Author |
Message |
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Sat Mar 11, 2006 4:23 pm Post subject:
Longer delays by using multiplexing |
|
|
The standard maximum delay of 2.7 s is normally the longest one can have in a patch area. In another thread the subject of sacrificing bandwidth for delay time came up, and indeed it is possible to do so.
This patch works by using multiplexing. Multiplexing is a way to combine more than one signal on a single line. In this particular case time division multiplexing is used, in one time slot the single line transports a bit of one signal and in another time frame the line transports a bit for another signal.
The delay line is here made to be part of this single line, and one time slot carries an original signal while the other time slot carries the already delayed signal (again). The time slots are just one sample time long, so the odd samples carry one signal and the even samples carry another.
Look at sw 2, when its clock input is high it sends it input to the out module, when the clock is low it sends its input back to sw 1. At that time sw 1 will e in the right position to send that signal into the delay line. One sample time later both switches will flip again, so we hear output from sw 2 and sw one will send one sample of the oscillator into the delay line. So the delay line gets the odd samples from the oscillator and the even samples from it's own output.
Anyway, this way you can go to 4.4 seconds of delay in one patch area, but the sample rate has been reduced to 48 kHz.
Now for this to really work the delay line must always hold an even number of samples. For a single delay this will not be the case, it depends upon the delay time, and it can be odd. By using two delays with exactly the same settings it is certain that the number of samples in the delay will be even always, even when the single delay would hold an odd number of samples.
The blue modules make up the building block, the other modules illustrate the idea. It is possible to use variable delays, provided they are both controlled in exactly the same way.
Credits are due to Rob Hordijk who brought this subject up (not on this forum) originally. the idea to use two delays to make it work was mine.
Also see http://electro-music.com/forum/topic-7979.html - that's where the idea came up for a 2nd time.
Description: |
Using multiplexing to get longer delay lines. |
|
Download |
Filename: |
long_delay.pch2 |
Filesize: |
1.03 KB |
Downloaded: |
2640 Time(s) |
_________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Sun Mar 12, 2006 4:26 am Post subject:
|
|
|
Ha! What a brilliant and elegant solution! And 48kHz is still plenty enough for many purposes. |
|
Back to top
|
|
|
ian-s
Joined: Apr 01, 2004 Posts: 2669 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Sun Mar 12, 2006 4:56 am Post subject:
|
|
|
Amazing. Trying to understand how it works makes my brain hurt. Enough to know it does I guess.
I noticed that you can use more pairs of delay modules and they don't all need to be the same length so adding six 100ms or one 500 + one 100ms gets more than 5 and a half seconds. I love long delays so I set up the same in the FX area, need to swap switch connections for some reason but gives >11 second delay in one slot
Thanks Jan and Rob |
|
Back to top
|
|
|
deknow
Joined: Sep 15, 2004 Posts: 1307 Location: Leominster, MA (USA)
G2 patch files: 15
|
Posted: Sun Mar 12, 2006 7:55 am Post subject:
|
|
|
this is fantastic. is there a reason not to double up again and go down to 24khz and 4xdelay time?
deknow |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Sun Mar 12, 2006 10:05 am Post subject:
|
|
|
deknow wrote: | this is fantastic. is there a reason not to double up again and go down to 24khz and 4xdelay time?
|
When you take a look at the thread I referenced above you'll see some multiplexing involving more than two chanels. I think that could be used to make the delays even longer, but I didn't try it.
Another matter is that at 24 kHz it probably would be necessary to give attention to anti-aliasing (i.e. you might need some pre/post filtering). _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Sun Mar 12, 2006 11:14 am Post subject:
|
|
|
Am I right in thinking that on the long delay output, the actual output format is the 48kHz delayed signal, interleaved by zero's every other sample?
If so, wouldn't it be better to use some sample&hold strategy, especially when going for 24kHz delays?
Edit: this started me to wonder about how a signal with a lower sampling frequency can and should be represented in a higher sampling frequency. Is there a difference between inserting zero's in all the 'empty places' of the higher sampling frequency in stead of keeping the higher sampling frequency on a fixed level untill a new lower sampling frequency signal arrives (a la sample&hold)? Intuitively, I would opt for the second option, but is this right? |
|
Back to top
|
|
|
Afro88
Joined: Jun 20, 2004 Posts: 701 Location: Brisbane, Australia
Audio files: 12
G2 patch files: 79
|
Posted: Sun Mar 12, 2006 1:55 pm Post subject:
|
|
|
Fozzie wrote: | Am I right in thinking that on the long delay output, the actual output format is the 48kHz delayed signal, interleaved by zero's every other sample? |
If this were the case, you'd get a hell of alot of noise in the output signal. Think about what the waveform would look like if there were 0's ever other sample: a series of 2 sample long square waves of different volumes. It seems the patch doesn't work this way - I had a look on the old oscilloscope just to be sure too...
I'm not sure why this works the way it does - it makes logical sense for the last switch's output to switch between 0 and the delay output. Maybe it has something to do with each switch being on alternate channels each clock tick. But then how does signal even get through?? Is it something to do with the feedback path? This patch makes my head hurt |
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Sun Mar 12, 2006 2:01 pm Post subject:
|
|
|
Yes, I'd think too that inserting lots of zero's would give trouble (I'd think of it as inserting lots of high frequencies in there that don't belong; is this 'your noise'?)
When testing these muxes manually (not on 48 kHz unfortunately; I'm not that fast ), the value does revert to 0 when the input is routed to the other channel than the one is being measured..... |
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
|
Back to top
|
|
|
ian-s
Joined: Apr 01, 2004 Posts: 2669 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Mon Mar 13, 2006 11:58 am Post subject:
|
|
|
Hey Fozzie
Cant download the last patch. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Mon Mar 13, 2006 12:51 pm Post subject:
|
|
|
Probably due to the double posting followed by deletion of the attachment in the 2nd one, anyway there is no patch now for as far I can see.
Could you try to re-upload the patch on the same post Fozzie ? _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
cebec
Joined: Apr 19, 2004 Posts: 1098 Location: Virginia
Audio files: 3
G2 patch files: 31
|
Posted: Mon Mar 13, 2006 1:11 pm Post subject:
|
|
|
wow, take a look at these with a scope/spectrum analyzer. whatever's happening in these patches is causing enormous, 'louder-than-fundamental', spikes at 48 kHz and 24 kHz, respectively (jan's patch, and then fozzie's patch) if i could hear them (or my output transducers could reproduce them), it'd hurt, i think. Last edited by cebec on Mon Mar 13, 2006 1:46 pm; edited 1 time in total |
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Mon Mar 13, 2006 1:15 pm Post subject:
|
|
|
Bump for new version recognition.
In addition: anyone any ideas on the valueswitch issues? If I add a s/h module, it is perfectly silent . And the signal has dropped considerably in volume.
|
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Mon Mar 13, 2006 1:29 pm Post subject:
|
|
|
Played around with the S/H timing, and this one seems to work, although I don't know why...
Noticed btw that it doesn't work with 2.7s delay, possibly because the delay lenth cannot be divided by four.
Cebec, would you also have a look at this one?
Edit: please refer to updated version a few posts below this one; removed unnecessary patch Last edited by Fozzie on Mon Mar 13, 2006 3:07 pm; edited 1 time in total |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Mon Mar 13, 2006 1:36 pm Post subject:
|
|
|
Fozzie wrote: |
In addition: anyone any ideas on the valueswitch issues? |
I'm not sure I understand what you mean ... your conclusion that the signal must come out in pulses seems correct to me, but as it's an 48 kHz signal I'd expect the DA filtering to smooth it out. Apparently though, after reading cebec's post, that sems to be a mistake. Apart from that the 48 kHz signal could give aliasing problems in modules following the long delay.
I did tgry to use a S&H on the output but nothing did get through it, no matter if I clocked it in phase or in anti-phase, whicj makes me believe it does not run an the full audio rate ??
Of course you can always apply a low pass filter after the delay, whci probably can be as simple as a mixer with feedback to itself. I don't have a scope reasdy though to check things out.
Oh, and the patch loads ok now, but didn't check it out yet - listening to this strill :-) _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
cebec
Joined: Apr 19, 2004 Posts: 1098 Location: Virginia
Audio files: 3
G2 patch files: 31
|
Posted: Mon Mar 13, 2006 1:40 pm Post subject:
|
|
|
Fozzie wrote: | Cebec, would you also have a look at this one? |
it looks good when you're viewing the signal from 'direct' and any ONE of the taps... as soon as you start mixing the taps, the spike/and aliasing get worse. |
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Mon Mar 13, 2006 1:45 pm Post subject:
|
|
|
[quote="Blue Hell"] Fozzie wrote: |
I did tgry to use a S&H on the output but nothing did get through it, no matter if I clocked it in phase or in anti-phase, whicj makes me believe it does not run an the full audio rate ??
|
Please check the latest version, it has a sample & hold, gives back the same volume as the input, and hope it doesn't have spikes (but can't check). It appears there are some weird sample delays in those s/h modules. My solution is strictly trial & error. I had a hunch the timing signal for the s/h would be the issue of the silence, but do not have a complete theory on what happens.
edit in response to cebec: only tap3x is the s/h 'smoothed' output of course, but your observations are interesting (but not adding up in my brain to anything sensible ) |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Mon Mar 13, 2006 2:40 pm Post subject:
|
|
|
There are some funy things happening in your patches Fozzie.
On the 1st one the time between the 3rd and 4th echoes is longer than the other intervals are. The 2nd and 3rd blips are softer than the other two.
On the 2nd patch I don't hear the 3rd blip, and the 4th seems to come late as well.
I'll try to experiment a bit. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Mon Mar 13, 2006 2:53 pm Post subject:
|
|
|
Ok the 48 kHz signals are softer than the original, there is some logic in that as they have one sample of signal and then one sample of silence.
Ok and the irregualr delays are logic as well, the direct signal is not the firs step of course so the last signal must be the fourthy tap really. When I connect it a bit differently that is all solved. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Mon Mar 13, 2006 3:20 pm Post subject:
|
|
|
Fozzie wrote: | Sorry for posting so much in this thread. My naming of the outputs could have been better. The last output (most delayed) is actually 4x delayed, and named so in this last patch.
|
That's all clear now to me :-)
Quote: |
In my demo-experiments, it works correctly with beat-synced delays, but the time factor of delay multiplication is dependent on the masterclock. 93 and 95 bpm work, but 92 and 96 don't. All related to the delay length imho.
|
That's why you need two identical delays in series, when using one sometimes the delay length will be an odd number off samples and sometimes it will be an even number. For odd lengths it won't work correctly. HAving two identicvally set delays in series assuers you'll always have an even number of samples.
Quote: |
I'll delete the earlier version of the file, to not clutter up this topic too much.. |
Ah well it's an interesting thread I think, good to see the pitfalls and the confusion :-) _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Fozzie
Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Mon Mar 13, 2006 3:27 pm Post subject:
|
|
|
Blue Hell wrote: | That's why you need two identical delays in series, when using one sometimes the delay length will be an odd number off samples and sometimes it will be an even number. For odd lengths it won't work correctly. HAving two identicvally set delays in series assuers you'll always have an even number of samples.
....
Ah well it's an interesting thread I think, good to see the pitfalls and the confusion |
Good point on the identical delays. However, I'm interested in using in live-played 4 measure-long delays (beatsynced), therefore, the use of the 2.7 mode of the quad module is best suited for tempi between 93 and 120 bpm.
And I like the way you enjoy the pitfalls & confusion. Can be a good attitude in life I guess... |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Mon Mar 13, 2006 3:49 pm Post subject:
|
|
|
Fozzie wrote: |
And I like the way you enjoy the pitfalls & confusion. Can be a good attitude in life I guess... |
The thing is, I now know better what happens than before. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Rob
Joined: Mar 29, 2004 Posts: 580 Location: The Hague/Netherlands/EC
G2 patch files: 109
|
Posted: Mon May 08, 2006 7:47 am Post subject:
|
|
|
Hi guys,
I guess you all figured out that in this method of muxing the audio through a delay there is a serious problem with changing the delay time. It is impossible to prevent a delayline to skip the samples that belong to the other channel while changing the delay time. This should actually be done in the DSP code that manipulates the read and write memory pointers. My solution is to use a constant and check if the value has settled after some time, after which a S&H passes a new delay time value. The delayed action is a severe disadvantage but still better as recording the terrible noise when changing the delay time.
Another issue is when wanting to mux a stereo or quadro signal through a delay line and capturing the samples at the end. For this I use a T&H instead of a S&H, which works like a charm. It is a bit obscure how to sequence four pulses in a 'walking ring' fashion at 96kHz to be able to pass a quadro signal, but in the accompanied patch you can see how I solved that. Still, when changing the delay modules with other types can swap or shift the outputs in an obscure way.
The delay line modules have been in the system unaltered since alpha release 0.01 or so, and there was a remark from Clavia in the past that once they start to work on the G2 again they will a.o. have a look at making longer delay lines at lower sample rates. But as promises is what the road to hell is paved with I have no clue about the value of such remarks.
/Rob
Description: |
Forcing four audio signals through delay lines at 24kHz sample rate |
|
Download |
Filename: |
QuadrupleDelayAt24kHzSR.pch2 |
Filesize: |
2.3 KB |
Downloaded: |
1629 Time(s) |
Description: |
Stereo pingpong audio delay at 48kHz |
|
Download |
Filename: |
StereoDelayAt48kHzSR.pch2 |
Filesize: |
2.09 KB |
Downloaded: |
1765 Time(s) |
|
|
Back to top
|
|
|
|