Re: file format for sound
Re: file format for sound
- Subject: Re: file format for sound
- From: Jim McGowan <email@hidden>
- Date: Mon, 08 Aug 2011 21:52:59 +0100
The only format I know of that combines both audio & sequencing data is Interactive XMF (iXMF), but I don't think it is widely supported, and I've not seen any implementation on Apple platforms, but you can look into it here http://www.iasig.org/wg/ixwg/ IMHO it would be simpler to stick to MIDI for an iOS game. If you haven't already found it, there is sample code for playing MIDI sequences at https://developer.apple.com/library/mac/#samplecode/PlaySoftMIDI/Introduction/Intro.html and https://developer.apple.com/library/mac/#samplecode/PlaySequence/Introduction/Intro.html.
The reason I recommended the book is that there can be many factors determining the choice of approach for game audio, particularly on mobile platforms with limited resources. Having some knowledge of these before hand might make it clearer which approaches are best for your particular project and make your implementation process a bit simpler. As your original post seemed to indicate that you were unsure of what a MIDI file was, I thought this might be a useful path for you. Apologies if I underestimated your knowledge in this area.
As to why your longer MP3 files are not playing, I can't really offer any advice without further details of the problem. How is your graph setup are you getting any of the file playing or nothing at all, do you get any console messages, etc. Any details you can provide will help.
Jim
On 8 Aug, 2011, at 21:37 , Bob Sabiston wrote:
> I'm not sure I need to go buy a book to learn the answer to this fairly simple question, do I? After slogging through all the crap necessary to get synth sound and mixed channels w/ fx playback and music simultaneously on iOS, I don't really feel like such an absolute beginner. I just am confused as to why my mp3 playback does not work with longer files, and in addition I am wondering whether a 'pure' sound format exists, where you get the samples and their sequencing all bundled up in a file.
>
> Bob
>
>
> On Aug 8, 2011, at 3:26 PM, Jim McGowan wrote:
>
>> It sounds like you are just starting out with (game) audio, so I would recommend reading something like Audio Programming for Interactive Games by Martin D. Wilde. It covers things like MIDI vs Audio files and a few other basic concepts, so you should get a good idea of the advantages and disadvantages of each, and when it would be preferable to use one over the other.
>>
>> Jim
>>
>> On 8 Aug, 2011, at 20:05 , Bob Sabiston wrote:
>>>
>>> Hello,
>>>
>>> I am still starting with Core Audio. I was wondering if there is a file format I might use for my videogame, which encapsulates sampled sound with sequencing information to reproduce a song? I think that might be what a MIDI file does, though I am fuzzy on how samples play into it, are they/can they be included?
>>>
>>> Then, what tools can be used to make songs and save in that format?
>>>
>>> Alternatively it seems like much game sound is maybe done with aiff or mp3 if it is a longer sound, like an entire song? I have had some success with MP3 playback starting from that Mixer sample code, but those mp3's are only seven seconds long. I haven't gotten it to work with an entire 4MB song -- should I be able to do that using Audio Units on iphone? What is the best way of playing mp3 songs via Audio Units, if I have a whole Audio Graph and other sound effect channels etc?
>>>
>>> Thanks
>>> Bob
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden