From c03d395f6848fe9b2d1185173a9cf5ec8277394f Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 21 Nov 2023 14:07:33 +0200 Subject: Crappy fft for spectrum analysis and initial gtk test --- src/midi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/midi.c') diff --git a/src/midi.c b/src/midi.c index c01b803..e711ecb 100644 --- a/src/midi.c +++ b/src/midi.c @@ -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); -- cgit v1.2.3