New audio effect: AudioEffectAnalogDelay

Status
Not open for further replies.

Blackaddr

Well-known member
New audio effect: AudioEffectAnalogDelay

I've updated the BAGuitar library with a brand new effect. It is designed to model the essentials of a BBD based delay pedal such as the Boss DM-3. What gives an analog delay (as opposed to a digital delay) its character is the echos are not perfect copies of the original. Extreme anti-alias filtering remove much of the frequencies above 1500 Hz. If feedback is used, repeated echoes continues to lose frequencies after each echo, just like echoes in a real environment.

Here's a short video showing off some different delay configurations. I'm running a new AudioDelayDemo example that's been added to the BAGuitar library.


Here are the key features of the new effect

- the same class is configurable to use internal RAM or external SPI RAM
- external SPI RAM uses DMA to avoid loading the processor.
- Provides parameter control for bypass, delay, feedback, wet/dry mix and volume.
- effect parameters can be controlled via MIDI (USB or DIN)
- implements an 8th order IIR filter to match the characteristics of the DM-3 (uses ARM DSP instructions)
- COMING SOON: user programmable filters and some more pre-defined ones.

The filtering is based on the following paper. Personally I did not find modelling the harmonic distortion worth while. Adding noise and and THD might be of academic interest but I don't want to waste Teensy processing power on it. Modelling the compander is more difficult. The method used in the paper is very expensive, so I left it out for now.
Practical Modeling of Bucket-Brigate Device Circuits

**The "internal RAM" mode will work on any Teensy Audio project. The external RAM requires you have the Teensy Guitar Audio shield, or something with the same SPI pinout as that board.


**BAGuitar now requires a fork of the DmaSpi library. Both can be found on Github.
https://github.com/Blackaddr

The DmaSpi library had to be modified in order to support easier transfers with the LC1024 SPI memory in particular.

BAGuitar Library Changes:
I've been working on big enhancements to the library over the past 3 months. The library now contains some very useful general purpose primitives than can be used to build audio effects. An example of this is the 'AudioDelay' class. It provides general audio buffering using either internal or external memory, but is NOT an AudioEffect itself. This allows it to be used in other AudioEffects as a building block. I've also added a general purpose External SRAM Manager that allows a SPI memory to have 'slots' treating the external memory as managed pool. This will allow external memory to be more easily split between different effects. Currently working on adding an LFO primitive. Many of these ideas come from great work done by other contributors to the Teensyduino libraries.

I'm planing to use these primitives to make a new digital delay shortly with the same effect controls, as well as some new effects such as SoundOnSound and AutomaticDoubleTracking.

SALE: to celebrate this first milestone in the BAGuitar library development the Teensy Guitar Audio Shield will be on sale for $10 off starting tomorrow (Friday) for a limited time or while my current batch of inventory lasts.

If you have any questions about the effect, the libraries or the board I'll do my best to answer them.
 
Last edited:
I've updated this effect on Github to add two more pre-defined filters to change the character of the delay.

I've added a function (setFilter) to select one of several pre-defined filters, also there is now setFilterCoeffs() to program your own custom filter design.

Here's a picture of the 3 pre-defined filter responses.
plots.jpg

DM3: (red) the default filter. This is modelled after the Boss DM-3 pedal, which has a very strong resonance peak (nearly +15dB!) right before the rolloff begins around 2Khz. The result is a bright sounding "natural" echo like around tall buildings or a canyon. The high frequencies resonate, while the lows die away.

WARM: (blue) a custom filter I made based on a Butterworth design. It has smooth rollover (no resonance peak) starting around 2KHz. It does not have the resonance peak you get from the DM3, so it provides a smoother, warmer tone in the echoes.

DARK: (green) a custom Chebychev Type II filter with a very sharp roll-off at 1 KHz. This provides a very bassy echo. Muted notes can slap back like that guy in the upstairs apartment stomping the floor.

You can try these all out by uncommenting some new lines added to the AnalogDelayDemo.ino.
Code:
  //////////////////////////////////
  // AnalogDelay filter selection //
  // Uncomment to tryout the 3 different built-in filters.
  //analogDelay.setFilter(AudioEffectAnalogDelay::Filter::DM3); // The default filter. Naturally bright echo (highs stay, lows fade away)
  //analogDelay.setFilter(AudioEffectAnalogDelay::Filter::WARM); // A warm filter with a smooth frequency rolloff above 2Khz
  //analogDelay.setFilter(AudioEffectAnalogDelay::Filter::DARK); // A very dark filter, with a sharp rolloff above 1Khz

