Hi Klaus, Thanks for the reply. If I understand correctly, waveform is a read-only primitive, and only work for constant data. Am I missing something? Do you have an example?
I suppose a rwtable could be abused as intermediate. But it seems like overkill, for just getting arguments from a function call stack. -- robin On 8/17/22 18:55, Klaus Scheuermann wrote: > I did a list with wavform once > https://faustdoc.grame.fr/manual/syntax/#waveform-primitive > > Hope it helps... > >> On 17. Aug 2022, at 18:10, Robin Gareus <ro...@gareus.org> wrote: >> >> Hello Faust community, >> >> I'm brushing up my FAUST skills. It's been over a decade and it's >> amazing to see how far things have grown. Well now, I just ran into an >> issue: >> >> >> How can I place signal primitive into a list? >> >> e.g. use _,_ as list arguments (_,_) for `an.analyzer(3, HERE)` >> >> >> If I understand correctly, lists are just parallel composition. So I >> expected an extra pair of brackets to work. Why doesn't it? >> >> >> -8<- >> >> Perhaps the deeper issue is the design-pattern that I'm aiming for. So >> let me elaborate. The specific use-case is a multiband effect[1]: >> >> The following works (implementation omitted for readability): >> >> ``` >> apply(fq,g1,g2,g3,g4) = _; >> >> freqs=100,200,300; >> >> process= _ <: par(i,2,_) >> : (an.analyzer(6, (freqs)) , _) >> : apply (freqs); >> >> ``` >> >> Now, I'd like to make this generic for arbitrary numbers of frequency >> bands, rather than 3 hardcoded band-splits. This is similar how >> an.analyzer() or filterbank work, except with an additional gain >> parameter for each band: >> >> >> ``` >> nuapply(freqs, gain) = _ >> with { >> nb = ba.count(freqs); >> f(n) = ba.take(n, freqs); >> g(n) = ba.take(n, gain); // bm +1 elemements >> }; >> ``` >> >> So far so good. This works with explicit literal arguments. >> >> However I fails to see how the output of analysis stage can be passed as >> list. >> >> I tried another approach using `nu2apply(freqs)` and then >> selectn() the gain levels from input bus, but that quickly becomes a mess. >> >> What is the Faustian way to implement this? >> >> Thanks in advance, >> robin >> >> -- >> >> [1] >> https://gist.github.com/x42/eeb2aa9f9cc4a9083fb2cf2d86645c9a#file-mcomp-dsp-L43-L60 >> _______________________________________________ >> Faudiostream-users mailing list >> Faudiostream-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/faudiostream-users >
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users