annotate DrumTimingLoader_OF/ofxAubioOnsetDetection/AubioPitch.h @ 3:303edbbcf1bd tip

updated ofxAubioOnsetDetection file
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Sun, 24 Nov 2013 08:15:17 +0000
parents 82352cfc0b23
children
rev   line source
andrew@0 1 /*
andrew@0 2 * AubioPitch.h
andrew@0 3 * fileLoaderAndOnsetDetection
andrew@0 4 *
andrew@0 5 * Created by Andrew on 24/01/2012.
andrew@0 6 * Copyright 2012 QMUL. All rights reserved.
andrew@0 7 *
andrew@0 8 */
andrew@0 9
andrew@0 10
andrew@0 11 #ifndef AUBIO_PITCH_H
andrew@0 12 #define AUBIO_PITCH_H
andrew@0 13
andrew@0 14 #include "ofMain.h"
andrew@0 15 #include "aubio.h"
andrew@0 16
andrew@0 17 class AubioPitch {
andrew@0 18 public:
andrew@0 19 AubioPitch();
andrew@0 20 ~AubioPitch();
andrew@0 21
andrew@0 22 bool processFrame(float* frame, int size);
andrew@0 23
andrew@0 24 int bufsize, hopsize;
andrew@0 25
andrew@0 26 aubio_pitchdetection_type type_pitch;
andrew@0 27 aubio_pitchdetection_mode mode_pitch;
andrew@0 28
andrew@0 29
andrew@0 30 float threshold;
andrew@0 31
andrew@0 32 smpl_t pitch;
andrew@0 33
andrew@0 34 aubio_pitchdetection_t *pitchDetect;
andrew@0 35 fvec_t *vec;
andrew@0 36 int pos;
andrew@0 37
andrew@0 38 float doPitchDetection(float* frame, const int& length);
andrew@0 39
andrew@0 40 float getPitch();
andrew@0 41 void addToBuffer(float* tmpFrame, const int& n);
andrew@0 42
andrew@0 43 //float getPitchDetectedFromBuffer(float* frame, const int& length);
andrew@0 44
andrew@0 45 };
andrew@0 46 #endif