Mercurial > hg > multitrack-audio-matcher
comparison src/testApp.cpp @ 32:4be22a1a0e24
added in chroma comparison for fourth channel (guitar)
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Mon, 02 Apr 2012 17:19:22 +0100 |
parents | 02f659277346 |
children | 6fb77b20413c |
comparison
equal
deleted
inserted
replaced
31:02f659277346 | 32:4be22a1a0e24 |
---|---|
78 eventMatcher.newSnareEvent(testChannel, timeIn); | 78 eventMatcher.newSnareEvent(testChannel, timeIn); |
79 } | 79 } |
80 | 80 |
81 // check for mouse moved message | 81 // check for mouse moved message |
82 if ( m.getAddress() == "/elec" ){ | 82 if ( m.getAddress() == "/elec" ){ |
83 float chroma[12]; | 83 int testChannel = m.getArgAsInt32(0); |
84 double timeIn = m.getArgAsFloat(1); | |
85 float chromaIn[12]; | |
86 printf("CHROMA received at time %f\n", timeIn); | |
84 for (int i = 0;i < 12;i++){ | 87 for (int i = 0;i < 12;i++){ |
85 chroma[i] = m.getArgAsFloat(i); | 88 chromaIn[i] = m.getArgAsFloat(i+2); |
86 printf("chroma[%i]: %f\n", i, chroma[i]); | 89 printf("chroma[%i]: %f\n", i, chromaIn[i]); |
87 } | 90 } |
88 // eventMatcher.newChromaEvent(testChannel, pitchIn, timeIn); - WRite this! | 91 eventMatcher.newChromaEvent(testChannel, chromaIn, timeIn); |
89 } | 92 } |
90 | 93 |
91 | 94 |
92 if ( m.getAddress() == "/start" ){ | 95 if ( m.getAddress() == "/start" ){ |
93 printf("start!\n"); | 96 printf("start!\n"); |