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:
parent
47705d3acb
commit
81ac081614
BIN
App/app.mlapp
BIN
App/app.mlapp
Binary file not shown.
@ -1,26 +1,26 @@
|
|||||||
%Written by Darell
|
%Written by Darell, edited by Arthur Lu
|
||||||
|
|
||||||
% CONTRIBUTORS:
|
% CONTRIBUTORS:
|
||||||
% Person1: Darell
|
% Person1: Darell
|
||||||
|
% Person2: Arthur Lu
|
||||||
|
|
||||||
% DOCUMENTATION:
|
% DOCUMENTATION:
|
||||||
%Pass-through function used by app
|
%Pass-through function used by app
|
||||||
|
|
||||||
function output = SoundGeneratorSelect(amplitude, frequency, phase, fs, duration, duty,number)
|
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);
|
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);
|
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);
|
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);
|
output = generate_sawtooth(amplitude, frequency, phase, fs, duration, duty);
|
||||||
elseif(number == "Option 5")
|
elseif(number == "WhiteNoise")
|
||||||
output = generate_white(amplitude, fs, duration);
|
output = generate_white(amplitude, fs, duration);
|
||||||
elseif(number == "Option 6")
|
elseif(number == "HalfCircles")
|
||||||
output = generate_halfCircles(amplitude, frequency, phase, fs, duration, duty);
|
output = generate_halfCircles(amplitude, frequency, phase, fs, duration, duty);
|
||||||
else
|
else
|
||||||
output = 0;
|
output = 0;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue
Block a user