DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: ElectricDruid on December 29, 2016, 03:01:04 PM

Title: 4 second digital delay project
Post by: ElectricDruid on December 29, 2016, 03:01:04 PM
Hi all,

I've finally finished the Digital Delay project I've been working on. Full details are over on my website:

http://electricdruid.net/diy-digital-delay/ (http://electricdruid.net/diy-digital-delay/)

A quick summary of the features:


(http://electricdruid.net/wp-content/uploads/2016/12/DSCN5484.jpg)
(http://electricdruid.net/wp-content/uploads/2016/12/DSCN5476.jpg)

I started off trying to use a PIC to add tap tempo to the PT2399, using PWM to control a current sink, including a calibration routine by reading the frequency of the PT2399's clock output with the PIC. I spent a long time on it before I gave up. Ultimately, the PT2399 isn't worth that amount of effort. So then I started a "blank sheet" digital delay design. I wanted to keep it all through-hole rather than SMD, and I wanted it as simple as possible. Those two criteria decided the chip choices and a lot else.
The hardware is very similar to what Slacker came up with in a earlier thread:

http://www.diystompboxes.com/smfforum/index.php?topic=106741.20 (http://www.diystompboxes.com/smfforum/index.php?topic=106741.20)

We were both applying similar conditions (easy breadboarding/prototyping, cheap, simple) and so got to similar results. My final design uses a 33FJ64GP802 dsPIC in 28-pin DIP, and a couple of 8-pin DIP 128KB SRAMs.

Anyway, full schematics and code are available for people to play with, and you could use the hardware as a jumping-off point for your own dsPIC pedal development. I've got PCBs and programmed chips available for purchase if you just fancy building one rather than getting into programming.

(http://electricdruid.net/wp-content/uploads/2016/12/DigiDelayPCBChipset.jpg)

Enjoy the echoes!..choes!..choes!..oes!..s!

Tom
Title: Re: 4 second digital delay project
Post by: lars-musik on December 29, 2016, 03:16:14 PM
It is simply great that you share your fine projects. Thanks a lot! But I'll have a hard time putting this into a 1590a!
Title: Re: 4 second digital delay project
Post by: cloudscapes on December 29, 2016, 04:02:29 PM
How are you varying the delay time? Variable samplerate above and below 32khz? Or some DSP kung-fu?  ;)
Title: Re: 4 second digital delay project
Post by: ElectricDruid on December 29, 2016, 04:29:16 PM
Quote from: cloudscapes on December 29, 2016, 04:02:29 PM
How are you varying the delay time? Variable samplerate above and below 32khz? Or some DSP kung-fu?  ;)

No, this version uses a fixed sample rate. The delay time is varied by moving the read pointer which follows the write pointer through RAM. To avoid glitches, the old position and the new position are cross-faded while it changes.

One day I'd like to do a variable-sample-rate version, because I'd like to add a delay time CV modulation input. But for now, the most important thing was to get this one finished.

T.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on December 29, 2016, 07:13:35 PM
One other late addition to the code that I forgot to mention is a Sync Output. It outputs a short pulse at the current tempo (either set by the Delay Time knob or tapped on the Tap Tempo footswitch). This could be used to sync other pedals based on the TAPLFO or similar chips. Since the TAPLFO includes multipliers, you could have a (for example) phaser running at twice the delay speed, or half, or x1.5, or whatever.
God only knows what happens with a tremolo and a delay sync'd up. Could you have the delay fill in the bits the trem makes quiet? Lots of possibilities, anyway.

T.
Title: Re: 4 second digital delay project
Post by: midwayfair on December 30, 2016, 10:02:50 AM
hnnnnggggg

(http://oddstuffmagazine.com/wp-content/uploads/2013/07/0515-610x340.jpg)
Title: Re: 4 second digital delay project
Post by: deadastronaut on December 30, 2016, 11:40:28 AM
4 seconds...brilliant!!!!...  8) 8) 8) 8) 8) 8) 8) 8)
Title: Re: 4 second digital delay project
Post by: mth5044 on December 31, 2016, 08:20:02 PM
Can't wait to order! Definitely will put in a purchase within a fews.

Is it hard to set the delay time, especially in the shorter settings? I wonder if it would be worth adding a selector short/medium/long similar to what boss did/does with their delay time selector.

How do you think it react to an LDR placed across the delay time pot for modulation with a TAPLFO/LED?
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 01, 2017, 05:12:33 AM
I tweaked the delay time pot control response with a look-up table for exactly the reason you give - with a linear control, it's hard to set the shortest times accurately, since even a quarter of the way around is a full second of delay. The final response looks like this:

