FDWaveformView | Reads an audio file and displays the waveform | Audio Utils library
kandi X-RAY | FDWaveformView Summary
kandi X-RAY | FDWaveformView Summary
FDWaveformView 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.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FDWaveformView
FDWaveformView Key Features
FDWaveformView Examples and Code Snippets
Community Discussions
Trending Discussions on FDWaveformView
QUESTION
Here is what I am trying to do:
The screenshot is taken from a 6s iPhone.
I have been working in AVAudioPlayer and I would like to draw a waveform which looks look like the first screenshot. I am using FDWAVEFORMVIEW Github pods to draw waves. but I m confused how to draw same waves.
Code:
...ANSWER
Answered 2019-Dec-30 at 21:29Ah, waveform drawing... From the looks of it, you're probably going to need to fork this and make your changes, because the FDWaveformRenderOperation
doesn't support this style.
It looks like you can modify the plotWaveformGraph
method in FDWaveformRenderOperation
to achieve this. Currently, it iterates over every sample in the buffer, but if instead, you maintain an index
that's incremented every nth sample (the bar "width") plus the bar "spacing," you can get this appearance. This is a naive approach, to be clear. Ideally, you'd average the samples in a "bar" and draw that value.
This is NOT compiling code, but should give you a place to start.
QUESTION
I am currently using FDWaveFormView to great success to display waveforms representing audio I record from AKMicrophone
or AKAudioFile
.
I am successfully able to highlight specific regions in the waveform and FDwaveForm
gives back a range of the samples from the audiofile.
My problem now is I cannot find an appropriate method in AKPlayer
that would let me play from a start sample to an end sample.
I noticed that AKSamplePlayer
is now deprecated, but it did have a method:play(from: Sample, to: Sample)
My guess is that I would be able to do some math to translate Sample position to time (as a Double
as prescribed in AKPlayer
), however I have not found the appropriate math or functions to do this, any hints?
To be very explicit in what I am trying to do, please refer to the image below:
note for any AudioKit core members who may see this question, I know there are a variety of AudioKitUI components that may of made this easier, however only FDWaveFormView
has given me the functionality I need for this particular app, i'm happy to discuss further offline, thanks again so much.
EDIT
I've come up with some code that I believe has solved it:
...ANSWER
Answered 2018-Sep-11 at 20:05I found the solution, essentially RTFM on DSP 101 and samples :
QUESTION
I'm writing an iOS application and integrated FDWaveformView 2.0.0 via CocoaPods. Sometimes UIGraphicsGetCurrentContext() returns nil and I get the "FDWaveformView failed to get graphics context" log message.
...ANSWER
Answered 2017-Apr-25 at 10:57I solved the issue by updating to 2.1.0
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FDWaveformView
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page