rendering a waveform on an iphone
Asked Answered
P

3

16

I was wondering if anyone has any suggestions on how to go about rendering a waveform of an audio file. I wold like to enable the user to set an in and out point of an audio track and I need to have a waveform so you can see where to put the points.

Are there any libraries available for this or does it need to be a completely custom solution?

Is it even called a waveform ? Maybe there's a better word for it so I can do some more searching.

TIA !

Plumbago answered 22/5, 2009 at 2:53 Comment(0)
M
11

I'm reposting my answer from this question, since it applies here as well:

When displaying an audio waveform, you will want to do some sort of data reduction on the original data, because there is usually more data available in an audio file than pixels on the screen. Most audio editors build a separate file (called a peak file or overview file) which stores a subset of the audio data (usually the peaks and valleys of a waveform) for use at different zoom levels. Then as you zoom in past a certain point you start referencing the raw audio data itself.

Here are some good articles on this:

Waveform Display

As far as source code goes, I would recommend looking through the Audacity source code. Audacity's waveform display is pretty good and mostly likely does a similar sort of data reduction when rendering the waveforms.

Moriyama answered 22/5, 2009 at 3:19 Comment(0)
G
2

CorePlot is the library you are looking for. It is hosted on Google code.

See this related SO question.

Galan answered 22/5, 2009 at 6:25 Comment(0)
S
1

I realise this is an old post, however i searched for this recently, and decided to roll my own solution based on a few snippets i located on SO and a few other sites.

See my answer to This question

Stouffer answered 12/9, 2011 at 20:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.