lhl2617 / VSLilyPond

VSCode Extension for LilyPond
https://marketplace.visualstudio.com/items?itemName=lhl2617.vslilypond
96 stars 7 forks source link

Handle keyUp status in running status mode #350

Closed paradox460 closed 3 years ago

paradox460 commented 3 years ago

According to the MIDI spec, a keyDown with a velocity of 0 is equivalent to a keyUp status. This is how the code previously worked, prior to 71300a0.

The MIDI spec section in question:

Running Status is especially helpful when sending long strings of Note On/Off messages, where "Note On with Velocity of 0" is used for Note Off.

This commit reintroduces a check for that, while preserving the newer (as of 71300a0) status checks. That way, both keyUp AND keyDowns with 0 velocity are registered as keyUps

Interestingly enough, JZZ had issues with running status last year, but they have fixed them https://github.com/jazz-soft/JZZ/issues/26. Provided this holds true, we don't have to worry about maintaining current status for RS mode.

lhl2617 commented 3 years ago

huge thanks for your PRs -- I'll look over them over the weekend.

paradox460 commented 3 years ago

Awesome, thank you very much.

Sorry for the back-and-forth on the meaning of a Note On with velocity 0. It was buried in a passage of the spec I skipped over the first time around.

Also, you might want to check your release system, I noticed that your repo showed 1.7, but VSC won't update past 1.6.5. Is it stuck in an approval pending phase or something?

lhl2617 commented 3 years ago

Sorry for the back-and-forth on the meaning of a Note On with velocity 0. It was buried in a passage of the spec I skipped over the first time around.

No worries, it was an oversight on my part in the beginning anyway! MIDI isn't always fun to work with.

Also, you might want to check your release system, I noticed that your repo showed 1.7, but VSC won't update past 1.6.5. Is it stuck in an approval pending phase or something?

No idea... renewing the tokens and rerunning. Marketplace is known to be a wild area with lots of bugs...

lhl2617 commented 3 years ago

Marketplace is known to be a wild area with lots of bugs...

image

Turns out it failed the virus scan....wat?

paradox460 commented 3 years ago

How on earth did that happen. Very strange

lhl2617 commented 3 years ago

How on earth did that happen. Very strange

Likely due to some dep I updated on the way.