(http://www.electricdruid.net/images/DelayTimeCurve.png)

As you can see, half way round the pot is only a bit over 1/2 second, and even 2/3rds round is only a second. The very long times are all at the end. It feels very natural because of the "octave character". Don't forget there's tap tempo too, so that's handy for long times.

I don't know how it'd react to delay time modulation. I haven't tried it. It does some cool stuff if you twiddle the knob, and sounds like it's playing backwards and stuff, but I wasn't aiming for delay time modulation on this version. I will one day do a variable sample rate version which would be better for delay time modulation.
Title: Re: 4 second digital delay project
Post by: mth5044 on January 01, 2017, 12:05:56 PM
Cool, thanks for the detailed response! Nice work around for the delay time. Should have figured you had it down since all of your projects are so detailed and complete! Can't wait to build it. Thanks again and happy new year!
Title: Re: 4 second digital delay project
Post by: bean on January 01, 2017, 08:19:11 PM
Got mine ordered. I'm going to build the sh*t out of this. Thanks for making the project available!
Title: Re: 4 second digital delay project
Post by: potul on January 02, 2017, 12:14:05 PM
Wow, nice project using a dspic.  I did my first DSP tests using one of these.

I see you programmed it in ASM. Any reason not to use C? performance?

Are you using DMA to read ADC?
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 02, 2017, 01:57:02 PM
Quote from: potul on January 02, 2017, 12:14:05 PM
Wow, nice project using a dspic.  I did my first DSP tests using one of these.
They're pretty powerful chips if you start really using the DSP features.
Quote
I see you programmed it in ASM. Any reason not to use C? performance?
No particular reason, beyond personal taste. I don't much like C, in truth. I know where I am with Assembly - there's nothing in there which I didn't put in. I like that. The performance gain is a bonus.
Quote
Are you using DMA to read ADC?
No, not here, although I often have on other projects. On this one, I read them "manually" because I've interleaved the reads so that the audio channel gets read much more often than the pots. The read pattern goes like this:

Audio, CV0, Audio, CV1, Audio, CV2, Audio, CV3, Audio, CV4, Audio, CV5, and then back to the beginning.

With a 64.8KHz ADC read rate, I get a sample rate of 32.4KHz for the audio, and 32.4/5 =6.48KHz for the pots. While the DMA will do some clever stuff, I couldn't figure out a way to make it do that!

Tom
Title: Re: 4 second digital delay project
Post by: cloudscapes on January 02, 2017, 07:39:46 PM
Quote from: ElectricDruid on January 02, 2017, 01:57:02 PM
No, not here, although I often have on other projects. On this one, I read them "manually" because I've interleaved the reads so that the audio channel gets read much more often than the pots. The read pattern goes like this:

Audio, CV0, Audio, CV1, Audio, CV2, Audio, CV3, Audio, CV4, Audio, CV5, and then back to the beginning.

With a 64.8KHz ADC read rate, I get a sample rate of 32.4KHz for the audio, and 32.4/5 =6.48KHz for the pots. While the DMA will do some clever stuff, I couldn't figure out a way to make it do that!

I do this as well, partly because I'm not smart enough to figure DMA out. All my pots take turns being sampled on slower-than-audio-rate timer.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 02, 2017, 08:12:48 PM
Quote from: cloudscapes on January 02, 2017, 07:39:46 PM
I do this as well, partly because I'm not smart enough to figure DMA out. All my pots take turns being sampled on slower-than-audio-rate timer.

It's not so much a question of "smart" in order to figure DMA out, rather "willing to try about a million possibilities until one works"! Once you've got one working set-up, it's easier to tweak it. But finding that first working set-up has eaten days of my life, for all kinds of things.

And anyway, the round-robin sampling thing is a useful trick too, so if we've got that sorted, it's all good.

T.
Title: Re: 4 second digital delay project
Post by: Beo on January 03, 2017, 04:43:20 AM
Quote from: ElectricDruid on December 29, 2016, 07:13:35 PM
One other late addition to the code that I forgot to mention is a Sync Output. It outputs a short pulse at the current tempo (either set by the Delay Time knob or tapped on the Tap Tempo footswitch). This could be used to sync other pedals based on the TAPLFO or similar chips. Since the TAPLFO includes multipliers, you could have a (for example) phaser running at twice the delay speed, or half, or x1.5, or whatever.
God only knows what happens with a tremolo and a delay sync'd up. Could you have the delay fill in the bits the trem makes quiet? Lots of possibilities, anyway.

The sync output could be used to drive an led/lcd display for delay time. I did something like this in my 1000 competition entry:
http://www.diystompboxes.com/smfforum/index.php?topic=96870.420 (http://www.diystompboxes.com/smfforum/index.php?topic=96870.420)

I recently picked up a 1980's Ibanez DM2000, in part for its 1sec delay but also for it's Hold and Modulation functions. If there's any room for additions in your design, these are two functions I'd like to see.

Looking forward to building this! Thanks E Druid!
Title: Re: 4 second digital delay project
Post by: potul on January 03, 2017, 05:16:32 AM
Quote from: ElectricDruid on January 02, 2017, 08:12:48 PM
Quote from: cloudscapes on January 02, 2017, 07:39:46 PM
I do this as well, partly because I'm not smart enough to figure DMA out. All my pots take turns being sampled on slower-than-audio-rate timer.

It's not so much a question of "smart" in order to figure DMA out, rather "willing to try about a million possibilities until one works"! Once you've got one working set-up, it's easier to tweak it. But finding that first working set-up has eaten days of my life, for all kinds of things.

And anyway, the round-robin sampling thing is a useful trick too, so if we've got that sorted, it's all good.

T.

That was my experience in the past as well.. it's really a nightmare to figure out a working example using DMA. I lost weeks trying to make it work, and I'm not sure I could replicate it now.

Title: Re: 4 second digital delay project
Post by: bean on January 10, 2017, 04:03:46 PM
Got mine built up but I'm having a bit of noise. Voltages seem to check out (solid 3.3v off the regulator and around 4.2v Vb off a steady 9.14v supply), and all my parts/values are correct.

I audio probed around to see what I could find. Some noise and whine out of pin25 which seems to be exacerbated by the filter section (probing at their outputs) so when it gets to the circuit output it's pretty loud. At first I had it plugged into my testing rig which includes a charge pump for different voltage selection (9, 15, 18, -9) so I bypassed that and went straight to the One Spot. That definitely did help with some noise but it's still pretty bad. Also swapped out for a different batch of TL072 just in case. I have not tried plugging into another power supply but my One Spot is pretty solid for testing (and obviously the build isn't boxed yet). Should I expect some noise level with this build or are there any suggestions on where to look next? Delay itself is working great.
Title: Re: 4 second digital delay project
Post by: 12Bass on January 10, 2017, 04:37:10 PM
Quote from: ElectricDruid on December 29, 2016, 03:01:04 PM

  • 12 bit/32KHz input, 16 bit/32KHz output

Guessing this is a typo... unless the circuit is somehow increasing the bit depth.
Title: Re: 4 second digital delay project
Post by: cloudscapes on January 10, 2017, 05:02:45 PM
Quote from: 12Bass on January 10, 2017, 04:37:10 PM
Quote from: ElectricDruid on December 29, 2016, 03:01:04 PM

  • 12 bit/32KHz input, 16 bit/32KHz output

Guessing this is a typo... unless the circuit is somehow increasing the bit depth.

Not saying it isn't a typo, but this is actually fine for some effects. If the feedback path for delay/reverb type of effects is digital, then it would benefit from a higher bitdepth DAC.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 10, 2017, 07:58:59 PM
No, no typo. Cloudscapes is spot on.

Think what happens when you recirculate the delays. You add two 12-bit numbers together, and you get a 13-bit result. You do that a couple more times, you get a 14-bit result, etc etc. It keeps adding up.
It helps quite a bit to have more resolution than your input format, and if you can maintain that extra resolution at the output, so much the better. The alternative is truncation or rounding, and that introduces more errors.

Tom
Title: Re: 4 second digital delay project
Post by: bluebunny on January 12, 2017, 03:45:01 PM
I bit.  $$$

Can't wait to build this . . .

        .
        .
        .

. . . onto the end of my backlog.   :icon_rolleyes:
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 12, 2017, 05:17:34 PM
Aww, go on, it'll only take an old hand like you a couple of hours to put together! You can start after breakfast and be done by coffee time!

Seriously, the slow bit is the enclosure, since there's hardly any off-board wiring. Or maybe I'm just a bit c**p at drilling.

T.
Title: Re: 4 second digital delay project
Post by: Ice-9 on January 12, 2017, 05:44:20 PM
What can I say Tom, outstanding project. Nice of you to bring it to the forum and I look forward to building this one when I find a little spare time. :)
Title: Re: 4 second digital delay project
Post by: Jamforthelamb on January 12, 2017, 06:01:36 PM
Mine came in the mail yesterday! Can't wait for the next Tayda code to come out  :icon_lol:.
One question. What does the tap tempo set the timing of the delay to? I think I read further up that it isn't a typical 1/4 not or 1/8th note type deal (meaning where you can pick the tempo).
Thanks, looking forward to building it!
-Kevin
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 12, 2017, 06:25:39 PM
No, it's straight tap time. You tap, the echoes go at the speed you tap.

Good luck with your build. Let me know if you have any problems or find any mistakes in the build docs.

Thanks,
Tom
Title: Re: 4 second digital delay project
Post by: Cozybuilder on January 12, 2017, 10:47:05 PM
Mine arrived in the post today- it looks great! Now I just need to get some free time. Consulting work with travel, am busier than ever......
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 13, 2017, 05:17:21 AM
Just to say that I updated the construction guide on the website. Someone pointed out to me that I'd completely messed up the film caps section! The BOM and schematic were correct, but the description of where to find/fit them was way out.

Anyway, it's fixed now. If anyone spots anything else whilst they're building, do let me know.

Thanks,
Tom
Title: Re: 4 second digital delay project
Post by: mth5044 on January 17, 2017, 07:49:21 PM
Quote from: bean on January 10, 2017, 04:03:46 PM
Got mine built up but I'm having a bit of noise. Voltages seem to check out (solid 3.3v off the regulator and around 4.2v Vb off a steady 9.14v supply), and all my parts/values are correct.

I audio probed around to see what I could find. Some noise and whine out of pin25 which seems to be exacerbated by the filter section (probing at their outputs) so when it gets to the circuit output it's pretty loud. At first I had it plugged into my testing rig which includes a charge pump for different voltage selection (9, 15, 18, -9) so I bypassed that and went straight to the One Spot. That definitely did help with some noise but it's still pretty bad. Also swapped out for a different batch of TL072 just in case. I have not tried plugging into another power supply but my One Spot is pretty solid for testing (and obviously the build isn't boxed yet). Should I expect some noise level with this build or are there any suggestions on where to look next? Delay itself is working great.

Any updates on this beanman?
Title: Re: 4 second digital delay project
Post by: bean on January 18, 2017, 10:48:05 AM
Quote from: mth5044 on January 17, 2017, 07:49:21 PM
Quote from: bean on January 10, 2017, 04:03:46 PM
Got mine built up but I'm having a bit of noise. Voltages seem to check out (solid 3.3v off the regulator and around 4.2v Vb off a steady 9.14v supply), and all my parts/values are correct.

I audio probed around to see what I could find. Some noise and whine out of pin25 which seems to be exacerbated by the filter section (probing at their outputs) so when it gets to the circuit output it's pretty loud. At first I had it plugged into my testing rig which includes a charge pump for different voltage selection (9, 15, 18, -9) so I bypassed that and went straight to the One Spot. That definitely did help with some noise but it's still pretty bad. Also swapped out for a different batch of TL072 just in case. I have not tried plugging into another power supply but my One Spot is pretty solid for testing (and obviously the build isn't boxed yet). Should I expect some noise level with this build or are there any suggestions on where to look next? Delay itself is working great.

Any updates on this beanman?

Have not gotten back to it yet. There are a couple spots I still want to audio probe though. I'll have an update maybe today, if it helps.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 18, 2017, 12:13:08 PM
Whine is definitely not right. Some hiss is to be expected, especially with the repeats up, since it's only a 12-bit ADC.

Someone recently had problems with bad distortion and the filters oscillating. The problem in that case was synth levels going in. Turning the input down to guitar level helped no end. It's possible that if you feed it a very hot signal, you might get some weirdness.

Good luck!

Tom
Title: Re: 4 second digital delay project
Post by: bean on January 18, 2017, 07:56:53 PM
My vRef voltage is on the low side (4.2v on a 9.4v supply) so I pulled all three TL072 to see if one might be causing a problem. No change on vRef with that so I went ahead and replaced the two 10k voltage dividers and 47uF decoupler. Still sitting at 4.2v. So, maybe that is what it should be here.

Anyway, here is a quick clip to show what I am experiencing. It's starts with hard bypass on my testing rig then with the effect engaged. Using the circuit bypass does not change the noise level. Noise level also does not seem to be effected by the delay time, either.

https://soundcloud.com/madbeanpedals/digidelay-hiss

PS I'll start a separate thread for this if I come up with anything else - I don't want to pollute this one with a debug.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 31, 2017, 07:58:21 AM
I've just posted an addition to the project page over on my site. The schematic as shown accepts up to nearly 3.3Vp-p input level. This is good for some stuff, but not so great if you're running it with a low-level guitar output.
By modifying four resistor values, you can tweak the levels in the circuit and improve S/N for low level signals by 13dB. This reduces the maximum input level to 680mVpp.

(http://electricdruid.net/wp-content/uploads/2017/01/SignalNoiseMod.png)

If you're finding the pedal hissy, or you're building it and don't have a guitar with a hot output, it might be a good idea to make these changes.

HTH,
Tom
Title: Re: 4 second digital delay project
Post by: cloudscapes on January 31, 2017, 04:39:01 PM
Ever think of implementing a compander circuit for hiss reduction/more effective bandwidth?
Title: Re: 4 second digital delay project
Post by: roseblood11 on January 31, 2017, 05:03:00 PM
... or to design a new version with better converters? I know nothing about digital circuits, but would it be too difficult to make a delay with at least 16 bit / 44.1kHz?
Nice add-ons would be modulation and the possibility to add an effects loop just for the repeats.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on January 31, 2017, 08:11:54 PM
Yes! Both of the above!

Of course I thought about adding a compander circuit, and it would definitely help, but it also adds more circuit complexity and takes up more PCB space and adds another large chip. Is there room? Barely.
I've been thinking of a rack-mount version along the lines of the Ibanez DM2000, though, and that would definitely include the compander. It'd up the S/N and provide a bit of vintage character at the same time. Win/win in my book.

And yes, of course you can build a pedal with 16-bit 44.1KHz converters. These days it's simple and cheap to build one with 24-bit/96KHz converters. So what's the problem? Well, they're designed to be soldered by robots. There are no through-hole decent quality converters that I can find (someone prove me wrong! I'd love you forever!) Don't expect to put one together yourself. Some brave souls do, but it's not what I'd call "DIY friendly". And anyway, if I went down that route...what's the point? There are ten pedals like that in the market already from international manufacturers who can build 10K units as an opening offer and consequently offer finished units at a price I could never hope to meet even for bare boards and chips. There's really no point me trying to compete with the likes of Boss and others. If you want a pedal like that, buy one off the shelf. It'll be cheaper and a lot easier than building one. Sorry, but that's how the economics work.

So, how important to you is the "DIY" aspect? Is there any interest in "delay modules" a bit like the Belton brick (except unpotted, most likely) that could provide all the surface-mount parts to do a really serious digital delay? Would building such a thing into a pedal be considered cheating?!?  ;) How much is the cost an issue?
I ask because I could probably design and program such a thing (I'm thinking of SMD codec, processor, and RAMs on a mini-PCB module) and then I'd have to get a (few?) hundred built up. Is it worth it? That's the big unknown.

If any of this changes in the future, I'm all ears. Always open to a new idea and a new project!

Tom





Title: Re: 4 second digital delay project
Post by: cloudscapes on January 31, 2017, 09:22:18 PM
I totally get keeping the design minimal, chip-wise. If your chip can handle it, maybe you could try coding an envelope follower, and use that to gate noise digitally! Won't get rid of the DAC noise, but it'll help with the ADC. At least i ntheory. I haven't tried it myself, but I'm thinking of it.

I had also considered throwing an ne570 in my own delay, but decided not to much for the same reason as you. Board realestate.

16 bit audio is pretty undoable in DIP unless you go for discontinued parts. Sometimes I come accross NOS 16bit ADCs in DIP, but they're often really low samplerate, or don't have the filters that new audio chips have. You have to do the aliasing filter front end and back end yourself. PARTS EVERYWHERE

I've been playing around with codecs from time to time. I like the ak4552. Cheap, small package (sop 16 or something, not dip), 24/88 quality, and uncomplicated (no i2c configuration, just pump clocks into it and you're set). I can pipe audio in and out of it just fine, but I haven't quite figured out yet to use it along with how I usually code my pic effects. One interrupt that's too long making it miss a clock, and the codec glitches. And my programs rely on a LOT of interrupts. to make it work I'd have to fit absolutely everything I do inside of 20-30us or something, per sample. Including sampling pots from time to time. Not all pots every time obviously.

Pros use stuff like DMA and buffering audio samples in blocks of 128 or something. Pros who are way smarter than me.  ;D
Title: Re: 4 second digital delay project
Post by: markseel on January 31, 2017, 10:13:13 PM
QuoteDon't expect to put one together yourself.
If I'd have followed that advice I'd have never given it a shot and wouldn't be where I'm at today.  I'm not a hardware engineer - I do software.  But after years of wanting to empower myself with a bit of hardware design (I use FreePCB) and assembly (OSH Park rocks! and Digikey/Mouser has everything) I can now make boards for cheap and even solder TSSOPS, 0402 and 0603 SMT passives, and smaller LQFP chips.  I ended up buying a used microscope for SMT work off of eBay, and a cheap soldering iron with a fine tip.  You wouldn't believe how much easier an old scope makes soldering small stuff.  You even learn to be more steady.  A bit of solder flux and decent/fine soldering wire and you're off and running - with a bit of practice.  But you can do it!!!!

Quote
There are ten pedals like that in the market already from international manufacturers who can build 10K units as an opening offer and consequently offer finished units at a price I could never hope to meet even for bare boards and chips. There's really no point me trying to compete with the likes of Boss and others. If you want a pedal like that, buy one off the shelf. It'll be cheaper and a lot easier than building one. Sorry, but that's how the economics work.
I think that sentiment may be missing the point, especially in a DIY forum like this.  DIY isn't necessarily an economics driven decision - sometimes it is - but now always!  Sometimes it's not about getting the cheapest unit but rather building one yourself to your specs and design and learning (and sharing) your ideas, progress, and results with other folks.

QuoteI've been playing around with codecs from time to time. I like the ak4552.
Totally agree - that's a real simple device with respectable performance.  It's easy to hookup (just a handful of caps and resistors).  Check out the AK4556 - still easy as you can just hook it up (no need to configure via I2C/SPI) to an I2S MCU/DSP - and have 24-bit up to 192 kHz.

QuotePros use stuff like DMA and buffering audio samples in blocks of 128 or something. Pros who are way smarter than me.
Oh I don't know about that!  And as smart as the pro's may be (I'm a career audio/wireless FW engineer myself) they don't always do things the easy way (the hard way might be more impressive, provide more job security, and is often over-designed for obscure features, etc).  If someone showed a clear/simple example of audio/I2S DMA and block-based buffering I bet it would look plenty easy.  Side note; 128 would be pretty big - which creates latency.  Maybe something like 32 or 16 if the ISR overhead is acceptable?

QuoteI ask because I could probably design and program such a thing (I'm thinking of SMD codec, processor, and RAMs on a mini-PCB module) and then I'd have to get a (few?) hundred built up. Is it worth it? That's the big unknown.
Well as the creator of the (unfinished) XMOS-based FlexFX stuff I'm biased a bit.  But that Teensy board with a Cortex M4 looks like a solid platform.  Add your yet-to-be-designed audio board with an AK4556 and some high impedance input buffers and you'd have a nice platform for delay effects.  Hey if you want and other are interested I can design a Teensy compatible AK4556 board and make it available at OSH Park - wouldn't take long :-)
Title: Re: 4 second digital delay project
Post by: Strategy on January 31, 2017, 11:10:58 PM
I'll probably order and build one of these anyways, but to satisfy my need for instant gratification...any video or audio content of this online yet? I searched youtube (no luck, lots of good electricdruid projects posted though) but I have not checked Soundcloud yet.
Title: Re: 4 second digital delay project
Post by: bsoncini on February 01, 2017, 03:01:19 AM
I built one of these. At first it had a bunch of hiss. Did the mods that Tom suggested and it is much quieter now. Still a bit of noise but hardly noticeable now.

I don't have the time to make a video. But I can say. I've built numerous pt2399 delays and the quality of the delay in this pedal sounds better (cleaner?). The tone controls are nice to have. With dirt pedals most pt2399 sound very muddy. With this they sound really good playing around with the tone knobs. But I really love the echo splash function.
Title: Re: 4 second digital delay project
Post by: imaradiostar on February 02, 2017, 07:01:02 PM
Half off topic, but I'm totally game for a forum based teensy guitar/music audio board with the ak4556 on it. Mark graciously offered to design the board. Let's start a new thread and talk specifics.

It would be a really fun development platform! The newest teensy has a 180MHz processor with a true floating point unit and it supports the  cmsis instructions. It could be a powerful little board.

Jamie
Title: Re: 4 second digital delay project
Post by: ElectricDruid on February 02, 2017, 07:55:28 PM
I'm game too, but I don't think I'm typical. I've been writing assembly language for 35 years and this stuff doesn't scare me. I've learned a pile of computer languages. I'd like to see this digital stuff get a wider audience. I thought what Digital Larry was doing with his SpinCAD Designer was great. That's the sort of stuff we need.

I'd like to try and attract people who thought they could only build a basic fuzz pedal, and people who don't even know that a basic fuzz pedal is easier than (for example) a digital harmoniser.

The intent of my DigiDelay was in this direction - a 4 second digital delay with features beyond the typical, but that you could build without having to learn surface-mount soldering or programming or even install some new software package where the instructions say something like "Open a Xgip window and type extract -S 407  /home /bingo".

Not that I'm trying to dissuade anyone - far from it. As you said, get a thread going and let's go for it. I just want to throw in a reminder to think of the non-digital amongst us ;)

T.
Title: Re: 4 second digital delay project
Post by: lmkv15 on February 02, 2017, 11:10:23 PM
Hi Tom,
One should also have integrated filters in the input and output of type LT1063 (order of eight)

regards Uwe
Title: Re: 4 second digital delay project
Post by: spgjmf on February 15, 2017, 03:17:15 PM
hi all,
Been a forum reader for years. After being away from DIY for a while I came back for this project. I'm glad I did. wow I really like this delay. its got great personality. big thank you to Tom!

I have it working on the bench, its quite  and works very well with line level stuff, synths and modular stuff. I am having trouble with the drill template :o  It seems the distance between the 3 upper knobs and the 2 filter knobs is not big enough. Has any had this problem. Also tthe fit in 1590BB box is really tight. I may just go we a bigger box, ha.  any suggestion on using the drill template? I always free handed it in the pass and used big boxes for lots of room :-)

the delay is very different than the current crop of delays, which to me all try to sound "produced". this guy is like an ingredient to a larger mix, you can build with it. the feed back within the DSP is a neat thing to...lots of feedback, if you want

take care,
Jeff
Title: Re: 4 second digital delay project
Post by: bsoncini on February 20, 2017, 03:34:27 AM
It is a bit of a tight squeeze. I never use the drill templates so I had no problem. For me the hardest part was the DC jack. Used one of the low profile ones that the nut is on the outside of the box.
Title: Re: 4 second digital delay project
Post by: Philthy on February 20, 2017, 08:49:37 PM
Would the various "made for PT2399" modulation daughter boards (eg: 1776, Grind Customs etc) work with this delay?

Ideally I'd love to see the ED TAPLFO integrated into the 4-sec DD design, but I'm gassing to build it as is with modulation tacked on.

cheers
Title: Re: 4 second digital delay project
Post by: bean on February 20, 2017, 09:15:40 PM
Quote from: Philthy on February 20, 2017, 08:49:37 PM
Would the various "made for PT2399" modulation daughter boards (eg: 1776, Grind Customs etc) work with this delay?

Ideally I'd love to see the ED TAPLFO integrated into the 4-sec DD design, but I'm gassing to build it as is with modulation tacked on.

cheers

I tagged an optical modulation board onto it (lug2 of the delay pot) and it worked okay. My particular modulation wasn't perfect for this delay but yeah, you should be able to do it.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on February 22, 2017, 04:11:23 PM
Quote from: spgjmf on February 15, 2017, 03:17:15 PM
hi all,
Been a forum reader for years. After being away from DIY for a while I came back for this project. I'm glad I did. wow I really like this delay. its got great personality. big thank you to Tom!

Thank you, Jeff! Glad you like it!

Quote
I have it working on the bench, its quite  and works very well with line level stuff, synths and modular stuff. I am having trouble with the drill template :o  It seems the distance between the 3 upper knobs and the 2 filter knobs is not big enough. Has any had this problem. Also tthe fit in 1590BB box is really tight. I may just go we a bigger box, ha.  any suggestion on using the drill template? I always free handed it in the pass and used big boxes for lots of room :-)

It sounds like I'd better check that template. I had a nightmare with it, so I'm not really surprised. You know that feeling when things just don't go right? It was one of those...

Quote
the delay is very different than the current crop of delays, which to me all try to sound "produced". this guy is like an ingredient to a larger mix, you can build with it. the feed back within the DSP is a neat thing to...lots of feedback, if you want

Yeah, I wanted it to be able to do runaway echoes if it could. As it stands, it will do runaway feedback, but only if you open the filters up a bit. I was pleased with the overall "sound" of it - it has some character without being "lo-fi" or "dirty", but it's not by any means "sterile" or "digital" either. It makes me want to do more digital delays.

Tom
Title: Re: 4 second digital delay project
Post by: cloudscapes on February 22, 2017, 06:24:25 PM
Quote from: ElectricDruid on February 22, 2017, 04:11:23 PM
Yeah, I wanted it to be able to do runaway echoes if it could. As it stands, it will do runaway feedback, but only if you open the filters up a bit. I was pleased with the overall "sound" of it - it has some character without being "lo-fi" or "dirty", but it's not by any means "sterile" or "digital" either. It makes me want to do more digital delays.

If you do more (I hope you will!) try analog feedback path too! Even at low bitdepths and rates (12/22) I was surprised at the amount of "analog delay" character I could get.

I love runaway feedback that is on the brink of howling but not quite there yet.
Title: Re: 4 second digital delay project
Post by: ElectricDruid on February 23, 2017, 07:39:13 AM
Quote from: spgjmf on February 15, 2017, 03:17:15 PM
Also the fit in 1590BB box is really tight.

This is true! I had quite a job laying out the PCB to make it all fit, since I didn't want the PCB to be horribly cramped. Still, I'd want to say "fairly tight" not "really tight" ;) It could be much worse!!

