There actually isn't much complicated DSP in this delay at all, if you take away the ringmod feature. If I cut all the fat out and simplify things, it's just a loop (variable speed, basically delay time) that runs at the samplerate I want. And each "pass" of the loop, it does a couple things. It samples a single sample of audio (via the ADC) of whatever is being summed by the analog stuff (audio dry in + feedback path) and puts that single sample to memory at a specific (but constantly incrementing) address. Then it increments that "position" in memory by 1, reads that new part of memory (the last time was sampled/written to a full delay time loop ago) and play that single sample back via the DAC.
It's a memory "ring". Like a rubber band loop. A ring with thousands (hundreds of thousands) of individual audio samples. And the program goes around the ring by incrementing "where" to read and write a single sample. It shouldn't read and write at the same spot, though. It write's at a specific spot, advances one sample address, then reads this new one. Repeat all of this tens of thousands of times per second.
I could explain it a whole lot better with a picture, maybe. My delay is quite a bit more complex than this (it does fancy tricks with the memory addresses, and the ringmod), but fundamentally that's how a delay works. Keeping track of numbers and samples, but no real DSP.
I'll type a longer reply later.
Playing around with a long delay
Moderator: Ghost Hip
Forum rules
The DIY forum is for personal projects (things that are not for sale, not in production), info sharing, peer to peer assistance. No backdoor spamming (DIY posts that are actually advertisements for your business). No clones of in-production pedals. If you have concerns or questions, feel free to PM admin. Thanks so much!
The DIY forum is for personal projects (things that are not for sale, not in production), info sharing, peer to peer assistance. No backdoor spamming (DIY posts that are actually advertisements for your business). No clones of in-production pedals. If you have concerns or questions, feel free to PM admin. Thanks so much!
- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
- mathias
- IAMILFFAMOUS
- Posts: 3868
- Joined: Sat Dec 29, 2007 4:25 pm
- Location: noosphere
- Contact:
Re: Playing around with a long delay
While we're talking about ARM and Arduinos, the board that I use in my handmade keyboards (as in computer keyboards - pics [inside] [url][finished][/url]) is a Teensy 2.0, which is an Arduino-alike with USB HID (human interface) protocol (but that part can be ignored.) They have a board that's Arduino-compatible but has a small ARM chip. I wonder if this would be interesting to you at all, Cloudscapes?
https://www.pjrc.com/store/teensy31.html
I might try to put together one of these (I have a spare Teensy 3.0 for a project that never happened) with some digipots and a circuit just to see what I can do. (Analog controlled by digital kind of thing.. although I suppose I could run signal through one of the analog-in pins.
https://www.pjrc.com/store/teensy31.html
I might try to put together one of these (I have a spare Teensy 3.0 for a project that never happened) with some digipots and a circuit just to see what I can do. (Analog controlled by digital kind of thing.. although I suppose I could run signal through one of the analog-in pins.
ILF Equipped 
If you can read this, then I'm back?

Searching for that new sound.skullservant wrote:You can like whatever you want so long as it makes you happy
If you can read this, then I'm back?

- cloudscapes
- FAMOUS
- Posts: 1159
- Joined: Sat Nov 25, 2006 1:41 pm
Re: Playing around with a long delay
That keyboard
I have a teensy 3.1 that I haven't tried yet. It's great for people who want to do DSP, for sure! I don't think it's for me, though, because it requires you to have the bootloader chip with the propriety firmware along with the ARM. I don't want to have to plug a dongle to my pedals, or plug the teensy stamp in them. I prefer it to be my own solution. Also, I don't like the arduino IDE it uses very much. For the same reasons I wouldn't want to use notepad to put together and edit a 100-page essay with tables and graphs and shit. It's user-friendly, but incredibly limited as an IDE.
That said, it's nothing personal against teensy or arduino. Just taste. They have an amazing audio library and GUI editor!
http://www.pjrc.com/teensy/td_libs_Audio.html

I have a teensy 3.1 that I haven't tried yet. It's great for people who want to do DSP, for sure! I don't think it's for me, though, because it requires you to have the bootloader chip with the propriety firmware along with the ARM. I don't want to have to plug a dongle to my pedals, or plug the teensy stamp in them. I prefer it to be my own solution. Also, I don't like the arduino IDE it uses very much. For the same reasons I wouldn't want to use notepad to put together and edit a 100-page essay with tables and graphs and shit. It's user-friendly, but incredibly limited as an IDE.
That said, it's nothing personal against teensy or arduino. Just taste. They have an amazing audio library and GUI editor!
http://www.pjrc.com/teensy/td_libs_Audio.html
- mathias
- IAMILFFAMOUS
- Posts: 3868
- Joined: Sat Dec 29, 2007 4:25 pm
- Location: noosphere
- Contact:
Re: Playing around with a long delay
fwiw the keyboard (which still uses PIC-based microcontrollers) doesn't use any of the Arduino toolchain, just standard open source tools: https://github.com/technomancy/atreus-firmware
I forgot that Phil switched to the cheaper / easier-to-get A-Star Micro boards: https://www.pololu.com/product/3101 which is what the main firmware supports; but there is still a Teensy branch.
I forgot that Phil switched to the cheaper / easier-to-get A-Star Micro boards: https://www.pololu.com/product/3101 which is what the main firmware supports; but there is still a Teensy branch.
ILF Equipped 
If you can read this, then I'm back?

Searching for that new sound.skullservant wrote:You can like whatever you want so long as it makes you happy
If you can read this, then I'm back?

- mathias
- IAMILFFAMOUS
- Posts: 3868
- Joined: Sat Dec 29, 2007 4:25 pm
- Location: noosphere
- Contact:
Re: Playing around with a long delay
cloudscapes and others, if you're looking for a cheap, breadboard-friendly ARM chip to try out, this just came out: https://www.sparkfun.com/products/13305
32 bit ARM Cortex-M0+ 48 MHz CPU
62kb Flash Memory, 8kb RAM, 1/8(emu)kb EEPROM
13 High Resolution Analog Inputs
27 Digital I/O Pins (NOT 5V Tolerant)
10 PWM outputs
7 Timers for intervals/delays, separate from PWM
3 UARTs (serial ports)
SPI, I2C, & I2S
I2S (for high quality audio interface)
4 Lightweight DMA channels
Touch Sensor Inputs
$12.95
32 bit ARM Cortex-M0+ 48 MHz CPU
62kb Flash Memory, 8kb RAM, 1/8(emu)kb EEPROM
13 High Resolution Analog Inputs
27 Digital I/O Pins (NOT 5V Tolerant)
10 PWM outputs
7 Timers for intervals/delays, separate from PWM
3 UARTs (serial ports)
SPI, I2C, & I2S
I2S (for high quality audio interface)
4 Lightweight DMA channels
Touch Sensor Inputs
$12.95
ILF Equipped 
If you can read this, then I'm back?

Searching for that new sound.skullservant wrote:You can like whatever you want so long as it makes you happy
If you can read this, then I'm back?

- mathias
- IAMILFFAMOUS
- Posts: 3868
- Joined: Sat Dec 29, 2007 4:25 pm
- Location: noosphere
- Contact:
Re: Playing around with a long delay
Bumping thread because I did some spring cleaning and pulled out the Teensy 3.0 and an old 12AX7 overdrive/distortion pedal that I built from a kit (and it never worked) -- the good news is that the case of the old tube-based pedal is HUGE and has a big hole on top, so I'm gonna tear out the guts, solder in jumper wires to input, output, 9VDC, etc and stick an adhesive breadboard on top for prototyping. We'll see how the Teensy 3.0 does as a pedal brain for controlling digipots in some simple analog circuits. Should be super fun!
ILF Equipped 
If you can read this, then I'm back?

Searching for that new sound.skullservant wrote:You can like whatever you want so long as it makes you happy
If you can read this, then I'm back?
