TZF Flanger question

Started by anotherjim, March 24, 2015, 05:44:40 PM

Previous topic - Next topic

anotherjim

This one's bugging me...
And I'm having trouble describing... I'll try twice for luck ;)

Does a digital Flanger, that can sweep to and from exactly zero delay (but the dry signal is static), the same effect as a bbd based one (which cannot achieve zero delay) with a fixed delay in parallel so that it sounds like it's sweeping from zero?

...or another way...

If digital, is it necessary to sweep the wet signal from before to later than a fixed parallel dry delay? I'm thinking it should be no different from sweeping the wet from zero (given that it really is zero) to later than the dry and back to zero. I can't imagine how the notching could work differently between either one.

BTW, I'm assuming the digital effect does the wet/dry mix digitally, so there's no effect from any buffering or converter latency - it really can go to zero delay between wet & dry.

Thanks.



Mark Hammer

Keep in mind that there are two ways a "digital flanger" could work: one is to produce delay and vary the clocking so that the delay time gets longer and shorter, and the other is to model what a flanger sounds like, including what it sounds like when it goes "through zero".

Typically, any digital rack or floor unit that does, more or less, what an analog one does (only using digitally stored samples instead of analog-stored ones), will not deliver up through zero flanging.  It is a relatively trivial matter to provide a very short delay offset for the fixed signal, such that an analog-delayed signal can be coaxed into being "ahead" of the fixed-delay signal, and then pass through the zero point on the way back to longer delay times.  Traditionally, this would have been a very big deal for a digital unit, simply because the fixed delay would have required its own A/D and D/A conversion, and memory storage.  Which is why the digital units that provide TZF are applying algorithms that model TZF.

Somewhere in either the very late 70's or very early 80's, Craig Anderton had an article in one of the mags he frequented - Guitar Player, Keyboard, Modern Recording - and outlined how to produce TZF with a pair of digital rack units.  I seem to recall he used a pair of Deltalab Effectron digital units at the time, which could provide delays down to maybe 1-2ms.  One was set for a delay around 2ms or so, so that the other would sweep below that point ("through zero") and then return.  Even though neither unit could sweep more than maybe an 8:1 ratio or so, being able to sweep from 8msec "through" the zero point at 2ms down to 1ms and then back, yielded a dramatic effect.

DrAlx

It depends on how close to zero you can go with digital.  e.g. if smallest delay you can produce  is 1ms, you'd notice the big jump between 1ms and zero.
I consider "zero" to be any delay time under 0.05 ms since that puts the first notch at the top of the audible audio range 20 kHz.
The Tunnelworm TZF is a digital.  I can't remember if it mixes a clean signal and a delayed one, or two delayed ones..  

Digital Larry

I just implemented a TZF block in SpinCAD Designer.  I haven't goofed around with it much but it doesn't sound quite as dramatic as I was expecting.  I will have a closer look at it and do some experiments with the sweep width and speed.

The FV-1 has special instructions for chorus/flange that use built in Sin/Cos LFOs, although you can construct a different kind of thing that lets you create your own LFO waveform and use that.  It's trivial to set a fixed tap anywhere in the buffer and the fixed tap gets mixed with the moving tap digitally before going to the D/A.

At 32 kHz, the samples are about 1/32 of a millisecond apart.  The LFO design allows intersample interpolation for 8 more virtual bits of time resolution.  So it should be able to get real close to zero with a fair amount of accuracy.  This is different than having a fixed buffer length and modulating the clock signal.  Sample interpolation

My thought on the digital/analog debate as far as flangers, chorus, and phasers go is:

It's all about the LFO.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Mark Hammer

It's often about the signal.  One of the things I harp on regularly is that the benchmark flanging sounds we love are typically applied to a mixed-down signal during post-production.  The same processing applied to a single instrument is much less inspiring.

