###################################################### # # # BINAURAL BEAT GENERATOR: # # # # written by: DANA M. NIBBY # # # # This software is shareware. It may be freely # # distributed as long as money is not charged for # # it. If you have any modifications to this code, # # Please send it to: D_NIBBY@UNHH.UNH.EDU # # Thanks... (S)HAREWARE 1991 # # # ###################################################### main: a$ = "":cls print spc(25) "** Binaural Beat Generator **" print:print:print print spc(22) "(1) Play individual binaural beat" print spc(22) "(2) Create a binaural beat program" print spc(22) "(3) PLAY program" print spc(22) "(4) LOAD program" print spc(22) "(5) SAVE program" input a$ if a$ = "1" then individual if a$ = "2" then create if a$ = "3" then player if a$ = "4" then prgld if a$ = "5" then prgsv individual: cls:print"surface frequency ..";:input sf print "binaural frequency ..";:input bf print "volume (0-255) ..";:input vol print:print:print "NOW PLAYING A ";bf;" HZ BBEAT" print:print "HIT ANY KEY TO END" indibeat: sound sf,50,vol,0: sound sf+bf,50,vol,1 a$ = inkey$: if a$ = "" then indibeat goto main create: print"name of program..";: input appel$ print"how many segments..";: input seg for x = 1 to seg print "segment #";x:print print"surface frequency..";: input sf(x) print"binaural frequency..";: input bf(x) print"duration (in seconds)..";: input dura(x) next x: goto main player: print"NOW PLAYING PROGRAM: ";appel$ for x = 1 to seg print:print"Segment #";x print"Surface frequency :";sf(x) print"Binaural frequency :";bf(x) dura(x) = dura(x) + TIMER TIMER on ploop: sound sf(x),50,255,0 sound sf(x) + bf(x),50,255,1 if TIMER > dura (x) then FINAL goto ploop final: TIMER off:next x: goto main prgsv: appel$ = appel$ + ".bbeat" open appel$ FOR OUTPUT AS #1 write #1,seg for x = 1 to seg write #1, sf(x), bf(x), dura(x) next x: close #1: goto main prgld: print "program name..";: input appel$ appel$ = appel$ + ".bbeat" open "I" , #1, appel$ input #1, seg for x = 1 to seg input #1, sf(x), bf(x), dura(x) next x: close #1: goto main