electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
How to get a 1 sample delay?
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [20 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 3:49 am    Post subject: How to get a 1 sample delay? Reply with quote  Mark this post and the followings unread

Hi.

I need a one sample delay in a signal path, parallel to the original one ( without feedback path). Is it possible in G2 ? In G1?

Thanks a lot.
Back to top
View user's profile Send private message
3phase



Joined: Jul 27, 2004
Posts: 1183
Location: Berlin
Audio files: 13
G2 patch files: 141

PostPosted: Thu Jun 10, 2010 4:07 am    Post subject: Reply with quote  Mark this post and the followings unread

i think so.. just have forgotten how.. a mixer module with feedback?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Thu Jun 10, 2010 4:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Et voilà.

Both audio and control rate version provided (just change in clocking).

It's a cheap spinoff of the zero latency differentiator circuit I did.


1SampleDelay__TK.pch2
 Description:
Delays incoming signal by one sample. Audio and control rate versions.

Download
 Filename:  1SampleDelay__TK.pch2
 Filesize:  1.13 KB
 Downloaded:  1689 Time(s)

Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 4:20 am    Post subject: Reply with quote  Mark this post and the followings unread

Merveilleux !

Thanks tim.

I've find another solution, more expansive than your patch but mine let you choose between 1 to 7 sample delay.

Edit: of course, I think it's possible to do the same with your patch using a clock divider module?


1to7sampledelay.pch2
 Description:

Download
 Filename:  1to7sampledelay.pch2
 Filesize:  818 Bytes
 Downloaded:  1451 Time(s)

Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Thu Jun 10, 2010 4:34 am    Post subject: Reply with quote  Mark this post and the followings unread

Your design halves the sampling frequency down to 48kHz due to the shift register being clocked at that rate. If that isn't a problem, you might want to try the clocked delay module, as it does the same thing and the delay can be manually adjusted.

My design is an 1-sample delay of the full signal bandwidth. (96k audio or 24k control)

cheers,
t
Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 4:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Oooppss. Sorry for my mistake. Nevermind, your patch do the job far better.
Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 6:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Just a question: Since 1000/96000=0,010416666 and the delay module min value show 0,01ms , I'm asking if the delay module give exactly a one sample delay?
Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Thu Jun 10, 2010 8:41 am    Post subject: Reply with quote  Mark this post and the followings unread

A good idea. The delay lines can be used in a sample-accurate context. I do this often for the pseudo-sampling and pseudo-RAM circuits. However one has to be careful because the delay line taps are interpolated.

But I probed and measured and found the correct delay time offset for exactly one sample delay (it's 100% precise).

So yeah, this works great, and we are down to two modules. (A 5ms delay module and a constant module to get the precise tap offset).

Thanks for the idea. Smile My klutzy old differentiator design is obsolete now.


1SampleDelay2_TK.pch2
 Description:
1-sample delay for audio. Far more elegant technique by using precisely calibrated delay tap offset.

Download
 Filename:  1SampleDelay2_TK.pch2
 Filesize:  840 Bytes
 Downloaded:  1789 Time(s)

Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 8:59 am    Post subject: Reply with quote  Mark this post and the followings unread

tim wrote:

Thanks for the idea. Smile My klutzy old differentiator design is obsolete now.


Not really : both design have advantages/inconvenient if we look at cycles versus memory.

So if we want a 512 samples delay lines? Doesn't seems to be equal to the max value of the 5ms delay lines.

512samples =5,333333
Max delay times=5,30

I' ve made a midi sync looper a while ago . I post it under your midi looper.
Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Thu Jun 10, 2010 9:22 am    Post subject: Reply with quote  Mark this post and the followings unread

The 5ms delay line is exactly 512 samples. I've just measured it. And the individual samples can be precisely accessed quite easily.

The samples do not appear to be interpolated simply in a linear fashion (which is good). Probably cubic spline or Lagrange.

All this is quite a discovery, giving me lots of new ideas. Smile
Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 9:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Great ! I like to know you have new ideas ! This smell good.
Sorry for my bad english.
Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Thu Jun 10, 2010 11:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tim, a question come in my mind: you put a constant of 16 unit to the mod input. The mod input is set to 1. Ok, but it means that's possible to have a delay time shorter than 1 sample. How it's possible????? I don't really understand how a sample could be divided.
Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Fri Jun 11, 2010 2:44 am    Post subject: Reply with quote  Mark this post and the followings unread

The "space inbetween" the discrete sample values is interpolated. This is common practice for any kind of non-fractional sample playback (eg. in samplers), and the better it is performed, the better the sound quality is. I'm positively amazed that the G2 delays do this. Smile
Back to top
View user's profile Send private message
iPassenger



Joined: Jan 27, 2007
Posts: 1067
Location: Sheffield, UK
Audio files: 5
G2 patch files: 78

PostPosted: Fri Jun 11, 2010 3:24 am    Post subject: Reply with quote  Mark this post and the followings unread

tim wrote:
The "space inbetween" the discrete sample values is interpolated. This is common practice for any kind of non-fractional sample playback (eg. in samplers), and the better it is performed, the better the sound quality is. I'm positively amazed that the G2 delays do this. Smile


Do you mean it averages the value between the two points? E.g. smoothing the step?

_________________
iP (Ross)
- http://ipassenger.bandcamp.com
- http://soundcloud.com/ipassenger
Back to top
View user's profile Send private message Visit poster's website
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Fri Jun 11, 2010 3:44 am    Post subject: Reply with quote  Mark this post and the followings unread

iPassenger wrote:
tim wrote:
The "space inbetween" the discrete sample values is interpolated. This is common practice for any kind of non-fractional sample playback (eg. in samplers), and the better it is performed, the better the sound quality is. I'm positively amazed that the G2 delays do this. Smile


Do you mean it averages the value between the two points? E.g. smoothing the step?

Yup. And not simply linearly.

This has drawbacks too, though. When using the delay line as memory via 100% feedback, the recirculating signal in the feedback loop degrades after a while since the interpolation can't be 100% accurate and the minute deviances add up with each recirculation. This results in the signal slowly dying down to zero.
However, in my newest 60 seconds control-signal recording devices (which are based on delay lines as pseudo-RAM), I fiddled around endlessly Confused until I was able to compensate for this subtle signal degradation, making a 100% stable feedback loop.
The 5ms delay having exactly 512 samples is a fantastic discovery, as it makes accessing the individual samples totally straightforward numerically. So now, a 512 word memory array with direct read access is in reach. I'll do it.
Back to top
View user's profile Send private message
iPassenger



Joined: Jan 27, 2007
Posts: 1067
Location: Sheffield, UK
Audio files: 5
G2 patch files: 78

PostPosted: Fri Jun 11, 2010 3:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Nice one, go for it. Very Happy

Make us some more cool stuff! Twisted Evil

_________________
iP (Ross)
- http://ipassenger.bandcamp.com
- http://soundcloud.com/ipassenger
Back to top
View user's profile Send private message Visit poster's website
Roland Kuit



Joined: Sep 29, 2003
Posts: 1090
Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127

PostPosted: Fri Jun 11, 2010 4:07 am    Post subject: Reply with quote  Mark this post and the followings unread

great stuff tim, thanks!
Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Fri Jun 11, 2010 4:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Do you mean that FFT is now possible on the G2 ?
How about the method you're talking about access to the individual samples?
Back to top
View user's profile Send private message
Tim Kleinert



Joined: Mar 12, 2004
Posts: 1148
Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236

PostPosted: Fri Jun 11, 2010 9:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Moody33 wrote:
Do you mean that FFT is now possible on the G2 ?

Nah, not really. I could get a maximum of only 96 frequency bins from an expanded G2, and that's only talking about realtime analysis and resynthesis. Plus, it would have to use bandpass filters rather than the (far more accurate) method via heterodyning (which I used in the SpectraVocoder patch). Can be done. But it's not going to sound that great. Might try it though, just for fun.

If you want to record and manipulate the analysed audio, this experimental patch I did some days ago is the best you can get:
http://www.electro-music.com/forum/post-297635.html#297635
It has only 32 frequency bins (don't laugh), but it can record up to 60 seconds of audio analysis and play that back at any speed, manipulate the resynthesis frequencies and stuff.

Quote:
How about the method you're talking about access to the individual samples?
The problem is the numerical system used by the Clavia modulars, which is essentially derived from the binary number system, thus following the progression of the power of 2 (1, 2, 4, 8, 16... etc.). Having been an Assember coder back in the days (ah, the Commodore 64 Laughing), this is very familiar to me and has alot of advantages (eg. in conjunction with logic signals which are also binary).
The drawback is that it is cumbersome when having to deal with numbers which are not related to this system. The 5ms delay however has 512 samples, which is exactly 2^9, or 64*8. Which means that 1/8 of each Clavia unit precisely points to a sample in this delay line.
For everything to work though, one has to lockstep the whole readout process to a pointer that sample-accurately moves along with the "content" recirculating in the delay. Also, the interpolation-induced signal degradation within the feedback loop has to be compensated for. As I say, I'll patch it soon. Smile

cheers,
t
Back to top
View user's profile Send private message
Moody33



Joined: Apr 28, 2009
Posts: 111
Location: France
G2 patch files: 16

PostPosted: Sun Jun 13, 2010 9:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for your explanation Tim.
I've take a look on your last patches, (pitch-shifter and grain stuff), and I find them impressive.
You said: "For everything to work though, one has to lockstep the whole readout process to a pointer that sample-accurately moves along with the "content" recirculating in the delay. Also, the interpolation-induced signal degradation within the feedback loop has to be compensated for. As I say, I'll patch it soon."
Did the modulation delay time design in your last patches is "the read out" process you were talkin about? As I'm not very good in math stuff and in english too, there is things I don't understand clearly.
Is it also possible to jump between exact samples when the delay time is 25,100,500,1000 or 2000 seconds?
If you have the time I'd really like to see a patch showing us how to select a samples number in the delay time.

Thanks you again for your educative and useful patches. I'm often impressed on how you get around G2 apparent/obvious (???) limits.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [20 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 » Nord Modular G2 Discussion
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


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