--- Saving session to: ECE481_22-Mar-2002.txt --- Processed startup.m --- ; ; ; ; ; ; ; edit tremolo tremolo tremolo fschange('c:\personal\class\2001-02\spring\ece481\matlab\tremolo.m'); clear tremolo tremolo fschange('c:\personal\class\2001-02\spring\ece481\matlab\tremolo.m'); clear tremolo tremolo fschange('c:\personal\class\2001-02\spring\ece481\matlab\tremolo.m'); clear tremolo tremolo fschange('c:\personal\class\2001-02\spring\ece481\matlab\tremolo.m'); clear tremolo tremolo fschange('c:\personal\class\2001-02\spring\ece481\matlab\tremolo.m'); clear tremolo fschange('c:\personal\class\2001-02\spring\ece481\matlab\tremolo.m'); clear tremolo tremolo vibes edit vibrato1 vibrato1 vibrato1 vibrato1 vibrato1 wavwrite(y,fs,16,'\temp\junk.wav') Warning: Data clipped during write to file:\temp\junk.wav > In C:\MatLab6p1\toolbox\matlab\audio\wavwrite.m (PCM_Quantize) at line 239 In C:\MatLab6p1\toolbox\matlab\audio\wavwrite.m (write_wavedat) at line 257 In C:\MatLab6p1\toolbox\matlab\audio\wavwrite.m at line 104 vibrato2 type tremolo % Tremolo demo % Parameters fs = 10e3; % sampling frequency fo = 440; % pitch dur = 3; % duration Ddb = 10; % tremolo depth (in dB) fr = 4; % tremolo rate % Time vector tt=0:1/fs:dur; % Signal x=sin(2*pi*fo*tt); % Envelope D=(10^(Ddb/20)-1)/(10^(Ddb/20)+1); env=1+D*sin(2*pi*fr*tt); % Make the sound y=env.*x; y=adenv(dur,0.1,fs).*env.*x; %more like a vibraphone % Play and look at the sound plot(tt,y) soundsc(y,fs) type vibrato1 % Vibrato demo #1 % Parameters fs = 10e3; % sampling frequency (Hz) fc = 440; % pitch (Hz) dur = 5; % duration (s) depth = 1; % vibrato depth (Hz) fr = 4; % vibratro rate % Time vector tt=0:1/fs:dur; % Frequency ff = fc + depth*sin(2*pi*fr*tt); % Make the sound y=sin(2*pi*ff.*tt); %y=adenv(dur,0.1,fs).*env.*x; %more like a vibraphone % Play and look at the sound plot(tt,y) soundsc(y,fs) type vibrato2 % Vibrato demo #2 % Parameters fs = 10e3; % sampling frequency (Hz) fc = 440; % pitch (Hz) dur = 5; % duration (s) depth = 1; % vibrato depth (Hz) fr = 4; % vibratro rate % Time vector tt=0:1/fs:dur; % Frequency deviation ff = depth*sin(2*pi*fr*tt); % Make the sound y=sin(2*pi*fc*tt + ff); % Play and look at the sound plot(tt,y) soundsc(y,fs) type vibrato3 % Vibrato demo #3 % Parameters fs = 10e3; % sampling frequency (Hz) fc = 440; % pitch (Hz) dur = 5; % duration (s) depth = 1; % vibrato depth (Hz) fr = 4; % vibratro rate % Time vector tt=0:1/fs:dur; % Envelope ee=adenv(dur,0.1,fs); % Frequency deviation ff = depth*ee.*sin(2*pi*fr*tt); % Make the sound y=ee.*sin(2*pi*fc*tt + ff); % Play and look at the sound plot(tt,y) soundsc(y,fs) exit