- Eventide Audio

Home Forums Products Vsig and Preset Development Help with C_Counter reset Reply To: Help with C_Counter reset

#119668
jfcharles
Member

Here is a version that works, but I really just tricked your own patch. What's happening in your most recent version is that when you are at "3" and hit the "increment" trigger, you first increment the counter, get the flag for "max value reached" then reset. The only thing I added is a connection from the reset trigger to the C_MERGE with the increment trigger in input (I added a 4th input). Seems to work. There must be more elegant versions – I hope someone will share!

HEADM adc 2 2 iSwitchL-out iSwitchL-out Empty Empty 1 menupage-obj ;=0,0,100,0
ISWITCH iSwitchL 4 SelectCounter-out adc-in1 adc-null adc-in1 adc-null ;=575,0,100,0
C_MERGE resetCounter 2 SelectCounter-timeout reset-out ;=400,150,100,0
STEXTKNOB SelectTextKnob %s select 4 0 SelectCounter-out "textknob: select 0" "textknob: select 1" "textknob: select 2" "textknob: select 3" ;=575,200,100,0
C_MERGE incrementCounter 4 resetCounter-out SelectTextKnob-textnum_out increment-out reset-out ;=400,300,100,0
C_COUNTER SelectCounter incrementCounter-out resetCounter-out 1 3 ;=575,325,100,0
MENUPAGE menupage menupage menupage 5 increment-obj SelectTextKnob-obj counterMonitor-obj textKnobMonitor-obj reset-obj ;=950,125,100,0
MONITOR counterMonitor SelectCounter-out "counter:         %1.0f" cntMonitor ;=800,325,100,0
MONITOR textKnobMonitor SelectTextKnob-textnum_out textknobMon:%2.4f knobMonitor ;=800,200,100,0
TRIGGER increment increment increment ;=100,550,100,0
TRIGGER reset reset reset ;=250,550,100,0
TAIL tail

Jean-François.