long digital delay build log

Started by cloudscapes, November 27, 2014, 10:40:47 PM

Previous topic - Next topic

SISKO

More thoughts on this:

Create a window the same length as the memory buffer being looped, and multiply it with the buffer itself.
Do the math in the first loop and the you are off.

You may have to create a custom window vector from experience.
Like windowing the buffer and let it loop
--Is there any body out there??--

cloudscapes

I should have posted an update. The fade-out/fade-in at loop point kind of fixed it to my satisfaction. Thanks for the suggestion though, unfortunately I don't have enough memory to double the memory buffer. And I'm afraid I'm not math-fluent enough to know anything about vectors.  :icon_neutral:

I've moved on to other tasks since. Apart from minor debug and convenience features (such as clearing the memory whenever I change delay ranges, and remembering whether it was in hold mode on power-up) the only big thing left is tap-tempo, which won't be a problem.

That and a rare crackle that sometimes happens when I have modulation cranked.
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

cloudscapes

~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

anotherjim

Simply beautiful, and weird. I could get lost in that pedal for days.
Top Job.

cloudscapes

Quote from: anotherjim on March 01, 2015, 02:02:45 PM
Simply beautiful, and weird. I could get lost in that pedal for days.
Top Job.


thanks :)

weird, my kind of thing as well
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

wilrecar77

Amazing! This is the most interesting build thread that I've seen in a long time. So interesting, in fact, that you have inspired me to build my own digital delay. Mine will be less ambitious, but it's exciting nonetheless. I've decided to go the AVR route with an atmega1284 and a similar adc-memory-dac setup. Thank you for documenting this project and inspiring me to make my own.

Marcvv

Wow, Etienne, that is a piece of art! Let me know when you are ready to sell them, please!

cloudscapes

Quote from: wilrecar77 on March 01, 2015, 10:10:22 PM
Amazing! This is the most interesting build thread that I've seen in a long time. So interesting, in fact, that you have inspired me to build my own digital delay. Mine will be less ambitious, but it's exciting nonetheless. I've decided to go the AVR route with an atmega1284 and a similar adc-memory-dac setup. Thank you for documenting this project and inspiring me to make my own.

do it! you'll have to dial the samplerate/fidelity back a lot for the atmega, but it's otherwise still perfectly doable.

for pot sampling (delay time, other stuff) use an interrupt to only do it every 10-100 milliseconds or so. only the sampling/memory/playback stuff needs to work at high speed. the rest can be slow and it'll free up resources.
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

~arph

This thing sounds fantastic! I love the sample rate reduce and ringmod on the repeats. Possibilities are endless, which you nicely display in the last part of the video.  8)
I think I need this pedal  ;D

Zero

Stellar work, Etienne!!

Amazing what you were able to squeeze out that uC. :icon_cool:

You should send one of these to Radiohead so it can be featured on their new album  :)

~arph

Yes, but isn't johnny using MAX/MSP or PD?  So he can easily recreate all this in his laptop. (and control it live)

gattart

