Mercurial > hg > midi-score-follower
comparison src/midiEventHolder.cpp @ 4:4a8e6a6cd224
optimised draw function in dynamic vector class. Added Gaussian lookup but not yet used.
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Fri, 19 Aug 2011 15:53:04 +0100 |
parents | de86d77f2612 |
children | 195907bb8bb7 |
comparison
equal
deleted
inserted
replaced
3:de86d77f2612 | 4:4a8e6a6cd224 |
---|---|
23 pulsesPerQuarternote = 240; | 23 pulsesPerQuarternote = 240; |
24 noteArrayIndex = 0; | 24 noteArrayIndex = 0; |
25 noteMinimum = 30; | 25 noteMinimum = 30; |
26 noteMaximum = 96; | 26 noteMaximum = 96; |
27 | 27 |
28 minimumMatchSpeed = 0.7; | 28 minimumMatchSpeed = 0.0; |
29 maximumMatchSpeed = 1.3; | 29 maximumMatchSpeed = 2.0; |
30 | 30 |
31 likelihoodWidth = 100; | 31 likelihoodWidth = 100; |
32 likelihoodToNoiseRatio = 0.02; | 32 likelihoodToNoiseRatio = 0.02; |
33 | 33 |
34 bayesStruct.speedLikelihoodNoise = 0.05;//was 0.05 | 34 bayesStruct.speedLikelihoodNoise = 0.02;//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 speedPriorValue = 1.0; |
39 | 39 |
47 bayesStruct.relativeSpeedPrior.getMaximum(); | 47 bayesStruct.relativeSpeedPrior.getMaximum(); |
48 //bayesStruct.simpleExample(); | 48 //bayesStruct.simpleExample(); |
49 | 49 |
50 speedPriorValue = 1.0; | 50 speedPriorValue = 1.0; |
51 noteHeight = (*screenHeight) / (float)(noteMaximum - noteMinimum); | 51 noteHeight = (*screenHeight) / (float)(noteMaximum - noteMinimum); |
52 | |
53 printf("lookup index %f value %f\n", bayesStruct.prior.getLookupIndex(100, 30., 10.0), bayesStruct.prior.gaussianLookupTable[(int)bayesStruct.prior.getLookupIndex(100, 30., 10.0)]); | |
52 } | 54 } |
53 | 55 |
54 | 56 |
55 | 57 |
56 void midiEventHolder::reset(){ | 58 void midiEventHolder::reset(){ |