added descriptive names to sound generator selection,

dynamically populate src location,
changed default sound generator duty to 0.5,
set default band pass filter ceiling to 20khz
This commit is contained in:
Arthur Lu 2021-12-09 22:43:53 -08:00
parent 47705d3acb
commit 81ac081614
2 changed files with 9 additions and 9 deletions

Binary file not shown.

View File

@ -1,26 +1,26 @@
%Written by Darell
%Written by Darell, edited by Arthur Lu
% CONTRIBUTORS:
% Person1: Darell
% Person2: Arthur Lu
% DOCUMENTATION:
%Pass-through function used by app
function output = SoundGeneratorSelect(amplitude, frequency, phase, fs, duration, duty,number)
if(number == "Option 1")
if(number == "Sine")
output = generate_sine(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Option 2")
elseif(number == "Square")
output = generate_square(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Option 3")
elseif(number == "Triangle")
output = generate_triangle(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Option 4")
elseif(number == "Sawtooth")
output = generate_sawtooth(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Option 5")
elseif(number == "WhiteNoise")
output = generate_white(amplitude, fs, duration);
elseif(number == "Option 6")
elseif(number == "HalfCircles")
output = generate_halfCircles(amplitude, frequency, phase, fs, duration, duty);
else
output = 0;
end
end