Logic Menu

Logic modules in SoftStep are useful mostly to shape and control the flow of gates. In musical terms they might be considered, at least partly, as tempo or rhythm shapers. These modules come in two flavors: logical functions and bitwise operators. In the Logic menu there is a separator bar between them.

The logical functions modules (Sync, Hold, Flip, Pulse, Num2G, and Not) regard their inputs as either logical True (anything other than 0) or logical False (0), and always give an output result of either 0 or 127, nothing in between - with the output indicator a red LED rather than a number. Bitwise operators modules (Mask, AND, OR, Invert, and XOR, Shift and Gates) operate on the inputs on a bit-by-bit level, giving a bit by bit output result that can be any number in the 0-127 range. The beauty of bitwise operators is that the logical truth of the functions is also valid for the output as a whole because any not-zero is logical True, and only 0 is logical False.

Logical Function Modules


The Sync module does a simple but often necessary function. It forces one clock gate to synchronize with another. To use it, put the module output to be synchronized -such as a Ball module - into the first (unlabeled) connection input, and put the sync source - such as a Clock module - into the Sync input. The Ball will instantly become synchronized to the Clock.

The module works by looking for a gate at the 1st input. Until it finds one, the output remains 0. When a gate is seen, the output still remains at 0, but the module switches to looking for a gate at the Sync input. When it sees the gate, the output goes to 127 for exactly 1 tick, then back to 0 while the module starts looking for another input to sync up.

GHold (Gate Hold)

The GHold module looks for the start of a gate at the Clock (yellow) input, then it delays this gate according to the Delay input, after which it holds the gate to On (127) for the duration set in the Hold input.

The blue button that switches between 32n and Trb (Turbo) checkbox selects whether Delay and Hold times are in 32nd notes, or in 64th note triplet ticks. Default time is 32nd notes.

A typical use for the GHold module is to extend the gate On times from modules that produce a single tick gate, such as the Sync and Ball modules. Another use is to add syncopation to clock gates, to get them out of their robotic rut.

The GHold module should not be confused with the Delay module. They do similar things quite differently. GHold holds a single gate signal and will start anew with its delay/hold cycle if a new clock comes in before the module has cycled through. The Delay module is "analog" in that it passes values through, not just gates. Also, it uses a 128-step delay chain, so each change that comes through is remembered and delayed at the output.


Flip emulates a classic logic circuit known as a "Set/Reset Flip-Flop." This is essentially a 1-bit memory circuit, and it is one of the core building blocks of digital computers. In the context of SoftStep, it is like a wall light switch: once it is flipped, it stays there until it is flipped again.

The S or Set input causes the output to go True (127) when it receives a gate transition (0 to non-zero). The output then stays at 127 until the R or Reset input gets a gate transition, at which time the output goes to False (0) and stays there until the S input gets another gate, etc.

The FB or Feedback check box causes the module to act somewhat differently. The logic changes such that the output is fed back into the R input. The result of this is that gate transitions at the S input cause the output to alternate between True (127) and False (0), and the R input is ignored. This gives frequency division by 2 of the S input. To illustrate, put the output from a Clock module into the S Flip input and set the FB checkbox. The output of the Flip will be 1/2 of the Clock rate.


Upon receipt of a gate (0 to non zero), the pulse output goes to 127 for exactly 1 cycle, then returns to 0.


Number to Gate. This module converts any non-zero to 127; 0 stays 0. Generally you won't need to use this module because SoftStep treats any non-zero as logical True anyway. It is sometimes useful when you are using the bitwise operators, and you want an arbitrary non-zero value to be expressed as 127, which makes all bits in the value individually set to true.


Logical NOT converts True (any non-zero) to False (0); and False to True (127).

Logical Bitwise Operator Modules


A Boolean logical AND function with the parameter input as one operand, and the bits selected by clicking on the numbered buttons as the other operand. The small gray box to the right of the switches show the number represented by the bits set in the switches.

The Boolean logical AND function is that if either of two operands is False, the result will be False; both have to be True for the result to be True. Thus, the AND function works something like digital masking tape, and in fact the AND function is sometimes called a masking function.

In SoftStep you often will want to AND a result to isolate one of the bits. For example, to isolate one of the 7 rhythm tracks of the Rhythm module, or one of the 4 hits from the Ball module. If you do not need to dynamically select the bit to isolate, the Mask module is ideal.


This is the Boolean AND function, the same as the Mask module above but with both operands as connection inputs.

The Boolean logical AND function is that if either of two operands is False, the result will be False; both have to be True for the result to be True.

You would use this module rather than the more user friendly Mask module when you want to dynamically change the masking operation. For example, say you are using the Ball module as a rhythm source, and you want to switch between various combinations of the wall hits. You might give one input to the AND module the Ball output, and the other input the output from a sequencer that has been set to the mask values you want to use. Then as the sequencer steps, the AND function causes different rhythm combinations to become active.

Another good use for the AND module is to get drum rolls from a Pattern module: Connect the output from a Pattern module with the same Clock that is controlling the Counter (or whatever) that is controlling the Pattern module's step sequence. Then when the Pattern output is On, the AND module's outpput On/Off follows the Clock's %On setting (which always has at least 1 Off tick), and when the Pattern output is Off, the AND will also be Off.


The Boolean logical OR function is that if any one of any number of operands is True, the result is True; all must be False for a result of False.

The OR module is handy for combining gate outputs from other modules like the Pattern sequencers. A great way to produce complex rhythm patterns is to set up several Pattern modules of different step sizes and then use OR to combine the outputs.


The Invert module does a bitwise XOR (see below) of the input parameter as one operand and the bits set in the row of click buttons below it as the other. Each button that is on will invert the corresponding bit of the input.


The Boolean logical Exclusive OR or XOR function is that if the two operands are different the result is True, if they are the same, the result is False. You can think of XOR as a bit inverter. For every On bit in one operand, the result will be the reverse of the corresponding bit in the other operand. To put it another way, if you set one operand to all 1's (in SoftStep this would be 127), XOR acts as a bit-by-bit NOT on the other operand.


Binary shift or rotate Input value by Shift parameter bits. Shifts left if Left checkbox is checked, otherwise shifts right. If Rotate checkbox is checked, the operation is a rotate, if unchecked, it is a shift.

A a left shift is the same as multiplying by 2 for each bit shifted. Thus with the input set to 1, a left shift of 3 bits gives a result of 1 x 2 x 2 x 2=8. Conversely, a right shift is the same as dividing by 2 for each bit shifted.

The difference between shift and rotate is that when a shift overflows, the overflow bits are discarded, whereas a rotate operation folds the bits back into the result. That is, the bit positions are rotated but none are lost.

Useful values for the Shift parameter are 0-7, with 0 being no action, and 7 being a discard of all bits for shift (output always=0); and a complete rotate (output always=input) for rotate. Shift parameter values greater than 7 are forced to 7.


This module converts gate (zero / non zero) inputs into bit positions in the output. The first gate input (labeled "0") produces 0/1, the next produces 0/2, then 0/4, etc. This module can be viewed as the inverse of the Mask module. The LED indicators show the gate value of each input; all 7 inputs are logically ORd to produce the output. The Clock input acts as a sampler, freezing the gates at their state when the clock ticks. Set the clock input to 126 for Turbo mode. It will then calculate each input on each system tick (64th note triplets).

SoftStep is Copyright © 1999-2004 by John Dunn and Algorithmic Arts. All Rights Reserved.