PT2399: Is It Possible To Have Infinite Repeats Without Sound Degradation?

Started by Paul Marossy, August 19, 2013, 02:36:22 PM

Previous topic - Next topic

Paul Marossy

I'm messing around with a delay circuit and noticed that, depending on how the controls are set, the sound quality of the repeats degrades a little with each successive repeat. From what I have read, this is because of the limitation of the 44K of internal memory. Is there a way to minimize it to something not so noticeable? It seems to be pretty OK on short delay times, but it really goes south on long delay times...  :icon_confused:

Philippe

curious as to whether repeated delay tones (analog or digital) are like 2nd/3rd generation recordings (or even photocopies)...something gets lost along the way in terms of resolution.

Paul Marossy

Quote from: Philippe on August 19, 2013, 02:48:59 PM
curious as to whether repeated delay tones (analog or digital) are like 2nd/3rd generation recordings (or even photocopies)...something gets lost along the way in terms of resolution.

Yeah, that's kind of what it sounds like. The first repeat is a lo-fi copy of the original signal, then the next one is like a lo-fi copy of the first repeat, and so on.

It seems to me that it's something that you can't really get around...

R.G.

It is *possible* to do this, but it's quite difficult in practice.

The fundamental thing you're fighting is the loss of information every time a signal is converted from analog to digital and vice versa. There are small, unavoidable errors in this process each way. A lot of modern sampled-data practice is spent on minimizing these errors. Things like quantization error, Nyquist filtering, integral and differential nonlinearity in A-D and D-A converters all add up to make the delayed signal not quite a perfect replica of the original sound.

Modern data digitization practices do minimize this, but if you incur the losses in converting from analog to digital, and back to analog, and then feed that back to be digitized again, the errors mount up, as do the losses due to filtering to keep digital grak out of the original process.

If you digitize only once, and then repeat by replaying the stored stuff from the digital form for each repeat instead of going out to analog, and back in to digital, you can get clean sounding repeats. But this is COMPLICATED to program well inside the DSP, and needs a lot of storage for all the repeats.

For small, simple echos - that is, the PT2399 that's now ubiquitous - there's no chance. So you minimize it and keep it to short delays, adaptive filtering, yada, yada.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

R.G.

I forgot to mention - the accumulation of processing errors happens in nearly all processes. The way you minimize this is to have one standard, and compare every result against the original standard, not against the result of the previous operation.

Errors build up in every situation where you use a previous result as the basis of a new operation. Unless there are NO errors in making a copy, then copies of a copy, and copies of copies of copies... always build up the errors, no matter what the process is.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Paul Marossy

Quote from: R.G. on August 19, 2013, 03:03:54 PM
It is *possible* to do this, but it's quite difficult in practice.

The fundamental thing you're fighting is the loss of information every time a signal is converted from analog to digital and vice versa. There are small, unavoidable errors in this process each way. A lot of modern sampled-data practice is spent on minimizing these errors. Things like quantization error, Nyquist filtering, integral and differential nonlinearity in A-D and D-A converters all add up to make the delayed signal not quite a perfect replica of the original sound.

Modern data digitization practices do minimize this, but if you incur the losses in converting from analog to digital, and back to analog, and then feed that back to be digitized again, the errors mount up, as do the losses due to filtering to keep digital grak out of the original process.

If you digitize only once, and then repeat by replaying the stored stuff from the digital form for each repeat instead of going out to analog, and back in to digital, you can get clean sounding repeats. But this is COMPLICATED to program well inside the DSP, and needs a lot of storage for all the repeats.

For small, simple echos - that is, the PT2399 that's now ubiquitous - there's no chance. So you minimize it and keep it to short delays, adaptive filtering, yada, yada.

Yeah, that's kind of what I thought. But at least now I know why. Thanks R.G.!  :icon_razz:

Paul Marossy

Quote from: R.G. on August 19, 2013, 03:06:18 PM
I forgot to mention - the accumulation of processing errors happens in nearly all processes. The way you minimize this is to have one standard, and compare every result against the original standard, not against the result of the previous operation.

Errors build up in every situation where you use a previous result as the basis of a new operation. Unless there are NO errors in making a copy, then copies of a copy, and copies of copies of copies... always build up the errors, no matter what the process is.

