In brief I'm trying to make a Eurorack module which implements the concept of the GameBoy's wave channel with reasonable accuracy. Like the GB, initially I'll have a 4-bit/32-slot wavetable which you will be able to see on an OLED (or hopefully eInk) display and "draw" using some tactile switches and a rotary encoder. It will support V/Oct plus a tune knob.
If I get this far, next step is to store the wave in flash (easy enough I'm just not worrying about it yet). Future plans would be for 8-bit waves, a non-morphing wavetable bank (like you can do in LSDJ), saving multiple waves / banks, and perhaps a separate LSFR noise oscillator. The LSFR probably wouldn't need a display.
As best as I understand it the GB wave channel used a timer to control how often to increment the position in the table which was then written to a 4-bit DAC. Higher pitched notes resulted in a shorter timer and, subsequently, marching through the array quicker thus increasing the pitch. That's really all there is to it and I find it a rather clever design. Sort of almost like a reverse sample and hold kinda. Intriguing concept given in the digital domain fixed sampling rates are by far the most dominant means I think of when thinking about audio.
To actually get this to work, I came up with several solutions as I ran into obstacles and found other potential ways of doing things. Not sure which I'll go with yet, but they are:
- Electro Smith Daisy using a timer to control the wave updates which, in turn, updates a value which the AudioCallback is reading from. This means there will be artifacts (I wasn't planning on doing liner interpolation)
- Using the Ornament and Crime (a uO_C in my case) which uses a Teensy to update the 12-bit DAC via a timer similar to the GameBoy. Custom firmware because O_C by itself has a fixed sample rate like the Daisy, but is only 16.67kHz
- Using a Teensy 4.0 with an SPI DAC (like O_C but with the OLED display connected to I2C). Given the high speed of the Teensy and the high speed of the DAC, I expect minimal jitter/artifacts using the timer method
- Finally, which is sort of becoming my favorite option, using a Teensy 4.0 with a R-2R discrete DAC or perhaps a parallel DAC IC. This feels closest to how the GB might work (though certainly isn't exactly the same)
Source code is here
And some cross-posted forums posts here:
- Original MW post (discussing if there was a way around O_C's fixed CV update rate), here
- Post on the Daisy forums on how ways I can get something similar on the Daisy (noting it has fixed speed DACs) here (although I got some excellent help on the Daisy Slack space I need to port back to that post and push to the repo)
- Post on the Teensy forums on doing Aruino PORT style fast writes here