If you're thinking about getting an audio board for guitar, the 15% off sale for the audio boards on Tindie ends Friday, then I'm away for a week.
 
This is super cool stuff. It's funny how humans prefer imperfection in our art forms.

I love that this works with the visual audio design tool. I really want to try it out but I'm really curious about your midi capability. Can effects be controlled with a hardware midi controller like a midi pedal? Can any of the parameters be assigned to a controller thru midi? I have a unique controller that I'm creating and I'm wondering if it would work with this. I'm assuming yes, but you don't specifically state on your Tindie page that effects can be selected or swapped live with a midi controller. Can this be used on stage or is it just for messing around with the audio design tool, which is awesome enough, BUT if someone makes a bunch of custom effects can they easily add it to their rig? Does it work with your micro midi controller? Or an RJM Mastermind LT? If so, you might want to add a bullet point on your page regarding various controllers that work with it and specifically state that it can easily be added into an existing rig.
 
This is super cool stuff. It's funny how humans prefer imperfection in our art forms.

I love that this works with the visual audio design tool. I really want to try it out but I'm really curious about your midi capability. Can effects be controlled with a hardware midi controller like a midi pedal? Can any of the parameters be assigned to a controller thru midi? I have a unique controller that I'm creating and I'm wondering if it would work with this. I'm assuming yes, but you don't specifically state on your Tindie page that effects can be selected or swapped live with a midi controller. Can this be used on stage or is it just for messing around with the audio design tool, which is awesome enough, BUT if someone makes a bunch of custom effects can they easily add it to their rig? Does it work with your micro midi controller? Or an RJM Mastermind LT? If so, you might want to add a bullet point on your page regarding various controllers that work with it and specifically state that it can easily be added into an existing rig.

Those are some great questions. I am away at a tech conference this week and unfortunately can't give them the answers they deserve typing on a phone. I'll be sure to post a proper reply when I return this weekend.
 
This is super cool stuff. It's funny how humans prefer imperfection in our art forms.

I love that this works with the visual audio design tool. I really want to try it out but I'm really curious about your midi capability. Can effects be controlled with a hardware midi controller like a midi pedal? Can any of the parameters be assigned to a controller thru midi? I have a unique controller that I'm creating and I'm wondering if it would work with this. I'm assuming yes, but you don't specifically state on your Tindie page that effects can be selected or swapped live with a midi controller. Can this be used on stage or is it just for messing around with the audio design tool, which is awesome enough, BUT if someone makes a bunch of custom effects can they easily add it to their rig? Does it work with your micro midi controller? Or an RJM Mastermind LT? If so, you might want to add a bullet point on your page regarding various controllers that work with it and specifically state that it can easily be added into an existing rig.

Thanks for your patience, I'm back from the GTC conference and will do my best to answer your questions.

- effects can controlled by a MIDI pedal by using the standard MIDI library, rather than the USB-MIDI in the AnalogDelay demo. If you are using the TGA Pro board, it already has the MIDI circuitry and jack requires, so you can connect 5-pin MIDI cable directly to the board. If you are using the PJRC audio board, you would need to add your own MIDI electrical circuits. Modifying the AnalogDelay demo to use regular MIDI should be easy. You can see how regular MIDI is used in a loop back test here.

- you can certainly use MIDI to turn multiple effects on and off. The AnalogDelay demo uses MIDI to control the effect bypass, though admittedly at the moment it's just the one effect being controlled. You can choose any CC you want to control the parameters on AudioEffectAnalogDelay. In the demo, I set them to match the hard coded-values CC values in the BAMidiTester application, but you can match it to your own controller. At the moment, only the AnalogDelay has MIDI control as a pre-made example. To control the effects in the Teensy Audio Library with MIDI, you'll need to add your own code, however I plan to release more audio effects in my BAGuitar library and all of them will have MIDI control like in the AnalogDelay demo.

- You could certainly use the TGA Pro on stage if you built yourself an enclosure for it. As mentioned above, using the onboard MIDI circuitry and 5-pin din jacks, you should be able to control it with any other MIDI controller. I may provide prebuilt enclosures in the future, but not at the moment. The 'Pro' in the name is actually for 'prototyping', the idea is provide an easy platform to start learning how to write effects without worrying about preamp designs or soldering SMD components.

Hope that helps!
 
Ok, that is pretty awesome. You are officially on my list of things to do. Hopefully I will be able to support this endeavor soon after I clear some other things from the list.
 
Status
Not open for further replies.
Back
Top