Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:5425] Loadable fgens

Date2004-11-10 10:41
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:5425] Loadable fgens
I am continuing to look at plugin fgens.  I am now at the problem of
how to write an fgen in isolation.  I think that the values ftp and e
(at least) are needed in the function, and at present these are static
values.  I can see four ways forward
1) Add ftp and e as arguments to all fgens (currently they are void
(*)(void))
2) Add ftp and e as arguments to all loaded fgens
3) Add ftp and e to the ENVIRON structure
4) Add a new table environment which it passed to gen functions --
which would allow multiple instantiations without reloading.

and possible simple variants....

There may be other values needed -- have not thought this all the way
through.  Any thoughts?  At present I have loadable fgens but there is
no way to write them as plugins only as new code in fgens.c which
hardly seems useful!

==John ffitch

Date2004-11-10 11:54
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:5426] Re: Loadable fgens
I have committed the code to ftest.c which defines a totally dull fgen
and it seems to work.  Currently I am using option 2 (Add ftp and e as
arguments to all loaded fgens).  Still open to improvements.
==John ffitch