[PD] notein midi, use only a range of notes...

Lorenzo Sutton lorenzofsutton at gmail.com
Thu Jul 8 17:23:56 CEST 2021


On 08/07/21 13:08, Simon Iten wrote:
> hi list,
> what is the prefered vanilla way to set a range for the notein object?
> say i only want midi notes 40 to 60 to play a pitched sound in my patch, notes below and above would control other parameters of "the synth".
> i tried with two [moses] objects but it seems a bit convoluted and since i am dealing with a “list” of 3 values (pitch, velocity, channel) it is not very elegant.

just use [unpack] before the two [moses] and [pack] after them.

If you really dislike the two [moses] objects you could have something like:
[expr ($f1 >= 40) && ($f1 <= 60)]

in a single object and use it for a [spigot] to filter the numbers... 
But I'm not sure that's any better - and you'd still need to 'extract' 
only the first number, again most probably with [unpack].

It also really depends on the design of your patch... 'where' does the 
3-value list come from? Are you generating it? Capturing it from a 
physical device, etc.?

My two cents,

More information about the Pd-list mailing list