Hi, fantastic echo, a resonant filter is nice. I fake that on my DL4 using one of the swishy progs, and I control it (well, 'control' is a big word for what I can actually achieve) with an EV5 pedal. So, that blue-green, multi-beknobbed box is the result? Beauty.
Anyways, I was hoping you might be able to answer a reasonably simple question regarding one of the PDS8000 chips. My PDS8000 has had an extremely intense lifetime, but keeps on 'breaking'. My tech, a friend of mine, who is really an excellent electronics tech, after telling me off usually manages to fix it. However, this time apparently it is much more difficult. He says that the culprit is the chip M411024HP-15C* (top left corner when you have the REV C in the middle on the bottom). Mine is painted gold for some reason, all the other chips are black. He says he can't get ahold of one to replace. OK, I'm stuck here in Italy again (family issues), and I really need my PDS8000 to enjoy my life. OK, so I have a PDS1002 too, and a DL4 (that also keeps 'breaking' but nothing that a bit of CRC can't handle), but the 8000 was my first and remains my favourite looper. Do you know where I can get one of those chips? If there are issues with sending over-seas I've got a sister in Toronto (Canada, not really over-seas, just across-the-lakes so-to-say), so if you know of a company that has shops in Canada, all the better. I'll take some pix in case you want to see what's up inside, in case mine is 'different'.
Just thinking, any idea of putting in a jack for a control pedal, like on the DL4, to control the filter and/or the feedback, erode or delay time? Just rewatched that vid. I gotta clean my soldering iron... Do you think there's an 'easy' way of doing one in stereo, or would you always have to double up on the knobs? I love how the thing kinda talks to itself at times. I try to get the same effects using my VG99 a monophonic analogue synth going into a few loopers, oh yeah, there's the 16 Second reissue too...
Thanks for now, Rick Gatta

LightSoundGeometry

Quote from: cloudscapes on November 28, 2014, 12:20:07 PM
I look forward to the interesting stuff I can put in the feedback path!

Ringmod, maybe? Refold audio over and over again will lead to some really interesting overtones!

Bitcrusher? Good for emulating really lofi 80s delays!

Pitch shifter? Tack on an FV-1!

Diodes? I'm already thinking of using diodes to clamp audio for the ADC input, so that when it clips, it clips in an interesting manner, rather than digitally.

Definitely a filter, probably resonant.

make a popping old phonograph lofi noise like vinyl 

cloudscapes

#133
Recently decided to redo the hardware of this effect. Couple of reasons:

1. I've had issues with the adc input biasing that I still haven't quite figured out. I set up the adc to accept voltages between 0.1v and 4.5v, then biased the input to be something around 2.25v when completely silent, using a precision trimmer. But for some reason, every couple of months, I've needed to rebias it drastically (down to 1v or something) or else I'd get nasty clipping/distortion. It didn't make sense to do it, since the design didn't support it, but it was the only way to make it sound good. For a while, then a month later it would "realize" that was all wrong, and sounded bad again. Then I'd have to reset the bias up to the "correct" 2.25v. Repeat 2 or 3 times over the year.

This is probably a symptom of my bad analog mixing, it's ab it hackish, with some opamp stages blocking dc and others not. It's all over the place. I need to streamline it.

2. I have a quad opamp acting as glue logic, a triangle generator into a comparator, outputing a variable PWM that's fed into the uC. The time-stretch/reverse feature needs a smooth PWM to work how I like. I remember trying this in code back when I was designing the thing, and had issues with interrupts. I'm going to try the code route again so that I don't need as much circuitry.

3. The 8 diode soft clipping is probably overkill. Might reduce it to 4 diode.

4. The 4-th order active filter post-dac is probably unneeded. If anything, I should be putting it pre-adc.

5. Currently it has 3 external controls for audio mixing. Wet/dry blend, dry input (into adc) and wet output. I can't remember why I thought this was a good idea. It's great for fine tweaking, but it makes it hard to un-tweak it quickly in the middle of a song back to a default setting. I'm just going to simplify that to wet & dry control.

6. The uC it uses is a PIC32 MX. Since then, a number of new uCs got supported by the IDE I use, including the newer MZ series. I had a look, and because I don't use too many advanced peripherals, porting the code will almost do itself! I want to look into this because the new MZ chips actually come with 512 KB internal ram, which is exactly how much I need for the delay. Previously I'd been using external expensive MRAM for this, so if I can save $25 plus the board space it uses, it's worth it. The uC pins are almost exactly the same, too. And it can be clocked much higher (200MHz vs 80MHz). That gives extra range on the delay time. I can speed up a loop much faster.

7. Try and figure out better power filtering/isolation. It doesn't seem to play nice when daisy-chained with other digital/hybrid effects.

I'm not too intimidated by this undertaking. I've learned a bit during and since building this when it comes to audio mixing, which is where its main flaws are. And the vast vast majority of the hardest work, the code, can remain nearly untouched!
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

anotherjim

For a soft-clip adc input, have you considered the CMOS inverter? Since you aren't afraid of SMD, there are single device types available such as...
https://www.fairchildsemi.com/products/logic/flip-flops-latches-registers/inverters/NC7SZU04.html
Powered from ADC Vref, it would automatically bias to half, swing from rail to rail and soft clip at top and bottom and guarantee no overs.
I don't know how well these parts match the original 74c04 inverters featured in...
https://www.fairchildsemi.com/application-notes/AN/AN-88.pdf
...but they ought to work.
Anyway, you can prove the principle to yourself using CD4069UB if you have some. ? I've used CD4007UB inverters before and it do work.


cloudscapes

Quote from: anotherjim on February 20, 2016, 09:06:40 AM
For a soft-clip adc input, have you considered the CMOS inverter? Since you aren't afraid of SMD, there are single device types available such as...
https://www.fairchildsemi.com/products/logic/flip-flops-latches-registers/inverters/NC7SZU04.html
Powered from ADC Vref, it would automatically bias to half, swing from rail to rail and soft clip at top and bottom and guarantee no overs.
I don't know how well these parts match the original 74c04 inverters featured in...
https://www.fairchildsemi.com/application-notes/AN/AN-88.pdf
...but they ought to work.
Anyway, you can prove the principle to yourself using CD4069UB if you have some. ? I've used CD4007UB inverters before and it do work.

I've seen CMOS inverters! I have yet to try them.

Giving this thread a little nudge. I've put my vibrato aside for the moment and started re-breadboarding this delay. At least the essentials (microcontrollers, memory, adc, dac, some inputs) so that I can start redoing the analog bits. As mentioned elsewhere in the thread, I was never happy of my analog routing/mixing/feedback implementation. It was so many parts that I'nm sure I can simplify a bit.

I got a NE570 compander that I might try using to get the noise floor even lower. Optional though, since it was already pretty good.
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

anotherjim

Currently I have a single PT2399 delay on breadboard with the following front end entirely formed from a CD4007 array...
Input amp - N-channel common source. pins 9,10,12.
Tails switch - P channel. pins 1,2,3. Channel DC coupled between input amp drain and mixer input R. Gate control same as for J-FET switches, but no gate diode needed.
Input/Regen mixer - P-N channel inverter. Pins 6,8,13. This is an inverter similar to the 4069UB but I don't need its 6 inverters. So using the 4007 instead is a no-brainer.

All of the 4007 operates from 5volt. The input amp gate is biased to 2.5v From the PT2399 pin2.
Input gain of the PT2399 (pins15,16) is less than unity so that only the preceding 4007 inverter can clip & the 2399 input cannot.
It sounds very promising.

I've used 4000 CMOS down at 3volt, but not inverters for linear use. It probably should work, but needs testing. If it don't like 3v3, you only need to attenuate it's output before the ADC.
For feeding an ADC and you want something in front that clips nicely & adds some tape style saturation/compression. An inverter will do that. I know other non-linear amps exist, but I don't know anything else as simple as the CMOS inverter for the job.


Personally, I don't think companders are worth the extra outlay. Pre-emphasis - 1 pole of treble boost starting about 300Hz, then an extra pole on the anti-alias filter before the ADC to compensate for the boost is easier & probably can use circuit elements you already have. De-emphasis is done by making the DAC reconstruction filter a little deeper.



cloudscapes

#137
I first started on this delay almost exactly 2 years ago! I had a bit of time/inspiration last week so I went and almost completely redid the hardware. At least the analog portion of it.

Old schematic:
https://c2.staticflickr.com/8/7483/16067852532_fbe6ab8fa3_h.jpg

New schematic:
http://www.soniccrayonfx.com/private/mechanical_sun_schematic_v2.jpg

I was never happy with the analog portion of the project. It felt needlessly complicated. What I changed:

1. Removed weird glue logic, the PWM generator in the top-right of the old one. Used for "analog math", a quad opamp turned triangle generator and a comparator, used by the micro as part of the same-pitch time stretching. Did it entirely in code this time, so that's a lot of PCB space saved.

2. Smarter ADC/DAC filtering. Old one had a 4th order active filter post-DAC, and some RC filters pre ADC. Put the 4th order filter pre-ADC instead, and a 2nd order filter post-DAC. It's a smarter way of doing it, and should provide cleaner sound. It's a few more parts at least for this stage of the audio signal, but I saved a huge amount in other areas.

3. Added a proper voltage reference for the ADC, a part designed for the task.

4. Smarter buffering/mixing/gain/feedback/tone control stages. Previously used 9 opamp stages to do all this (not counting the ADC/DAC filters), bit of overkill. Brought it down to 5. That's a whole quad opamp (and lots of passives) less to worry about! The tone control is more or less the same, with a couple tweaks. I haven't yet decided if I want an extra opamp buffer stage on the input, right before the wet/dry mixing. Sounds good as is, but it'll make the impedance weird.

5. Simpler diode limiter pre-ADC. 4 diodes instead of 8.

6. Other misc tweaks. Like the 4-position delay range switch should only need 3 connections to the microcontroller instead of 4 if I code smarter.

Overall a much more straightforward circuit. And it will be easier to lay out the PCB (after new years), and hopefully finally populate a few of these. Code changes were extremely minimal, I did them as I went along.
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}

Kevin Mitchell

This thread is awesome! I'm inspired to breadboard this project and tinker. I'm totally up to learning how to put together my first digital effect and this one fits the bill. Just need to get my hands on that development board...  ;D
  • SUPPORTER

cloudscapes

The new layout I've done. I'll spend a day or so staring at this for mistakes then submit it to oshpark!



parts: ~110
pins/pads: 378
vias: 114
total trace length: 158"

The previous one from two years ago was much more complicated:



parts: ~140
pins/pads: 483
vias: 116
total trace length: 185"

The source code I've been working with, for those curious:
http://dronecloud.org/stuff/delay_v2.html
~~~~~~~~~~~~~~~~~~~~~~
{DIY blog}
{www.dronecloud.org}