How to

Whatever is on my mind…

Max and Max for Live tutorials

Geek stuff…

Clox… a healthy ticker…

How to sync to Live’s clock for step sequencing:

Last time we spoke I said I would show a good clock that would stick to Live’s transport. Well, here it is:

This is a utility version of the Adlais 1.3.4 clock.

Of course, that picture doesn’t quite tell the whole story, but, the plugsync~ object is what makes this clock tick (thanks to Daniel from http://ldmdesign.org for explaining this to me). Plugsync~ reports what Live’s transport is doing, reporting Start/stop, bars, beats and stuff. The important outlet (for our needs) is outlet 7, which reports clock ticks.

1nd – Dotted whole note – 2880 ticks
1n – Whole note – 1920 ticks
1nt – Whole note triplet – 1280 ticks
2nd – Dotted half note – 1440 ticks
2n – Half note – 960 ticks
2nt – Half note triplet – 640 ticks
4nd – Dotted quarter note – 720 ticks
4n – Quarter note – 480 ticks
4nt – Quarter note triplet – 320 ticks
8nd – Dotted eighth note – 360 ticks
8n – Eighth note – 240 ticks
8nt – Eighth note triplet – 160 ticks
16nd – Dotted sixteenth note – 180 ticks
16n – Sixteenth note – 120 ticks
16nt – Sixteenth note triplet – 80 ticks
32nd – Dotted thirty-second note – 90 ticks
32n – thirty-second note – 60 ticks
32nt – thirty-second-note triplet – 40 ticks
64nd – Dotted sixty-fourth note – 45 ticks
64n – Sixty-fourth note – 30 ticks
128n – One-hundred-twenty-eighth note – 15 ticks

Knowing that there are 1920 ticks/whole note or 480 ticks/quarter note makes translating ticks to note values easy as:

All I needed to do was divide or multiply outlet 7 to get my clock ticking nicely:

This shows inside the p Maffs patcher…

The clock sel input takes the note value selected on the UI translated to multiplier values. I also used them to flip the switch so that values above 4n (which = 1) divide the ticks instead of multiply. This gives a count that always reflects Live’s transport, starting at zero when Live restarts. The modulo (%) divides this clock by the number of steps – although the high number is always 0 which needs fixing later…

I could have had one of these algorithms for each clock division but I can’t stand the mess… although I can see it being useful for seriously messing with the clock outputs (more on that another time).

The only other bits are adding a shift integer for (you guessed it) shifting the step sequencer, and a / object for a clock multiplier, so you can get some very long steps…

After all that there is a patcher for all the direction stuff which I’ll save for now (there are some unusual, randomish variants in Adlais, and I going to explore those some more in the future) and a swing patcher which is probably the most stupid way of implementing swing imaginable – but it works…

Later….

Posted by Dave Elson in How to, 0 comments

More Clox…. a quick and dirty ticker…

More Max 7/Max for Live meanderings…. Geek alert…

Last time I wrote about the counter based clock in Adlais Shift Register Sequencer:

how it works ok until you change it then return to 4/4 time. A quick google doesn’t help much either. At first I thought I should just find a way to reset it after each switch but you wouldn’t want to do that with your watch – it just proves it’s a crap watch…

Anyway, I said I had two solutions:

The first turned out to be a nightmare, not even a Sundial and I’m not going to show you, the second has a certain simple elegance…

But it is cheating really:

Here I got a Max multislider object for pitch control, it’s output multiplied by the Rangifier patcher, feeding a Clock patcher (The Rangifier just multiplies the 0 – 1 output of multislider to a useable MIDI note range)…

What’s inside the Clock patcher Dave?

Here:

It’s a live.step object… the standard Max for Live step sequencing object which I think is dead ugly, but it’s timing is pretty solid, see the standard StepSeqControl patcher:

What we get from this little setup is a nice simple step sequencer with rock solid timing, but accessing the clock between the transport object and live.step is onerous, and try applying a step shift to both the live.step and multislider simultaneously….

What it is good for is nice, quick pitch and modulation sequencing but i want a rock solid clock that allows me to intercept it at many points to produce a wide variety of timing effects… The question I had was ‘Where can i find the ticks for my clock from?’

A brief chat on Facebook and the answer was found, and the clue is in the question…

Next time I’ll tell all and I’ll release it in a significant free update for Adlais…

 

Posted by Dave Elson in How to, 0 comments

M4L: Thinking about clocks…

When building a Max For Live sequencer, clocks are a problem…

My ‘Adlais’ sequencer has a counter based clock:

The Metro object automatically synchronizes to Ableton Live’s clock, but only in that it counts upwards at the rate input – in this case 4n – from when Live’s transport is engaged. The plugsync~ object resets the clock when Live’s transport is stopped and restarted.

Well, that’s fine, you might say… and it is up to a point.

It is ‘in sync’ with Live’s clock, but not with Live’s transport, and that is a problem. If I were to set the number of steps in my sequencer to 5, step 1’s position will shift along the transport by on step per 4 beats, so:

 

Transport 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
Counter 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1

 

If I then switch back to 4 steps, this happens:

 

Transport 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
Counter 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1

 

Which is what is happening with Adlais

And renders my upcoming percussion sequencer useless

So far I have found two solutions, one of which is elegant, the other is stupid….

Answers on a postcard please

Really, i would love to know your thoughts…

Posted by Dave Elson in How to, 0 comments

Square Wave Sequencers…

Is what I thinking about

Or more accurately: Pulse Train Sequencers…

I got one working which uses a pulse wave as a gate for triggers from a clock

The other idea is to use two pulse waves with sync to keep the front edge of the pulse at clock

Anyway, the working one is here:

Posted by Dave Elson in How to, 0 comments