Forums > MaxMSP

make bang when change happens

Nov 06 2010 | 11:27 am

Hi all!
(This is my firs post here)

I’m building a sequencer that should control VST plugin (Battery) via "vst~" object. So far i’ve figure out some basic concepts to create this kind of patch, but right now i’m stuck with making "bang" signal after some change in "tempo" object.

Here is the detailed description of the problem. I want to make a bang in every change that comes from tempo object and send it to vst midievent when certain condition is meet in "if then" object.

The example patch is in att.


Nov 06 2010 | 6:04 pm

your problem is the {if $1 && $2 == 1 then $i1]. "&&" is the logical AND operator. So what you are asking is "if the first number AND the second number are equal to 1, give me the first number". Since the first number is between 1 and 8, the only time you would ever get any output is if the first toggle is on and your counter is at 1.
Have a look below. It’s one way of doing it. I also changed your [pack] to a [pak] so that every change outputs the list (no need for the bang anymore).

-- Pasted Max Patch, click to expand. --

Nov 06 2010 | 6:22 pm

Just to clear things up a little: [if $i1 && $i2 == 1 then $i1] means if the value in the first inlet is non-zero and the value in the second inlet is equal to 1 then outlet the first value. To be as MIB describes it would need to be [if $i1 == 1 && $i2 == 1 then £i1].

if $i1 is a boolean operation with 0 being false and anything else being true. You need to be specific either side of the == operator if you want to compare both inlet values.

I hope that clears things up a tiny bit.


Nov 06 2010 | 6:39 pm

@Luke – silly me. should think a bit longer before posting.

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

Forums > MaxMSP