{"id":17201594,"url":"https://github.com/kyome22/audiovisualizerkit","last_synced_at":"2025-04-13T19:31:52.014Z","repository":{"id":245605998,"uuid":"818562128","full_name":"Kyome22/AudioVisualizerKit","owner":"Kyome22","description":"Provides the computational assistance for drawing the audio visualizer.","archived":false,"fork":false,"pushed_at":"2024-08-24T08:55:10.000Z","size":1414,"stargazers_count":24,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T10:21:23.142Z","etag":null,"topics":["audio-visualizer","fft","swift","swift-package-manager"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kyome22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-22T07:17:48.000Z","updated_at":"2025-03-24T16:38:20.000Z","dependencies_parsed_at":"2024-08-24T09:49:35.124Z","dependency_job_id":"efdf1a94-3d1b-4ae8-b796-7d4780adc1e8","html_url":"https://github.com/Kyome22/AudioVisualizerKit","commit_stats":null,"previous_names":["kyome22/audiovisualizerkit"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyome22%2FAudioVisualizerKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyome22%2FAudioVisualizerKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyome22%2FAudioVisualizerKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyome22%2FAudioVisualizerKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kyome22","download_url":"https://codeload.github.com/Kyome22/AudioVisualizerKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248767957,"owners_count":21158563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-visualizer","fft","swift","swift-package-manager"],"created_at":"2024-10-15T02:12:14.665Z","updated_at":"2025-04-13T19:31:50.869Z","avatar_url":"https://github.com/Kyome22.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AudioVisualizerKit\n\nProvides the computational assistance for drawing the audio visualizer.\n\n\u003cimg src=\"Screenshots/audio_visualizer.gif\" height=\"220px\" /\u003e\n\n## Requirements\n\n- Development with Xcode 15.4+\n- Written in Swift 5.10\n- Compatible with iOS 17.0+, macOS 14.0+\n\n## Privacy Manifest\n\nThis library does not collect or track user information, so it does not include a PrivacyInfo.xcprivacy file.\n\n## Installation\n\nAudioVisualizerKit is available through [Swift Package Manager](https://github.com/apple/swift-package-manager/).\n\n**Xcode**\n\n1. File \u003e Add Package Dependencies…\n2. Search `https://github.com/Kyome22/AudioVisualizerKit.git`.\n3. Add package and link `AudioVisualizerKit` to your application target.\n\n**CLI**\n\n1. Create `Package.swift` that describes dependencies.\n\n   ```swift\n   // swift-tools-version: 5.10\n   import PackageDescription\n\n   let package = Package(\n       name: \"SomeProduct\",\n       products: [\n           .library(name: \"SomeProduct\", targets: [\"SomeProduct\"])\n       ],\n       dependencies: [\n           .package(url: \"https://github.com/Kyome22/AudioVisualizerKit.git\", exact: \"1.0.0\")\n       ],\n       targets: [\n           .target(\n               name: \"SomeProduct\",\n               dependencies: [\n                   .product(name: \"AudioVisualizerKit\", package: \"AudioVisualizerKit\")\n               ]\n           )\n       ]\n   )\n   ```\n\n2. Run the following command in Terminal.\n\n## Usage\n\n1. Get the URL of the music file.\n2. Use `AudioAnalyzer` to play music and get magnitudes and RMS.\n   - You can specify the FFT size.\n   - You can specify a window function (hann or hamming or blackman).\n3. Use `AmplitudeSpectrumView` to draw the audio visualizer.\n   - You can select the shape type (straight or ring). \n   - You can specify the drawing range.\n   - Pass RMS to enable color linked to sound intensity.\n\n```swift\nimport AudioVisualizerKit\nimport SwiftUI\n\nstruct ContentView: View {\n    let audioAnalyzer = AudioAnalyzer(fftSize: 2048, windowType: .hannWindow)\n\n    var body: some View {\n        AmplitudeSpectrumView(\n            shapeType: .straight,\n            magnitudes: audioAnalyzer.magnitudes,\n            range: 0 ..\u003c 128,\n            rms: audioAnalyzer.rms\n        )\n        .padding()\n        .onAppear {\n            let url = Bundle.main.url(forResource: \"example\", withExtension: \"mp3\")!\n            try? audioAnalyzer.prepare(url: url)\n            try? audioAnalyzer.play()\n        }\n        .onDisappear {\n            audioAnalyzer.stop()\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyome22%2Faudiovisualizerkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyome22%2Faudiovisualizerkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyome22%2Faudiovisualizerkit/lists"}