annotate DrumTimingLoader_OF/src/DrumTimingLoader.cpp @ 2:50ba55abea8c

updating files to newer version
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Sat, 23 Nov 2013 15:49:27 +0000
parents 82352cfc0b23
children
rev   line source
andrew@0 1 /*
andrew@0 2 * DrumTimingLoader.cpp
andrew@0 3 * DrumTimingLoader
andrew@0 4 *
andrew@0 5 * Created by Andrew on 09/08/2012.
andrew@0 6 * Copyright 2012 QMUL. All rights reserved.
andrew@0 7 *
andrew@0 8 */
andrew@0 9
andrew@0 10 #include "DrumTimingLoader.h"
andrew@0 11
andrew@0 12 DrumTimingLoader::DrumTimingLoader(){
andrew@0 13
andrew@0 14 }
andrew@0 15
andrew@0 16
andrew@0 17 void DrumTimingLoader::initialise(){
andrew@0 18
andrew@0 19 recordedTracks.loadTestAudio();
andrew@0 20 /*
andrew@2 21 calculateRecordedTempoData();
andrew@2 22 printf("\n audioeventmatcher\nFIRST PASS: FINAL recorded tempo is %f\n", recordedTempoData.playingTempo);
andrew@2 23 setTempoPrior(recordedTempoData.playingTempo);
andrew@2 24 calculateRecordedTempoData();//now calculate again using better prior
andrew@2 25
andrew@2 26 printf("\n audioeventmatcher\nSECOND PASS: FINAL recorded tempo is %f\n", recordedTempoData.playingTempo);
andrew@2 27 printf("GLOBAL TEMPO of RECORDED FILES\n");
andrew@2 28 */
andrew@0 29
andrew@2 30 }
andrew@2 31
andrew@2 32 void DrumTimingLoader::update(){
andrew@2 33 recordedTracks.updatePosition();
andrew@0 34 }
andrew@0 35
andrew@0 36
andrew@0 37
andrew@0 38 void DrumTimingLoader::draw(){
andrew@0 39 bool drawTracks = false;
andrew@0 40 if (drawTracks)
andrew@0 41 recordedTracks.drawTracks();
andrew@0 42 else
andrew@0 43 recordedTracks.drumTimingAnalyser.drawTempoCurve();
andrew@2 44
andrew@2 45 ofSetColor(0);
andrew@2 46 ofDrawBitmapString("play pos sec: "+ofToString(recordedTracks.playPositionSeconds, 2), 20, 20);
andrew@0 47 }
andrew@0 48
andrew@0 49 void DrumTimingLoader::windowResized(int w, int h){
andrew@0 50 recordedTracks.windowResized(w, h);
andrew@0 51 }