%let pc=1.25; %macro df3(note,octave,length); select(¬e.); when('A') call sound(55*(2**&octave.),&length.*160*&pc.); when('A#') call sound(58*(2**&octave.),&length.*160*&pc.); when('Bb') call sound(58*(2**&octave.),&length.*160*&pc.); when('B') call sound(62*(2**&octave.),&length.*160*&pc.); when('C') call sound(65*(2**&octave.),&length.*160*&pc.); when('C#') call sound(69*(2**&octave.),&length.*160*&pc.); when('Db') call sound(69*(2**&octave.),&length.*160*&pc.); when('D') call sound(73.5*(2**&octave.),&length.*160*&pc.); when('D#') call sound(73.5*(2**&octave.),&length.*160*&pc.); when('Eb') call sound(78*(2**&octave.),&length.*160*&pc.); when('E') call sound(82*(2**&octave.),&length.*160*&pc.); when('F') call sound(87*(2**&octave.),&length.*160*&pc.); when('F#') call sound(92.5*(2**&octave.),&length.*160*&pc.); when('Gb') call sound(92.5*(2**&octave.),&length.*160*&pc.); when('G') call sound(98*(2**&octave.),&length.*160*&pc.); when('G#') call sound(104*(2**&octave.),&length.*160*&pc.); when('Ab') call sound(104*(2**&octave.),&length.*160*&pc.); when('R') call sleep((&length./3)*&pc.,1); otherwise; end; %mend; /* DEEP PURPLE : SMOKE ON THE WATER */ data _null_; do i=1 to 4; %df3('E',2,1.5); %df3('G',2,1.5); %df3('A',3,2.5); %df3('E',2,1.5); %df3('G',2,1.5); %df3('A#',3,0.75); %df3('A',3,3); %df3('E',2,1.5); %df3('G',2,1.5); %df3('A',3,2.6); %df3('G',2,1.5); %df3('E',2,4); end; run;