sounds in code ?

BlitzMax Forums/BlitzMax Programming/sounds in code ?

If Pitch=0 Then Sound_handle2=PlaySound(Sound_000)
If Pitch=1 Then Sound_handle2=PlaySound(Sound_001)
If Pitch=2 Then Sound_handle2=PlaySound(Sound_002)
If Pitch=3 Then Sound_handle2=PlaySound(Sound_003)

SetChannelVolume(Sound_handle,Your_Volume_variable)

OK so you are going to need some elaborate coding to make it happen, I had to repeat tonnes of instructions becuase loops would not work for this when creating the samples maybe someelse could shed some light on this?

Here is a link to my working program complete with spacey's sounds from the 80's

http://software.wizz.googlepages.com/Emulator2001_t.exe

how many tones do you want 128 or 256 maybe, I can help

You wont have files on your drive with samples.

A noise channel:
Global sampleb:TAudioSample=CreateAudioSample( 22232,fr,SF_MONO8 )
For k=0 Until 22232
If T=0 Then f=Rand(0,255)
T:+1
If T=8 Then T=0
sampleb.samples[k]=f
Next
Global soundb:TSound=LoadSound( sampleb,True )
Sound_handleb=CueSound(soundb)
SetChannelVolume(Sound_handleb,0)
noise_cued=1