phase7: a new user oscillator for Korg Logue

A new user-oscillator has been released for the Minilogue XD and Prologue – phase7. This is a successor to unity, and the oscillator can emulate the Roland JP8000 super-saw as well as a range of other waveforms.

The plugin’s architecture is that of a classic super-saw emulator, with seven free-running waveform generators for each of the two oscillators. In a standard super-saw emulation each wave generator will produce a naive sawtooth with a sharp transition that will generate obvious aliasing at the 48KHz sample rate used by the Logue synthesisers. To counter this, the waveform generators are usually backed by a high-pass filter. While this can not prevent the aliasing from occurring, it will remove alias components at frequencies below the fundamental, giving a sound that is characteristic of the JP-8000 and JP-8080.

phase7 uses a state-variable backing filter which can be programmed for 24dB/octave high-pass but also low-pass, band-pass and notch-reject modes, while the waveform generators contain several shape models that include both naive and anti-aliased (poly-BLEP) models.

In its simplest operating mode, the plugin uses the classic JP8000 architecture with naive aliasing waveforms but which track the waveform and wave shape of the VCOs that is set on the Logue front-panel controls.

The pro version of the plugin extends this with additional wave shapes and filter modes, where the waves shape, filter cutoff and filter resonance can be controlled via a parameter. By combining anti-aliased waveforms with non-HPF filter modes, a range of effects can be generated – all with a stack of seven parallel wave generators.

The implementation of this on the 84MHz Cortex M4 parts used by the Prologue and Minilogue is challenging due to the limited CPU available. The plugin has to render up to 14 independent waveforms with anti-aliasing and two digital filters plus two LFO generators, all within a budget of less than 1500 CPU cycles per sample. To achieve this, a careful mix of both integer and floating point instructions are used.

The Cortex M4 FPU lacks vector processing instructions, but it does have 32 single-precision floating point data registers, allowing state to remain inside the CPU during the processing of blocks of samples. Inline assembler is used to assign specific FPU registers to the filter state, allowing the use of efficient vldm and vstm instructions to efficiently copy the FPU state to/from SRAM. In the main processing loop. FPU stall hazards are avoided by mixing both float and integer calculations where possible, making it easier for gcc’s excellent instruction scheduler to do its job.

The plugin’s oscillators and filters are developed offline, using Xcode on a Mac, making development and debugging relatively easy. However, to tune performance it is essential to run the code directly on the Logue hardware and check for performance bottlenecks, This is done using the dragon debug-over-audio library. Timing can be measured using the debug block in the STM part and the results read-back from the actual Logue hardware over the audio channel. dragon makes this easy because it is packet based, so that the Logue oscillator can run normally and is interrupted by the white-noise-like data burst as and when there is data to be read.

For more information on phase7 and download, see the oscillator page.