implemented generate_keyboard, lfo_square

This commit is contained in:
Arthur Lu 2021-12-12 20:20:36 -08:00
parent d7d455070f
commit 9b9e8852de
5 changed files with 8 additions and 2 deletions

BIN
app.mlapp

Binary file not shown.

View File

@ -9,10 +9,13 @@
function output = LFOSelect(amplitude, frequency, phase, fs, duration, input,number)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
if(number == "AmplitudeSawtooth")
if(number == "AmplitudeSine")
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);
elseif(number == "FrequencySine")
output = lfo_freq_sine(amplitude, frequency, phase, fs, duration, input);
elseif(number == "FrequencySquare")

View File

@ -56,6 +56,9 @@ function output = SoundGeneratorSelect(amplitude, frequency, phase, fs, duration
output = generate_trumpet(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "TubularBells")
output = generate_tubularBells(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Keyboard")
output = generate_keyboard(amplitude, frequency, phase, fs, duration, duty);
else
output = zeros(1, fs * duration);
end