| We should have this discussion in the developers’ list, but anyway, here’s the situation regarding access to “any variable”,
as I see it.
1. Steven’s type system would allow us to expose access to variables, that is not the main issue.
2. Local variables are allocated in an instrument variable pool, and they exist per-instance
3. Globals are in a global pool.
4. To access a variable in an instrument we need to have an instance handle of some kind. So a mechanism to
manipulate instance handles needs to be added to the API.
5. Accessing the global pool should be easier since it does not depend on any given instance.
So we need to design an API to access the type system, and we should do this in a way that is complete
and without hacks. If it is agreed that we should do this, we can put that on the 7.00 list.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952
> On 11 Sep 2017, at 23:57, Rory Walsh wrote:
>
> To get around this issue I've simply set the table number. But I agree, it would be nice to be able to use these tables. It doesn't work with Cabbage either. It can be done via the API, but it's a hack. You can parse the Csd for the global table variables. When you have their name you can run Csound in debug mode for a single cycle and grab the value of the global variables. Their order of appearance in the header section plus 100 will give you the table number. I always thought it would be nice to have an API function to query the value of any variable at any given time, but I don't think it's possible without serious restructuring. Perhaps this is why use channels instead!
>
> On 11 September 2017 at 19:58, jpff wrote:
> As far as I can tell you could search in a loop as GetTable returns -1 for a nonexistent table, or you could use a channel to transmit gisine. It might be nice to know maxfnum (largest table number) but I think it is not available
>
> On Mon, 11 Sep 2017, Francesco Porta wrote:
>
> Thanks Rory,
> but i do not understand (as usual :)).
> I am doing this:
> 1 retrieve the fgen number reading a csd as text
> 2 retrieve length and values using
>
> cs:TableLength(numeroTavola)
> for i=1, length do
> value = cs:TableGet(numeroTavola, i)
> end
>
> this is working ok. But what if i have an orchestra ftgen with automatic number assigned,
> i.e. something like gisine ftgen 0, 0, 1024, 10, 1?
> How can i retreive the assigned number?
>
>
> 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
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
|