%%Doug Van Nort   MUMT 611 Final Project
%
%
%This main script calls all of the necessary elements of the HMM system
%



%****read in audio samples, extract features
violin_read;

flute_read:

trumpet_read;
%************

%****Do the clustering (note: this will take a few minutes)
cluster;
%****

%*** Map all of the observation sequences to the codebook
coding;
%*****

%**Here we train our 3 HMMs
violin_training;
flute_training;
trumpet_training;
%******



%***finally we classify the test data
classify(OVL(2,:));
classify(OVL(4,:));
classify(OVL(5,:));
classify(OVL(13,:));
classify(OVL(17,:));
classify(OVL(22,:));
classify(OVL(27,:));
classify(OVL(32,:));
classify(OVL(37,:));
classify(OVL(42,:));

classify(OVR(2,:));
classify(OVR(4,:));
classify(OVR(5,:));
classify(OVR(13,:));
classify(OVR(17,:));
classify(OVR(22,:));
classify(OVR(27,:));
classify(OVR(32,:));
classify(OVR(37,:));
classify(OVR(42,:));

classify(OFL(2,:));
classify(OFL(4,:));
classify(OFL(5,:));
classify(OFL(13,:));
classify(OFL(17,:));
classify(OFL(20,:));
classify(OFL(22,:));
classify(OFL(27,:));
classify(OFL(32,:));
classify(OFL(37,:));

classify(OFR(2,:));
classify(OFR(4,:));
classify(OFR(5,:));
classify(OFR(13,:));
classify(OFR(17,:));
classify(OFL(20,:));
classify(OFR(22,:));
classify(OFR(27,:));
classify(OFR(32,:));
classify(OFR(37,:));

classify(OTL(2,:));
classify(OTL(4,:));
classify(OTL(5,:));
classify(OTL(13,:));
classify(OTL(17,:));
classify(OTL(20,:));
classify(OTL(22,:));
classify(OTL(27,:));
classify(OTR(30,:));
classify(OTL(32,:));

classify(OTR(2,:));
classify(OTR(4,:));
classify(OTR(5,:));
classify(OTR(13,:));
classify(OTR(17,:));
classify(OTL(20,:));
classify(OTR(22,:));
classify(OTR(27,:));
classify(OTR(30,:));
classify(OTR(32,:));
