[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] buttonview as trigger?
Never mind, figured it out:
resetPitch.action = { pitchSh.value = 1.0 };
I just didn't look carefully enough before through the
class definition.
James
--- James Harkins <jamshark70@xxxxxxxxx> wrote:
> How do you use button view as a trigger (v2.2.16)? I
> want to have a button on my GUI that would reset the
> value of a slider view. In my code, I have:
>
> pitchSh = SliderView.new( ... etc. etc. );
> resetPitch = ButtonView.new(w, Rect.new(...), "Reset
> Pitch", 0, 0, 1, 0, 'linear');
>
> .....
>
> output <! Sequencer.ar({ pitchSh.value = 1.0; 0 },
> resetPitch.kr)
>
> What happens is that the Sequencer function executes
> continuously; the second I let go of the slider, its
> value jumps back to 1.0. I thought the Sequencer
> function executes only when the trigger moves from
> zero to non-zero? What am I missing?
>
> James
>
> =====
> ____ James Harkins
> \ / jamshark70@xxxxxxxxx
> \/ http://www.duke.edu/~jharkins
>
> "... love and hot pants, peace and harmony..."
> -- Dick Lee, Hot Pants: The Musical
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> _______________________________________________
> sc-users mailing list
> sc-users@xxxxxxxxxxxxxxx
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
=====
____ James Harkins
\ / jamshark70@xxxxxxxxx
\/ http://www.duke.edu/~jharkins
"... love and hot pants, peace and harmony..."
-- Dick Lee, Hot Pants: The Musical
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com