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 » G2 Patches - Completed » Audio In
polyphonic "intelligent elastic audio" sampler
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Tim Kleinert



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

PostPosted: Sun Oct 28, 2007 2:03 pm    Post subject:  polyphonic "intelligent elastic audio" sampler
Subject description: sample-accurate intelligent grain detection and other goodies :-)
Reply with quote  Mark this post and the followings unread

Hi folks,

Anyone remember the old AKAI samplers? They had two algorithms for time-stretching, one called "cyclic" and the other called "intelligent".

The "cyclic" one basically chopped up the sample into small grains of a constant size and simply spreaded them out over the desired sample length, applying crossfading to circumvent audio clicks. Conceptually, this process is basically the exact reverse of the "classic" pitch shifting algorithm of FX units, with which it unfortunately shares the same sonic drawbacks: The grain size (with pitch shifting, it would be the length of the delay line) intermodulates with the audio signal, producing all sorts of "flangey" artefacts. (Expectedly, these "artefacts" have since been turned into a common (and hence overused) effect. There was a period when you couldn't get away from house tracks full of "timestretched-to-death" vocal hooks. "Sssuuuggggaaarrrrdddaaddddddeeeyyy", anyone?Laughing)

All of my previous elastic audio attempts where built around this "constant grain size" idea, with the aforementioned side-effects. To alleviate those, various jitter parameters (jittering the grain frequency, pitch and position) were introduced primarily as an attempt to mask the intermodulations and the resulting "flangey" artificial sound. On simple monophonic source material, this sometimes worked OK. On more complex stuff (and especially drum loops) it sounded either cool and "techy" or utter shite, depending on personal taste. (I gravitate towards the latter...Laughing)

Back to the vintage AKAI time-stretcher. It also had an "intelligent" mode. This process scanned the audio material for positive-going zero crossings, thereby extracting single waveform cycles. These were then looped into larger grains (the amount of cycles could be manually set) and these again were spread out over the desired sampling time. This had the advantage that no crossfading was necessary, since there are no clicks -the individual waveform cycles are seamlessly joined to each other. Also, the resulting variable grain size is relative to the source material, causing no more intermodulations, and a more natural sound.

If you've read this far, you probably know what's coming... Yes. I've managed to build this concept on the G2. But contrary to the old AKAI, the G2 does it in realtime, turning it into a performable "elastic audio" thing. It even tracks keyboard pitch.

This patch contains all of my newest X-rated perversions of abusive G2 patching.Laughing It features innovations like non-drifting sample-accurate access to the delay lines (without the old klutzy time-stamping workaround), intelligent realtime zero-crossing detection and grain generation, DIY oscillators (for keyboard tracking) and other insanities. Most of it is abstract "low-level" style stuff, so please don't ask me to explain it. To be honest, I don't understand most of it myself anymore, now when I look back at it. But lo and beholds, it works.

Next to the functional improvements over my older designs, the audio quality is also considerably improved. The old patches suffered from the fact that the delay lines were driven by control rate (24kHz) readout pointers, making it somewhat "lo-fi". Here, everything relevant is clocked at 96kHz. Big difference. Smile

Controls description:

INPUT, CHANNEL: Selects input channel for audio capturing.
SAMPLE Capture: Pressing this button starts the sampling. (2.7 seconds)
SAMPLE <scrub>: Freely scrub around in the captured sample (without affecting pitch). Also assigned to modulation wheel.
TIME <dir>: Time axis of the sample (independent of pitch). Zero means that time stands still. Positive or negative amounts make time move forwards or backwards. This parameter is assigned also to the pitch stick, enabling you to comfortably jog around in the sample.
TIME KBT: Makes the time axis track the keyboard, making higher keys move faster.
PITCH Coarse: Tuning of the sample (independent of speed)
PITCH KBT: Makes the sample track the keyboard.
(Note: Activating TIME KBT and PITCH KBT together makes the patch behave similar to a conventional sampler.)
GRAIN Size: Amount of discrete waveform cycles per grain (counted in increments of 0.5).
GRAIN SIZE Jitter: Adds jitter to each grain cycle, making it less static.
DUAL GRAIN MODE On/Off: Yup, there's a second grain generator under the hood. Activating this makes the sound thicker. Imagine two oscillators instead of one. You have to add some grain size jitter for this function to have any effect! Only by adding jitter will the grain oscillators go out of phase and create a denser sound.
VOLUME A,D,S,R: Envelope

No FX. You can always add if you want.

Note 1: When you first load the patch, it is silent. In order to hear something, you a)have to capture some audio, b)press a key, and c)futz around with the modwheel and pitch stick. (Just to restate the obvious...)

Note 2: The pitch keyboard tracking isn't perfect, due to internal calculation resolution of the G2. I pushed it as far as it could go....

Note 3:The patch fits "neatly" :(100% mem Laughing) on a DSP, making for 4- or 8-voice polyphony depending on your G2 expansion status.

