|
Hi Jonatan,
Le 18/04/2014 16:29, Jonatan Liljedahl a écrit : The architecture system gives you a lot of flexibility. For example you can modify the root class dsp (from which the class mydsp generated by the faust compiler inherit) in order to introduce a new field, for example fMyRandomSeed. In the dsp() constructor you can initialize fMyRandomSeed the way you need (for example using the system random number generator so that each instance will have a different value). The faust code can then refer to fMyRandomSeed using fconstant(int fMyRandomSeed , <math .h >)Hmm, no it seems myConst would be used directly inside the compute() functions, so all instances would still use the same value? Cheers Yann On Fri, Apr 18, 2014 at 4:25 PM, Jonatan Liljedahl <[email protected]> wrote:Thanks Yann, So you mean that I would then set this myConst variable before calling init on each dsp instance? On Tue, Apr 15, 2014 at 11:20 AM, Orlarey Yann <[email protected]> wrote:Hi Jonatan, Le 14/04/2014 14:33, Jonatan Liljedahl a écrit :Hi! I'm wondering if there's any way to set initialization values per dsp instance? Specifically, I'd like to get different random seeds for noise generator in each instance. Surely, I could generate N noises in each instance and select different ones, but that would be kind of wasteful.A possibility is to rewrite a noise generator using a seed declared as a foreign constant (syntax : fconstant ( int myConst , <math .h >) ) Cheers Yann ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Faudiostream-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/faudiostream-users-- /Jonatan http://kymatica.com |
------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech
_______________________________________________ Faudiostream-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/faudiostream-users
