diff options
Diffstat (limited to 'src/midi.c')
-rw-r--r-- | src/midi.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -14,12 +14,12 @@ void midi_decode(uint32_t msg, synth_t * synth) { switch (message) { case 0x08: - // printf("Note Off: channel=%d, note=%d, velocity=%d\n", channel, data1, data2); + printf("Note Off: channel=%d, note=%d, velocity=%d\n", channel, data1, data2); synth->midi_note[data1].noteOff = Pa_GetStreamTime(synth->stream); synth->midi_note[data1].noteOffSample = synth->midi_note[data1].elapsed; break; case 0x09: - // printf("Note On: channel=%d, note=%d, velocity=%d\n", channel, data1, data2); + printf("Note On: channel=%d, note=%d, velocity=%d\n", channel, data1, data2); //synth->midi_note[i].n = -1; synth->midi_note[data1].freq = notes[data1 % 12][(data1 / 12) % 8]; synth->midi_note[data1].channel = channel; @@ -127,9 +127,10 @@ init_midi(midi_t *m, synth_t *synth) info = Pm_GetDeviceInfo(i); printf("%d: %s [input: %d output: %d opened: %d is_virt:%d] (interf: %s) -- %d\n", i, info->name, info->input, info->output, info->opened, info->is_virtual, info->interf, Pm_GetDefaultInputDeviceID()); //if (!strcmp("MPK225 MIDI", info->name) && !info->input) break; - //if (!strcmp("MPK225 Port A", info->name) && info->input == 1) break; + if (!strcmp("MPK225 Port A", info->name) && info->input == 1) break; //if (!strcmp("CH345 MIDI 1", info->name) && info->input == 1) break; - if (!strcmp("Midi Through Port-0", info->name) && info->input == 1) break; + //if (!strcmp("Midi Through Port-0", info->name) && info->input == 1) break; + //if (!strcmp("DigitalKBD MIDI 1", info->name) && info->input == 1) break; } Pt_Start(1, midiCallback, m); |