If/Then Toggle Problems

Nov 30, 2009 at 5:25am

If/Then Toggle Problems

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. –
#46902
Nov 30, 2009 at 5:33am

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.

#168666
Nov 30, 2009 at 5:45am

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. –
#168667
Jan 23, 2010 at 9:02pm

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

#168668
Jan 23, 2010 at 9:42pm

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. –
#168669

You must be logged in to reply to this topic.