How to copy waveform of audio file in ios? - ios

I m going to develop audio track editing app in ios.
I've created waveform of audio file already. And going to implement "copy" feature of selected waveform.
For this, I've get part data of NSData (audio file's) and draw waveform again with copied part data.
This formal way cant provide high speed to draw waveform for each actions (paste, delete).
So my questions is what is the best way to edit audio track ?
I will appreciate if anyone let me know similar open source link or blog link.
Thanks in advice

Related

Is there any way to detect and cut out the real video part from a full video

Not sure whether I can explain my question. I have a bunch of video material. Some of them are recorded videos from mobile phones. When people record the video on their phone, their produced video may contain more than just the recorded video I need. I need to detect and cut out the useless part. The useless part would be still while the part I need is changing and on the play.
I do not know whether there is any way for me to do it. I can write some code but I just do not know what libraries to use. Does it have something to do with OpenCV. Or is there a way to solve it with ffmpeg?
Hopefully someone can give me some ideas. Thanks a lot.

SoundCloud waveform generation mechanics and display

I am developing an app for iOS devices that is supposed to have a waveforms of music files like on SoundCloud. The problem is that I have achieved generation of waveform of fully downloaded file, how to generate a waveform of streaming audio during its playback? If someone's aware of how SoundCloud presents its waveforms please reply.
If we are talking about SoundCloud, for displaying an audio waveform, what I think is that they are -somehow- working with metadata for each specific audio to draw its desired waveform; Why it might be right? that's because the waveform will be drawn for each audio even before playing it (without waiting for streaming it). Applying the previous approach might be suitable solution for your issue.
However, I suggest to checkout this library, it might contains what are you looking for (drawing the waveform while streaming the audio file).
Also checking this Q&A might be helpful to your case.
Hope this helped.

Audio bars visualizer in iOS

I'm looking for a way to create a audio bars visualizer similar to this in iOS.
Every white bar will move up and down depending of audio wave. I'm really lost because haven't much experience dealing with audio in Objective-c.
EDIT: What i'm seeking is what Overcast's app does on its visualizer (the group of vertical orange bars on the lower part of the podcast's image)
Anyone can help?
Thanks
EDIT: Thanks to Tomer's answer I finally made it. First I did this tutorial in order to make it all clear. Then I created my own VisualizerView for my project, you can find it in this gist. Maybe is not perfect but it does what I needed to do.
Generally, you have a few options if you want to get an idea of what something sounds like in iOS:
Use the simple AVAudioPlayer audio player, and then use the [audioPlayer averagePowerForChannel:] method to get the avarage audio level for the current moment. Check out this tutorial.
Use the Audio Queue API, which lets you send whatever audio you want to the speaker: You would read audio from your source and fill the buffers with it every time. (If you're reading from a file, use AVAssetReader) This way you always know exactly what waveform you're playing, so you can, for example, calculate its avarage power or process it in other ways like FFT. Then you'd update the bars accordingly.
EDIT: The standard way of doing such a thing is to use the Fast Fourier Transform (FFT) - it extracts frequency information from a sound. Here's a good example of using it on iOS (Apple's guide here). But, of course, to use it you have to know exactly what waveform you're playing every time, so you'd probably want to use a lower-level API such as Audio Queue.

Can I use an image to be a poster frame for an audio clip on iOS?

I'm using AVMutableComposition and AVAssetExportSession to composite several discrete audio clips/files together into a single file, similarly to this post but there will be no "video" track. I'd like to give the track some visual appeal using a still image so that when the user plays the clip they don't just see a generic quicktime icon, ideally I'd replace the image with branding or something relevant to the audio content. How would I go about doing it and is there a way to do it without dramatically increasing file size(ie some way to have a really slow framerate or just something so its not generating 30 fps for what is non moving art.) Appreciate any help on this.
AVAssetWriter will allow you to create video from a still image. This question provides a great example of how to do so.

Create a Video Overlaying another Video

I am trying to make a nice pretty video.
I have a AVI video from a GOPro video camera, and I hae some info I want to overlay on top of the video. Like Time, GPS, Speed, G-Force etc.
I got my raw data, and ActionScript coded it up into a Flash movie, but then worked out I have two issues.
Flash export to AVI is pretty crap, and basically does a screen capture.
The export to AVI cant be transparent or anything but spare/rectangle.
So, can anyone suggest a better way? Should I use something other than Flash to create my speedometer, that is more friendly for overlaying on a AVI?
This is the sort of thing I am trying to create.
youtube.com/watch?v=tT-vDtQyCbo
I have a CSV of all my raw data, and am trying to find a way to overlay it and look as professional as that link above. I can make the dials in actionscript, but then exporting to AVI with a 'screen capture' type program, they look pretty crap. But on the other hand, inporting my HD video info Flash, and it becomes pretty crap quality, and still have the export issue at the end.
I'm not 100% clear on what you're trying to do.
If you mean that you want to put some info over a video using Flash, all you need to do is import your video onto the timeline on one layer and then place your information on a higher layer. If you want your video to play as a different shape, then you can simply apply a mask to the layer your video is sitting on.
If you throw in more directing information then I'll improve this answer for you :)

Resources