Forums > MaxMSP

If/Then Toggle Problems

November 30, 2009 | 5:25 am

I’m trying to get an if-then powered toggle to act as a midi trigger for a set note. The problem is that no matter what number is set, the toggle will reset it to the arguments set in the if-thens. The only work around I can figure is to have a message set to the note I want. This method is more inconvenient because the patcher that this is a part of is HUGE and I need the notes to be more dynamic. Otherwise it will get even larger…

So does anyone have any suggestions as to how to keep the number set AND use the toggle as a midi trigger??

– Pasted Max Patch, click to expand. –

November 30, 2009 | 5:33 am

I’m not understanding yet, but the first thing that pops into my head would be to use trigger to specify the order of actions so you can store values in an int object or message box first, then bang them out if certain conditions are met… but I am too tired right now to actually understand what you are trying to do.


November 30, 2009 | 5:45 am

maybe the bigger picture will help to clarify. this patch uses silhouettes to control midi events. this specific version sends a bang to midiout to play a note. (unfortunately you have to reset it after each note). the problem is that if the note (through Rewire) has a high attack setting, then a bang is insufficient for the note to reach full value. i was thinking that a toggle might do the trick. if an object is in the silhouette then the note is played and held, if not it releases the note.

– Pasted Max Patch, click to expand. –

January 23, 2010 | 9:02 pm

I think you’re looking for ‘togedge’. That will convert toggle to bang.


January 23, 2010 | 9:42 pm

I’m a little unclear about the problem, but this addresses a couple interpretations of what the problem might be:

– Pasted Max Patch, click to expand. –

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