Modulo Magic


Modulo Magic
for music synthesizers.

 

A CV and signal processor based on the mathematical modulo principle.

Some ideas on how to use this module:

In the mathematical world, modulo gives the remainder after an integer division. For example 7 divided by 4 would give a result of 1, with 3 remainder, so 7 modulo 4 would be 3. 11 modulo 4 would also be 3, as would 15 modulo 4 and so on.

This module allows a similar principle to be applied to a voltage. If the modulo (Step Initiation CV) is set at 1 volt and the step size also set at 1V, the output would follow the input while the input remained between 0V and 1V. As soon as 1V was reached, 1 volt would be subtracted from the output, so for an input varying between 1V and 2V, the output would track at a volt less, i.e. between 0V and 1V again. There are 8 stages to the module, so this process would occur again as the input voltage passed 2 volts and so on up to 8 volts. Of course, the Step Initiation CV and Step size are adjustable.

This can be used to constrain a CV to a single octave or similar interval as needed.

Now consider if the step size is greater than the Step Initiation CV (SICV) - each time a multiple of the SICV is passed, the greater step size voltage will be subtracted, resulting in successive negative offsets to the output. A smaller step size will have the opposite effect, with successive positive offsets being added. When a rising voltage is fed via this particular setup to a VCO, rising "bubbles" will result.

There is also an offset adjustment to adjust the initial value to which the modulo will be applied. An optional switch will allow the number of modulo cycles to be limited between 8 and 1.

Of course that is not the only way this module can be used. It can also be used as an audio frequency wave multiplier. A triangle, sine or sawtooth waveform at audio frequencies can be modified to produce some pleasant reedy type sounds. As the inputs can be controlled by CVs, these timbres can of course be swept.

A little on how it works:


The schematic of the Modulo Magic.

IC3 is forms a mixer with both inverted and non-inverted inputs for the control of the size of the step (Step Size) that is added to or subtracted from the CV being processed. Of note is that the output is inverted so as to work with the remainder of the circuitry, which is designed to work with an inverted signal to keep the parts count down. Keep this in mind when studying the diagram.

A mixer output is provided so this section of the module can be used as a plain CV mixer when not being used for other processing. When used as a mixer, if a non-inverted output is required, the signal must be fed into the 'subtract' inputs.

IC1 is a straight forward, two (inverting) stage, non-inverting DC summer/buffer with unity gain. The CV to be processed is fed into this buffer, and the modified signal is taken from its output. All processing is done to the voltage between these two inverting stages.

The output of the first inverting stage of IC1 (pin 1) is fed the sense inputs of a row of comparators (IC4-7). This voltage is compared with a series of reference voltages created by a string of resistors being driven by the first op-amp of IC2. The voltage present at the input of this stage (the Step Initiation CV) is divided into equal portions by the resistor string, to provide the equally spaced modulo points. The actual number of points is determined by a rotary switch that grounds the string part way though by connecting one of the "T" points to 0 volts. If none of the points are grounded, there are 8 modulo points.

As the CV being fed into IC1 increases, each comparator is triggered as its sense point is passed. The output of each comparator in turn switches on an analog switch, routing the output of step size mixer to the second stage summer of the CV processing buffer. This voltage will be summed with the input CV before being passed to the output. Each of these comparators controls an identical stage, so each time another is triggered, the exact same voltage is summed with the input CV, producing another "step". The size and direction of this step depends on the output of the Step Size mixer. If it is equal to the Step Initiation CV, the result will be true modulo, otherwise it will be one of the other effects described above.

An offset voltage can be added to the point where the first step occurs, using the second op-amp of IC2, an inverting buffer. Its outputs are fed simultaneously to both stages of the CV buffer (IC1) - thus canceling out any overall voltage offset at the output. This offset however is present at pin 1 of IC1 - the output of the first stage, and thus also present at the sense inputs of all of the comparators. This offset effectively shifts all sensing points by exactly the same amount, allowing a wider or narrower point before the first step occurs.

