Clock multiplier?
Hi Guys,
I can create a really handy clock divider for my sequencer project, but dang, how to implement the opposite, a clock multiplier?
You could measure the clock interval and divide by the multiplier.
in my sequencers i use a master BPM value, which can be fetched from other places.
another option would be to let the master clock send the delta time as float instead of a trigger. if there is a "60." coming (instead of the usual bang), it should be easy to create delayed copy of that number (and change it to 30. so that you can add another clock divider)
Here's 4 for starters
Wow, thank you guys.
Right now, my solution is not that elegant like yours.
My main clock is a signal LFO, which is synced with Live's transport bar. I know, it could be better, but it works, and I can apply a very nice swing, so yeah, I'll stick with this.
So, my solution is that I convert the clocks frequency to MS, divide it by 2-3, the apply it to a delay...
On the other hands...is it possible to implement a sequencer "engine", where every step its own time division?
And if it is "faster" than a main clock, it repeats the notes?
if you are using cycle~ with sah~ or something like that you might want to change that.
how you design your clock should depend on what you need to do with it, not the other way round.
for example if you´d build it around phasor~ (instead of a cosine!?), a simple
*~ 2
%~ 1
will double the clock frequency...
but i am the wrong guy for signal driven clocks, thats not my world, i find numbers more interesting for complex stuff.
I came across this post with the same question as the OP. I realize the thread is old but I'll provide a suggestion anyway.
In case you are running off of the host transport, e.g. in Ableton and building a Max4Live sequencer and you'd like to have multiples off of that clock,
Try using a plugsync~ object and pull the numbers off of the "current beat fraction" outlet. By multiplying the float by a large enough number and rounding you should be able to get sufficiently high precision. Then use some modulo math to bang at your desired multiples. This avoids any extra interval measurements that the plugsync is already doing for you.