Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %load('chirp','Fs','y');
- %y=y/max(abs(y));t=(0:length(y)-1)/Fs;
- %sound(y*get(SD_VOLUME,'value'),Fs);
- Fs = 8192;
- Vol = 0.8;
- mnoznik_polton = 1.059463;
- C = 261.6;
- Cis = C*mnoznik_polton;
- D = 293.7;
- Dis = D*mnoznik_polton;
- E = 329.6;
- F = 349.6;
- Fis = F*mnoznik_polton;
- G = 391.9;
- Gis = G*mnoznik_polton;
- A = 440;
- B = A*mnoznik_polton;
- H = 493.9;
- C2 = 523.2;
- Fr = [C Cis D Dis E F Fis G Gis A B H C];
- F = [C D E F G A H C2];
- Czas = 1; %czas trwania pojedynczego dzwieku w sekundach
- t=0:1/Fs:Czas;
- for i = 1:length(F),
- f = Fr(i);
- disp(f);
- y = sin(f*2*pi*t);
- sound(y*Vol,Fs);
- pause(Czas);
- end;
- %t = (0:length(y)-1)/Fs;
- %y_ = [];
- %t_ = [];
- %for i=1:Czas,
- % y_ = [y_ y];
- % t_ = [t_ t];
- %end;
- %for f=140:100:540,
- %x=-pi:0.001:pi;
- %y = sin(x*f);
- %end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement