Forums > MaxMSP

Audio Rate Sequencer

May 4, 2009 | 12:17 am

Hi All

I have wanted to build an audio rate sequencer for a while and after looking at the patch in the examples i came up with this.

I don’t think its quite audio rate, but almost. I’ve been having trouble trying to figure out how to get signal objects to trigger the audio instead of edge, though i don’t know how much precision i am losing with edge???

Ideally I’d like to load the audio in to buffers, and have the ability to shorten them (start and end times) and envelope them also. I had a look at groove~ but I couldn’t get it to work at all.

– Pasted Max Patch, click to expand. –

May 5, 2009 | 12:35 am

Hey, your patch is really cool(been thinking of doing this myself but then just ended up using seq~)… the true test of how much precision and how ‘audio-rate’ your sequencer is, is to turn up the BPM to something like 3000 and listen to hear if the sfplay~ method will still play accurately(i.e. the sequence should eventually sound like a fully predictable oscillator(sound should be a continuous tone without aberrations)…). If not, then it’s probably not as audio-rate as you want it to be… your sfplay~ method actually comes pretty close. but compare the sound with the method below and you see it’s not quite as oscillator-like.

This uses audio-rate/signal calculations only:

– Pasted Max Patch, click to expand. –

…to be able to select start/end time should be fairly easy beyond this… you can either set the 2nd and 3rd inlets of wave~ or swap out wave~ for play~ and see helpfile for play~ as to how to get beginning and end times(using *~ and +~ into play~)). i also cleaned up the delay network above the matrixctrl and used an uzi instead(much faster sequence-drawing-to-buffer~ response i think…). you will need to somehow calculate proper playback speed based on the millisecond duration of the sample/selection(i just set them all to a default of 5 which will not sound like the original sample most of the time but it was a quick and easy way to get the answer to you). also, for windowing, you can drive the window with the output from the zigzag~ objects(when zigzag moves from 0 to 1, the amp-window can be synced to that same exact signal driving the playback). Hope that helps.


May 5, 2009 | 7:05 pm

cheers man, i’ll be working on this for a while i think

i’ve wanted to use max for more than just sound sources for a while. i also want to hook it up with cubase for some synth action, will probably post back over the next few weeks

thanks again Smile


May 6, 2009 | 3:16 pm

eric lyon’s objects have a sample accurate sample player. it responds to a click (going from 0 to 1) from an audio signal.


May 7, 2009 | 11:52 pm

nice patch, raja.

good fun to play with time stretching the samples.


May 8, 2009 | 10:14 am

hey mang it was my idea! jk

just figured a way of writing function to a buffer for audio rate enveloping too. no doubt raja will supe it up now

– Pasted Max Patch, click to expand. –

May 9, 2009 | 5:09 pm

Hey, thanks, the_man361, much appreciated…

but ya, my patch is just a derivative of Mike S’s awesome and inspirational original patch/idea.

…and, i don’t think I can supe up the envelope, that’s pretty much how i’d do it except with a multislider(seems quicker to draw envelopes into multislider(using rampsmooth~ to interpolate the index~ output) than moving/clicking function points but that’s more of a personal preference/obsession for multislider solutions).

great work! audio-rate solutions are always a beautiful thing. Smile


May 9, 2009 | 5:39 pm

here is an audio rate pattern gate that i’ve been making, maybe of interest

oli


May 9, 2009 | 6:04 pm
oli larkin wrote on Sat, 09 May 2009 11:39
here is an audio rate pattern gate that i’ve been making, maybe of interest

oli

that sounds nice and slick! especially the ‘roll’ function.


May 9, 2009 | 6:05 pm

hey oli,

i don’t suppose you’d know how i would go about implementing swing in the timing?


May 9, 2009 | 6:33 pm

oli probably has a better method, i tried delay~ and it didn’t work as well as tapin~ tapout~, so maybe this could be a start.


May 9, 2009 | 7:08 pm

i have some externals that i am developing to do sample accurate swing clock. I have found it a bit of a nightmare without resorting to C… the delay approach is not great, since you get problems when you change the shuffle value or tempo.

oli


May 9, 2009 | 7:34 pm

could you not select specific values from the phasor that correspond to the swing, and use them as triggers?


May 9, 2009 | 7:50 pm

Mike wrote, "could you not select specific values from the phasor that correspond to the swing, and use them as triggers?"

the patch i uploaded in answer to the swing question has that basic idea added… (see above). i think, though, oli is saying that once you change the tempo, my tapin~/tapout~ (or delay~) method will not update swing values accurately on time with the tempo change…this is probably true, even if you have the max-swing time in my patch locked to tempo changes(instead of arbitrary maximum swing ms value, have step-size in milliseconds and use multislider to tweak percentages of that step-size for swing), the sample-rate operations will make delayed-values from previous tempo-changes inappropriate to the new tempo… if that makes sense… my wording is a bit off…


May 10, 2009 | 12:19 am

here is a version using an external for the swing clock. It’s not perfect…getting there

external is only compiled for mac at the minute


May 10, 2009 | 9:29 am

Dear Oli and all

This is great, though there is a little error in the external: the ramp does not swing!

If you unplug to res filter, and put slow (48bpm) stacc (0.02) notes, the only thing the swing changes is the lenght of the note, not the swing of attacks.

I think the ramp output is the guilty (when I spy it from a scope)

Please post a fixed version and we’ll all be dancing soon!

pa


May 10, 2009 | 10:38 am

i know it has some issues

Smile

will fix when i have a chance

o


May 10, 2009 | 3:04 pm
oli larkin wrote on Sat, 09 May 2009 19:39
here is an audio rate pattern gate that i’ve been making, maybe of interest

oli

hi there could someone post a max 4.6 version of this..thanks a lot


May 10, 2009 | 4:01 pm

here you go


May 10, 2009 | 9:17 pm

I’ve implemented really good swing in audio rate sequencers by running a phasor through a look up table and feeding that to seq, i can get real time groove interpolation and strength changing

– Pasted Max Patch, click to expand. –

groovemap02.maxpat

– Pasted Max Patch, click to expand. –

Viewing 20 posts - 1 through 20 (of 20 total)