Receiving MIDI Control Change Reset message

Hi all,
I’m writing a plugin for the moddwarf which accepts midi messages and acts on those messages. I have a filter in the code to only accept MIDI messages on channel 16, or 0x0f in code. I’m receiving the MIDI Note On and Off messages without an issue, so for example messages <0x9f 0x30 0x1> and <0x8f 0x30 0x1 >. However I’m trying to send a MIDI Control Reset message <0xbf 0x79 0x0> And I’m not receiving that in my code.

The skeleton of my MIDI code in the run function is:

	// sort out any MIDI events
	LV2_ATOM_SEQUENCE_FOREACH (looper->midi_input, ev) {
		if (ev->body.type == looper->uris.midi_MidiEvent) {
			const uint8_t* const msg = (const uint8_t*)(ev + 1);
			switch (lv2_midi_message_type(msg)) {
			case LV2_MIDI_MSG_NOTE_ON:
				break;
			case LV2_MIDI_MSG_NOTE_OFF:
				break;
			case LV2_MIDI_MSG_CONTROLLER:
				es_log("LV2_MIDI_MSG_CONTROLLER\n");
				break;
			case LV2_MIDI_MSG_PGM_CHANGE:
				es_log("LV2_MIDI_MSG_PGM_CHANGE\n");
				break;
			case LV2_MIDI_MSG_CLOCK:
				break;
			default:
				es_log("Unknown message 0x%x\n", lv2_midi_message_type(msg) );
				break;
			}
		}
	}

I’ve stripped out code for Note On and Off messages but for LV2_MIDI_MSG_CONTROLLER and LV2_MIDI_MSG_PGM_CHANGE I just log a message regardless of the channel it’s received for. I’ve checked with a MIDI monitor in parallel that the Reset message is being sent, but for some reason the run method of my plugin never receives it. Perhaps you have to register for those MIDI events in a different way to notes on and off?

1 Like

There is no MIDI message filtering for the data that is sent to plugins, assuming you connect the correct MIDI cable on the pedalboard.

So it could be something regarding those lv2 midi utils.
Logging every received message (the first/status byte) might help to find the problem.

5 Likes