How does a device (the 4066) that has only a 15v range allow at least +/-10V to pass through it? The answer is it doesn't. By powering the 4066 and its associated drive circuitry from +14.4V and -0.6V, and placing the output of the analog switch at the virtual ground point of an inverting op-amp buffer, the full range of the signal is allowed to pass while the voltage at that point is held near or at 0V by the action of the op-amp while the analog switch is closed. When the analog switch is open, the diode connected between the input and 0V prevents in incoming signal from going below -0.6V, and thus prevents it from going outside the allowed input range. There is no need to protect against excursions in the positive direction, as these are in the allowed input range. A second diode at the output of the analog switch prevents the op-amp from driving the output below -0.6V, should the switch open while such potential exists.

Construction


The component overlay for the VER1.2 PCB. Click here for an enlarged, printable version. Print at 300dpi for a correct scale printout.

There are numerous ways this board can be used. For example, each input could be fed by a pot wired as a voltage divider, with it's input end normalized to +VE via a 1k resistor. This way you would be able to use the module as a sequencer when not using it as a switch.

It is also possible to wire in a "steps" switch. Each of the "T" pads is wired to a successive position on an 8 position rotary switch, with the switch common connected to 0 volts/GND. There are two suitable 0V/GND pads provided on the PCB.

Again, the number of knobs, inputs etc. will depend very much upon how the builder wishes to use this module. I will make the following suggestions:

  • One step size input should be taken to a pot to allow for a fixed step size to be selected without additional CVs present. A 100k linear pot wired between +15 and -15 volts fed into one of the subtract inputs would be ideal. Note that the +15 should be connected to the counter-clockwise end of the pot. The range should be limited by connecting a resistor 470k between the wiper of the pot and the SS pad on the PCB, or by replacing the resistor on the PCB itself with a 560k resistor. A second pot could also be added as such, but with a larger value series resistor, so as to operate as a "fine tuning" control. Doing so would sacrifice the second subtractive input. Alternately, the series resistor could be taken directly to pin 6 of IC3.
  • The remaining step size inputs can be taken to panel jacks either directly, or via attenuators. To wire up such an attenuator, use a 100k linear pot with its counter-clockwise end connected to 0V/GND, its clockwise end connected to the panel jack, and its wiper connected to the SS or SA pads on the PCB.
  • There is a single input provided, marked IN. This can be taken to a panel jack either directly, or via an attenuator wired as described in the point above.
  • Additional inputs can be wired to the pad marked M2, though these will need series resistors of 100k added.
  • There are two identical offset inputs provided. They can be wired as per the main input, either directly to the panel, or via an attenuator, or connected to a pot. If connecting an initial offset pot, the associated input resistor on the PCB should be increased to 470k.
  • There are two reference inputs provided, each labelled differently (Initial Step CV and Ref). They can be wired as per the input, either directly to the panel, or via an attenuator, or connected to a pot. If connecting an initial step size pot powered from the power rails, the associated input resistor on the PCB should be increased to 470k. It should be noted that the module will not function with a reference value of 0V. A negative reference will cause positive steps to be added to the output, an effect that can be useful. The initial step size pot can wired between the positive and negative rails, instead of just between positive and ground.
  • It should be possible to wire up a fixed modulo control, where the reference is fed the exact same voltage as the step size, though to do this would require the addition of a switch to isolate any other input to the reference input. A multi-turn trimpot would be required as the series resistor into the reference input to allow the correct scaling to be set. Note that changing the number of modulo points also changes the distance between the sensing points, so the fixed modulo switch would also need to disconnect the common of the rotary switch.


A possible wiring solution, showing several options mentioned in the text above. The Pos/Neg switches were included as this will allow the manual controls to be easily set to zero by turning the pots fully counter-clockwise. This example is as per how I wired my Best of CGS panel. Some resistor values were changed as per the notes above.

Notes:

  • Yes, it's a very complex, even confusing, design.
  • While untested, the module should work on +/-12 volts.

Parts list

This is a guide only. Parts needed will vary with individual constructor's needs.

Article, art & design copyright 2003 by Ken Stone