Not a reason to stop trying.  Just don't think you did something wrong, or picked a bad design if it doesn't sound as mind-blowing as you were expecting.

Digital Larry

Quote from: Mark Hammer on March 24, 2015, 10:49:00 PM
It's often about the signal.  One of the things I harp on regularly is that the benchmark flanging sounds we love are typically applied to a mixed-down signal during post-production.  The same processing applied to a single instrument is much less inspiring.

Not a reason to stop trying.  Just don't think you did something wrong, or picked a bad design if it doesn't sound as mind-blowing as you were expecting.

Would we agree that the section in the middle of "Life in the Fast Lane" is a good example of such?

I don't have that at the ready to listen to, but in a mix, often times that just happens once, going up for example, and doesn't just swoop back and forth.  That's probably not going to happen in a foot pedal.

I do appreciate your encouraging words.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

StephenGiles

At the end of the day, you can't beat 2 reel to reel tape recorders, one with varispeed I'm afraid.
"I want my meat burned, like St Joan. Bring me pickles and vicious mustards to pierce the tongue like Cardigan's Lancers.".

anotherjim

The digital system I'm thinking of is the cyclic write buffer with a "swinging" read pointer. As long as the read pointer can't read past the current write position, and it writes before it reads, the read sample can be the current write, so absolute zero delay between wet and dry at the top of the swing.
Yes, it's trivial to have another pointer, with a fixed offset behind the write pointer of half the buffer length so we can tap the centre of the swinging pointer for the "Dry" signal - the swinging read pointer will be moving back and forth through zero delay with respect to the centre pointer. You have a fixed delay in playback, but the short delay time involved don't make that an problem.

But the point of my question is that I find it hard to see how that would differ from only swinging from (true) zero behind the write to max delay and then back up the write and then simply mixing the write samples with the swinging read samples. You would still have the same relative changes in delay between wet and dry.


Mark Hammer

Quote from: Digital Larry on March 24, 2015, 11:23:46 PM
Would we agree that the section in the middle of "Life in the Fast Lane" is a good example of such?

We would agree completely.  You can add Itchy-Coo Park, Listen to the MUsic, Sky Pilot, The Big Hurt, Axis Bold as Love, and so many others to that list.

Quote from: anotherjim on March 25, 2015, 05:54:50 AM
The digital system I'm thinking of is the cyclic write buffer with a "swinging" read pointer. As long as the read pointer can't read past the current write position, and it writes before it reads, the read sample can be the current write, so absolute zero delay between wet and dry at the top of the swing.
Yes, it's trivial to have another pointer, with a fixed offset behind the write pointer of half the buffer length so we can tap the centre of the swinging pointer for the "Dry" signal - the swinging read pointer will be moving back and forth through zero delay with respect to the centre pointer. You have a fixed delay in playback, but the short delay time involved don't make that an problem.

But the point of my question is that I find it hard to see how that would differ from only swinging from (true) zero behind the write to max delay and then back up the write and then simply mixing the write samples with the swinging read samples. You would still have the same relative changes in delay between wet and dry.

TZF requires a T for the Z to be audible.  That is, the modulated signal has to not only catch up to the fixed one (i.e., achieve zero delay), but pass it, and be ahead in time, before falling back behind again.

Of course, I may have misunderstood you...it's 8:30AM and I'm afraid that first cuppa joe I made for myself wasn't particularly strong.  :icon_lol:

Digital Larry

#9
Quote from: anotherjim on March 25, 2015, 05:54:50 AM
But the point of my question is that I find it hard to see how that would differ from only swinging from (true) zero behind the write to max delay and then back up the write and then simply mixing the write samples with the swinging read samples. You would still have the same relative changes in delay between wet and dry.

I see what you're getting at and it makes sense to me.  It also bugs me for some reason so I'll try to think through it.

