-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I was working with one of my users to try to figure out why a Beat Link Trigger integration example was failing to learn MIDI mappings on channels other than 0, and discovered that I had been using the wrong key to compare MIDI commands all along. I had seen them showing up in :status in the REPL, so I was using that. But after following many blind alleys, I finally noticed that whenever the channel was not zero, :status was nil. I tracked that down to this line, which blindly tries to use the status byte as a key to find the command. Of course, that only works when the channel bits are all zero.
I will fix my code to use :command instead, but I think this behavior should be changed. This is not a useful value for :status; it is just a clone of :command when channel is 0, and nil otherwise. It should instead just hold the actual status byte if you keep it at all; otherwise I am certainly not going to be the only person to step on this particular painful rake.