Csound Csound-dev Csound-tekno Search About

[Csnd] Re: FLbutton

Date2008-05-19 12:33
FromLuís Antunes Pena
Subject[Csnd] Re: FLbutton
Hello,
if this is the expected behaviour, it's somehow strange because you're alowed to trigger the event only once ...
Is there any other possibility to have simple trigger-button like a bang in Max/Msp?
Thanks,
-Luis

Andres Cabrera schrieb:
Hi,
I haven't tried it, but I think it is the expected behavior. Type 1 is just a trigger, while type 2 is a switch. You're right about the value staying on, it is more intuitive, but I think the button was made to wrok like that.

Cheers,
Andrés

On Sun, May 18, 2008 at 10:41 AM, Luís Antunes Pena <k_o_m_p@yahoo.de> wrote:
The FLbutton opcode seams not to work correctely. I supose when one presses the button it should change the output to ion and return to ioff after leaving the button. Type "1" changes only once from ioff to ion. Is this the expected behavior?  Type "2" changes the output correctly to ioff after pressing the button again. I attached a simple example to demonstrate this.

(running Csound 5.08 - Intel)

Thanks,

Luis



<CsoundSynthesizer>
;flags
<CsOptions>
</CsOptions>

;orchestra
<CsInstruments>
  sr        =  44100
  ksmps        =  10
  nchnls    =  2


  ix_panel  =  100  
  iy_panel  =  100  

        FLpanel   "bang", ix_panel , iy_panel, 250, 200


  ion        =  1 
  ioff        =  0
  itype        =  1
  iwidth    =  50
  iheight   =  50
  ix        =  5
  iy        =  5
  iopcode   =  -1            ; deactivate opcode option
 
  gkbutton, gibutton_h    FLbutton          "bang", ion, ioff, itype, iwidth, iheight, ix, iy, iopcode


           FLpanelEnd 
        FLrun    

    instr 1

        printk2 gkbutton  
 
    endin

</CsInstruments>
   
;score
<CsScore>
i1  0  6000
e

</CsScore>
   
</CsoundSynthesizer>


_________
http://icem.folkwang-hochschule.de/~pena



Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.



--
signatur

http://icem.folkwang-hochschule.de/~pena




Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.

Date2008-05-19 12:40
FromVictor Lazzarini
Subject[Csnd] Re: Re: FLbutton
Type 1 is probably best used to start instrument instances.

At 12:33 19/05/2008, you wrote:
>Hello,
>if this is the expected behaviour, it's somehow strange because you're 
>alowed to trigger the event only once ...
>Is there any other possibility to have simple trigger-button like a bang 
>in Max/Msp?
>Thanks,
>-Luis
>
>Andres Cabrera schrieb:
>>Hi,
>>I haven't tried it, but I think it is the expected behavior. Type 1 is 
>>just a trigger, while type 2 is a switch. You're right about the value 
>>staying on, it is more intuitive, but I think the button was made to wrok 
>>like that.
>>
>>Cheers,
>>Andrés
>>
>>On Sun, May 18, 2008 at 10:41 AM, Luís Antunes Pena 
>><k_o_m_p@yahoo.de> wrote:
>>The FLbutton opcode seams not to work correctely. I supose when one 
>>presses the button it should change the output to ion and return to ioff 
>>after leaving the button. Type "1" changes only once from ioff to ion. Is 
>>this the expected behavior?  Type "2" changes the output correctly to 
>>ioff after pressing the button again. I attached a simple example to 
>>demonstrate this.
>>
>>(running Csound 5.08 - Intel)
>>
>>Thanks,
>>
>>Luis
>>
>>
>>
>>
>>;flags
>>
>>
>>
>>;orchestra
>>
>>   sr        =  44100
>>   ksmps        =  10
>>   nchnls    =  2
>>
>>
>>   ix_panel  =  100
>>   iy_panel  =  100
>>
>>         FLpanel   "bang", ix_panel , iy_panel, 250, 200
>>
>>
>>   ion        =  1
>>   ioff        =  0
>>   itype        =  1
>>   iwidth    =  50
>>   iheight   =  50
>>   ix        =  5
>>   iy        =  5
>>   iopcode   =  -1            ; deactivate opcode option
>>
>>   gkbutton, gibutton_h    FLbutton          "bang", ion, ioff, itype, 
>> iwidth, iheight, ix, iy, iopcode
>>
>>
>>            FLpanelEnd
>>         FLrun
>>
>>     instr 1
>>
>>         printk2 gkbutton
>>
>>     endin
>>
>>
>>
>>;score
>>
>>i1  0  6000
>>e
>>
>>
>>
>>
>>
>>
>>_________
>>http://icem.folkwang-hochschule.de/~pena
>>
>>
>>
>>Gesendet von 
>>Yahoo! 
>>Mail.
>>Dem pfiffigeren Posteingang.
>>
>
>
>--
>
>http://icem.folkwang-hochschule.de/~pena
>
>
>
>Gesendet von 
>Yahoo! 
>Mail.
>Dem pfiffigeren Posteingang.

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth