You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decimal numbers in midiToFreq() return microtonal values, because they're not rounded first.
This is actually a pretty cool feature, and allows some creative possibilites (microtonal music!), but it might be unexpected for some because the reference implies the value should be an integer MIDI note number:
General MIDI treats notes as integers where middle C is 60, C# is 61, D is 62 etc. Useful for generating musical frequencies with oscillators.
Rather than 'fix' this, adding a note to the reference description along the lines of 'Decimal values return microtonal frequencies.' Might clarify that those values won't be rounded to equal temperament tuning, but keep a pretty cool, if unexpected, feature?
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
Most appropriate sub-area of p5.js?
p5.js version
1.11.1
Web browser and version
Firefox 133.0.3
Operating system
Windows 11
Steps to reproduce this
Steps:
Rather than 'fix' this, adding a note to the reference description along the lines of 'Decimal values return microtonal frequencies.' Might clarify that those values won't be rounded to equal temperament tuning, but keep a pretty cool, if unexpected, feature?
Snippet:
I'd be happy to add this note to the reference if it's accepted.
The text was updated successfully, but these errors were encountered: