Stereo guitar/bass cabinet emulation

Working on the enclosure now. Everything fits as planned. For the light pipes i'm going to use a 3mm round acrylic rods mounted into a LED bezels.
TGX4_box6.jpgTGX4_box7.jpg
TGX4_box8.jpgTGX4_box10.jpg
 
On the GUI side: there is one main tab with quick access to the most used functions plus preset handling. All sections have their tabs with all the controls from the html page.

gui_TGX4a.gif
 
How are you doing the communication between your GUI in the browser and the pedal? MIDI over USB? Or USB Serial?

Chip
 
WebMIDI (fx settings) + WebSerial (console + status report) in the browser, MIDI+Serial over USB for the Teensy.
The GUI on the pic above is a platformio native linux project for LVGL9.1 which then will be run on the ESP32+TFT. ESP will control the Teensy via I2C.
 
Boards arrived, now let's hope there will be no or minimal need for bodges.
You been doing great process with this! Fantastic work. I hope this solves all your noise, gain, self-oscillating issues also.

Can you tell you how you populated the board? I see you have bare PCB and stencil so I assume you put the soldering paste yourself, you are able to pick and place the SMD components and have reflow oven to do soldering? I've only done simple PCB's myself with simple components mostly prepopulated at PCB factory (few by hand with soldering iron) so those ADC/DAC chips etc. look scary to work with :D
 
Last edited:
Thanks! Noise/oscillation issues are almost gone with the AK converters.

I have used the stencil + solder paste and human pick&place.
TGX4pcb6.jpg

For placing the components i use either tweezers (larger components) or a vacuum pick up which i designed some years back. Can't imagine working without it now. The pump is activated by a touch sensor in the handle.
vpick1.jpg


I do have a reflow oven, but for this board i went with hot air station.
QFN packages are actually quite easy to work with. Lots of flux, melt, gently press - the chip will position itself and the excess solder on the central pad can be squeezed out (if there is any). Once done, add more flux and clean the edges from any solder balls. Good quality flux is the key.
Uploaded the GUI code to the ESP to see how it looks on the small screen:
tgx4_gui_esp1.jpg

I plan to rework the preset system. I'll go with ProgramChange command for the preset change, giving 128 available presets. Data will be stored on the SD card. I thouight about saving them in the external Flash, but Teensy4 does not have a footprint for it. If there is no SD card detected it will fall back to the 8 presets in EEPROM.
 
Before the ESP starts to talk to Teensy i wanted to see if everything works when put together into the enclosure, check the current consumption.
Teensy + ESP32S + Display (not using any wireless connectivity yet) draws about 217mA from a 9VDC source.
TGX4_box12.jpg
ESP got a 2nd USB-C connector for programming. I was thinking about adding a small 4 way usb hub, as there is still some space available on the pcb, but meh, touch screen interface is only one option from many, not all using USB.
The red VBUS wire should be disconnected. ESP is powered from the onboard 5VDC switching regulator.
TGX4_box13.jpg
The ideal standoff height is 29.5mm. I've used a 29mm one + one M3 washer.
TGX4_box14.jpg
 
I'm still deep in the GUI(ESP32) - Teensy integration.
Preset System:
supports up to 128 presets (if SD card is present) or 8 if using EEPROM only. EEPROM is still used to hold the 1st 8 presets. Acts like a backup copy, SD cards can fail. Preset names are added, limited to 15 characters.
I also added a separate software DC blocking filter on the input, it doesn't have to rely on the built in one.
I have successfully tested the hardware and will post the HW design files soon.
Overall i'm really happy with the design decisions, esp. the choice of ADC+DAC. It's so much better compared to pretty much all codec chips i've used previously. Hi gain guitar rhythm sound is a really good test to show all the signal chain flaws and imperfections.
Here is an audible comparison: 24bit WM8731 (HPF off, single ended IO) vs 32bit AK5552+AK4452 (differential IO). The samples are normalized since WM8731 works with lower reference voltage (3.3V), AKs run on 5V anlaog supply. WM is a lot noisier + still has a bit of oscillation, even when the guitar vol knob is muted. AK pair - well, here you can hear it:

 
What this project was still lacking is a decent wah, not only for the usual "quack" sounds, but also as a pre EQ tone shaping tool. Adding it now. I'm not after modelling any specific models, but rather using one as a starting point and tweak it until it sounds good with the rest.
Here is a short sound sample:


It has two controls: Frequency (rocker pedal position) and Dry/Wet mix. I haven't implemented the expresion pedal control yet, but it will be an ideal application for it.
Wah is placed after the compressor and in front of the boost/overdrive.
 
