Forums > MaxMSP

Filtering certain Number Range

Jul 17 2011 | 9:22 pm

Hey everybody I’m fairly new to Max/MSP and I’m making a keyboard interface to toggle midi notes thru a makenote with a slider and have it randomized. I was wondering if there a certain way to filter only certain notes to be processed and played like for example only black or white notes. If anyone can shed some light on the matter it’d be greatly appreciated thanks!

Jul 17 2011 | 10:24 pm

many different ways of doing something like that. some object to look into: select, route, coll, table, split…

have a look at the helpfiles of those and see if you get inspired. If you have some more specific questions and a patch to post, I will be happy to help out further.

Jul 18 2011 | 1:36 am

If you want to be able to filter, say all G#s no matter which octave they are in, take a look at [%] (modulo) object.

Aug 24 2016 | 5:03 pm

Hey guys, I know that this is an old thread, but I’m a beginner and I’m really curious how to filter notes with [%] as BkShepard suggested. I checked the help and reference cards but they don’t give an example of that function. Anybody got an example of this in action?

Aug 24 2016 | 5:23 pm

the % object is one way how to get the remainder of a division.

when you send note numbers between 0 and infinite into [% 12], it will output numbers 0-11, which stand for keys C-B#.

so for example you can do things like [if $i1%12==3 then $i1] to filter a stream of notes for D# across they keyboard.

Aug 27 2016 | 12:11 am

Awesome! Thank you so much! My Quantizer is working wonderfully :D

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP