Hi all,

I'm working on a project similar to the Granulator effect in the Faust
Playground modules:
https://github.com/grame-cncm/faustplayground/blob/master/
faust-modules/effects/Granulator.dsp

But I'm struggling to adapt what I see in the Granulator implementation to
fit my use case. Specifically, I have an audio stream, and a "master clock"
phasor, and what I want is that on every new cycle of the master phasor, a
gate for the audio stream either opens or closes randomly (i.e. multiply by
1.0 or 0.0).

Here are the important bits of my implementation:

samphold(c, x) = x * s : + ~ *(1-s) with {
>   s = (c' < c);
> };
>


> master = os.phasor(1.0, masterFreq); // masterFreq is something like 4Hz
>


> ratio_env = 0.4;
> pulsar = ((master < ratio_env) : @(100)) * (probability > (abs(no.noise) :
> samphold(master)));
> process = myStream * pulsar;


The `pulsar` line is borrowed almost verbatim from the Granulator.dsp file,
except that I use the `master` phasor here explicitly instead of the
`pulsar` input stream. Also, Granulator.dsp uses `ba.latch` where I'm using
my own `samphold` implementation that more closely matches PureData's
implementation, as I've had success with this patch in PD but not in Faust.

With my implementation here, the output result is basically `myStream`
mixed with noise, and I don't understand why? I have a similar result when
I just use `pulsar = (probability > (abs(no.noise) : samphold(master)))` as
well... why would that not work alone? What is the other part, `((master <
ratio_env) : @(100))` supposed to be doing in Granulator.dsp anyway? I
don't really understand that part.

Any help here would be greatly appreciated!

Thank you,
Nick
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to