"Generate" sounds and load them with bass ?
Here my function from BBS (Signature). You can translate it to bmax.
Function BASS_CreateBeep%(art% = 1 ,hz% = 900,time% = 100 ,freq# = 44100 , chans% = 1, max% = 1, flags% = 0, onlynew% = 0)
Local q%, y%, yy% , stemp%, length%, tbank%, hfinal%, hchannel%
length = (((freq*chans)*time) / 1000)*2
stemp = BASS_SampleCreate(length,freq,chans,max,flags)
tbank = CreateBank (length*2)
For q = 0 To (length-1)
;this 4 are for 44100/mono/16bit (default values)
If art=1 y=Sin(q/freq*360*hz)*32767
If art=2 yy=yy+Rand(hz/8,hz*3):y=Sin(yy/freq*360)*16384
If art=3 yy=yy+Rand(1000.0*hz/(q+1),1000.0*hz/(q+1)*10):y=Sin(yy/freq*360)*16384
If art=4 y=y+hz*1.45:If y>32767 y=-32767
;feel free to add your own stuff. :)
PokeShort tbank, q*2, y
Next
BASS_RtlMoveMemory2(stemp, tbank, length)
FreeBank tbank
hfinal = BASS_SampleCreateDone()
hchannel = BASS_SampleGetChannel (hfinal, onlynew)
Return hchannel
End Function
A demo for this (b3d/b+) is included in BBS.
cu