When a portmidi sink is started, it emits a polyphonic aftertouch event on midi channel 5
Summary
The start method of a PortMidiSink object calls a push midi message with a status byte of 165 (polyphonic aftertouch on midi channel 5), a data1 byte of 1 (pressure is applied to midi note 1) and a data byte 2 of 67 (pressure of 67).
This is not necessary and it is probably an artifact of some very old never cleaned prototype code (first occurence I could find in this commit : 7fe2fd02 and there was a comment with a fixme that subsequently disappeared in this commit : 8e0405e1)
While this looks very innocuous (after all, its only one midi message of an uncommon type on a very low pitch that is mostly never used), this breaks trivial test cases in scenic : When developing, we usually test with the alsa midi through channel as both input and output just to ensure connections are working as intended, this means the message will be reemitted in an infinite loop, and, moreover, switcher will continually set the property last_midi_value on the midisrc quiddity. For whatever reason, switcher lives pretty well with this infinite loop until we try to disconnect the midisrc from the midisink. Switcher then freezes and dies. This happens with the development version of scenic 4.1 paired with switcher 3
This also caused an infinite loop in switcher 2 and scenic 4.0X but the rate of event spam seems much lower so it never caused any major issue before now. (switcher 3 sends upwards of 200 property update event per second while switcher 2 sends +-20/s)
How to reproduce ?
Start a PortMidiSink
Expected behavior
A PortMidi
What is the frequency of occurrence of this behavior ?
Every time
Other comment
(Provide here extra comment if any)