Csound Csound-dev Csound-tekno Search About

[Csnd] FLTK Widgets Not Working (Windows)

Date2008-06-05 20:07
FromJim Aikin
Subject[Csnd] FLTK Widgets Not Working (Windows)
When I load the second block of code given in the manual's "FLTK Widgets and
GUI controllers" page (the one that instantiates two panels and puts a
slider in each of them) and then run it from Csound5gui in Windows, the FLTK
windows are drawn to the screen, but the client area isn't. The client area
still holds whatever was on the screen before the window was drawn. There is
no visible slider.

I've tried this in two computers. One has an openGL-compatible graphics
card, the other doesn't. The performance is not identical; without openGL,
there are some additional redraw problems when a window is dragged. But even
with openGL, the code simply doesn't work as given.

To save everyone the trouble of looking it up, the code is given below. Is
there something easily fixable here? Thanks!

--Jim Aikin

;*************************************************



; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac           -iadc    ; -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o linseg.wav -W ;;; for file output any platform


;*******************************
sr=48000
kr=480
ksmps=100
nchnls=1

        FLpanel         "Panel1",450,550,100,100 ;***** start of container
gk1,iha FLslider        "FLslider 1", 500, 1000, 0 ,1, -1, 300,15, 20,50
        FLpanelEnd      ;***** end of container

        FLpanel         "Panel2",450,550,100,100 ;***** start of container
gk2,ihb FLslider        "FLslider 2", 100, 200, 0 ,1, -1, 300,15, 20,50
        FLpanelEnd      ;***** end of container

        FLrun           ;***** runs the widget thread, it is always
required!

instr 1
; gk1 and gk2 variables that contain the output of valuator
; widgets previously defined, can be used inside any instrument
printk2 gk1
printk2 gk2   ;print the values of the valuators whenever they change
endin
;*******************************


f 0 3600 ;dummy table for realtime input
e




-- 
View this message in context: http://www.nabble.com/FLTK-Widgets-Not-Working-%28Windows%29-tp17677385p17677385.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2008-06-05 21:06
FromIain McCurdy
Subject[Csnd] RE: FLTK Widgets Not Working (Windows)
I think something got broken between 5.07 and 5.08 with regard to FLTK. Gui and command line versions both give problems. The code you posted will work on 5.07 but not on 5.08. The ^C exiting problem seems to be specific to 5.08 also.
Iain

> Date: Thu, 5 Jun 2008 12:07:41 -0700
> From: midiguru23@sbcglobal.net
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] FLTK Widgets Not Working (Windows)
>
>
> When I load the second block of code given in the manual's "FLTK Widgets and
> GUI controllers" page (the one that instantiates two panels and puts a
> slider in each of them) and then run it from Csound5gui in Windows, the FLTK
> windows are drawn to the screen, but the client area isn't. The client area
> still holds whatever was on the screen before the window was drawn. There is
> no visible slider.
>
> I've tried this in two computers. One has an openGL-compatible graphics
> card, the other doesn't. The performance is not identical; without openGL,
> there are some additional redraw problems when a window is dragged. But even
> with openGL, the code simply doesn't work as given.
>
> To save everyone the trouble of looking it up, the code is given below. Is
> there something easily fixable here? Thanks!
>
> --Jim Aikin
>
> ;*************************************************
>
> <CsoundSynthesizer>
> <CsOptions>
> ; Select audio/midi flags here according to platform
> ; Audio out Audio in No messages
> -odac -iadc ; -d ;;;RT audio I/O
> ; For Non-realtime ouput leave only the line below:
> ; -o linseg.wav -W ;;; for file output any platform
> </CsOptions>
> <CsInstruments>
> ;*******************************
> sr=48000
> kr=480
> ksmps=100
> nchnls=1
>
> FLpanel "Panel1",450,550,100,100 ;***** start of container
> gk1,iha FLslider "FLslider 1", 500, 1000, 0 ,1, -1, 300,15, 20,50
> FLpanelEnd ;***** end of container
>
> FLpanel "Panel2",450,550,100,100 ;***** start of container
> gk2,ihb FLslider "FLslider 2", 100, 200, 0 ,1, -1, 300,15, 20,50
> FLpanelEnd ;***** end of container
>
> FLrun ;***** runs the widget thread, it is always
> required!
>
> instr 1
> ; gk1 and gk2 variables that contain the output of valuator
> ; widgets previously defined, can be used inside any instrument
> printk2 gk1
> printk2 gk2 ;print the values of the valuators whenever they change
> endin
> ;*******************************
> </CsInstruments>
> <CsScore>
> f 0 3600 ;dummy table for realtime input
> e
>
> </CsScore>
> </CsoundSynthesizer>
>
> --
> View this message in context: http://www.nabble.com/FLTK-Widgets-Not-Working-%28Windows%29-tp17677385p17677385.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. Invite friends now!