% Lab report 1 - DAS 2012
% Rob Taylor Student# 311123392

% Spatial chorus script

clear all

[x fs] = wavread('G1.wav'); % wave file input

output_level = 0.99
fx_shift = 0; % shifts the modulated channel path in milliseconds
mix = 0; % 0 for equal amplitude, -1 for dry, 1 for wet
Interpolation = 1; % 1 = Spline, 2 = All-pass
ModFilterQ = 2; % filter bandwidth
ModFilterF = 8; % filter frequency
ModType = 1; % 1 = fractal, 0 = white noise
ModCorr = 1; % (less correlated) 0 and (more correlated) 1
ModRate = 10; % 'Framerate'.. > 1 (noise resolution)
DelayR = 12; % in milliseconds
DelayL = 8; % in milliseconds
WidthR = 0.09; % value between (less width) 0 and (more width) 1
WidthL = 0.05; % value between (less width) 0 and (more width) 1
SAMPLERATE = 44100; % fs - samples per second

y=Spatial_chorus(x,SAMPLERATE, WidthL, WidthR, DelayL, DelayR, ModRate, ModCorr, ModType, ModFilterF, ModFilterQ, Interpolation, mix, fx_shift, output_level); % function call

wavwrite(y, fs, 'G1_chorus.wav'); % output as wave file

