view chromagramm/ChordDetect.h @ 0:572c856e38ac

Starting up openFrameworks project for audio time warping. The ofxFileReader goes in addons of your OF folder, the libraries and source (chromogram, fftw and source code src+ timewarp) are probably best kept in the repository, then dragged into the project afresh. That way, as we update the repository, the code that the openFrameworks project looks for will be updated.
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Tue, 17 May 2011 08:48:58 +0100
parents
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