www.96kHz.org
advanced audio recording
a multi-stage wave guide oscillator in VHDL
 DSP Module

This page shows an implementation of my multi-stage-feedback delay. In this case it uses extreme short delays and thus realizes a wave guide oscillator. It works with similar methods as the well known Karplus-Strong-Algorithm. It is an update of the first version which initially had been implemented in my Chameleon Synthesizer using C-Language at that point of time and later had been ported to VHDL.

Hardware

While the first version was running in a Spartan device this one was ported to Altera Cyclone using both
the Gleichmann HPE Mini and my new Altera PCB:

Altera Cyclone II Development board


Block Diagram of the Oscillator

Memory Feedback Sound Generation with modified Karplus Strong


Unlike in my first version of the multi delay oscillator using wave guiding this way, here 3 or more feedback loops are used to drive the harmonics of the fundamental frequency back into the circuit, coming much closer to the behaviour of the focussed string instruments.

The feedback signals are scaled adequately and added to the existing mix with defined post scaling to achive a simple IIR-Filter ("MIX") that way that the overall energy in the cirucit slowly disappears in a controlled way. By using dedicated equalizers in the paths, also the harmonics can be even controlled in a more detailled way. Generally IIR-Filters are used will limit the high frequencies. All filters are controlled with modifiers (actually a kind of LFOs which I use in my synthesizer to change parameters in real time). Here the mixer is controlled intuitively to create more "live" in the sounds.

More than 3 stages require lower feedback ratios in order to create a more dedidacted behavior of the harmonics. Note that this requires a very precise interpolation in most cases. One must not overlook that after each loop "the harmonics of the harmonics" will be introduced into the signal. Practically a 1/4 and an 1/6 loop showed good results when applied slightly however a third and a fith should be more suitable for the classical guitar sound.

Regarding the initial wave to be fed into the RAM, a multi harmonic music pulse appears most effective, which already describes the intended base frequency. Therefore the pulses have either to be prepared in a RAM when focussing a DSP system or must be resampled accordingly. For my FPGA solution I found a very simple way to to this by simply using one frequency for filling and another one for reading which is a feature of modern block RAMs.

The design works with 96kHz sample frequency and almost 50MHz FPGA clock frequency (96.000 x 64) offering 512-times oversampling. This is a great advantage when it comes to an efficient sub sample filtering required for the interpolation.


Example Waves

The following screenshots have been taken with my SVGA-Oscilloscope and copied together for two cases showing 5 points of time after a period of one second. The cyan-green waves at the left side show the behaviour of a simple feedback. The right sequence shows the introduction (or the maintenance!) of the third harmonic which grabs a part of the inital energy of the wave. After 5 sec the simple circuits presents a sine wave, where the third harmonic is still present in the right example.

Wave Guide Sound Generation with Multi Feedback Delays


Examples with more feedback

Using more feedback of the third harmonic and a clean phase constellation the signal rapidly progresses to a triangle.

Wave Guide Oscillator with Multi Feedback Delays


This also is the case when using the 5th harminc a bit more and a different start pulse

Wave Guide Oscillator with Multi Feedback Delays


Remark

As formerly stated, this approach is a bit similar to the patent of Karplus and Strong from 1987. In order not to violate this, a trick can be used: One undersamples the outgoing data stream slightly and truncates the delay appropriately so that the resulting feedback pitches correspond. This creates a de facto band limit without using an explicit lowpass so the filters can be partly left away. See the former circuit for this.

Addendum 2007: The patent of Karplus / Strong has most probably expired.



Read more about the former Version multi delay oscillator.

 Read some general information about the function of the K-S-Algorithm.

 Read more about the platform here: Gleichmann HPE Mini

 
Altera
Cyclone II
FPGA

 

 
96 kHz
Audio DSP

 

©  Dipl.-Ing. Jürgen Schuhmacher  2007