'$DYNAMIC 'current library; DIRESTUF.QLB DEFINT A-Z DECLARE SUB setitup (fil$, buff(), BYVAL p) DECLARE SUB resetdsp DECLARE SUB playsnd (BYVAL n, BYVAL f) DECLARE SUB savesnd (voc$, BYVAL w) DECLARE SUB closefile DECLARE SUB setwait (b(), BYVAL t) CLS DIM voc(16383) maxv = (6 * 4) + 2 resetdsp setitup "noise.cbv" + CHR$(0), voc(), 2 FOR i = 1 TO maxv READ a$ f$ = a$ + ".voc" + CHR$(0) savesnd f$, i NEXT i FOR i = 1 TO maxv t# = TIMER playsnd i, -90.8858 PRINT i w$ = INPUT$(1) PRINT " "; TIMER - t# NEXT i closefile DATA 1,2,3,4,5,6,11,12,13,14,15,16,21,22,23,24,25,26,31,32,33,34,35,36,win,intro ' -NOTE: individual voice files must be less than 32K ' RESETDSP ' -execute once at the beginnung of your program. ' SETITUP file$ + CHR$(0), buffer(), 2 ' -loads the information for a set of voices. file$ is the file ' the voices are saved to. the +chr$(0) is nesisary. buffer is ' dimentioned for the size of the voice file. 2 is the sound ' channel or some such rot. it is virtualy always two. ' SAVESND voc$ + CHR$(0), offset ' -saves the voice file you use in SETITUP. file$ is the filename ' you are saving to. the +chr$(0) is nesisary. offset is the number ' of the voice in the file. this number must always be 0 the first ' time you execute it in a program, and it must increase ' sequentialy in each subsequent use in the same program. ' PLAYSND samplenumber, frequency ' -plays the specified voice at the specified speed. samplenumber ' is the number of the voice. frequency is the speed to play ' the voice ((256-1000000)/sampling rate). ' CLOSEFILE ' -execute closefile once at the end of your program.