Epoch
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Keywords

Latest topics
» SAS Macro: Convert numbers (e.g., 1000) to names (e.g., One thousand)
Making Music in SAS:Did you know you could have SAS play music? EmptyMon Jun 10, 2013 2:57 pm by Admin

» SAS Enterprise Guide: Explore Data before you start Analysing
Making Music in SAS:Did you know you could have SAS play music? EmptyMon Jun 10, 2013 2:53 pm by Admin

» Predictive Analytics
Making Music in SAS:Did you know you could have SAS play music? EmptyFri May 31, 2013 3:30 pm by Admin

» Creating Frequency Report and Creating User Defined styles in SAS Add-In for Microsoft Office
Making Music in SAS:Did you know you could have SAS play music? EmptyTue Oct 23, 2012 2:11 pm by pallav

» Prompted Reports in BI Dashboard
Making Music in SAS:Did you know you could have SAS play music? EmptyThu Oct 11, 2012 4:54 pm by kushal

» Free SAS Webinar : Getting Started with SAS Hash Object
Making Music in SAS:Did you know you could have SAS play music? EmptyWed Oct 10, 2012 6:08 pm by pallav

» Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?
Making Music in SAS:Did you know you could have SAS play music? EmptyTue Oct 02, 2012 12:47 am by rajin_kumar@yahoo.com

» What is written to SAS Log?
Making Music in SAS:Did you know you could have SAS play music? EmptyTue Oct 02, 2012 12:39 am by rajin_kumar@yahoo.com

» SAS Portal and BI Dashboard: Customizing the Tabs
Making Music in SAS:Did you know you could have SAS play music? EmptyTue Oct 02, 2012 12:33 am by kushal

Affiliates
free forum


Making Music in SAS:Did you know you could have SAS play music?

Go down

Making Music in SAS:Did you know you could have SAS play music? Empty Making Music in SAS:Did you know you could have SAS play music?

Post  pallav Fri May 18, 2012 5:44 pm

Copy and paste this programm in SAS, submit and listen to song....Smile

%let pc=1.25;
%macro df3(note,octave,length);
select(&note.);
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;
/* SAMPLE */
/* Old MacDonald Had a Farm */
data _null_;
do i=1 to 2;
%df3('C',3,1);
%df3('C',3,1);
%df3('C',3,1);
%df3('G',2,1);
%df3('A',3,1);
%df3('A',3,1);
%df3('G',2,2);
%df3('E',3,1);
%df3('E',3,1);
%df3('D',3,1);
%df3('D',3,1);
%df3('C',3,2);
if i=1 then do;
%df3('R',1,2);
%df3('G',2,2);
end;
end;
%df3('G',2,.5);
%df3('G',2,.5);
%df3('C',3,1);
%df3('C',3,1);
%df3('C',3,1);
%df3('G',2,.5);
%df3('G',2,.5);
%df3('C',3,1);
%df3('C',3,1);
%df3('C',3,2);
%df3('C',3,.5);
%df3('C',3,.5);
%df3('C',3,1);
%df3('C',3,.5);
%df3('C',3,.5);
%df3('C',3,1);
%df3('C',3,.5);
%df3('C',3,.5);
%df3('C',3,.5);
%df3('C',3,.5);
%df3('C',3,1);
%df3('C',3,1);
%df3('C',3,1);
%df3('C',3,1);
%df3('C',3,1);
%df3('G',2,1);
%df3('A',3,1);
%df3('A',3,1);
%df3('G',2,2);
%df3('E',3,1);
%df3('E',3,1);
%df3('D',3,1);
%df3('D',3,1);
%df3('C',3,3);
run;

pallav

Posts : 98
Join date : 2012-03-14
Location : Ahmedabad

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum