Skip to content

:status value is a rake which I stepped on hard #8

@brunchboy

Description

@brunchboy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions