implemented generate_keyboard, lfo_square
This commit is contained in:
parent
d7d455070f
commit
9b9e8852de
@ -9,10 +9,13 @@
|
|||||||
function output = LFOSelect(amplitude, frequency, phase, fs, duration, input,number)
|
function output = LFOSelect(amplitude, frequency, phase, fs, duration, input,number)
|
||||||
%UNTITLED Summary of this function goes here
|
%UNTITLED Summary of this function goes here
|
||||||
% Detailed explanation goes here
|
% Detailed explanation goes here
|
||||||
if(number == "AmplitudeSawtooth")
|
if(number == "AmplitudeSine")
|
||||||
output = lfo_sawtooth(amplitude, frequency, phase, fs, duration, input);
|
output = lfo_sawtooth(amplitude, frequency, phase, fs, duration, input);
|
||||||
elseif(number == "AmplitudeSine")
|
elseif(number == "AmplitudeSquare")
|
||||||
|
output = lfo_square(amplitude, frequency, phase, fs, duration, input);
|
||||||
|
elseif(number == "AmplitudeSawtooth")
|
||||||
output = lfo_sine(amplitude, frequency, phase, fs, duration, input);
|
output = lfo_sine(amplitude, frequency, phase, fs, duration, input);
|
||||||
|
|
||||||
elseif(number == "FrequencySine")
|
elseif(number == "FrequencySine")
|
||||||
output = lfo_freq_sine(amplitude, frequency, phase, fs, duration, input);
|
output = lfo_freq_sine(amplitude, frequency, phase, fs, duration, input);
|
||||||
elseif(number == "FrequencySquare")
|
elseif(number == "FrequencySquare")
|
||||||
|
@ -56,6 +56,9 @@ function output = SoundGeneratorSelect(amplitude, frequency, phase, fs, duration
|
|||||||
output = generate_trumpet(amplitude, frequency, phase, fs, duration, duty);
|
output = generate_trumpet(amplitude, frequency, phase, fs, duration, duty);
|
||||||
elseif(number == "TubularBells")
|
elseif(number == "TubularBells")
|
||||||
output = generate_tubularBells(amplitude, frequency, phase, fs, duration, duty);
|
output = generate_tubularBells(amplitude, frequency, phase, fs, duration, duty);
|
||||||
|
|
||||||
|
elseif(number == "Keyboard")
|
||||||
|
output = generate_keyboard(amplitude, frequency, phase, fs, duration, duty);
|
||||||
else
|
else
|
||||||
output = zeros(1, fs * duration);
|
output = zeros(1, fs * duration);
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user