syedhali / EZAudio

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
Other
4.94k stars 822 forks source link

iOS Generate Waveform for scrollview #62

Open castles opened 10 years ago

castles commented 10 years ago

Firstly.. awesome framework.

I want to generate a waveform zoomed in so that I only see 5 seconds of audio at one time. I want to then put it into a scrollview so that I can swipe through the waveform. Is this possible?

mmarkov-appolica commented 10 years ago

I'm interested in this feature too

castles commented 10 years ago

Hi, mmarkov. I managed to get it to work.. I ended up splitting the audio file into frames and creating images from each segment. It took a while to piece together and I don't think its pretty but it works.

syedhali commented 10 years ago

I'm not sure about the current version of EZAudio, but for the new version of EZAudio I'm going to keep this in mind as a feature on the default audio plots. New release will probably be sometime in October.

mnearents commented 9 years ago

Castles, would you mind sharing how you did it? How is the performance? When you say "it took a while to piece together" do you mean performance-wise it is slow? Or do you mean it took you a long time to figure out how to do it?

castles commented 9 years ago

Hi lususvir, It took a while for me to work it out. Performance wise its ok, It takes about 1 minute for 3 minutes of audio. This is fine as I'm caching the generated images and so its only happens once per song. I'll see if I can dig up the code.

Joni-Aaltonen commented 7 years ago

@castles were you ever able to find the code, I'd be interested too. @syedhali Was this ever added to EZAudio as a feature?

castles commented 7 years ago

Hi Joni-Aaltonen. I don't really have a working example but this might help: http://audiokit.io/playgrounds/Analysis/Tracking%20Frequency%20of%20Audio%20File/ have you seen this?

Joni-Aaltonen commented 7 years ago

Hi @castles - thanks for the example, however already seen that. AudioKit's plotter doesn't seem to do quite what I'm after.