diff options
author | deva <deva> | 2008-07-21 15:32:54 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-21 15:32:54 +0000 |
commit | 217a8a1aa8eba3611d5ba6abefb502fb041e13cb (patch) | |
tree | fe80b09f306e0c83d0e4a0eb5ef5f476183b5fbc /src/jackclient.cc | |
parent | 981cd50a83e67f5471ee1e1ad0c0575506f14da0 (diff) |
Made midi mapper.
Diffstat (limited to 'src/jackclient.cc')
-rw-r--r-- | src/jackclient.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/jackclient.cc b/src/jackclient.cc index 0f3e254..ed2838e 100644 --- a/src/jackclient.cc +++ b/src/jackclient.cc @@ -121,21 +121,15 @@ int JackClient::process(jack_nframes_t nframes) for(jack_nframes_t i = 0; i < midievents; i++) { jack_midi_event_t midi_event; jack_midi_event_get(&midi_event, midibuffer, i); - /* - // Parse midi event - printf("[ Time: %d Size: %d ", midi_event.time, midi_event.size); - for(size_t j = 0; j < midi_event.size; j++) { - jack_midi_data_t m = midi_event.buffer[j]; - printf(" Data: %d ", m); - } - printf("]\n"); - */ + int s = midimapper.map(midi_event); + if(s == -1) continue; // -1 is illigal node. + Ports::iterator pi = output_ports.begin(); while(pi != output_ports.end()) { // Create trigger event - Event event(*pi, sample[midi_event.buffer[0]], midi_event.time); + Event event(*pi, sample[s], midi_event.time); events.insert(event); pi++; |