I want to build a Bernoulli gate like e.g. Count Modula’s Chances by using only free VCV modules. Similar to the ‘Normal’ mode of Chances, the gate length of the input signal is supposed to be maintained.
What I have come up with so far uses a Random and a Compare module to split the signal by chance into two paths, which are each picked up by a VCA.
Also included is a chain of two Mix modules to delay the gate signal, so that it does not arrive before the switch signal.
The B Offset knob on the Compare module sets the probability for one or the other output.
Do you know of a more compact/streamlined way to create a Bernoulli gate with VCV modules?
Below is the post I created for various forms of Bernoulli Gates. The constructs are definitely not smaller, but they support multiple modes of operation. I’m sure they could be made more compact with the newer VCV Free modules.
Thank you, Dave, yours is a beautiful piece of work! I must admit though that having the Compare module now is a blessing.
Actually, the Compare method also works in a polyphonic setting. The patch is still bigger than Count Modula’s Poly Chances, but looks like a much better deal than the monophonic version.
The example shows 8 channels, but expansion to 16 only takes a second Mult module.
I just noticed that in the Compare path, the Mult module can be omitted altogether when the gate signal (SQR) is run straight into the inputs of the Merge module .
However, the Poly Chances module seems to stop working when there is no Mult module. The Split module shows 0 channels coming in and the scopes also show no signal. Not sure whether this is intended or a bug, @CountModula?
Thank you for trying to reproduce the issue! I think I solved it:
When I re-load the .vcv file I posted above, Poly Chances works fine right from the start.
Then I pull in another Poly Chances (or duplicate the existing), and first move the OUT A and OUT B cables from the existing to the new, then move the INPUT cable from existing to new, poly Chances stops working.
However, when I first move the INPUT cable, then the OUT A and B cables, the polyphony is recognized and it works fine.
So, it appears that the sequence in which cables are connected matters. It appears that you first need to let Poly Chances know that a polyphonic signal is coming, then connect the OUTs. Did not know that .
When VCV introduced the stacked input cables, there was a change made to the ABI that meant the method I was using to propagate a disconnected input state to outputs on certain modules such as the poly modules and switch modules stopped working resulting in the behaviour you are seeing (When disconnecting a cable from certain inputs, the associated outpus become permanently disabled. · Issue #125 · countmodula/VCVRackPlugins · GitHub) . On some modules, disconnecting an input would then permanently disable the associated outputs. This has been fixed for v2.6.0 and will be release when I can find time to finish testing the new modules that are to be included and write the manual.The side effect of the fix is that outputs on the affected modules will now always have 1 channel outputting 0 volts on them when there is no input connected as the ABI no longer allows setting of 0 channels on an output port.
Thank you for taking the time to explain. And it is even more appreciated that you are staying on top to keep your modules current! This is no trivial task. Your modules are so useful, I really would not want to miss them.