From e6bad374a660b98e481b5793733610a2e63afdb6 Mon Sep 17 00:00:00 2001 From: anne118193 <65373942+anne118193@users.noreply.github.com> Date: Wed, 8 Dec 2021 20:57:02 -0800 Subject: [PATCH] Update DarellAnnePitchEnvelope.m --- src/DarellAnnePitchEnvelope.m | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/DarellAnnePitchEnvelope.m b/src/DarellAnnePitchEnvelope.m index dc147f6..6b5643f 100644 --- a/src/DarellAnnePitchEnvelope.m +++ b/src/DarellAnnePitchEnvelope.m @@ -1,4 +1,20 @@ %Written by Darell and Anne +%If there is a frequency of 200Hz: +%1. it needs to ramp up a frequency from 0Hz to the 200Hz over the attack time +%2. It needs to ramp down to a set sustained frequency over the decay time e.g. 160Hz < 200Hz +%3. It maintains this 160Hz until the release time +%4. Release time: It decays from 160Hz further all the way back to 0Hz. + +% CONTRIBUTORS: +% Person1: Darell +% Person2: Anne + +% DOCUMENTATION: +% phase shift is in number of periods +% fs is the sampling frequency: how many sample points per second +% duration is time in seconds +% duty is a number between 0 and 1 + function output = DarellAnnePitchEnvelope(input, Fs, attack,decay,sustain,release) %percentages for attack, decay, sustain, release len = length(input); @@ -54,4 +70,4 @@ function output = DarellAnnePitchEnvelope(input, Fs, attack,decay,sustain,releas tcounter = tcounter+1; end -end \ No newline at end of file +end