4xD
The 4xD started life because I wanted a number of simple, high quality, mono delays to create spatial effects for mix elements: the idea is that the original sound is panned hard left or right and a delayed version is panned to the opposite side. Typical delay times for this technique are between 3 and 50ms with the shorter times giving more subtle vertical positioning effects - allowing different elements in the mix to sit in separate spaces, and the longer times giving dramatic wide stereo effects.
Of course I could have achieved this with a couple of off-the-shelf digital effects processors, but I wanted a hands-on box with a dedicated knob for each delay time and no layers of menus to scroll through!
As I started to design this box, it became apparent that a number of other desirable functions could be achieved with pretty much the same hardware .. and so some more features got added - but all the time keeping to the principle that this should be a hands-on box with instant access to all parameters. I also aimed to have comprehensive analog I/O to allow modular-style configurability and insertion of external devices in the feedback loops.
Actual size (if viewed on a 96dpi monitor) panel graphics:
Feature overview
- 4 independent high quality digital delays (16bit/48kHz using 24bit/192kHz converters)
- Each of the 4 delay lines has delay times from 0.0ms to 670ms (or 1340ms) in 0.1ms/0.2ms/1ms/2ms/5ms/10ms steps (pseudo logarithmic scale)
- Double delay mode where delay times up to 1340ms are achieved by using a 24kHz sampling rate
- Double delay mode where delay times up to 1340ms at 48kHz sampling rate are achieved by sharing a common input between a pair of delay lines
- Dedicated knobs for each delay time and each delay feedback
- Level matching delay time switching for glitch free operation
- Resampling mode where changing the delay time alters the pitch of what is currently in the delay buffer, giving a similar effect to a BBD based delay where the sample rate is varied to change the delay time (although with the 4xD, once the delay time is no longer changing, and the delay buffer pointer has 'caught up' to where it should be, the sampling rate is again perfect digital 48kHz quality)
- Delay input jack sockets normalised to allow use with single input and stereo or multi-tap outputs
- Analog input stages designed to clip excessive signals in analog domain, before the A/D converter
- Analog feedback loop I/O to insert external EQ, filters, distortion, etc.
- Digital dry mix level allows internal mixing of dry signal to output
- Digital feedback loop can be activated in software to put feedback under MIDI control, and for use when dry signal is mixed with the output (in this case external analog feedback doesn't work well)
- Independent LFO per pair of delays with adjustable amplitude and phase offset within each pair
- Sine, triangle, saw-up, saw-down and square LFO waveforms
- LFOs can be synced to MIDI clock with periods of 16, 8, 4, 2, 1, 3/4, 1/2, 1/3, 1/4, 1/6, 1/8, 1/12, 1/16 bars
- Continuous rotary encoders and 3 digit LED display for digital parameters
- Remembers all settings on power down
- Sends and receives all digital parameters via MIDI
Many possibilities
Here are a few examples of ways this box can be used:
- Simple mono delays for spatial positioning and stereo effects
- Stereo delays, with various feedback configurations (ping pong delays, etc.)
- 4-tap delay with various feedback configurations
- Delays with external EQ/filters/distortion/etc. in feedback loop
- Flanging effects - wild sonic possibilities with external processing of flanger feedback loop
- Dynamically modulated 'dub-box' style delay effects
Use as a general audio-DSP platform
The hardware design also lends itself well to general use as a lightweight audio-DSP platform. It uses 3 microcontrollers: 1 for UI and 2 for DSP, all of which have ICSP/ICD headers to allow programming and development with the assembled board. Since it is based on PIC chips the development software is free and the development tools are very inexpensive. All that is needed is Microchip MPLAB IDE software and an ICD2 compatible programmer/debugger.
A company called Olimex do some good ICD2 clones: PIC-ICD2 at US$89.95 and PIC-TINY-ICD2 at US$49.95. If you are going to do a lot of development you'll probably want to get the more expensive one as the cheaper device (in common with other cheap ICD2 clones I've seen) communicates with the PC via RS232 (not USB) which can make it quite slow to program and debug.
What you have for audio-DSP is:
- 2x Cirrus Logic CS4272 24bit/192kHz Stereo Audio CODECs
- The default components give a sampling rate of 48.828125kHz (this was chosen instead of 48kHz to avoid having a separate crystal for the UI PIC to get the exact MIDI baud rate)
- 2x Microchip dsPIC30F6012A each running at 30 MIPS (that's 614 instruction cycles per stereo sample which is enough to do quite a lot of processing)
- 2x 1024Kbit SRAM giving a total of 2684ms sampling time at 16bit/48.828125kHz or 1790ms at 24bit/48.828125kHz
- 4x high quality analog input buffers/filters
- 4x high quality analog output buffers/filters
- Circuitry to allow feedback in the analog domain
- Optional external analog CV inputs: 4x 12bit inputs (2 per dsPIC), each capable of 100ksps (400ksps total), with input buffer circuits included on the PCB
- Optional external digital I/O: 8x I/O pins (4 per dsPIC) routed to PCB headers; can be used for an external SPI interface
And for the UI you have:
- Microchip PIC16F877A dedicated to UI (so no instruction cycles of the dsPICs are wasted)
- 16x digital inputs (the default configuration uses this for 7 rotary encoders, 1 push switch and 1 toggle switch)
- 11x digital outputs (the default configuration uses this for a 3 digit 7 segment LED display)
- MIDI In, Thru and Out
- 4x clip LEDs (these are controlled directly by the dsPICs)
The 4xD code should make a good starting point for your own DSP projects: all the ground work such as the rotary encoder scanning, LED driving, inter-PIC SPI comms, CODEC I/O handling, etc. is there already. Just plug in the algorithms you want to play with..
More ..
- Overview
- User manual
- Photos
- Audio samples
- Schematic
- Parts list
- PCB layout
- Source code
- Construction guide
- PCBs & Parts kits
- Surface mount soldering