[Csnd] GUI question
| Date | 2011-05-02 14:20 |
| From | John ffitch |
| Subject | [Csnd] GUI question |
Those who know me know that i am not a GUI/click/point kind of person
but i am kinda required to create a user interface. First attempt is
using FLTK widgets
I have managed to create a panel with three sliders and three buttons
(quite amazing for me!) and can even use the sliders for amplitude etc
My problem is how to implement a reset; I would like it to set the
values for the sliders to a sane value. current code looks like
gk1, gih1 FLslider "Sl1", 0, 32000, 0, 5, -1, 300,15, 20,50
gk2, gih2 FLslider "Sl2", 0, 1, 0, 5, -1, 300,15, 20,100
gk3, gih3 FLslider "Sl3", 0, 100, 0, 5, -1, 300,15, 20,150
gkr, ihb3 FLbutton "@<<", 1, 0, 1, 50, 15, 150, 200, -1
.....
FLsetVal gkr, 10000, gih1
FLsetVal gkr, 0, gih2
FLsetVal gkr, 0, gih3
kcps = cpspch(p4)
....
If click on the button the values reset, but the sliders cease to
function. Surely the FLsetVal should trigger and reset? What have I
failed to understand?
==John ffitch
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-05-02 14:25 |
| From | Adam Puckett |
| Subject | Re: [Csnd] GUI question |
Try FLsetVal_i. On 5/2/11, John ffitch |
| Date | 2011-05-02 14:42 |
| From | jpff@cs.bath.ac.uk |
| Subject | Re: [Csnd] GUI question |
> Try FLsetVal_i.
>
But that only works at initialissation time, and I want to reset an
instrument that i srunning.
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-05-02 14:50 |
| From | Rene Jopi |
| Subject | Re: [Csnd] GUI question |
Hi, Use an INIT instrument instr 100 ;init FLsetVal_i ...
FLsetVal_i ...
........ endin This instrument can be activated by FLTK button, by score, etc... René 2011/5/2 <jpff@cs.bath.ac.uk> > Try FLsetVal_i. |
| Date | 2011-05-02 15:02 |
| From | Iain McCurdy |
| Subject | RE: [Csnd] GUI question |
|
John, The problem with what you are trying to do is that the button does not output a zero when released (should probably be considered a bug). As gkr remains at 1, FLsetVal is continually resetting the slider, preventing you from moving it yourself. If you change the button type to 2 and toggle it on and off it will do what you want, albeit with an extra click. Alternatively you could use FLbutton's ability to trigger notes and trigger a note dedicated to resetting the sliders using FLsetVal_i as other people have suggested. Bye, Iain > Date: Mon, 2 May 2011 14:42:44 +0100 > From: jpff@cs.bath.ac.uk > To: csound@lists.bath.ac.uk > Subject: Re: [Csnd] GUI question > > > Try FLsetVal_i. > > > > > But that only works at initialissation time, and I want to reset an > instrument that i srunning. > > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > |
| Date | 2011-05-02 15:24 |
| From | Adam Puckett |
| Subject | Re: [Csnd] GUI question |
Iain, Thanks for explaining it better to him. That is exactly the idea I was going for, but a lot of times I expect people to think exactly like me. On 5/2/11, Iain McCurdy |