One thing that would be different, or you'd need to deal with somehow, is the LFO signal.   If you were going through zero at the center of LFO sweep, the LFO would have maximum slope at zero, assuming a sine wave.  If it were at the end of the sweep it would slow down and then start over.  You could do an absolute value of the sine, folding it in half I suppose, and then make sure that the pointy part matched up with the minimum delay.

Whether one tap is 10 msec "ahead" of the other or "behind" shouldn't make any difference in the notch spacing.

There is one difference I can think of.  When your readback point is getting closer to the place where the original signal goes in (because of moving the pointer, or increasing the clock LFO) there is a slight pitch shift up.  And when it goes away from that place, there is a slight pitch shift down.  In a real TZF, that shift would continue until the LFO turned around.  In this example that shift would happen in the middle of the LFO sweep.

It's fairly fascinating and I may before too long be able to try this in DSP.  
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

DrAlx

#10
Quote from: Mark Hammer on March 25, 2015, 08:27:33 AM
TZF requires a T for the Z to be audible.  That is, the modulated signal has to not only catch up to the fixed one (i.e., achieve zero delay), but pass it, and be ahead in time, before falling back behind again.

Depends on what you mean here.  

There is no difference between a sweep that bounces between +1ms relative delay and zero, and one that bounces between 1ms and -1ms relative delay.  The zero crossing will sound exactly the same.  In terms of flanger notches, all that happens is the top notch (that is way past audible frequencies) changes direction and starts to move back down to lower frequencies.

If on the other hand you are talking about a sweep that goes from +1ms to just past zero (say -0.1 ms relative delay) then that will sound different but only because you have two zero crossings closely spaced together in time.
You could get the same effect if you had a weird sweep that went 1ms to 0, then 0 to +0.1ms, then back to zero, then back to 1ms.


DrAlx

Quote from: Digital Larry on March 25, 2015, 09:33:24 AM
There is one difference I can think of.  When your readback point is getting closer to the place where the original signal goes in (because of moving the pointer, or increasing the clock LFO) there is a slight pitch shift up.  And when it goes away from that place, there is a slight pitch shift down.  In a real TZF, that shift would continue until the LFO turned around.  In this example that shift would happen in the middle of the LFO sweep.

OK. I take back what I said, or rather clarify it  The Doppler shift through the zero point will be different as you say.  I don't think its a big effect though because for slow sweeps the Doppler shift is small.

Digital Larry

#12
Quote from: Mark Hammer on March 24, 2015, 10:49:00 PM
Not a reason to stop trying.  Just don't think you did something wrong, or picked a bad design if it doesn't sound as mind-blowing as you were expecting.

I've just done a few simulations in my DSP system.  I can only use sine LFO sweeps, but I can tell you that the following things make big difference in the sound.
1) Feedback around the flanger - both level and phase.
2) Big one - do you invert the fixed tap signal?  Because if you do, when they line up, the signals cancel, which is more dramatic.  I'm also starting to think that compression after the fact would counteract the level drop as they head towards cancellation.
3) Tuning the nominal delay length.

I still don't quite feel like I'm in Hotel California, but getting closer.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Mark Hammer

I'll briefly pull it out of the realm of electronics and into the realm of "phenomenological psychoacoustics", since that little lateral bump might point to some things to tinker with (or maybe not...I'll let you decide).

What is it that we attend to when hearing TZF?  The most dramatic effects are those where we are attending to what seems to be a dramatic transformation of the tone, and then we reach a point where the sound is ...."confusing" is the best way I can describe it.    It seems to evaporate before out ears, and then return from a gaseous state back to a liquid and, eventually, solid state.

As you note in point #2, that momentary disappearance/disassembly is critical to the drama of the effect.  The extent and type of feedback is part of what shifts our perceptual focus to resonant peaks, and that may be part of what fosters the now-its-here-and-now-it-isn't experience.

