view src/LiveAudioInput.h @ 56:4394c9490716 tip

minor changes
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Mon, 24 Dec 2012 18:58:39 +0000
parents 852173ca8365
children
line wrap: on
line source
/*
 *  LiveAudioInput.h
 *  MultipleAudioMathcher
 *
 *  Created by Andrew on 30/01/2012.
 *  Copyright 2012 QMUL. All rights reserved.
 *
 */

#ifndef LIVE_AUDIO_INPUT_H
#define LIVE_AUDIO_INPUT_H


#include "ofMain.h"
#include "ChromaOnset.h"


struct AudioEvent {
	double millisTime;
	double frameTime;
	double pitch;
	int type;
};

class LiveAudioInput{
	
	int numberOfEvents;
public:
	
	
	LiveAudioInput();
	
	typedef std::vector<AudioEvent> EventVector; 
	
	EventVector liveEvents;
	
	void addPitchEvent(const double& pitch, const double& time);
	
	double framesToMillis(const double& frameCount);
	double millisToFrames(const double& millis);
	
};
#endif