diff --git a/DarellsAnnex/app.mlapp b/DarellsAnnex/app.mlapp index 78314e0..bd7b703 100644 Binary files a/DarellsAnnex/app.mlapp and b/DarellsAnnex/app.mlapp differ diff --git a/src/AmpEnvelopeSelect.m b/src/AmpEnvelopeSelect.m new file mode 100644 index 0000000..1492f51 --- /dev/null +++ b/src/AmpEnvelopeSelect.m @@ -0,0 +1,8 @@ +function output = AmpEnvelopeSelect(input, Fs, attack,decay,sustain,release,number) + if(number == "Option 1") + output = DarellAmplitudeEnvelope(input, Fs, attack,decay,sustain,release); + else + output = input; + end +end + diff --git a/src/DarellbandpassFilter.m b/src/DarellbandpassFilter.m index 918358a..fd23c4b 100644 --- a/src/DarellbandpassFilter.m +++ b/src/DarellbandpassFilter.m @@ -3,7 +3,7 @@ function output_y = DarellbandpassFilter(y,Fs,LOW,MED,HIGH) F = Fs * (-Len/2 : (Len/2 - 1))/Len ; Mod_Freq = fftshift(fft(y)); lenf = length(F); - output = 0 .* Mod_Freq; % zero array of len f + output = zeros([1,lenf]); % zero array of size Mod_freq for n = 1:lenf if ((LOW < abs(F(n))) && HIGH > abs(F(n))) @@ -14,7 +14,6 @@ function output_y = DarellbandpassFilter(y,Fs,LOW,MED,HIGH) end filtered_Mod_Freq = fftshift(Mod_Freq .* output); - output_y = real(ifft(filtered_Mod_Freq)); end \ No newline at end of file diff --git a/src/PitchEnvelopeSelect.m b/src/PitchEnvelopeSelect.m new file mode 100644 index 0000000..1cbe9d8 --- /dev/null +++ b/src/PitchEnvelopeSelect.m @@ -0,0 +1,8 @@ +function output = PitchEnvelopeSelect(input, Fs, attack,decay,sustain,release,number) + if(number == "Option 1") + output = DarellAmplitudeEnvelope(input, Fs, attack,decay,sustain,release); + else + output = input; + end +end +