[Csnd] Outvalue timing issue
| Date | 2018-10-08 19:36 |
| From | Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | [Csnd] Outvalue timing issue |
Hi all,
I'm having a weird issue using the "outvalue" opcode to refresh my host gui.
The opcode seems to have a bug at the first i-pass, and then it works well.
I'm getting the outvalue in my host with the csoundGetChannelCallback. and
i'm also printing it in the instrument to debug.
The instrument is like this
instr 1
ival = p4
print p4
kgoto thekpass
outvalue "T_sync",ival
thekpass:
endin
and the score :
i 1 0 1 1
i 1 1 1 2
i 1 2 1 3
i 1 3 1 4
i 1 4 1 5
i 1 5 1 6
i 1 6 1 7
i 1 7 1 8
The print inside the instrument prints the right value, while, at the same
time, the first i-pass always send 0 to the outvalue (i get 0 in the host -
and as you see, there is no 0 in my i statements). And then, all the values
in the host are delayed (the second statement sends 1, then 2 etc... while
the print displays 2,3 ..)
new alloc for instr 1:
instr 1: p4 = 1.000
in lua 3 0
instr 1: p4 = 2.000
in lua 3 1
and so on...
I saw a similar topic, but i don't see a real answer to this. The outvalue
is quite useful to trigger the callback in the host.
Do someone knows where it comes from ?
And do anyone has an alternative to trigger this kind of callback ?
Thanks in advance
Johann
--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2018-10-09 14:23 |
| From | Mauro Giubileo |
| Subject | Re: [Csnd] Outvalue timing issue |
|
Hi, I tried the 'outval' opcode in CsoundQT and it works correctly. It prints and sends the right values to the widgets. This is the code:
Best Regards, Il 2018-10-08 20:36 Johann Philippe ha scritto:
|
| Date | 2018-10-09 14:50 |
| From | Johann Philippe <000002c2c0737523-dmarc-request@LISTSERV.HEANET.IE> |
| Subject | Re: [Csnd] Outvalue timing issue |
Thank for the answer. In my case, the problem was that i used the csoundSetOutputChannelCallback to trigger the callback, but the value i used was coming from csoundGetChannelPtr. Now i use the third input argument in my callback function (opaque pointer), and cast it to a double. Then i get the right values.
Le mardi 9 octobre 2018 à 15:24:00 UTC+2, Mauro Giubileo <mgiubileo@COMPUTERALTAFED.IT> a écrit :
Hi, I tried the 'outval' opcode in CsoundQT and it works correctly. It prints and sends the right values to the widgets. This is the code:
Best Regards, Il 2018-10-08 20:36 Johann Philippe ha scritto:
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2018-10-09 15:52 |
| From | Mauro Giubileo |
| Subject | Re: [Csnd] Outvalue timing issue |
|
I'm glad now it works. :-) Regards, Il 2018-10-09 15:50 Johann Philippe ha scritto:
|