Have fun.

best,
tim



Idea : Capture your voice, deactivate DUAL MODE and GRAIN SIZE Jitter, set time axis to zero and scrub for an audible waveform. Now, futz around with GRAIN SIZE. Instant Aphex Twin Laughing ...

Update: This stuff is a work in progress. A polyphonic granular synth (with more features) based on this new elastic audio technique can be found here:
http://www.electro-music.com/forum/topic-21543.html



IntElasticSyntTK.pch2
 Description:
sample-accurate polyphonic elastic audio patch based on an intelligent time stretch algorithm.

Download
 Filename:  IntElasticSyntTK.pch2
 Filesize:  5.56 KB
 Downloaded:  2173 Time(s)


Last edited by Tim Kleinert on Sun Nov 04, 2007 8:28 am; edited 2 times in total
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: Sun Oct 28, 2007 2:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

ATTENTION: Please scroll upwards. Main patch is above. Smile

This is just an afterthought...

Just as an addendum, here's an experimental patch. I stacked all voices on top of each other, making it monophonic but with 16 grain oscillators (or 8 if unexpanded G2)!

(Grain jitter must be active so that all the grain oscs start having a life of their own.)

This sound surprisingly close to what I've heard from the Roland V-Synth, so I suspect that their VariPhrase technology works this way.

Strangely though, the "MonoKey" module uses more Mem% than the polyphonic one Confused, so I had to throw out some "less crucial" modules from the input section. But this is an experimental patch anyway.

Have fun.


MonoLasticSyntTK.pch2
 Description:
mono version of "InteLasticSyntTK"

Download
 Filename:  MonoLasticSyntTK.pch2
 Filesize:  5.45 KB
 Downloaded:  1844 Time(s)

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: Sun Oct 28, 2007 2:51 pm    Post subject: Re: polyphonic "intelligent elastic audio" sampler
Subject description: sample-accurate intelligent grain detection and other goodies :-)
Reply with quote  Mark this post and the followings unread

tim wrote:
Hi folks,
...... It features innovations like non-drifting sample-accurate access to the delay lines (without the old klutzy time-stamping workaround

........Most of it is abstract "low-level" style stuff, so please don't ask me to explain it. To be honest, I don't understand most of it myself anymore, now when I look back at it. But lo and beholds, it works.


You keep amazing me with your contraptions. However, as I was just about to get to grips with your previous time-stamping and grain techniques, I am utterly lost here looking at your patch. I know you don't want to explain the whole thing, but could I seduce you to say a few things about the new timing-technique? I love your 'old' beat-syncable elastic audio patches; could this new timing stuff also be used to sync to the master clock?

_________________
Spinning at ~0.0000115740740741 Hz
Back to top
View user's profile Send private message
v-un-v
Janitor
Janitor


Joined: May 16, 2005
Posts: 8933
Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1

PostPosted: Sun Oct 28, 2007 3:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tim, PLEASE send us an mp3 or something!! ;D
_________________
ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.
Back to top
View user's profile Send private message Send e-mail
Tim Kleinert



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

PostPosted: Sun Oct 28, 2007 3:07 pm    Post subject: Re: polyphonic "intelligent elastic audio" sampler
Subject description: sample-accurate intelligent grain detection and other goodies :-)
Reply with quote  Mark this post and the followings unread

Fozzie wrote:


You keep amazing me with your contraptions. However, as I was just about to get to grips with your previous time-stamping and grain techniques, I am utterly lost here looking at your patch. I know you don't want to explain the whole thing, but could I seduce you to say a few things about the new timing-technique?


Sure. It's so glaringly obvious that nobody thought of it. The delay line is 2.7 seconds long, which equals 259200 samples at 96kHz. So all you have to do is make the G2 count to 259200. Doh! Laughing Counter circuits can be built with feedbacking mixers.

That's the easy theory. The hard practice is actually getting it to work Laughing.

Fozzie wrote:
I love your 'old' beat-syncable elastic audio patches; could this new timing stuff also be used to sync to the master clock?


Absolutely, but with vastly improved audio quality. Time stamping took away 2 bits of audio resolution, and the 24kHz readout pointers didn't make things better either. Plus, the intelligent time stretching is a totally different ballgame. I'll patch it next time I have time.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Sun Oct 28, 2007 3:28 pm    Post subject: Re: polyphonic "intelligent elastic audio" sampler
Subject description: sample-accurate intelligent grain detection and other goodies :-)
Reply with quote  Mark this post and the followings unread

tim wrote:
Sure. It's so glaringly obvious that nobody thought of it. [...] So all you have to do is make the G2 count to 259200.


Sounds obvious Rolling Eyes now Laughing

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Burp



Joined: Dec 18, 2006
Posts: 53
Location: Utrecht - NL
G2 patch files: 7

PostPosted: Mon Oct 29, 2007 12:09 am    Post subject:   Reply with quote  Mark this post and the followings unread

