{"id":1427,"url":"https://github.com/fulldecent/FDWaveformView","last_synced_at":"2025-08-06T13:31:53.057Z","repository":{"id":11292729,"uuid":"13705438","full_name":"fulldecent/FDWaveformView","owner":"fulldecent","description":"Reads an audio file and displays the waveform","archived":false,"fork":false,"pushed_at":"2024-03-28T03:10:17.000Z","size":4663,"stargazers_count":1256,"open_issues_count":14,"forks_count":171,"subscribers_count":45,"default_branch":"main","last_synced_at":"2024-12-06T15:04:28.023Z","etag":null,"topics":["audio","cocoapod","ios","multimedia","swift","visualization","waveform"],"latest_commit_sha":null,"homepage":null,"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/fulldecent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["fulldecent"],"custom":["https://www.paypal.me/fulldecent","https://amazon.com/hz/wishlist/ls/EE78A23EEGQB"]}},"created_at":"2013-10-19T17:32:43.000Z","updated_at":"2024-12-04T06:50:41.000Z","dependencies_parsed_at":"2024-06-11T21:41:23.089Z","dependency_job_id":"e3e159ea-6454-4f14-9ee3-ff579b0337f8","html_url":"https://github.com/fulldecent/FDWaveformView","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDWaveformView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDWaveformView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDWaveformView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2FFDWaveformView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulldecent","download_url":"https://codeload.github.com/fulldecent/FDWaveformView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905436,"owners_count":17989764,"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","cocoapod","ios","multimedia","swift","visualization","waveform"],"created_at":"2024-01-05T20:15:46.215Z","updated_at":"2024-12-09T14:30:39.542Z","avatar_url":"https://github.com/fulldecent.png","language":"Swift","funding_links":["https://github.com/sponsors/fulldecent","https://www.paypal.me/fulldecent","https://amazon.com/hz/wishlist/ls/EE78A23EEGQB"],"categories":["Media","Libs","Swift","UI Components","Audio [🔝](#readme)"],"sub_categories":["Audio"],"readme":"# FDWaveformView\n\nFDWaveformView is an easy way to display an audio waveform in your app. It is a nice visualization to show a playing audio file or to select a position in a file.\n\n**:hatching_chick: Virtual tip jar: https://amazon.com/hz/wishlist/ls/EE78A23EEGQB**\n\nUsage\n-----\n\nTo use it, add an `FDWaveformView` using Interface Builder or programmatically and then just load your audio as per this example. Note: if your audio file does not have file extension, see \u003ca href=\"https://stackoverflow.com/questions/9290972/is-it-possible-to-make-avurlasset-work-without-a-file-extension\"\u003ethis SO question\u003c/a\u003e.\n\n```swift\nlet thisBundle = Bundle(for: type(of: self))\nlet url = thisBundle.url(forResource: \"Submarine\", withExtension: \"aiff\")\nself.waveform.audioURL = url\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/5N7ozog.png\" width=250\u003e\n\u003c/p\u003e\n\nFeatures\n--------\n\n**Set play progress** to highlight part of the waveform:\n\n```swift\nself.waveform.progressSamples = self.waveform.totalSamples / 2\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/fRrHiRP.png\" width=250\u003e\n\u003c/p\u003e\n\n**Zoom in** to show only part of the waveform, of course, zooming in will smoothly re-render to show progressively more detail:\n\n```swift\nself.waveform.zoomStartSamples = 0\nself.waveform.zoomEndSamples = self.waveform.totalSamples / 4\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/JQOKQ3o.png\" width=250\u003e\n\u003c/p\u003e\n\n**Enable gestures** for zooming in, panning around or scrubbing:\n\n```swift\nself.waveform.doesAllowScrubbing = true\nself.waveform.doesAllowStretch = true\nself.waveform.doesAllowScroll = true\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/8oR7cpq.gif\" width=250 loop=infinite\u003e\n\u003c/p\u003e\n\n**Supports animation** for changing properties:\n\n```swift\nUIView.animate(withDuration: 0.3) {\n    let randomNumber = arc4random() % self.waveform.totalSamples\n    self.waveform.progressSamples = randomNumber\n}\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/EgxXaCY.gif\" width=250 loop=infinite\u003e\n\u003c/p\u003e\n\n\nCreates **antialiased waveforms** by drawing more pixels than are seen on screen. Also, if you resize me (autolayout) I will render more detail if necessary to avoid pixelation.\n\nSupports **iOS12+** and Swift 5.\n\n**Includes unit tests**, todo: run these on GitHub Actions\n\n## Installation\n\nAdd this to your project using Swift Package Manager. In Xcode that is simply: File \u003e Swift Packages \u003e Add Package Dependency... and you're done. Alternative installations options are shown below for legacy projects.\n\n## Contributing\n\n* This project's layout is based on https://github.com/fulldecent/swift5-module-template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2FFDWaveformView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulldecent%2FFDWaveformView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2FFDWaveformView/lists"}