Mercurial > hg > multitrack-audio-matcher
comparison src/testApp.cpp @ 7:33dedfe32893
kick, snare and bass windowed. Likelihoods in dedicated screen regions
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Thu, 02 Feb 2012 21:55:51 +0000 |
parents | 746a5af43c02 |
children | 572564b7cb85 |
comparison
equal
deleted
inserted
replaced
6:746a5af43c02 | 7:33dedfe32893 |
---|---|
29 | 29 |
30 | 30 |
31 | 31 |
32 eventMatcher.recordedTracks.loadTestAudio(); | 32 eventMatcher.recordedTracks.loadTestAudio(); |
33 | 33 |
34 | 34 eventMatcher.setWindowDimensions(); |
35 //audioFilePlayer.loadAudioFile(infilename); | 35 //audioFilePlayer.loadAudioFile(infilename); |
36 } | 36 } |
37 | 37 |
38 | 38 |
39 //-------------------------------------------------------------- | 39 //-------------------------------------------------------------- |
64 | 64 |
65 if ( m.getAddress() == "/kick" ){ | 65 if ( m.getAddress() == "/kick" ){ |
66 // float pitchIn = m.getArgAsFloat(0); | 66 // float pitchIn = m.getArgAsFloat(0); |
67 int testChannel = m.getArgAsInt32(0); | 67 int testChannel = m.getArgAsInt32(0); |
68 double timeIn = m.getArgAsInt32(1); | 68 double timeIn = m.getArgAsInt32(1); |
69 printf("kick RECEIVED at time %f\n", timeIn); | 69 printf("\nKICK RECEIVED at time %f\n", timeIn); |
70 eventMatcher.newKickEvent(testChannel, timeIn); | 70 eventMatcher.newKickEvent(testChannel, timeIn); |
71 } | 71 } |
72 | 72 |
73 if ( m.getAddress() == "/snare" ){ | 73 if ( m.getAddress() == "/snare" ){ |
74 // float pitchIn = m.getArgAsFloat(0); | 74 int testChannel = m.getArgAsInt32(0); |
75 double timeIn = m.getArgAsInt32(0); | 75 double timeIn = m.getArgAsInt32(1); |
76 printf("snare RECEIVED at time %f\n", timeIn); | 76 printf("\nSNARE RECEIVED at time %f\n", timeIn); |
77 eventMatcher.newSnareEvent(timeIn); | 77 eventMatcher.newSnareEvent(testChannel, timeIn); |
78 } | 78 } |
79 | 79 |
80 if ( m.getAddress() == "/start" ){ | 80 if ( m.getAddress() == "/start" ){ |
81 printf("start!\n"); | 81 printf("start!\n"); |
82 eventMatcher.startPlaying(); | 82 eventMatcher.startPlaying(); |