LeffelMania / android-midi-lib

MIT License
255 stars 72 forks source link

Potential off by one in ChannelEvent Channel field #17

Open peterbekos opened 6 years ago

peterbekos commented 6 years ago

I think there's an off by one error in the channel for ChannelEvent objects. I know drums are always supposed to be on channel 10 but in the lib it comes back as 9. Cross referenced this with my DAW

peterbekos commented 6 years ago

Also I see this:

    public void setChannel(int c)
    {
        if(c < 0)
        {
            c = 0;
        }
        else if(c > 15)
        {
            c = 15;
        }
        mChannel = c;
    }

the reason I'm not so adamant about this being a bug is because maybe the goal is to reflect the data and not the actual number the users would see when interacting with channels.