Feedback welcome: Feel free to leave me a message or any hints in the "General Feedback" issue.
squares-and-circles is an alternate firmware for the Eurorack module O_C, targeting Teensy 4.0.
Big thanks to the creators of ornament & crime (o_C) and PJRC for the Teensy and also to all those who have worked on the code and algorithms partly reused here, especially Mutable Instruments. They served a great source of learning and provided a huge playground and the foundation for this project.
Given are the following ingredients: Two buttons, two encoders and a 128x64 display. Sixteen I/O ports (4x trigs, 4x cv and 4x dac) and a Cortex-M7.
Damn many possibilities to complicate it. Mono, stereo and then again CV. A tricky task to design a simple UI logic, not get lost in menu diving, and to get as much out of the hardware as possible (work in progress).
Similar to the Monomachine and Machinedrum, this device features four fully configurable engine instances. Each instance can be assigned a synthesizer, effects, or sequencer engine, which can be controlled via trigger inputs, CV inputs, or clock signals.
The available engine types include drums, synthesizers, oscillators, sequencers, and audio processors. The hardware ports and the generated output signals can be internally routed to any engine. For example, you can route the mono audio signal from an oscillator engine to a neighboring effects engine with stereo outputs, enabling seamless signal chaining.
- [Short Press [LEFT]/[RIGHT]] scrolls through the 4 machine-tracks.
- [Long press [LEFT]] enters the machine-selection-page.
- [Long press [RIGHT]] enters the menu-page.
- [Long press left or right [ENCODER]] shows the modulation popup
- [Long press [L-ENCODER] + [R-ENCODER]] saves the patch - will be restored at startup
- DEBUG: skip restore - press [RIGHT] button while startup ).
Machines wiki
- [Long press [LEFT]] enters the machine-selection-page.
- [Short press [R-ENCODER]] loads the selected engine.
- [Long press [R-ENCODER]] loads the selected engine - extended mode.
- GND
- CV
- Drums
- M-OSC
- SYNTH
- Stereo-FX
- NOISE
- SPEECH
- MIDI
- SEQ
Machines/Engines are controlled by individual parameters.
[Short press left/right [ENCODER]] changes parameter selection
[Rotate left/right [ENCODER]] changes parameter value
[Long press left or right [ENCODER]] shows/hides the modulation popup*
For each parameter a modulation can be assigned:
-
- SRC:
C1
,C2
,C3
,C4
- Analog inputs- OP:
THRU
,S&H-T1
,S&H-T2
,S&H-T3
,S&H-T4
,T&H-T1
,T&H-T2
,T&H-T3
,T&H-T4
- THRU - Thru Input
- S&H - Sample and Hold
- T&H - Track and Hold
- OP:
+
- Constant internal voltage- 10V with 1/1000 resolution - nice for fine adjustments (detuning etc)
- Hints:
- Parameter 0 (top-left) is mainly used for V/OCT control. Thus, one single V/OCT signal / CV-Input can be shared by using modulation on parameter-0 with attenuverter = +1 (-3V..+6V) range. It is also possible to select the V/OCT input in the io-configuration page.
- All other parameters can be modulated via CV-input with a assumed voltage-range of -4V..4V at 2kHz sample rate.
- Be aware the CV-range is probably limited by hardware to: -3.5v..6.5V
- SRC:
-
RND: Trigger generates a random voltage
- TRIG:
!
,T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
- TRIG:
-
ENV: Triggered Envelope (Attack, Decay)
- TRIG:
!
,T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
- ATTACK
- DECAY
- TRIG:
-
- TRIG:
-
,!
,T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
- SHAPE:
SIN
,TRI
,SQR
,STEPS
,NOISE
- FREQUENCY:
0-127
- WAVEFORM:
0-127
- TRIG:
-
- SRC:
C1
,C2
,C3
,C4
- ATTACK
- RELEASE
- SRC:
-
- TRIG:
!
,CLK
,T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
- PROB:
0-9
(0-100%) - STEPS:
1-16
- TRIG:
-
- TRIG:
!
,T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
,CLK/1
,CLK/4
,CLK/16
,CLK/32
,CLK/96
- RESET:
-
,T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
- 4-STEPS:
-64..64
- TRIG:
!
= current engine trigger
CLK
= internal clock
All modulations have an attenuverter parameter (-/+).
- The modulation-voltage is attenuverted/multiplied by -1..+1;
[Long press [RIGHT]] enters the I/O-Configuration page.
The I/O-Configuration page lets you virtually patch the engine with the hardware ports and internal gate/cv signals ($1-$9). Depending on the engine interface, trigger, gate, accent and V/OCT can be configured. In addition to the trigger, which is set with a rising edge, a gate state is also provided, that can be processed by the engine. Engines like Closed/Open-HiHats have an additional accent input - this works technically like a second trigger. The V/OCT input can optionally be quantized and transposed. In addition to the Tx inputs, the Cx inputs can also be used as a source for triggers and accents. The output can be configured as mono or stereo. Several engines can share the same output - the signal is mixed.
In case the Engine supports Triggers/Gates - Trigger Input is configurable:
- Trig-Input:
-
T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
In case the Engine supports V/OCT - V/OCT Input is configurable:
- CV-Input:
-
,C1
,C2
,C3
,C4
- V/OCT: -3V..6V for frequency-control (default)
- Quantizer: Off, Semitones, Ionian, Dorian, ...
- ROOT:
C
,C#
,D
,D#
,E
,F
,F#
,G
,G#
,A
,A#
,B
- ROOT:
- Transpose: -48 to 24 (semitone per step)
- FINE: semitone/128
In case the Engine supports Accents (Closed/Open HiHat) - Accent Input is configurable:
- Accent-Input:
-
T1
,T2
,T3
,T4
,C1
,C2
,C3
,C4
In case the Engine is an AUDIO_PROCESSOR - Input signal mix is configurable:
- Aux-Input:
-
,C1
,C2
,C3
,C4
- AUX-IN: -3V..3V for additional audio source for effects (prefer CV4).
- Insert-1: Feed-in signal from engine-1
- Insert-2: Feed-in signal from engine-2
- Insert-3: Feed-in signal from engine-3
- Insert-Aux: Feed-in signal from aux-input
- Level: Output volume level
- can result in distortion
- not available on CV-Engines
- Pan: Stereo panning
- on stereo engines with mono output, panning is also used for mixing
- Output
-
,A
,A+B
,B
,C
,C+D
,D
- The option
-(no output)
is useful if the signal is to be routed into an AUDIO_PROCESSOR engine
- The option
- Stereo
- Experimental stereo feature - see STERIOLIZED Flag ;-)
[Long press [LEFT] + [RIGHT]] for getting to the MIDI-Settings page.
The MIDI&Clock-Settings page lets you select the MIDI-Control.
- MIDI-Control:
-
disabled- In case OC_T40
- else
MIDI/USB
the USB-MIDI and/or hardware Midi-Input
In case the MIDI-Control is enabled, you can setup the Midi-Channel in the engine IO-settings.
Each engine can be assigned to a MIDI-Channel - it is possible to control single mono engines together polyphonically (for this all engines have to be set to the same midi channel). Midi-Engines consume the MIDI-Stream directly, therefore the MIDI-Messages are not converted as incoming CVs or triggers.
- CLOCK-Source: BPM
-
noneINT
Internal Clock-Source (BPM)T1
T1 as Clock-Input (4ppqn)MIDI
Clock received from MIDI
Clock-Source is used by engines like
FX/Delay
(clocked sync) orMIDI/Clock
- Engines can be loaded/selected by midi program change
- Default Parameter CC-Mappings
| HEX | DEC | parameter-index | CH | |-----|-----|-----------------|----| | 20 | 32 | 0 | * | | 21 | 33 | 1 | * | | 22 | 34 | 2 | * | | 23 | 35 | 3 | * | | 24 | 36 | 4 | * | | 25 | 37 | 5 | * | | 26 | 38 | 6 | * | | 27 | 39 | 7 | * |
[Press
L-ENC + R-ENC
] to enter the patch storage page
- Use
L-ENC
for patch slot selection - Use
R-ENC
for LOAD/SAVE- Load
empty
- restores all engines toGND/-
- Load
Use to enter callibration mode, or execute advanced setup commands
Power on the module with the [LEFT] button pressed for entering the setup procedure.
- Press left encoder to flip180.
- Press right encoder for changing display brightness (50%, maximal).
- Check the encoder rotation direction.
- Press encoder for reversed setup.
To calibrate the DAC, you need a multimeter. Besides the reference voltage of 0V
, the voltages -2V
and +2V
should be calibrated as accurately as possible.
Start with DAC1 (channel A) - connect the multimeter typically using alligator clip on a patch cable inserted in the jack. Use the right encoder to set the voltage as accurately as possible (press the encoder for coarse adjustment). Do it on all outputs - use the left encoder for channel selection. After calibrating 0V
on all outputs, press [right] to step to the -2V
calibration. Repeat the procedure and press [right] to calibrating +2V
.
To calibrate the ADC 0V
reference, remove all patch cables from the module. Use the right encoder to adjust the offset (press the encoder for fast adjustment). Do it on all cv-inputs, select the channel with the left encoder. Press [right] to enter the -2V
calibration. Now you need to connect the DAC outputs to the cv-inputs. The DAC output produces the reference voltage, that is calibrated on the input. Repeat the calibration procedure and step to the +2V
calibration.
- Test/Verify your TRIG or CV inputs.
- The output voltage is set by the cv input voltage (DACx = ADCx).
The project started as a kind of personal research in embedded DSP that I did over half a year. At some point, it turned out by chance that the O_C was very well suited for this by only upgrading the Teensy. Apart from the small optional mod on the DAC voltage range, the current O_C hardware unfortunately has some unchangeable limitations for audio applications. As you know, the Teensy 4.0 doesn't have "high-end" ADCs and a limited amount of RAM. On the other hand, it is the the combination of limitations that make the project unique.
Regarding the user interface and the concept of firmware, I am a bit torn. On the one hand, the two buttons and the two encoders are sufficient and actually practical for a multifunction module, but on the other hand, something is missing. Additional buttons/encoders could definitely simplify the operation/interaction - let's see if this puzzle can be solved.
The application code respectively the suite of machines/engines and the third-party source files are published under permissive software licenses. For the exact license and copyright holder - see the header of individual source code files or readme/license file in the sub folder.
The firmware as a whole is for personal use only. If you are considering commercial distributing hardware with this firmware, please contact me (eh2k◯gmx.de).