PocketMatrix forums

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

Synthesize sound.

Are there any free libraries that allow sythesizing sounds? I'm starting my first pocketpc app that's music related and need a wide range of notes. I don't want separate wav files for each note, rather modulate from a base file. Does that make sense?

Thanks,
Brian
SmarterThanSam · 25 Mar 2003, 03:17 UTC
You know i searched long and hard for something like that about a year ago, but after about 6 hours straight of digging on the net, I had come up with nothing. I suppose the main reason for a lack of software like this is the fact that most, if not all, of the current PPC's lack any sort of MIDI hardware. I guess it would be possible to write a software only sythesizer but I'm sure sound quality would be lacking and it might suck up too much processor speed.

My solution:

I sat down with my mic and guitar and spent an hour recording each note and each basic chord and saved them all as separate .wav files. It was a pain but really the only way I could find to make the program I was trying to make. Of course, this was a year ago and i haven't done any hardcore searching since then, so maybe something popped up, but i doubt it.
Sad to hear. I got to the point last night where I was ready to start recording notes off my guitar too. What a daunting task. I was thinking I could plug right into the mic jack though. What was the resulting size of all the wave files? Thanks for the reply!
http://www.fmod.org

You don't have to have a sample per note at all - you can get away with one sample per octave very nicely for a lot of instruments. Of course, YMMV depending on what exactly you're trying to synthesize.
Daveman57 wrote:
I guess it would be possible to write a software only sythesizer but I'm sure sound quality would be lacking and it might suck up too much processor speed.


Don't think so - the GBA uses software synthesis methods and it only has a 16Mhz ARM chip.

A 205mhz machine shouldn't even blink really... maybe 5% cpu time for 44khz?
Yeah, the PocketPCs should have no problems with that. Some SoundTracker type programs, DigitalSymphony in particular, used software synthesis, IIRC. On my old RiscOS machine (200MHz StrongARM with a crappy 16MHz bus) you could play some 8-channel modules without introducing much extra latency into the system.
SmarterThanSam · 26 Mar 2003, 04:25 UTC
Well what's up with that? Why couldn't I find this before my I recorded all of that stuff. Oh well i guess i can use that stuff now.

As For zinger's question, not that he cares anymore after these discoveries...

the files were each about 5 kb i think , but i have since reformated my hd time and time agian, and replaced that PPC with a shiny new Dell Axim, so i really dont remember.
Just as an aside note, I was going to write a program / look at the posibility of using one of the new ipaq, with a mic plug as a real time effect synth for a gutair / mic... but I neva got as far as checking the audio specs (full duplex etc) :-)

-B
SmarterThanSam · 26 Mar 2003, 13:20 UTC
Hey you know I was looking through the SDK docs this morning for PPC 2002 and i saw some stuff on MIDI.

Know anything about that?
PPC doesn't have a MIDI synth built in, though I *believe* it supports MIDI, allowing you to use MIDI-compliant equipment on your PPC.

As for MIDI synths, there is one whose name slips me, and Timidity has a port.

Speaking of MIDI, I need to try hooking up my iPaq to my keyboard via a serial -> MIDI converter.. I think there are a couple of programs out there.

It's been a while since I looked at this, so correct me if I'm wrong.
I thought that gamefreak had MIDI working on gfDoom. I could be wildly mistaken, but I was almost sure of it.
I can say without a doubt that the PocketPC does not have any built in hardware or software synths.
SmarterThanSam · 26 Mar 2003, 22:11 UTC
Yes sponge you are correct about hardware but im not sure about the software.
Yes, I know that... but I just recalled someone making a player for MIDI files and that a version of Doom was able to play the music, which is in MIDI. Again, I could be way off, but my memory usually serves me well and I trust it enough to post under the chance of looking like a fool.
The easiest way is propably to use fmod, and if you are keen on using MIDI, get a program like MID2XM which will let you convert MIDI files to XM (Fasttracker) files. The only thing you need for that are the right samples, preferably a whole patch set of the 128 standard MIDI instrument set. There is an old sound card which was popular during the good ol' DOS days called the Gravis UltraSound (GUS) which was (I think) one of the first low-end wavetable synthesizer sound cards which featured dynamically loading wave files for the standard MIDI instruments. Try to find the standard GUS patch set on the net somewhere, you can use the .pat files with MID2XM. I tried this method of converting MIDI files to XM some years ago and remember that the overall result sounded great.
I don't remember music from ANY PPC port.

There are several MIDI players for the PPC, but there isn't a *built-in* synth. A couple of those players require Timidity patches.
Thanks for all the replies. SmarterThanSam I saw the midi definitions in mmsystem.h too. I also see wave pitch control, WAVECAPS_PITCH. Is this usable? Sorry I'm new to C++. There's two functions that look interesting.

MMRESULT WINAPI waveOutSetPitch(HWAVEOUT hwo, DWORD dwPitch);
MMRESULT WINAPI waveOutSetPlaybackRate(HWAVEOUT hwo, DWORD dwRate);
I don't think wave pitch would cut it. You'd need multiple samples anyway, like one for each octave, since samples can't be distorted too much before they end up sounding like total crap.
Gravis UltraSound (GUS)

I just wanted to gloat and say that I have a 512KB GUS MAX sitting in one of my machines at home. It may be old, but it's one serious sound-card :)

Looks nice too (there's on on UK ebay <a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item;=3015270844&category;=16164">here</a>).

Cheers,

Ref
(in a hardware-nostalgia/throwback phase).