Amazing, and what a great obvious idea to count the sample length!
Can't wait to play with it.

_________________
if you don't know where you're going, you will allways arrive
Back to top
View user's profile Send private message Visit poster's website
mother misty



Joined: May 13, 2004
Posts: 681
Location: Ghent / Belgium
Audio files: 82
G2 patch files: 130

PostPosted: Mon Oct 29, 2007 6:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Nice piece of work!
Lots of fun! Smile

thanks for sharing!

misty.
Back to top
View user's profile Send private message Visit poster's website
Aesoteric



Joined: Nov 29, 2005
Posts: 11
Location: Bristol
G2 patch files: 2

PostPosted: Thu Nov 01, 2007 4:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tim, this is amazing stuff.

You always seem to remotivate me to more complex patching on my modular. I adore my G2 for live work (processing/sampling/mangling), but as soon as I get the thought of more advanced patching (granular), I get drawn back to Max, as it causes me less of a headache, but I've been toying with the idea of building some kind of mlr ( http://monome.org/data/app/mlr ) functionality into one of your loop-reorder patches.

I'm always looking for ways to take the pressure off my laptop live, so anything I can do with the G2 is a help. To be able to sample a loop, jump around in 16ths triggered by CC assigned pads quantised to the master clock. And perhaps even to be able to record button push patterns...

Anyways, thanks for these amazing patches, and for the inspiration. If you have any suggestions about the best way to keep the quantise tight, then please, please feel free to share!!

Cheers,
Tim (the other one)
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: Sat Nov 03, 2007 11:19 am    Post subject: Reply with quote  Mark this post and the followings unread

Aesoteric wrote:
To be able to sample a loop, jump around in 16ths triggered by CC assigned pads quantised to the master clock. And perhaps even to be able to record button push patterns...

Anyways, thanks for these amazing patches, and for the inspiration. If you have any suggestions about the best way to keep the quantise tight, then please, please feel free to share!!

Cheers,
Tim (the other one)


You're welcome, Tim Smile. Accessing the individual 16th slices after capturing is an easy task with my approach. I measure the length of the sampled loop with a precision of 1/96000 second. 16th fractionals of that value gets me to the individual slices -very easy, in theory. I say "in theory", because many modules have exhibited very subtle unprecisions, undetectable in normal applications, but noticeable with low-level stuff like this. (Eg., the NoteScaler or the Xfader are very very subtly out of whack.)

I don't quite understand what you mean with "CC assigned pads"? Wouldn't it be more straightforward to use MIDI Note On/Offs to trigger the individual slices?

Explain what you need and I can try to have a go at it. Shouldn't be that hard...

best,
tim
Back to top
View user's profile Send private message
Aesoteric



Joined: Nov 29, 2005
Posts: 11
Location: Bristol
G2 patch files: 2

PostPosted: Sun Nov 04, 2007 4:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Tim,

Thanks! The basic idea is you can sample a phrase, which is then chopped into 16/8/4 slices and each slice assigned to a midi note. The sample plays as normal unless you press a key, which then jumps playback to this position, and the sample continues from there. Jumps are quantized according to a specified subdivision of the master clock.

More advanced tricks are to be able to record a series of 16/8 notes in real time to create a new pattern that will loop until told to stop, when playback will return to normal.
Finally, probably the most unrealistic idea on the G2, would be to be able to push two notes simultaneously, and for the phrase to loop between those two points only. For example, the loop goes 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16...then you push 2+4, it would loop 2, 3, 4, 2, 3, 4, 2, 3, 4 etc. until you hit another note which will recommence playback from that point.

If you get a chance to try any of this out, I would be hugely grateful. I spent yesterday banging my head into my Powerbook with frustration.

A lot of thank you's,

Cheers,
Tim
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: Sun Nov 04, 2007 4:39 am    Post subject: Reply with quote  Mark this post and the followings unread

All of this, even the last bit with looping between the region defined by two keys, is doable. I already have an idea how to patch it.

Cannot guarantee yet if it will still fit on a single DSP, but conceptually it's possible on the G2. I'll patch it.

However, give me a weeks time, as I only have access to the internet on weekends at the moment.

Have a good week.
tim
Back to top
View user's profile Send private message
Aesoteric



Joined: Nov 29, 2005
Posts: 11
Location: Bristol
G2 patch files: 2

PostPosted: Sun Nov 04, 2007 5:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks a million Tim,

If you happen to find yourself in the UK, I owe you a bunch of beers...

Have a good week yourself.

Cheers,
Tim
Back to top
View user's profile Send private message
W.T.



Joined: Jul 11, 2004
Posts: 272
Location: The Netherlands
Audio files: 1
G2 patch files: 11

PostPosted: Mon Feb 11, 2008 6:39 am    Post subject: Reply with quote  Mark this post and the followings unread

It makes a lot of hard and aggressive noise sounds!

thanks a lot Very Happy
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 [14 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 Patches - Completed » Audio In
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