% do sine delay mod :  Also calls function 'make_sine_modulator'

[Input, FS] = wavread('violin_openD.wav'); % FS is audio samples per second

Width = .003; % basic delay on the input is 1 msec

Modfreq = 5; % for sub-audio sine-wave modulation signal

% [y MOD] = my_modulator(Input,FS,Modfreq,Width);
% 
% Mod_sig = make_sine_modulator(FS,Modfreq,LEN); % sub-audio modulation signal, sampled at the audio sampling rate

% If you want a different Mod_sig, make it here....
% or just read it in (but be sure it is at the audio sampling rate)

load mod_1Hz_1;
Mod_sig = mod_1Hz_1;

LEN=length(Input);

Mod_sig = Mod_sig(1:LEN);


f_Width = .006; % basic delay on the input is 1 msec


z=delay_mod(Input,FS,Mod_sig,f_Width);  % uses the modulation signal made by routine 'make_modulator'

z = .99*normsig(z);

wavwrite(z,FS, 'fmod_pulse.wav');


% sound(filt_z,FS);
