electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  EdisonRex Edison's Electronic Review
  Twyndyllyngs Special Monday edition of Chez Mosc
Please visit the chat
 Forum index » Clavia Nord Modular » G2 Building Blocks
Longer delays by using multiplexing
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [24 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Sat Mar 11, 2006 4:23 pm    Post subject: Longer delays by using multiplexing Reply with quote  Mark this post and the followings unread

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.


long_delay.pch2
 Description:
Using multiplexing to get longer delay lines.

Download
 Filename:  long_delay.pch2
 Filesize:  1.03 KB
 Downloaded:  1030 Time(s)


_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1027
Location: Zürich, Switzerland
Audio files: 6
G2 patch files: 212

PostPosted: Sun Mar 12, 2006 4:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Ha! What a brilliant and elegant solution! Cool And 48kHz is still plenty enough for many purposes.
_________________
beer
Back to top
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2575
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Sun Mar 12, 2006 4:56 am    Post subject: Reply with quote  Mark this post and the followings unread

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 Cool

Thanks Jan and Rob
Back to top
View user's profile Send private message
deknow



Joined: Sep 15, 2004
Posts: 1307
Location: Leominster, MA (USA)
G2 patch files: 15

PostPosted: Sun Mar 12, 2006 7:55 am    Post subject: Reply with quote  Mark this post and the followings unread

this is fantastic. is there a reason not to double up again and go down to 24khz and 4xdelay time?

deknow
Back to top
View user's profile Send private message Send e-mail
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Sun Mar 12, 2006 10:05 am    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Sun Mar 12, 2006 11:14 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Afro88



Joined: Jun 20, 2004
Posts: 701
Location: Brisbane, Australia
Audio files: 12
G2 patch files: 79

PostPosted: Sun Mar 12, 2006 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

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. Shocked 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 Confused
Back to top
View user's profile Send private message Visit poster's website
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Sun Mar 12, 2006 2:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Embarassed ), the value does revert to 0 when the input is routed to the other channel than the one is being measured..... Confused
Back to top
View user's profile Send private message
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Mon Mar 13, 2006 11:17 am    Post subject: Reply with quote  Mark this post and the followings unread

I still don't understand how these valueswitches work (in what they pass through when there's no input switched through to the output), but this patch has 4x delayed delay signals Cool

Based on the mux-technique by Selvmarcus, applied in the same way as Blue Hell's long delay. Enjoy (btw: I only checked this to work on the demo, but I can't think of a reason why it wouldn't work on the synth)!

Edit: uploaded the patch again, hope it can be downloaded now


LLLongDelay.pch2
 Description:
Delay at 24kHz, 4x longer than at full range. Techniques combined from Blue Hell and Selvmarcus. Second upload session due to double posting error.

Download
 Filename:  LLLongDelay.pch2
 Filesize:  1.61 KB
 Downloaded:  721 Time(s)


Last edited by Fozzie on Mon Mar 13, 2006 1:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2575
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Mon Mar 13, 2006 11:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey Fozzie

Cant download the last patch. Sad
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Mon Mar 13, 2006 12:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
cebec



Joined: Apr 19, 2004
Posts: 1064
Location: Virginia
Audio files: 3
G2 patch files: 31

PostPosted: Mon Mar 13, 2006 1:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Mon Mar 13, 2006 1:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Confused . And the signal has dropped considerably in volume.

Question
Back to top
View user's profile Send private message
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Mon Mar 13, 2006 1:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Mon Mar 13, 2006 1:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
cebec



Joined: Apr 19, 2004
Posts: 1064
Location: Virginia
Audio files: 3
G2 patch files: 31

PostPosted: Mon Mar 13, 2006 1:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Mon Mar 13, 2006 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

[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 Rolling Eyes )
Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Mon Mar 13, 2006 2:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Mon Mar 13, 2006 2:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Mon Mar 13, 2006 3:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

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.

I'll delete the earlier version of the file, to not clutter up this topic too much..


LLLongDelaySH2.pch2
 Description:
Sorta final bblock of the 4x elongated delay. Replaces my second try in this thread. For use in one's own patch, make sure the master clock is set to a tempo that works correctly (see rest of message). Delete test signal & clock & beat modules to

Download
 Filename:  LLLongDelaySH2.pch2
 Filesize:  2.39 KB
 Downloaded:  728 Time(s)

Back to top
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Mon Mar 13, 2006 3:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
Back to top
View user's profile Send private message Visit poster's website
Fozzie



Joined: Jun 04, 2004
Posts: 875
Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49

PostPosted: Mon Mar 13, 2006 3:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Smile


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
View user's profile Send private message
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20536
Location: The Netherlands, Enschede
Audio files: 147
G2 patch files: 318

PostPosted: Mon Mar 13, 2006 3:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Fozzie wrote:

And I like the way you enjoy the pitfalls & confusion. Can be a good attitude in life I guess...


Very Happy

The thing is, I now know better what happens than before.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Rob



Joined: Mar 29, 2004
Posts: 578
Location: The Hague/Netherlands/EC
G2 patch files: 109

PostPosted: Mon May 08, 2006 7:47 am    Post subject: Reply with quote  Mark this post and the followings unread

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. Wink

/Rob


QuadrupleDelayAt24kHzSR.pch2
 Description:
Forcing four audio signals through delay lines at 24kHz sample rate

Download
 Filename:  QuadrupleDelayAt24kHzSR.pch2
 Filesize:  2.3 KB
 Downloaded:  702 Time(s)


StereoDelayAt48kHzSR.pch2
 Description:
Stereo pingpong audio delay at 48kHz

Download
 Filename:  StereoDelayAt48kHzSR.pch2
 Filesize:  2.09 KB
 Downloaded:  709 Time(s)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [24 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » G2 Building Blocks
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use