-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject_3.m
54 lines (52 loc) · 1.18 KB
/
Project_3.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%% Project 3
load('song.mat')
original = MixMaster(song,1,BPM);
sound(original,Fs,16);
%%
audiowrite('DragonBorn.wav',original,Fs)
info = audioinfo('DragonBorn.wav');
disp(info.SampleRate)
disp(info.TotalSamples)
%%
w = original;
while true
clc
fprintf('1)Fade In\n2)Fade Out\n3)Pitch up\n4)Pitch down\n5)Plot\n6)Normalize\n7)Reset Vector\n8)Stop Sound\n9)Exit\n')
x = input('Enter Choice: ');
switch x
case 1
w = fade(w,'in');
sound(w,Fs,16);
case 2
w = fade(w,'out');
sound(w,Fs,16);
case 3 %dont like thes methods
w = w(1:1.5:end);
sound(w,Fs,16);
case 4
w = w(1:.5:end);
sound(w,Fs,16);
case 5
plot(w);
case 6
disp('Normalizing')
w = .9*w(1:end)/max(abs(w(1:end)));
sound(w,Fs,16);
case 7
w = original;
case 8
clear sound
case 9
clear sound
disp('exiting')
audiowrite('DragonBorn_Modified.wav',w,Fs)
break
otherwise
disp('Invalid Input')
end
end
%type NoteMaster
%type MixMaster
%type fade
%type Song
%type Notes