Csound Csound-dev Csound-tekno Search About

Re: Should FLbutton behave like this?

Date2006-05-30 15:24
From"Art Hunkins"
SubjectRe: Should FLbutton behave like this?
Yes, Istvan is correct.

Indeed, it has always bothered me that button type 1 didn't put out a simple
trigger - a single 1 when the button is pressed, otherwise zero. And, yes,
I'm making this as a possible feature request.

I guess I'd currently call this a "non-feature." Of course, you work around
this by using the button to trigger an instrument - even if the only thing
that instrument does is to set gkstop == 1.

Art Hunkins

----- Original Message ----- 
From: "Istvan Varga" 
To: 
Sent: Tuesday, May 30, 2006 2:16 AM
Subject: Re: [Csnd] Should FLbutton behave like this?


> On Tuesday 30 May 2006 05:10, Andres Cabrera wrote:
>
> > In this example, I think the second FLbutton should turnoff the
> > instrument, producing gkstop ==1, but it seems to never happen....
> > However, if the button type (4th argument is set to 2 instead of 1) it
> > now works, any ideas? Am I doing something wrong?
>
> I think only those button types that toggle between on/off state
> set the k-rate output, button type 1 can only trigger an event
> when pushed.
> -- 
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Date2006-05-31 11:25
FromIstvan Varga
SubjectRe: Should FLbutton behave like this?
AttachmentsNone  

Date2006-05-31 13:18
FromAndres Cabrera
SubjectRe: Should FLbutton behave like this?
I would really like this behavior. It would be a bit unexpected, but I
think it would be better than the one we have now if it is well
documented.

Could it happen that if you press the button with the mouse for a very
short time with high ksmps, that the event is missed?

Cheers,
Andrés

On Wed, 2006-05-31 at 12:25 +0200, Istvan Varga wrote:
> On Tuesday 30 May 2006 16:24, Art Hunkins wrote:
> 
> > Indeed, it has always bothered me that button type 1 didn't put out a simple
> > trigger - a single 1 when the button is pressed, otherwise zero. And, yes,
> > I'm making this as a possible feature request.
> 
> Having a single "1" output for one control period is not easy to implement,
> because the button does not run at k-rate, but is rather called
> asynchronously from a callback. So, it is possible to have the output
> set to the "ion" value when the button is pushed (i.e. the orchestra is
> responsible for clearing it to "ioff" later), or maybe "ion" while the
> button is held in the "down" position and "ioff" otherwise - but this
> would only work when the button is clicked with the mouse, and not when
> used with the keyboard.
> Is the first solution (only setting to "ion" when activated) acceptable ?