Piano keyboard can go out of range when typing extreme values

Normally, you cannot go outside of 0 and 144 when pressing the arrows in the piano keyboard input found in blocks like the play note (60 v) for (1) beats block. However, by typing a value not between 0 and 143, and then pressing the down arrow, it can go outside the range of 0-144.
Screenshot 2024-12-04 161127

Even typing a value above 1450 and then doing the same procedure will freeze Snap! withuot caution.

Fix

Don't make the piano keyboard display keys above 144 or below 0, when pressing the down arrow when not between 0 and 144, so things won't break like freezing the UI when it goes above 1450.

just use a better browser

[edit] Ha! now I think I understand the issue, some browsers apparently instead of automatically clamping frequencies they cannot play, because they are outside their (hardware's) Nyquist frequency range, and instead of throwing a JS error, decide to just break (Safari, sigh).

Thanks for the report, I've added those boundaries to the midi notes range. I did not add boundaries to the frequencies themselves for performance reasons, so you'll still be able to break the browser tab by attempting to play frequencies outside your hardware's Nyquist frequency range in ... Safari.

I just tested this out, and the ui doesn't freeze for me when it goes above 1450.

yeah, at first I couldn't reproduce it either. But in Safari - which I usually don't use - it does break (somewhat to my surprise, I have to admit).

I'm also surprised, since it doesn't seem right to freeze a page because of a bad frequency.