OliverLSanz / loopstrument

GNU General Public License v3.0
4 stars 1 forks source link

Status calculation is wrong in Bitwig.midiOut #24

Open a8t opened 7 months ago

a8t commented 7 months ago

Sorry, this isn't an issue, more of a question.

On this line: https://github.com/OliverLSanz/loopstrument/blob/a65e66840acfb0ccaf85b188c1015841e9628587/src/Bitwig.ts#L39 Can you explain adding channel here? Doesn't it shift the type bits too far?

According to the Linnstrument midi docs, CC should be 1011cccc where c is the channel. To me, this should be const status = type << 4 | channel);, where the << shifts 4 spaces left and | channel flips the appropriate bits to set the channel.

But... it seems your code works.

What do you think?

a8t commented 7 months ago

Sorry, I see why it's not breaking now. Channel is always 0 in the codebase :D

OliverLSanz commented 6 months ago

Hey, sorry for the late answer. I've forgot about this and just remembered it now that I received the "issue closed" mail.

You are right, this should be const status = type << 4 | channel);. I reopen the issue so I fix it when I have time to come back to this project.

If you have more questions or suggestions, feel free to drop them here or by email to oliverlsanz@gmail.com