diff --git a/src/.DS_Store b/src/.DS_Store index 5008ddf..14624d2 100644 Binary files a/src/.DS_Store and b/src/.DS_Store differ diff --git a/src/Main_test.m b/src/Main_test.m index b6de4b4..31f53eb 100644 --- a/src/Main_test.m +++ b/src/Main_test.m @@ -32,5 +32,4 @@ release = 0.1; x = DarellAmplitudeEnvelope(x, fs, attack,decay,sustain,release); %output new sound in time domain %play over 5 counts, should only hear 200hz playtime = 5; -play_continuous(x, fs, playtime) - +play_continuous(x, fs, playtime) \ No newline at end of file diff --git a/src/amplify.m b/src/amplify.m new file mode 100644 index 0000000..153767b --- /dev/null +++ b/src/amplify.m @@ -0,0 +1,8 @@ +function output = amplify(input, multiplier) + %input: a 1D array representing the sound signal in the time domain + %multiplier: a scalar that multiplier all values in the input array to + % amplify or decrease the volume. + %Returns: input signal scaled by the multiplier in the time domain. + %Author: Conner Hsu + output = input*multiplier; +end \ No newline at end of file diff --git a/src/reverse.m b/src/reverse.m new file mode 100644 index 0000000..586c606 --- /dev/null +++ b/src/reverse.m @@ -0,0 +1,6 @@ +function output = reverse(input) + %input: a 1D array representing the sound signal in the time domain + %returns: the input signal with its elements in reverse order. + %By Conner Hsu + output = flip(input); +end \ No newline at end of file