Stuck with a SynthEdit project?

Category: Integer step counter

Converting Integer to Boolean “steps” for a SynthEdit Sequencer.

This is a fairly basic structure consisting of 16 Roy IntTo(Bool) modules.
The IntTo(Bool) module is basically a comparator for Integers instead of Voltages.

Input (Integer): The input value to be compared.
Trigger At Value: The value that the input is to be compared with.
Invert (Boolean): If set to true the output will be “True” when the comparison is “False”, and “False when the comparison is “True”
Trigger Only If Equal: There is a very useful setting in the properties that we need for this structure: “Trigger Only If Equal” which means that if this box is ticked the output will only be “True” if the Input and “Trigger at Value” input match. If this is not ticked then the Output will be “True” when the Input Integer matches or exceeds the trigger value

The Integer to Boolean step converter.

These modules take an integer input from the DSP Count Input, and if the IntTo(Bool) module receives an Integer that matches the one specified at the Trigger At Value plug, then it will set the output to “True”.
If we set up a structure like the one below, and set up the Trigger At Value on each module then we need to start with the first module at Value 0, working up to 15 for the last module. All modules need to have their Trigger Only If Equal set as “True”. As the Input Integer value steadily rises/falls the appropriate module will send a true signal.
Note: the trigger value for the first module must be 0.

Now we have most of the building blocks for a functional sequencer…

A multi-function Step Counter in SynthEdit.

This module will give you the option to count up, or down, count to a set number and stop, or a pendulum mode (count up from 1-16, then count down from 16 to 1 and so on). The number of steps in the sequence can also be set via a drop down list. At the heart of this structure is the ED DSP Counter. This module takes a train of input pulses and counts them, outputting the appropriate integer.

ED DSP Counter.

Counts the number of Boolean input impulses between 0 (included) and a specified value (positive, negative or zero to block counting) specified by the Integer at Max Plug (included).
Input (Boolean): Input pulses to be counted.
Reset: At any time a Boolean “True” sent to the Reset pin can reset the counter to zero allowing it to restart.
Mode (List): The count can proceed in several ways depending on the Mode setting:
1) Unlimited: positive if Max is >0, negative if Max <0, no count if Max = 0
2) Stop: the counter is stopped once the Max value is reached
3) Wrap: the counter is reset to zero after the Max value is reached
4)Ping-pong: (Pendulum) The count proceeds from zero to Max then back to zero, indefinitely.
Max (Integer): Sets the maximum count.
Output (Integer): Outputs the number of pulses counted as an integer.

ED DSP Integer counter module

By using this counter we have an effective way of making a step counter which can be fed by the BPM Clock4 oscillator. This allows us to have a count running from 0 through to 16 (or whatever maximum is set), in a variety of modes.

Controlling the count direction.

Going up… Going down.
The first point of note is that the vales in the Fixed Values (Int) module are a little counter intuitive, until you consider the way the DSP counter counts. They are listed below with the actual number of the steps on the Left (Name) and the corresponding integer value on the right (Value). Step 2 has the count value of 1? That’s right. It’s because we are counting from 0, but referring to 0 as step 1. The value is always one less than the step number.

Counter values

These values are output to the Switch (Many>1) so we can select the number of steps we want in our count.
The Max count on the DSP counter is self explanatory, but we do need to look at how the ED Subtract module is connected (Below).
Input 1 must be fed from the switched Integer values, and Input 2 must be fed by the DSP Counter, otherwise the up/down count values just won’t match up properly. The Switch (Many>1) allows us to switch between counting up 1->16 and down 16->1. So (ignore the blue line and plugs) out Integer count is fed to the IO Module to go to our next structure/module.