Mercurial > hg > audio-file-loader
view chromagramm/ChordDetect.h @ 1:ba2a17cf81bf
first working version of audio file loder. Loads bach clip from the apps->audio-file-loader->bin->data->sounds foler. Three classes: SoundFileLoader does the loading and parsing of thefile with libSndFile. audio samples are kept in AudioFile and analysis of features are kept in AudioAnalysis, at this stage just chromagramm and basic energy
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Sun, 04 Sep 2011 22:45:35 +0100 |
parents | bcb0d40158f4 |
children |
line wrap: on
line source
/* * ChordDetect.h * ChordDetect * * Created by Adam Stark on 28/04/2008. * Copyright 2008 __MyCompanyName__. All rights reserved. * */ #ifndef CHORDDETECT_H #define CHORDDETECT_H #include "fftw3.h" class ChordDetect { public: ChordDetect(); // constructor ~ChordDetect(); // destructor void C_Detect(float c[],float c_low[]); int root; int quality; int intervals; private: void makeprofiles(); void calculateweightings(); void classifychromagram(); float calcchordvalue(float c[],float T[],float biasval, float N); float max(float array[],int length); int minindex(float array[],int length); float chroma[12]; float chroma_low[12]; float weight_sus[12]; float weight_aug[12]; float profiles[108][12]; float w_profile[12]; float chord[108]; float bias; }; #endif