Line 1: | Line 1: | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>%<br>% Programmer and Purdue Email Address:<br>% 1.Alberto Peralta aperalta@purdue.edu<br>%<br>% Homework #:01<br>%<br>% <br>%<br>% <br>%<br>% Program Description:This program will attempt to play Smoke in the water in its<br>% original speed, then tw0 times faster and then with an octave higher,<br>% lasting half the time<br>% <br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/<br>tempo=(60/112);<br>Sol=(2^(-2/12))*440;<br>Sib=(2^(1/12))*440;<br>Do=(2^(3/12))*440;<br>Reb=(2^(4/12))*440;<br>deltat = .00005;<br>negra=0:deltat:1*tempo;<br>puntillo=0:deltat:1.5*tempo;<br>corchea=0:deltat:.5*tempo; <br>blanca=0:deltat:2*tempo; <br>silencio= 0:deltat:2.5*tempo; <br><br>SolN= sin(2*pi*Sol*negra);<br>SiN= sin(2*pi*Sib*negra); <br>DoP= sin(2*pi*Do*puntillo); <br>DoB= sin(2*pi*Do*blanca);<br>ReC= sin(2*pi*Reb*corchea); <br>silencioP= sin(silencio);<br><br>Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];<br><br>sound(Smoke, 1/delta);<br>wavwrite(Smoke,1/delta,32, 'Normal Speed')<br><br><br>tempo=(60/112)/2;<br><br>negra=0:deltat:1*tempo;<br>puntillo=0:deltat:1.5*tempo;<br>corchea=0:deltat:.5*tempo; <br>blanca=0:deltat:2*tempo; <br>silencio= 0:deltat:2.5*tempo; <br><br>SolN= sin(2*pi*Sol*negra);<br>SiN= sin(2*pi*Sib*negra); <br>DoP= sin(2*pi*Do*puntillo); <br>DoB= sin(2*pi*Do*blanca);<br>ReC= sin(2*pi*Reb*corchea); <br>silencioP= sin(silencio);<br><br>Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];<br><br>sound(Smoke, 1/delta);<br>wavwrite(Smoke,1/delta,32, 'Faster Speed')<br><br><br><br>SolN= sin(4*pi*Sol*negra);<br>SiN= sin(4*pi*Sib*negra); <br>DoP= sin(4*pi*Do*puntillo); <br>DoB= sin(4*pi*Do*blanca);<br>ReC= sin(4*pi*Reb*corchea); <br>silencioP= sin(silencio);<br><br>Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];<br><br>sound(Smoke, 1/delta);<br>wavwrite(Smoke,1/delta,32, 'x(2t) ')<br><br>Y= wavread('Beatles'); <br>F = flipud(Y);<br>sound(Y, Fs)<br>wavwrite(F,1/delta,32, 'Flipped Beatles ')<br>%The forward message of this Beatles song is Number 9 <br>%When the flipud function was used it was hard to retrieve <br>%any message with any sense out of the file. I picked up some <br>%words like 'turn' and 'on'though. I dont think there is a real<br>%hidden message in this song. | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>%<br>% Programmer and Purdue Email Address:<br>% 1.Alberto Peralta aperalta@purdue.edu<br>%<br>% Homework #:01<br>%<br>% <br>%<br>% <br>%<br>% Program Description:This program will attempt to play Smoke in the water in its<br>% original speed, then tw0 times faster and then with an octave higher,<br>% lasting half the time<br>% <br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/<br>tempo=(60/112);<br>Sol=(2^(-2/12))*440;<br>Sib=(2^(1/12))*440;<br>Do=(2^(3/12))*440;<br>Reb=(2^(4/12))*440;<br>deltat = .00005;<br>negra=0:deltat:1*tempo;<br>puntillo=0:deltat:1.5*tempo;<br>corchea=0:deltat:.5*tempo; <br>blanca=0:deltat:2*tempo; <br>silencio= 0:deltat:2.5*tempo; <br><br>SolN= sin(2*pi*Sol*negra);<br>SiN= sin(2*pi*Sib*negra); <br>DoP= sin(2*pi*Do*puntillo); <br>DoB= sin(2*pi*Do*blanca);<br>ReC= sin(2*pi*Reb*corchea); <br>silencioP= sin(silencio);<br><br>Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];<br><br>sound(Smoke, 1/delta);<br>wavwrite(Smoke,1/delta,32, 'Normal Speed')<br><br><br>tempo=(60/112)/2;<br><br>negra=0:deltat:1*tempo;<br>puntillo=0:deltat:1.5*tempo;<br>corchea=0:deltat:.5*tempo; <br>blanca=0:deltat:2*tempo; <br>silencio= 0:deltat:2.5*tempo; <br><br>SolN= sin(2*pi*Sol*negra);<br>SiN= sin(2*pi*Sib*negra); <br>DoP= sin(2*pi*Do*puntillo); <br>DoB= sin(2*pi*Do*blanca);<br>ReC= sin(2*pi*Reb*corchea); <br>silencioP= sin(silencio);<br><br>Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];<br><br>sound(Smoke, 1/delta);<br>wavwrite(Smoke,1/delta,32, 'Faster Speed')<br><br><br><br>SolN= sin(4*pi*Sol*negra);<br>SiN= sin(4*pi*Sib*negra); <br>DoP= sin(4*pi*Do*puntillo); <br>DoB= sin(4*pi*Do*blanca);<br>ReC= sin(4*pi*Reb*corchea); <br>silencioP= sin(silencio);<br><br>Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];<br><br>sound(Smoke, 1/delta);<br>wavwrite(Smoke,1/delta,32, 'x(2t) ')<br><br>Y= wavread('Beatles'); <br>F = flipud(Y);<br>sound(Y, Fs)<br>wavwrite(F,1/delta,32, 'Flipped Beatles ')<br>%The forward message of this Beatles song is Number 9 <br>%When the flipud function was used it was hard to retrieve <br>%any message with any sense out of the file. I picked up some <br>%words like 'turn' and 'on'though. I dont think there is a real<br>%hidden message in this song. | ||
− | [[Media:Normal_Speed.wav]]<br>[[Media:Faster_Speed.wav]]<br>[[Media:Partc.wav]]<br>[[Media: | + | [[Media:Normal_Speed.wav]]<br>[[Media:Faster_Speed.wav]]<br>[[Media:Partc.wav]]<br>[[Media:FlippedBeatles.wav]] |
<br> | <br> | ||
Revision as of 14:32, 15 January 2011
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Programmer and Purdue Email Address:
% 1.Alberto Peralta aperalta@purdue.edu
%
% Homework #:01
%
%
%
%
%
% Program Description:This program will attempt to play Smoke in the water in its
% original speed, then tw0 times faster and then with an octave higher,
% lasting half the time
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/
tempo=(60/112);
Sol=(2^(-2/12))*440;
Sib=(2^(1/12))*440;
Do=(2^(3/12))*440;
Reb=(2^(4/12))*440;
deltat = .00005;
negra=0:deltat:1*tempo;
puntillo=0:deltat:1.5*tempo;
corchea=0:deltat:.5*tempo;
blanca=0:deltat:2*tempo;
silencio= 0:deltat:2.5*tempo;
SolN= sin(2*pi*Sol*negra);
SiN= sin(2*pi*Sib*negra);
DoP= sin(2*pi*Do*puntillo);
DoB= sin(2*pi*Do*blanca);
ReC= sin(2*pi*Reb*corchea);
silencioP= sin(silencio);
Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];
sound(Smoke, 1/delta);
wavwrite(Smoke,1/delta,32, 'Normal Speed')
tempo=(60/112)/2;
negra=0:deltat:1*tempo;
puntillo=0:deltat:1.5*tempo;
corchea=0:deltat:.5*tempo;
blanca=0:deltat:2*tempo;
silencio= 0:deltat:2.5*tempo;
SolN= sin(2*pi*Sol*negra);
SiN= sin(2*pi*Sib*negra);
DoP= sin(2*pi*Do*puntillo);
DoB= sin(2*pi*Do*blanca);
ReC= sin(2*pi*Reb*corchea);
silencioP= sin(silencio);
Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];
sound(Smoke, 1/delta);
wavwrite(Smoke,1/delta,32, 'Faster Speed')
SolN= sin(4*pi*Sol*negra);
SiN= sin(4*pi*Sib*negra);
DoP= sin(4*pi*Do*puntillo);
DoB= sin(4*pi*Do*blanca);
ReC= sin(4*pi*Reb*corchea);
silencioP= sin(silencio);
Smoke=[SolN, SiN, DoP,SolN, SiN ,ReC,DoB,SolN, SiN,DoP,SiN,SolN,silencioP];
sound(Smoke, 1/delta);
wavwrite(Smoke,1/delta,32, 'x(2t) ')
Y= wavread('Beatles');
F = flipud(Y);
sound(Y, Fs)
wavwrite(F,1/delta,32, 'Flipped Beatles ')
%The forward message of this Beatles song is Number 9
%When the flipud function was used it was hard to retrieve
%any message with any sense out of the file. I picked up some
%words like 'turn' and 'on'though. I dont think there is a real
%hidden message in this song.
Media:Normal_Speed.wav
Media:Faster_Speed.wav
Media:Partc.wav
Media:FlippedBeatles.wav