Quantize Midi Notes To a Scale

M4RS Music's icon

Here is a bit of javascript I wrote for a project I'm working on. I noticed that nowhere on the internet is there really a tutorial on how to quantize midi pitches in Max. That may be because it's really simple but regardless I feel like this could help someone so I'm sharing it.

In the readme I say that you should use a jsui object but this is not a ui element, I was just too lazy to figure out how to select a .js file in the js object. Hope someone can find some use in this, I used it to shift the pitch of notes that are being generated from the position a ball bounces in a physics simulation.

Source Audio's icon

before searching internet, a look into max examples would have been helpful.

/examples/max-tricks/notes-and-pitch

and

https://cycling74.com/forums/scalemaster-a-note-quantizer-scale-database

only place ALL items from zip file into a single folder