Yes, this makes sense. So I suppose even if the PT2399 had more onboard memory, it probably wouldn't help much?

If I could find a schematic of the Ibanez "DDL" digitial delay, that would be an interesting one to study. That one can do up to 1,600mS and it doesn't have the degrading repeats problem. But it also has an on-board microprocessor...

induction

Ray Ring at Circuit Salad has a PT2399 design that he says is a significant improvement. His original design uses a special, hard-to-find IC for the filter section, but he has an alternate design that uses a standard op-amp. I haven't built it (yet), but it sounds pretty nice in the demosHere's one with infinite repeats that definitely outperforms my Small Time (no offense, Merlin - I love my Small Time), degradation-wise. And here's a slap back demo, that also sounds nice.

The rest of the site is pretty cool, too. Worth exploring.

Digital Larry

Looks to me from the PT2399 block diagram that it has a built-in successive approximation comparator for doing the A-to-D conversion.  However the details of the conversion (such as # of bit of resolution and linear vs. log or mu-law or A-law any other non linear approach) is not particularly clear.   Or is it and I just couldn't figure it out?
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Paul Marossy

Quote from: induction on August 19, 2013, 04:01:01 PM
Ray Ring at Circuit Salad has a PT2399 design that he says is a significant improvement. His original design uses a special, hard-to-find IC for the filter section, but he has an alternate design that uses a standard op-amp. I haven't built it (yet), but it sounds pretty nice in the demosHere's one with infinite repeats that definitely outperforms my Small Time (no offense, Merlin - I love my Small Time), degradation-wise. And here's a slap back demo, that also sounds nice.

The rest of the site is pretty cool, too. Worth exploring.

I recently saw some of these pages.

R.G.

Quote from: Digital Larry on August 19, 2013, 04:08:02 PM
Looks to me from the PT2399 block diagram that it has a built-in successive approximation comparator for doing the A-to-D conversion.  However the details of the conversion (such as # of bit of resolution and linear vs. log or mu-law or A-law any other non linear approach) is not particularly clear.   Or is it and I just couldn't figure it out?
It's not you. I've never found it either. I don't think it's SA, I believe it's sigma-delta.

I think what winds up getting people at long delays is that the delay is fixed with the clock rate, and so is the A-D conversion. So at short delays, it samples really fast, and you get high fidelity through the audio band. Delay is lengthened by slowing down the clock, so the effective sampling rate goes down proportionately with the slower clock, and you run into needing to limit the high frequency content to avoid aliasing. Likewise, as the clock slows down, any quantizing errors are brought down in frequency. Even with the advantages of S-D for redistributing quantizing error, the slower the clock the more it's brought into the audio band. None of the simple filters I've seen even attempt to do the optimium filtering by lowering the filter cutoffs as the clock slows, but perhaps there is something there.

It doesn't hurt with the PT2399 to do a little extra treble loss on recirculates. This is delicate - too much makes recirculate very muddy.

It's a little funny - the PT2399 is AMAZING  for what it is - a single-chip audio delay that's usable by amateurs. But I suppose that it's always going to be that the simple, easy solutions are pushed to their edges and beyond instead of accepted for what they are.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

One needs to distinguish between digital delays where the recirculation of the signal is all done in the digital domain.  That is, the analog input signal is encoded, and the code passed along from memory location to memory location, and the contents of the last memory cell being logically combined with the encoded input sample of the moment.  As a simple digital logical combination of two signals (this microsecond's and that microsecond's), there is no information lost, because the signal has never detoured into the analog domain.

The PT2399  is a self-contained system, where the only access WE have to the signal is at those points where the signal pokes its head out from the digital to the analog domain.  At those points, we are doing something to it, generally filtering.  Whatever it is we are doing, we have modified the analog copy of the original digital code of the original analog input.  The net result is that when that modified analog output gets sent back for resampling, it is just the teensiest bit different such that the encoding is not identical.  So, code for signal at the last memory location is XYZ, and when encoded back at the input, it is re-encoded as WXY or WXZ, but not XYZ.  That tiny difference in signal may well be from the lowpass filtering to remove any possible sampling artifacts, but no matter: you've changed the signal so the encoding is different.  But since the signal one is re-encoding already has aliasing introduced by virtue of having passed through the chip and conversion process, every repeat results in the compounding of such aliasing. 

So the sound quality is just going to get crappier and crappier. 

mth5044


R.G.

Quote from: mth5044 on August 19, 2013, 10:29:55 PM
Perhaps check out the PT2395?
It's no longer made, and the quality of the ones that were available was declining.

The devil makes me want to start rumor of cosmically great sound made by NOS germanium-wafer PT2395s that were only made on one wafer run 18 years ago. The only way you could tell them apart visually was the germanium-wafer chips were packaged with gold-plated pins, and -

Nah, I couldn't do that.  :icon_lol:
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Digital Larry

Quote from: R.G. on August 19, 2013, 07:16:39 PM

It's not you. I've never found it either. I don't think it's SA, I believe it's sigma-delta.

Ah, that's because the memory is 1 bit wide?

See whether you believe this.

PT2399 data sheet says FCK = 2.0 MHz for 342 msec delay.   That's 44k samples.  44k/0.342 = 128655 audio samples per second.  2.0 MHz/128655 = 15.5 or close enough to 16 clocks per audio sample.  So I'd wager it's 16 bit encoding.  Make sense?
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Paul Marossy

Quote from: R.G. on August 19, 2013, 07:16:39 PM
It's a little funny - the PT2399 is AMAZING  for what it is - a single-chip audio delay that's usable by amateurs. But I suppose that it's always going to be that the simple, easy solutions are pushed to their edges and beyond instead of accepted for what they are.

They are pretty cool ICs. I guess it's not too hard to try and squeeze everything possible out of one and hit a wall when you reach its limits....  :icon_wink:

Quote from: Mark Hammer on August 19, 2013, 09:53:58 PM
One needs to distinguish between digital delays where the recirculation of the signal is all done in the digital domain.  That is, the analog input signal is encoded, and the code passed along from memory location to memory location, and the contents of the last memory cell being logically combined with the encoded input sample of the moment.  As a simple digital logical combination of two signals (this microsecond's and that microsecond's), there is no information lost, because the signal has never detoured into the analog domain.

So I assume some of these digital delays that use microprocessors (like the Ibanez "DDL" for example) do the repeats differently, so they can go on infinitely without degradation in sound quality (must stay in the digital domain?). Even BBD chips do pretty well, but you can also control how they are clocked, unlike the PT2399.  :icon_confused:

Mark Hammer

Pretty much, yeah.

Think of it like moving back and forth between tape and Pro Tools.  If one records to 2" tape, moves the tracks to Pro tool to do somethng with them, then rerecords the same tracks to tape, before moving them again to Pro Tools, you'd expect some sort of degradation when the signal has to be converted, reconverted, etc.  Keeping everything within the digital domain and the world of codes allows for preservation of quality.

That aside, I've been a staunch advocate of putting in just a little more lowpass filtering in the feedback path than the overall delay path.  Whether BBD or a digital chip like the PT2399, if there is any resampling involved (and both systems do it, just in different ways), a little bit more lowpass filtering on each subsequent repeat helps to smooth over some of the aliasing that happens during resampling.  I think it also helps to make the resulting sound a little more life-like by making the tone of earlier and later reflections different.  You can't get infinite repeats out of it, naturally, but even if you go to the Taj Mahal or world's largest parking-garage and use the long decays available in those places, the later reflections will be duller.

Paul Marossy

Quote from: Mark Hammer on August 20, 2013, 10:40:34 AM
You can't get infinite repeats out of it, naturally, but even if you go to the Taj Mahal or world's largest parking-garage and use the long decays available in those places, the later reflections will be duller.

Yeah, but it doesn't also get distorted into something else, it's still the original sound minus some of what has been "lost" while bouncing around off of the various surfaces. I'm perfectly fine with that. But the distortion of the original sound, not so much.  :icon_confused:

R.G.

Quote from: Digital Larry on August 20, 2013, 01:50:05 AM
Ah, that's because the memory is 1 bit wide?
See whether you believe this.
PT2399 data sheet says FCK = 2.0 MHz for 342 msec delay.   That's 44k samples.  44k/0.342 = 128655 audio samples per second.  2.0 MHz/128655 = 15.5 or close enough to 16 clocks per audio sample.  So I'd wager it's 16 bit encoding.  Make sense?
I believe it. I'm fairly sure that PT2395 was SD/1-bit wide because it used a 1-bit wide external memory chip; also, it used an external high-precision comparator and some precision caps that were about 99% of an SD converter. I think the 2399 is the successor with more stuff integrated into the chip as processing improved.

Quote from: Mark HammerSo I assume some of these digital delays that use microprocessors (like the Ibanez "DDL" for example) do the repeats differently, so they can go on infinitely without degradation in sound quality (must stay in the digital domain?).
The ability is certainly there as long as they have the memory available to do it. You take an error-hit when you do A-D or D-A conversion. If you keep stored data in digital, you only incur the penalties one time going in and one time coming out. If you can rig repeats inside the digital domain, you don't get creeping conversions errors.

But you do get "too-perfect" errors.  :icon_eek:  One of the criticisms of digital delays was that they sounded too clean compared to the tape echos they were used to replace. The repeats were crisp and clean, not like the tape echos which lost some treble and fidelity each pass in their own form of "conversion errors". Guitarists in general seem to like the fading of quality similar to tape echos. A really good digital delay would use both algorithms; no treble loss for repeats for people who want crispness (as in this thread) and loss-per-pass but with no fidelity loss for people who want tape echo emulations.

Even then, there are losses.

Digital conversion has an equivalent preserved marginal signal-to-noise ratio of about 6db per bit. 16 bit conversion is only 16 bit conversion for sounds that take all 16 bits. Softer sounds are converted into fewer bits, all the rest of the high-order bits being 0's, because they ARE softer. Sounds with only three-bit peaks are converted out into analog from digital with three-bit accuracy.

Infinite repeats at least doesn't have the slow loss of bits. But it does have arithmetic loss. Digital processes are arithmetic in nature, and can only have an accuracy of the number of bits preserved. Almost every time you do a multiply or divide, the result doesn't come out even. So multiplies and divides are done with 2X accuracy (i.e. 16 bit words are used for a 32 bit result) and the result either truncated or rounded to the actual machine resolution. On average, you can lose half a bit each time. This is the real idea behind using 24 and 32 bit coding for digital audio recording when 6 bits gives you 100+ db of signal to noise. Infinite repeats involves adding signals from the stored delay information to new information arriving from the A-D converter every pass, so you do some conversion and truncation/rounding each pass. It's a slower loss of information, but it is a loss. If you do internal filtering of the repeats, you get that loss due to fixed-precision math every time you do the MAC for the filtering.

It's almost like Mother Nature has a Meta-Rule: It's not going to be perfect.

Upon reflection, She does. That's what the three laws of thermodynamics amount to.
Quote
Even BBD chips do pretty well, but you can also control how they are clocked, unlike the PT2399.

You can get at the clock of the PT2399, but bass-ackwards. I've used the PT2399 as the VCO in a PLL and made it do things like accurate tap tempo and other tricks like slow-following a control signal and wobbling following that gives a ringing quality to the delay. It takes a bit of work to do this. The approximate nature of setting the clock open loop by controlling the current drawn from the timing pin is probably a lot more appropriate for this chip.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Paul Marossy

Quote from: R.G. on August 20, 2013, 10:47:24 AM
But you do get "too-perfect" errors.  :icon_eek:  One of the criticisms of digital delays was that they sounded too clean compared to the tape echos they were used to replace. The repeats were crisp and clean, not like the tape echos which lost some treble and fidelity each pass in their own form of "conversion errors". Guitarists in general seem to like the fading of quality similar to tape echos.

I like the PT2399 because in terms of the sound it's kinda like a tape echo, but just not as nice on the repeats.

Quote from: R.G. on August 20, 2013, 10:47:24 AM
You can get at the clock of the PT2399, but bass-ackwards. I've used the PT2399 as the VCO in a PLL and made it do things like accurate tap tempo and other tricks like slow-following a control signal and wobbling following that gives a ringing quality to the delay. It takes a bit of work to do this. The approximate nature of setting the clock open loop by controlling the current drawn from the timing pin is probably a lot more appropriate for this chip.

That was actually what I was thinking would be the next step, to try and somehow monkey with the clock of the PT2399. Not that I want to go that far, it's just a "theoritical thought".