Mercurial > hg > multitrack-audio-matcher
comparison src/testApp.cpp @ 10:cbadb9d05d29
Using timestamps for the scrolling alignment time
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Sat, 04 Feb 2012 19:59:27 +0000 |
parents | bc62266af280 |
children | 780def3a1f36 |
comparison
equal
deleted
inserted
replaced
9:bc62266af280 | 10:cbadb9d05d29 |
---|---|
64 if ( m.getAddress() == "/kick" ){ | 64 if ( m.getAddress() == "/kick" ){ |
65 // float pitchIn = m.getArgAsFloat(0); | 65 // float pitchIn = m.getArgAsFloat(0); |
66 int testChannel = m.getArgAsInt32(0); | 66 int testChannel = m.getArgAsInt32(0); |
67 double timeIn = m.getArgAsInt32(1); | 67 double timeIn = m.getArgAsInt32(1); |
68 printf("\nKICK RECEIVED at time %f\n", timeIn); | 68 printf("\nKICK RECEIVED at time %f\n", timeIn); |
69 | |
69 eventMatcher.newKickEvent(testChannel, timeIn); | 70 eventMatcher.newKickEvent(testChannel, timeIn); |
71 | |
70 } | 72 } |
71 | 73 |
72 if ( m.getAddress() == "/snare" ){ | 74 if ( m.getAddress() == "/snare" ){ |
73 int testChannel = m.getArgAsInt32(0); | 75 int testChannel = m.getArgAsInt32(0); |
74 double timeIn = m.getArgAsInt32(1); | 76 double timeIn = m.getArgAsInt32(1); |
75 printf("\nSNARE RECEIVED at time %f\n", timeIn); | 77 printf("\nSNARE RECEIVED at time %f\n", timeIn); |
78 | |
76 eventMatcher.newSnareEvent(testChannel, timeIn); | 79 eventMatcher.newSnareEvent(testChannel, timeIn); |
80 | |
77 } | 81 } |
78 | 82 |
79 if ( m.getAddress() == "/start" ){ | 83 if ( m.getAddress() == "/start" ){ |
80 printf("start!\n"); | 84 printf("start!\n"); |
85 printf("STRART TIME IN %i\n", ofGetElapsedTimeMillis()); | |
81 eventMatcher.startPlaying(); | 86 eventMatcher.startPlaying(); |
87 printf("TIME OUT %i\n", ofGetElapsedTimeMillis()); | |
82 } | 88 } |
83 } | 89 } |
84 } | 90 } |
85 | 91 |
86 //-------------------------------------------------------------- | 92 //-------------------------------------------------------------- |