comparison src/midiEventHolder.cpp @ 3:de86d77f2612

added speed prior setting. needs some cleaning
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Fri, 19 Aug 2011 02:36:34 +0100
parents 5581023e0de4
children 4a8e6a6cd224
comparison
equal deleted inserted replaced
2:5581023e0de4 3:de86d77f2612
33 33
34 bayesStruct.speedLikelihoodNoise = 0.05;//was 0.05 34 bayesStruct.speedLikelihoodNoise = 0.05;//was 0.05
35 bayesStruct.speedDecayWidth = 20; 35 bayesStruct.speedDecayWidth = 20;
36 bayesStruct.speedDecayAmount = 10; 36 bayesStruct.speedDecayAmount = 10;
37 37
38 speedPriorValue = 1.0;
38 39
39 matchWindowWidth = 8000;//window size for matching in ms 40 matchWindowWidth = 8000;//window size for matching in ms
40 41
41 bayesStruct.resetSize(matchWindowWidth); 42 bayesStruct.resetSize(matchWindowWidth);
42 bayesStruct.setPositionDistributionScalar(1); 43 bayesStruct.setPositionDistributionScalar(1);
44 bayesStruct.resetSpeedSize(200); 45 bayesStruct.resetSpeedSize(200);
45 bayesStruct.setRelativeSpeedScalar(0.01); 46 bayesStruct.setRelativeSpeedScalar(0.01);
46 bayesStruct.relativeSpeedPrior.getMaximum(); 47 bayesStruct.relativeSpeedPrior.getMaximum();
47 //bayesStruct.simpleExample(); 48 //bayesStruct.simpleExample();
48 49
49 50 speedPriorValue = 1.0;
50 noteHeight = (*screenHeight) / (float)(noteMaximum - noteMinimum); 51 noteHeight = (*screenHeight) / (float)(noteMaximum - noteMinimum);
51 } 52 }
52 53
53 54
54 55
67 playedEventTimes.clear(); 68 playedEventTimes.clear();
68 playedNoteOnMatrix.clear(); 69 playedNoteOnMatrix.clear();
69 matchMatrix.clear(); 70 matchMatrix.clear();
70 71
71 bayesStruct.resetSpeedToOne(); 72 bayesStruct.resetSpeedToOne();
73 bayesStruct.setSpeedPrior(speedPriorValue);
72 74
73 } 75 }
74 76
75 void midiEventHolder::clearAllEvents(){ 77 void midiEventHolder::clearAllEvents(){
76 recordedNoteOnMatrix.clear(); 78 recordedNoteOnMatrix.clear();