Mercurial > hg > precise-onset-detection
view ofxPreciseOnsetDetectorOffline/PreciseBassOnsetDetectorOffline.h @ 8:184a7c232049 tip
changed files since updating computer
author | Venetian |
---|---|
date | Thu, 14 Aug 2014 17:53:57 +0100 |
parents | b1c13e8bec26 |
children |
line wrap: on
line source
/* * PreciseBassOnsetDetectorOffline.h * BasslinePrediction * * Created by Andrew N Robertson on 11/04/2014. * Copyright 2014 QMUL. All rights reserved. * */ #ifndef PRECISE_BASS_DETECTOR_OFFLINE #define PRECISE_BASS_DETECTOR_OFFLINE #include "PreciseOnsetDetectorOffline.h" #include "YuleBrinner.h" //here qwe extend the usual precise onset detector to run different process functin that will log //the pitches of bass onsets using pyin // class PreciseBassOnsetDetectorOffline : public PreciseOnsetDetectorOffline{ public: //this version we will also try and detect pitch int processAudioFileForBeatTimes(std::string audiofile); void processYinAudio(float* frame, int blocksize); void processBassPitches(); void setMidiNoteString(int index, float midiPitch); void printOnsetLocations(); void printPitchInfo(); //void categoriseOnsets(std::vector<double> beatTimes); //void doCorrection(int& beattype, int& beatPosition); void predictionProcess(); int getOptimalLag(); double quantisedCorrelation(int lag); int getOnsetAtBeat(int tmpIndex, int beatPosition, int beatType, int& midiPitch); void checkPrediction(int lag); void checkPredictionFirstOrderMarkovCorrect(int lag); void checkBars(); YuleBrinner yule; }; #endif