Csound Csound-dev Csound-tekno Search About

API how can i know when csound performance is ready?

Date2015-12-22 10:27
FromFrancesco Porta
SubjectAPI how can i know when csound performance is ready?
Hello All,
i'm working on a simple program using a GUI and Csound via API.
Csound needs to load some soundfiles in GEN 1 tables and this require some time.
But my GUI is not waiting :)
Is there a way to know when csound has loaded all the files and is ready to play them?

Thanks,
ciao,
francesco.

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

Date2015-12-22 10:40
FromVictor Lazzarini
SubjectRe: API how can i know when csound performance is ready?
You can use ftgen to load these in an instrument. Since the code is sequential,
it will block until done. Then you can signal your gui by setting a channel.

instr ...
ival init 0
chnset ival, "loaded"
ifn ftgen  ...
ifn2 ftgen ...
ival = 1
chnset ival, "loaded"
endin

This whole action is at i-time, so the event
triggering this instrument can have p3 zero.

In your gui, you can check the channel value
and block until it's true.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 22 Dec 2015, at 10:27, Francesco Porta  wrote:
> 
> Hello All,
> i'm working on a simple program using a GUI and Csound via API.
> Csound needs to load some soundfiles in GEN 1 tables and this require some time.
> But my GUI is not waiting :)
> Is there a way to know when csound has loaded all the files and is ready to play them?
> 
> Thanks,
> ciao,
> francesco.
> 
> 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

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

Date2015-12-22 16:03
Fromfra
SubjectRe: API how can i know when csound performance is ready?
yes, perfect!
Many thanks,
ciao,
francesco.

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