Ok so I've realized that the way you started going about it at the beginning of this thread (changing the tempo on-the-fly) is much more powerful than simply changing the DynamicClock tempo from the get go: using a clock divider/multiplier gives you BOTH or MORE tempos to work with, whereas changing the tempo at the source just keeps you at a single working tempo.
With "looping conditionals" in MidiFire, is it possible to set arbitrary ratios for a clock multiplier?
You can set arbitrary numerator / denominator values for the divider I posted by adjusting the two constants at the top to suit. You could run multiple dividers with multiple values in parallel.
If you mean you want to change the divide ratio on the fly, then you could do this also by adding some code to set the values of K0 and K1 remotely via CC message (or randomly too I guess).
Multiplying is a bit more tricky (as described in this thread). The example I posted is limited to clock doubling (although you could run multiple copies in series to get other multiples of 2)
Then, I don't see why you couldn't add a divider at the end to effectively multiply by a fraction. Keep in mind that in the multiplication process each second tick will always be out a bit but in practice this may not be noticeable.
Multiplication is actually quite a bit harder as ticks have to be added at the right time (tempo wise). Problem is, you don't know the tempo until the second incoming tick, so the first inserted tick will always be wrong. Most apps/devices won't notice this too much.
So, doing simple multiplications like 2X or 3X could be done with the Stream Byter as it stands, but more elaborate multipliers like fractions or > 3 really require Stream Byter to support conditional looping. I plan to add looping in an upcoming update.
If a simple clock doubler would suffice for now, the me know and I can post that here.
Thanks for the info Nic. Well I was actually referencing something you had said earlier in the thread, and since MidiFire now supports (beta) conditional looping, I was wondering if it is now possible to create a module that would work dividing or mulitiplying the clock by ANY fraction?
I’m not sure how difficult this would be to create... I could start on it at least... It would be cool to have confirmation that it’s possible though... what do you think?
I think being able to loop will indeed make it more easy to cater for more esoteric fractions, but chaining multiple (pun) divider/multiplier blocks will probably have the same effect and could be done possibly more intuitively.
Yes conditional looping is in the current TestFlight beta that you have.
You add a +L flag to the IF/END that you know and love now and instead of passing control on to the next rule when it hits the 'END' it will instead jump back to the conditional and evaluate again. Here is a simple example.
ASS L0 = 0 IF L0 < 5 +L SND B0 07 01 MAT L0 = L0 + 1 END
So, it's a while loop.
Now, since it could be possible to cause nasty problems if you programmed an infinite loop, each loop will execute a maximum of 128 times regardless of the condition.
Hi, I am trying to process 32nd notes, 16th notes, 8 notes etc and because I want to play back all notes, I probably have it all wrong but I can process I think 32nd notes however I'm having difficulty Really understanding the code.
I understand that F8 are the ticks, K1 = 4 and MAT L2 = L0 % K1 So if L0 = 5, then L2 = 1