%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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.