Very nice! Any way you can add a global eq? How’s the esp32 tft screen/control integration coming along?
 
The 3 band tone stack (AMP section) is independent and always on. There is also a global high pass filter at the end of the signal chain.
I need to somehow squeeze the wah into the gui now. I think i'll change the Booster tab to "Preamp" and it will contain all the pre EQ/boost/octaver controls.
 
@Pio I just wanted to say that this is one of the most amazing projects on this forum. Congratulations!

I am watching your progress, since some years ago I did a prototype of guitar FX box using STM32F401 which is nowhere near to Teensy 4 in terms of computing power, but I have faced some similar issues with ADC noise. I was using WM8591 codec which has quite good spec (110dB SNR DAC, 102 dB ADC, differential outputs for DAC) and yes I think that DAC with separate 5V AVDD and differential output is essential with all that digital noise around the circuit. Without being able to eliminate noise in the hardware, I ended up using noise gate as the first stage of the FX chain and it pretty much eliminated the problem

A question: do you by chance live in Poland?
 
Last edited:
I'm still deep in the GUI(ESP32) - Teensy integration.
Preset System:
supports up to 128 presets (if SD card is present) or 8 if using EEPROM only. EEPROM is still used to hold the 1st 8 presets. Acts like a backup copy, SD cards can fail. Preset names are added, limited to 15 characters.
I also added a separate software DC blocking filter on the input, it doesn't have to rely on the built in one.
I have successfully tested the hardware and will post the HW design files soon.
Overall i'm really happy with the design decisions, esp. the choice of ADC+DAC. It's so much better compared to pretty much all codec chips i've used previously. Hi gain guitar rhythm sound is a really good test to show all the signal chain flaws and imperfections.
Here is an audible comparison: 24bit WM8731 (HPF off, single ended IO) vs 32bit AK5552+AK4452 (differential IO). The samples are normalized since WM8731 works with lower reference voltage (3.3V), AKs run on 5V anlaog supply. WM is a lot noisier + still has a bit of oscillation, even when the guitar vol knob is muted. AK pair - well, here you can hear it:

This is very impressive! With AK codecs and guitar pot turned down it gets very quiet. When you open the pot you get normal high gain noise which is typical in guitars, as no pickup (even humbucker) with unbalanced instrument cable is perfect.
 
@tomas
Thank you! It's been a journey and i think it will go further. Having the tested hw base i'll try to run the NAM models on Teensy next. While researching this topic lately i found a few PCB pics of the IK ToneX pedal, which, surprise surprise - uses MIMXRT1061DVL6B as the main DSP and separate ADC+DAC.
Regarding the NoiseGate - i think it's a must. I'm using a different approach, which i often used in analog distortion pedals - feed the gate's side chain input with a clean input signal (after the DC blocker) and use it to control a gain element placed right before time based effects. This way the threshold can be set once and does not depend on the overall distortion level, yet it cuts all the noise generated by it. The annoying decay stutter is also gone.
I don't live in Poland, but i am Polish.
 
More work on the Wah section:
the implementation is based on the work by Transmogrifox
adapted to the current TGX4 workflow (mono processing, bypass is stereo) and with a few additions:
- 8 wah models
- adjustable input gain
- dry/wet mix
- adjustable control range using Top + Bottom values, similar to the LFO settings in Phaser. This can be useful ie. while creating a bass wah model to precisely set the frequency sweep range
Here is a short sound sample recorded using the TGX4 + stereo looper/drum machine, wah controlled via expression pedal this time


Tracks:
1. Drum loop
2. Bass - clean bass Preset #7
3. Rhythm guitar: Crunch / Preset #3 + Wah
4. Solo Guitar: Preset #5, switched off the Doubler, added more Plate reverb and a bit of delay
 
The bottom lid has been officially screwed in, a long journey is coming to an end (probably).

tgx4_top_s.jpgtgx4_side2_s.jpg

Now i'll try to make some music with it while testing all the functions, document them (worst part) and post it on github.
There has been some changes to the hardware platform definition, making it hopefully less convoluted.
I'm going to use the GPIO15 input on the Audio Adaptor board as the expression pedal input, it can be wired to a 1/4 jack socket and used to control the WAH or something else. Also the pots and switches on the TGA Pro extension board should work from start - configurable in the SETUP window.

tgx4_setup1.jpg

The default functions for the footswitches are:
- Left - master bypass
- Middle - preset up, clicking it shows a popup with a next preset number/name, holing it down loads it.
- Right - preset down, the same operation as above. Click to change the nubmer, hold down to load it.

