PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

newbie questions - audio programming

I'm a newbie in ppc programming and I'm planning to write a 2d game. I've two questions about audio programming, please help me to understand.

1. There are structures such as "WAVEFORMAT_MIDI" documented in ppc sdk, is it possible to play midi files using them together with waveOut family ?

2. I want the program to handle user inputs, character animations and sound effects while midi playing in the background, is it possible to do this with the MFC multithreaded programming ?

Thankyou
PPCs don't have midi support. Most developers use a 3rd party library (MikMod, FMod, Hekkus, etc), which play music modules (MOD, XM, etc). There's no real use in implementing a low level sound library yourself when free alternatives are out there (MikMod and Hekkus).

Dan East
Yeah and if you already have music in midi format that you want to use, I have seen some x86 programs that convert midi to wav. Search on google as I can't remember their names. Then you can take the wav file and convert it to whatever.
Yeah, except midi is usually music, which means that it would take up quite a bit of space as a WAV, or even mp3. (not to mention the proc usage of the latter)
If you really want to use MIDI, i.e. your music is already prepared and in MIDI format, there are a few programs out there that'll convert MIDI to XM format (MIDI2XM is one). You need decent (and compact) instrument samples, and the output is far from perfect. Once you have XM format, you can use a tracker program to downgrade it to MOD format as required.
Bear in mind that the capabilites of MIDI are wildly different from the capabilities of MOD, so automatic conversion should be considered only as a starting point: You'll need to polish the resultant MOD file by hand.
Although, interesting to note... I just noticed this on the microsoft site today: 'Windows Mobile 2003 for Pocket PC Phone Edition now supports playback of both Windows Media and MIDI ring tones.'

How is that possible? :)
But is more than one instrument actually supported?
Considering that no ppc phone edition devices are available yet, I have no clue.

But I imagine so... and I also imagine that they sound just as bad as the multiple-tone/midi ring tones sound on the current 'advanced phones' (e.g. moto T720, nokia 3650, samsung a530).

But we'll see :)