On 08/07/2021 12:08, Simon Iten wrote:
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".
Lorenzo's suggestion to use [expr] seems good, but there is no need to [unpack] as [expr] can distribute a list across its variables:
#N canvas 500 93 495 363 12; #X msg 101 70 40 127 1; #X msg 111 96 60 127 1; #X msg 121 123 61 127 1; #X obj 199 185 expr ($f1 >= 40) && ($f1 <= 60); #X msg 83 45 39 127 1; #X obj 83 218 list prepend; #X obj 83 244 route 1 0; #X obj 83 297 print note; #X obj 113 271 print parameter; #X obj 83 160 trigger list list; #X connect 0 0 9 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 5 1; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 6 1 8 0; #X connect 9 0 5 0; #X connect 9 1 3 0;
In this case, [trigger list float] would work just as well as you are dealing with the first number in the list, but this generalises —— just add conditions on velocity and channel to [expr].
Is this elegant? No, just brute-force literal mindedness, I guess, but I am an idiot.
Best
m