Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-23-2009, 02:25 PM   #2 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 2,575
Default

Quote:
Originally Posted by Nitrex88 View Post
I'm looking for a way to combine separate audio files in one audio file. The starting separate files i can have are WAV or CAF (doesnt matter to me) and I would like to stitch them together into one file such as MIDI or anything other file type thats possible. Does anyone know of any way to make an application that can do this or can anyone provide me with some advice on where to look?
Nick
Can you clarify what you'll be doing with the combined file? Do you need to combine these files ON THE IPHONE, in your iPhone app? Do you just need to play the combined sound, or do you need to save it?

You can not combine WAV or CAF files to create a MIDI file in any case - a MIDI file is a series of musical notes, similar to sheet music. It can't represent the full range of sounds the way that WAV, CAF, and MP3 can; they are made up of individual "samples" that indicate the height of the sound wave, sampled thousands of times a second. You can combine WAF and CAF files to make a new WAV, CAF, or MP3 file, though. A program like Audacity can do this for you on the desktop. Garageband may work too; I'm not too familiar with it.

If you just need to play two sounds at the same time, both system sounds and AVAudioPlayer will do that.

If you need to combine the files on the phone, you'll have to read the raw samples from the files, and average the samples together. There's probably also a way to play both sounds at once and record the result, but that seems like extra work.

(*Technically you can combine MP3 files too, but it's better to start with a WAV of CAF - every time you convert to MP3, you lose more quality.)
__________________

Last edited by smasher; 06-23-2009 at 03:31 PM.
smasher is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 254
17 members and 237 guests
Ajameel, alexy, axeman, dany88, funkyspider, harrytheshark, LemonMeringue, MiniRobinho, minnepe, myPhone, nibby, Nuncha, robertyang999, SirGeraint, southfreo, stanny, teras
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,282
Threads: 39,074
Posts: 171,346
Top Poster: smasher (2,575)
Welcome to our newest member, FANFAN
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:53 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.