Expression pedal is by default used to control the Wah,

Saving a preset opens up a keyboard where a new name can be typed in:

tgx4_save1.jpg

What i'd like to do next is a few python scripts to dump all the presets from the Teensy's SD card into a file or vice versa - restore them from the backup file.
Possible future hardware explorations:
- GPIOs are rearranged to make the I2S2 available on the two FPC connectors. I was thinking, maaaybe a small daughter board with a codec chip connected to the I2S2 could make a stereo FX loop to inject more pedals between the amp simulation output and the effect section.
- small module plugged to the UART1 connector providing a standard DIN5 MIDI input.
 
The saga continues:
based on the experiences gathered with the TGX4 i came up with an idea for a much smaller module type device to be used as a Stereo IR cabinet emulator + Reverb only. Such a module can be built into an analog preamp/distortion or an amplifier.
The hardware is based on Teensy4.0 and a custom board with the following features:
  • stereo codec AK4558 (32bit 44.1kHz)
  • buffered inputs and outputs
  • separate stereo Headphone output with optional Volume pot
  • plan is to have the IRs stored on an SD card as wav files
  • HighPass, LowPass and Reverb level controls, Stereo doubler
  • 4 pot inputs
  • 4 buttons
  • power input: 9VDC
  • 1.28" round SPI display (GC9A01A) using LVGL9
t40_IRcabsim_pcb.gif

The boards are on the way, meanwhile, i got the LVGL9 working with DMA and dual buffering, heavily inspired by
GC9A01A Display driver by mjs513 and KurtE
It's a stripped down, minimalistic library that initializes the display and privides a display_flush callback that writes the pixel data using DMA.
t40_IR_cabsim_GUI.gif


I need to test the library wth multiple displays before i'll post it. Potentially it could a base for a generic Teensy/LVGL driver library for various displays.
 
The saga continues:
based on the experiences gathered with the TGX4 i came up with an idea for a much smaller module type device to be used as a Stereo IR cabinet emulator + Reverb only. Such a module can be built into an analog preamp/distortion or an amplifier.
The hardware is based on Teensy4.0 and a custom board with the following features:
  • stereo codec AK4558 (32bit 44.1kHz)
  • buffered inputs and outputs
  • separate stereo Headphone output with optional Volume pot
  • plan is to have the IRs stored on an SD card as wav files
  • HighPass, LowPass and Reverb level controls, Stereo doubler
  • 4 pot inputs
  • 4 buttons
  • power input: 9VDC
  • 1.28" round SPI display (GC9A01A) using LVGL9
View attachment 35494
The boards are on the way, meanwhile, i got the LVGL9 working with DMA and dual buffering, heavily inspired by
GC9A01A Display driver by mjs513 and KurtE
It's a stripped down, minimalistic library that initializes the display and privides a display_flush callback that writes the pixel data using DMA.
View attachment 35495

I need to test the library wth multiple displays before i'll post it. Potentially it could a base for a generic Teensy/LVGL driver library for various displays.
Sounds really good, my humble suggestion for your design is: please consider to maybe use 48Khz instead of 44.1Khz (or maybe an option for selecting it?): this would allow in future for integrating to other equipment like ADAT/SPDIF more easily if you would also implement digital outputs (e.g. all my digital audio equipment in my home studio uses 48Khz including my RME PCIe audio interface) ?
 
Fs of 44.1kHz is the default value coming from the original Teensy Audio library. The OpenAudioArduinoLibrary around which my fx lib is built does implement a setting for the Fs, however i did not implement it in all the modules. Some day i probably will.
48k also means more CPU load and the TGX4 migth not run with that setting (max reaching 90%). IR cabsim should have no problems.

As for SPDIF output, there is a SPIF3 module in the OpenAudioArduinoLibrary, which outputs data on GPIO 14. It's one of the POT inputs.
Pot inputs have parallel filter capacitors, but they can be isolated by cutting one jumper. At the cost of one Pot input i believe adding an SPIF out, using an external daughter board will be possible.
T40IRloader_pcb1.jpg
Also, i completely forgot that the bottom footprint on the T4.0 is not an SD card one, but for a FPC ribbon cable.
The 1st attempt to solve this: small flex pcb. Not ideal, the USB plug will have to be flat and it might not really be vibration tollerant.
t40SD_v1.jpg
I'll try this one first and see how it works. A longer flex pcb, with the socket placed on the other side, bent 180° might be another option.
 
Back
Top