I have a pair of Boss BF-1 units that I've lifted the dry mixing resistor in, so that each is essentially short time-delay unit that can be set to a fixed delay or modulated.  If I mix them together, I can get varying forms of TZF, where (with one of them fixed) I can vary how much time the modulated one spends on one side or the other of "zero".  If I allow them both to be modulated (and remember they each have their own LFO; I'm not syncing/linking them to a common one), the appearance of the zero point moves around in semi-aperiodic fashion (i.e., a more complex algorithm could probably describe when it appears, but the listener is too busy to note that complex periodicity).  One of these days, I need to clear off my bench, set them up and record some samples to demo the effect.

anotherjim

Full cancellation with regen about zero delay is interesting - I can hear that if the regen is inverted into the record mix AND the play is also inverted into the output mix. Sounds twangy, somewhat like a Jaw Harp. Not surprisingly, the bass is also severely cut.






DougH

Here's a good article that explains how TZF flanging (among other fx) works. I implemented these ideas in a couple delay lines using plugins in my DAW and it worked pretty well. I delayed the "dry" side 5ms (not noticeable) and varied the "wet" side from 0-10ms and back. With animation I was able to control exactly where the thru-zero point occurred, which was pretty handy for recording. That may not be that important in a guitar pedal but for recording, I like precise control over the sweep. As the article mentions, the dynamic feedback for this can get real tricky. I used a little signal phase shift in one of the lines to try to emulate that somewhat. It's not a super-pronounced over the top jet-plane sound, but it is a very nice flange effect, esp for a mix with a lot of harmonic content. And, the more harmonic content you have, the more pronounced it will be anyway. But you knew that.

http://www.soundonsound.com/sos/jan01/articles/vintage.asp
"I can explain it to you, but I can't understand it for you."

DrAlx

#16
Quote from: anotherjim on March 25, 2015, 10:58:10 AM
Full cancellation with regen about zero delay is interesting - I can hear that if the regen is inverted into the record mix AND the play is also inverted into the output mix. Sounds twangy, somewhat like a Jaw Harp. Not surprisingly, the bass is also severely cut.

I am not sure how your regen scheme is configured.

I know that if you just put regen in one arm (i.e. the swept delay but not the fixed delay) then you wont get full cancellation at the zero point.  That's because the arm with regen is giving you a delay plus its echos and the other arm can only cancel one of them.

I know of 2 ways of getting full cancellation with regen.

First way is to give the fixed delay and swept delay their own regen loops with matched feedback factors.  Easy to do for a digital pedal but not for analog.  I've never tried digitally so can't say what it sounds like.

The other way (which I used in my NZF flanger) is to to subtract the outputs of the two delay arms and then feed that back to the input of the flanger before the signal chain splits into the two delay lines.


anotherjim

For what I term Negative Regen, I have, and take this as what happens in one full pass of a cyclic buffer...

Record mix sample = Latest ADC sample minus the playback mix sample from the previous cycle. Actually, I "invert then add" for code convenience, but it's the same as subtract of course.
Playback mix sample = Same  new ADC sample as above minus delay sample from the swinging read pointer.

Usually (as I understand it), Negative Regen only subtracts in the record mix, but subtracting in the Play mix too sounds more interesting to me. Note - the "Dry" sample remains non-inverted throughout.

Normal Positive Regen is the same except the samples are added instead of subtracted at both mix times.

slacker

#18
I've done a flanger using the FV-1 that can go to zero delay and to me it sounds like a through zero flanger. with negative feedback it does the weirdness Mark referred to where the signal disappears or nearly disappears which is what I most associate with TZF. What it lacks is the effect DrAlx mentioned in post10 where it goes through zero then quickly turns round and goes back through it the other way before spending more time the other side. I think that's the missing ingredient.

Digital Larry

At the top of the list (at this particular moment) are mono and stereo TZF samples with some rather boring clean guitar input.  This is just one sound, you can get quite a range by adjusting the delay length and feedback.

http://www.soundclick.com/bands/default.cfm?bandID=1373300

Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer