[PD] question about moses/gate/split??

Mathieu Bouchard matju at artengine.ca
Sat Mar 10 19:42:27 CET 2012


Le 2012-03-10 à 18:23:00, Pagano, Patrick a écrit :

> If x can equal 1,2,3,4 and y can equal 1,2,3,4 how to send a bang when
> x=1 && y=1 BANG 1
> x=1 && y=2 BANG 2
> x=2 && y=1 BANG 3
> x=2 && y=2 BANG 4

if x<3 && y<3 then bang y*2+x-2

[moses 3] for x

[moses 3] for y

once you have computed y*2+x-2, use [sel 1 2 3 4] to turn them into bangs.

alternately, don't use moses, use y*4+x-4, now all your combinations are 
numbered from 1 to 16, and you can use [sel 1 2 5 6] to pick the four 
you're currently interested in, and you can later pick other combinations 
by changing the sel.

Whenever you change the range of x, change the multiplier of y and the 
subtracted constant.

  ______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC


More information about the Pd-list mailing list