The PCB is 109x69mm, and the 1590BB is 122.6x87mm at its smallest (the sides are slightly flared). So there's at least a couple of mm play at the sides. Here's a link to the datasheet:

http://www.hammondmfg.com/pdf/1590BB.pdf

Some of the clones vary a few mm, so it's possible that some are really tight. I've used Eddystone branded Hammond boxes and some other clones I got god-knows-where without problems.

Where I definitely agree that it's tight is above the PCB. The board-mounted pots raise the board off the surface of the box quite a bit (can't remember exactly - 13mm or something) and that doesn't leave much room above. The inside height is only 29.75mm. This is particularly an issue for the DC socket, which needs to be carefully positioned, and I've found that I needed to bend the solder tabs out of the way to more easily get the PCB fitted. With the board-mounted pots, it needs to go in pretty vertically, and you don't get as much wiggle room as you would with pots on wires.

I hope these notes help save other builders some heartache.

Tom
Title: Re: 4 second digital delay project
Post by: ElectricDruid on February 23, 2017, 07:49:38 AM
Quote from: cloudscapes on February 22, 2017, 06:24:25 PM
Quote from: ElectricDruid on February 22, 2017, 04:11:23 PM
Yeah, I wanted it to be able to do runaway echoes if it could. As it stands, it will do runaway feedback, but only if you open the filters up a bit. I was pleased with the overall "sound" of it - it has some character without being "lo-fi" or "dirty", but it's not by any means "sterile" or "digital" either. It makes me want to do more digital delays.

