Page 1 of 1

Simple utility to test the sound of the drum instruments

Posted: Fri Oct 30, 2015 11:13 am
by Henko

Code: Select all

graphics ! graphics clear ! draw color 0,0,1
dim drum$(50),not_all$(12),drum_not$(47)
for i=0 to 46 ! read drum$(i) ! next i
for i=0 to 11 ! read not_all$(i) ! next i
k=0 ! i=-1 ! oct=2 ! drum_not$(0)="b1"
do ! k+=1 ! i+=1 ! drum_not$(k)=not_all$(i)&oct
  if i=11 then ! i=-1 ! oct+=1 ! end if
  until k=46
c_list("ins","     Drums",drum$,46,50,20,250,405)
go_on:
k=list_selected("ins") ! if k=-1 then go_on
list "ins" select -1
a$="Q"&drum_not$(k) ! for i=1 to 5 ! a$&=drum_not$(k) ! next i
notes set ,,,,,,,,,a$ ! notes play
wait: if notes_time()<notes_length() then wait else go_on
end

def c_list(id$,title$,cont$(),size,xt,yt,xb,yb)
dim temp$(size+1)
for i=0 to size ! temp$(i)=cont$(i) ! next i
list id$ text temp$ at xt+2,yt+32 size xb-xt-4,yb-yt-34
draw size 3
draw rect xt,yt to xb,yb ! draw line xt,yt+30 to xb,yt+30
fill rect xt+2,yt+2 to xb-2,yt+28
draw color 0,0,1 ! draw text title$ at xt+5,yt+5 
draw color 0,0,0
end def

data "Bass Drum","Kick Drum","Snare Cross Stick","Snare Drum","Hand Clap"
data "Electric Snare Drum","Floor Tom 2","Hi-Hat Closed","Floor Tom 1"
data "Hi-Hat Foot","Low Tom","Hi-Hat Open","Low-Mid Tom","High-Mid Tom"
data "Crash Cymbal","High Tom","Ride Cymbal","China Cymbal","Ride Bell"
data "Tambourine","Splash cymbal","Cowbell","Crash Cymbal 2","Vibraslap"
data "Ride Cymbal 2","High Bongo","Low Bongo","Conga Dead Stroke","Conga"
data "Tumba","High Timbale","Low Timbale","High Agogo","Low Agogo","Cabasa"
data "Maracas","Whistle Short","Whistle Long","Guiro Short","Guiro Long"
data "Claves","High Woodblock","Low Woodblock","Cuica High","Cuica Low"
data "Triangle Mute","Triangle Open"
data "c","c#","d","d#","e","f","f#","g","g#","a","a#","b"