Page 1 of 1

#PB_Sound_Multichannel

Posted: Wed Oct 29, 2008 7:58 am
by noot
This might be something really simple, but I just can't figure it out...

I'm trying to do a little program that plays soundfiles using MIDI input, and polyphonically (using #PB_Sound_Multichannel). The problem is, when a midi note message comes in, I have something like

Code: Select all

channel = PlaySound (0, #PB_Sound_Multichannel)
SoundVolume (0, velocity, channel)
SoundFrequency (0, note, channel)
- but the PlaySound will cause the sound to start playing at default frequency and volume, before the parameters are set correctly. Is there any way to predict what the next channel will be BEFORE calling PlaySound? I tried to figure it out using the resulting channel data, but it gives weird numbers like 9707160 and 9707352 - what are these?