If you do more (I hope you will!) try analog feedback path too! Even at low bitdepths and rates (12/22) I was surprised at the amount of "analog delay" character I could get.

I love runaway feedback that is on the brink of howling but not quite there yet.

Yes, I'd like to do more. I've been studying the Ibanez DM2000 which (if those that don't know it) is an 80's era 12-bit rack delay with modulation. It uses transistor filtering and a 571 compander to get the best noise level, and also uses a analog feedback path. Borrowing the analog design from this old unit and adding my digital delay part would give a pretty cool delay. This isn't immediately straightforward though, since it uses a variable sample rate (32KHz to 128KHz) and my current code is a fixed sample rate. The dsPIC could do a variable rate, but the DAC won't output samples faster than 100KHz, so the modulation depth might not be quite as extreme.

Another possibility would be to use this as an opportunity to move to an external DAC and design a little "Delay module" PCB which would include a dsPIC, a codec and a 4 seconds of RAM all surface-mount on a little daughter board. People would then have access to a general-purpose good-quality digital delay that they could design into whatever effects they wanted. That throws up all sorts of other issues though - I haven't had to deal with SMD design or manufacturing, so there's some learning to do to make that happen.

Trouble is, there's lots of ideas for 2017 and it's almost 1/6th gone already!

Tom



Title: Re: 4 second digital delay project
Post by: spgjmf on March 02, 2017, 01:07:33 PM
I like the idea of a SMD delay board. then one could build whatever feed back path they wanted. as far as enclosues, Im going to get a bigger box!
Im a table top guy, so size is not a real concern....

keep you the good work and thanks ED for all the hard work!

JEff
Title: Re: 4 second digital delay project
Post by: Jamforthelamb on April 15, 2017, 05:46:25 PM
I recently got my Digidelay all wired up, and it appears to have a problem. I get the dry signal but no delay, just an occasional click/pop/white noise. I checked my voltages before and after installing the chips and everything was in spec. The only thing I did different is not have the indicating LEDs wired in initially as I didn't think that would matter. I wired them in, no change in my issue, and they don't light up either. Did the usual checks for solder bridges etc. Thanks for any help you can provide!
-Kevin
Title: Re: 4 second digital delay project
Post by: ElectricDruid on April 16, 2017, 07:16:38 PM
Send me a message, either a PM from here, or from the Druid website, and we'll get you debugged.

If the LEDs aren't lighting up, that means the dsPIC isn't running correctly. Power would be the first place to look. Are both 3.3V power supplies ok?

HTH,
Tom
Title: Re: 4 second digital delay project
Post by: Transmogrifox on April 17, 2017, 12:32:06 PM
Quote from: ElectricDruid on February 23, 2017, 07:49:38 AM
This isn't immediately straightforward though, since it uses a variable sample rate (32KHz to 128KHz) and my current code is a fixed sample rate. The dsPIC could do a variable rate, but the DAC won't output samples faster than 100KHz, so the modulation depth might not be quite as extreme.

My delay line code (for bela (http://cackleberrypines.net/transmogrifox/src/bela/07_MultiDelay_14_April_2017.zip)) sounds pretty good as a variable samplerate emulator.  The thing to keep in mind is this is simply a resampling application that can be done with biquad filters emulating the typical BBD delay filters, and a linear interpolated delay line arguably as well as a real externally variable sample rate. 

The main observation that led me here is that the 3rd order butterworth filters before and after a BBD chip limit the bandwidth on the audio signal that the higher variable samplerate has very little effect on the end audio quality (maybe gets a little more lo-fi on the lower end).  The output filter is functionally a delay line interpolator.  At the frequencies of interest, if you put the fixed rate delay line through a 6th or 8th order biquad, then you will have very little error in linear interpolating the delay line.

The main things you get from a variable samplerate are this:
a) LFO shape distortion (delay time proportional to 1/Fsample)
b) In the case of a BBD, some subtle amplitude modulation

Tom, on your site you have already worked out the formula for delay change vs modulation input.  For lower CPU usage perhaps this could be reasonably approximated with a polynomial series.

Just food for thought -- I don't think the variable samplerate injects any real "magic"...but then maybe you don't have enough spare cycles to handle this in real-time.
Title: Re: 4 second digital delay project
Post by: Digital Larry on April 18, 2017, 10:00:32 AM
Quote from: Transmogrifox on April 17, 2017, 12:32:06 PM
Just food for thought -- I don't think the variable samplerate injects any real "magic"...but then maybe you don't have enough spare cycles to handle this in real-time.

Well, conceivably you could get LFO controlled aliasing into the mix for longer delay times... not that I personally think it's anything to aspire to.

Back in the old days we'd say "man I wish these BBDs didn't have all these crappy qualities" and now we think "if only we can figure out how to emulate those crappy qualities"...
Title: Re: 4 second digital delay project
Post by: ElectricDruid on April 19, 2017, 06:17:40 PM
Definitely food for thought. I'm not wedded to the idea of a variable sample rate.

That said, it has some benefits for simplicity. The uP can simply be clocked at a different speed and bingo - everything else falls into place. Although I'd have to kick out my shelving filters on the delayed signal; filters that move about with delay time would be a bit weird. Or would they? Is that just more character? Like Larry said, maybe in twenty years someone will be trying to emulate those weird filters that used to move about when you changed the delay time!

Doing it the "pretend you've got a variable rate" way does use up more cycles. Whether that makes it unrealistic or not is a question of technical detail that I can't answer for certain currently.

I'm sure this is problem I'm going to be returning to. Just can't say when exactly.

Tom