OpenNBS / OpenNoteBlockStudio

An open-source Minecraft music maker.
https://noteblock.studio
MIT License
764 stars 51 forks source link

Rounding error causes velocity to go negative #466

Open BedrRedstone opened 3 months ago

BedrRedstone commented 3 months ago

When using the fade out macro, it will sometime give negative zero at the end of the macro. when it goes negative, it plays as though its velocity is 100

Steps to reproduce the behavior:

  1. Make a 15 note long sustain
  2. Right click
  3. Go to Macros
  4. Click on "Fade out"
  5. Look at the end of the sustain

It should neither be negative or play one negative.

image

Note that a 15 note long sustain is not the only example possible to get negative zero velocity