 |
 |
|
 |
06-23-2009, 02:57 PM
|
#1 (permalink)
|
|
New Member
Join Date: Apr 2008
Location: Long Island, NY
Age: 19
Posts: 84
|
Combining Audio Files...Possible?
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
|
|
|
06-23-2009, 03:25 PM
|
#2 (permalink)
|
|
Senior Member
iPhone Dev SDK Supporter
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 2,449
|
Quote:
Originally Posted by Nitrex88
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 04:31 PM.
|
|
|
06-23-2009, 08:17 PM
|
#3 (permalink)
|
|
New Member
Join Date: Apr 2008
Location: Long Island, NY
Age: 19
Posts: 84
|
Quote:
Originally Posted by smasher
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.)
|
No i'm not looking to use an already available program to combine sounds. I have a music app with tons of wav files representing each sound. I want to programatically be able to stitch them into one file that will be a "song" put together. I may have found a way to do it with the help of someone in the iPhone Dev section of the forums. If you have any suggestions and code please share. Thank you very much!
Nick
|
|
|
07-17-2009, 02:43 AM
|
#4 (permalink)
|
|
New Member
Join Date: Jul 2009
Posts: 1
|
Cool Audio Editor is a powerful audio editing software that enables you to combine, create, edit, filter, apply effects, and convert audio files.
|
|
|
07-17-2009, 03:15 AM
|
#5 (permalink)
|
|
Registered Member
Join Date: Apr 2009
Posts: 214
|
He wants to do it on the iPhone.
|
|
|
07-20-2009, 07:43 AM
|
#6 (permalink)
|
|
Registered Member
Join Date: Nov 2008
Posts: 260
|
Quote:
Originally Posted by Nitrex88
No i'm not looking to use an already available program to combine sounds. I have a music app with tons of wav files representing each sound. I want to programatically be able to stitch them into one file that will be a "song" put together. I may have found a way to do it with the help of someone in the iPhone Dev section of the forums. If you have any suggestions and code please share. Thank you very much!
Nick
|
A "mix" of any group of files is simply the sum of each individual sample combined into a single sample. Some problems arise though depending on the number of channels you want to mix in because of the limited amplitude range in digital audio.
Take a look at this : Viktor's Home Page: Mixing Digital Audio
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 448 |
| 50 members and 398 guests |
| !_UK@$, acerola, aryaxt, bbc z, BrianSlick, Chris Stewart, CoxTral, cphilc, CunningCat, dany88, darage, dcinqc, DenVog, endy13, falcon76, ggalante, gjosef, Gudus, iPhoneDevelopment, JHawk1, jingledale, joelm, josep@sixtemia.com, Kroupy, Kryckter, kyeck, lanej, lukeca, LunarMoon, mlfarrell, mlo, nDev1, NicolasD, nobre84, NSeven, PeddlePower, pereorra, ryguy2503, scribouillard, sennah, shay_somech, sjurmr, smasher, StevenD, TapTouchClick, thewitt, treazer, VanCrey, ZunePod |
| Most users ever online was 779, 05-11-2009 at 10:55 AM. |
» Stats |
Members: 21,500
Threads: 35,780
Posts: 156,758
Top Poster: smasher (2,449)
|
| Welcome to our newest member, VanCrey |
|