FrancescoCeruti / linux-show-player

Linux Show Player - Cue player designed for stage productions
https://linux-show-player.org
GNU General Public License v3.0
204 stars 49 forks source link

Launchpad support #259

Open k80w opened 1 year ago

k80w commented 1 year ago

It'd be great to have integrated support for the Novation Launchpad (as well as other similar controllers). It's easy to trigger cues using a Launchpad, but you have to manually send MIDI output to get visual feedback.

An ideal experience should provide visual feedback on the controller based on cue status.

It seems to be that in order to do this sustainably and generically, it might demand an extension to the existing Controller plugin.

k80w commented 1 year ago

I took a really rough crack at this in order to have something usable for my purposes: https://paste.sr.ht/~kt/e1fd9a1836cb1e51981f366e12b7624d81de007f

The first patch converts note_ons with velocity 0 to note_offs, like #257. The second patch (very messily) extends controller.py and protocols/midi.py to send MIDI messages to each of a cue's corresponding MIDI trigger notes whenever that cue's status changes.

It includes a very dirty method for converting the cue's background color to a Launchpad MK2–appropriate velocity code.

I don't intend for this to be merged, I just hope that it may help someone else looking for this functionality quickly :)