hey stéphane, nice! that sounds pretty much like what i need. are these primitives available in the master-dev branch? also i was wondering, is it possible to do something like this on block level? say i have a dynamic modulation system where the user can assign modulators to parameters, can i check somehow at the beginning of a block if the parameter is modulated and decide wether to multiply the parameter with the modulation signal in the current block or not? or is that what is referred to as “multirate”? i am suspecting that this is not possible without checking some condition at every sample, or doing it outside faust.
thanks for all the tipps so far! best, josh > On 7. Dec 2018, at 17:58, Stéphane Letz <l...@grame.fr> wrote: > > >> Le 4 déc. 2018 à 18:41, Joshua Peschke <j...@wavecasual.com> a écrit : >> >> hello everyone, >> i am wondering about how to optimise faust processors. i have a pretty big >> processor that is comprised of multiple parts (its a synth voice with >> multiple oscillators, filters, modulators) and it seems that turning the >> individual parts off doesn’t help performance. i read somewhere that >> everything in faust is “always on”. am i right to assume that means that all >> signal paths get evaluated even when they do not contribute to the final >> signal? >> is there a way to optimise this? > > Well they are two « still not official » primitives, which are « enable » > and « control » with the following semantic : > > (x, y : control) == x > but x is only computed when y is true (y != 0) > > 'Control' is a variant of 'enable 'and the two are related in the following > way: > (x, y : enable) ==> (x*y, y>0 : control) > > They can be used to stop part of the computation, depending of the « y » > signal. Not that « enable » and « control » can only be used in scalar mode > in the old C++ backend that is: faust -lang ocpp …… » > >> my current solution would be to split the large processor up and turn the >> individual parts on and off in c++ which would work, but be kind of a pain. >> also are there other tipps you have to achieve better performance? i noticed >> for example that the smoothing of parameters seems to affect performance >> quite much (if there are lots of them..). do you have any suggestions on how >> to minimise this? any hints are very much appreciated! >> >> in general i have to say great work! faust is awesome! >> >> > > Assuming you are not using « enable » and « control », you can also try the > « faustbench » and « faustbench-llvm » tools, to find out the best > compilation options: > https://github.com/grame-cncm/faust/tree/master-dev/tools/benchmark > > Stéphane _______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users