Csound Csound-dev Csound-tekno Search About

[Csnd] how to display a value in fltk widget?

Date2013-03-08 09:03
FromStefan Thomas
Subject[Csnd] how to display a value in fltk widget?
Dear community,
I would like to display a special value  in a fltk-widget.
In this easy case I would love to see the value of printk2 in the widget's window.
Is it possible?

<CsoundSynthesizer>
<CsOptions>
-odevaudio -+rtmidi=alsa -Ma  -m0d -+rtaudio=alsa -o dac -b341 -B 1024
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
giwave ftgen 0,0,2^10, 10, 1,1/2,1/3,1/4,1/5,1/6,1/7,1/8
massign 0, 1
gkamp init 0
instr 1   
    iamp     ampmidi 0.25
    gkamp init iamp
     icps cpsmidi
    iein = 0.01
    iaus = 3
    irelease = 0.1
    aenv linsegr 0,iein,1,iaus,0,irelease,0
    asig poscil iamp*aenv, icps, giwave
    outs asig, asig
endin

instr 101 ; prints midi amplitude
    printk2  gkamp
endin
</CsInstruments>
; ==============================================
<CsScore>
f    0 60
i101 0 60
</CsScore>
</CsoundSynthesizer>