Towards A Sequencer


#1

I’ve been looking into smaller modules that can produce a wide range of rhythmic and tonal sequences and I have a concept to combine JDRaoul’s Euclidean Sequencer with @robertsyrett 's LFO Sequencer resulting in a very small number of controls with a large range if possible outputs. I’m in the very primitive stages of design, where I’m getting into the bones of the Eudlidean Sequencer and trying to manually recreate it and I have a few questions:

a) I’ve noticed that there’s a counter with the expression (x < 65535) * (x+1), and I was curious, what is the significance of 65535? Is it just an arbitrarily high reset value?

b) I understand that the clock input gets multiplied by an expression using the three length, offset, and hits controls but I’m wondering what exactly this expression results in? I’ve tried metering the output but can’t really discern what the behavior is other than it must result in a binary state that gates the clock.

c) If I was to use basic math nodes to recreate fract and floor functions (sounds silly but I have my reasons), how would I go about it? I understand what they do based on the descriptions in the documentation but can’t quite figure out how to implement them.

Thanks in advance.


#2

Yes I noticed that last year when I made a micro version of the Euclidean sequencer with a visual display – curious. Later when I added it to @RileyGuy’s uClidean Sarlaccs circular sequencer I replaced it with an updated reset counter – either from @RobertSyrett or from the library I think. I can’t remember the details but I think reset in the updated counter was more reliable. Here’s the thread on the old forum: http://forum-old.audulus.com/discussion/2425/euclidean-circles-clone/p1

One can definitely notice changes in programming styles/best practices when looking back through some of the older modules.

RG uClidean uEuclidean RM.audulus (679.0 KB)


#3

65535 is the largest 16-bit integer, I’m not exactly sure why JDRaul went with that, but yeah, the pattern just needs to reset at some arbitrary point.

(floor(fract((hits * (offs+count))/length-.001)*length)<hits)*clock

is the simplified expression.

You can think of a * b as a mathematical operator but here it is working like an if/then/else statement. If the clock gate is high (which is a 1) and there is a hit on this step of our count (that’s also a 1) then it will output 1 (1 * 1) otherwise it will mute the clock gate (1 * 0).

There is probably a way, but you might want to hold off until you have your sequencer working probably, then you can start making it needlessly complicated.

I uploaded my current version of the Euclidean sequencer in my personal collection, which also has loop length instead of the count going up to the largest 16-bit integer.


#4

Thanks for the good explanations!


#5

Thank you for this.


#6

The challenge you would have in trying to recreate the fact() and floor() functions is that all values in Audulus are 32 bit floating point numbers. You could probably come up with something using a sequence of mod() expressions for each power of 10 and conditionals, but it would likely be very CPU intensive compared to the native functions.


#7

I think he means a solution that avoids the expression node (except maybe comparators and input constants) and only uses mostly multiply, add, and crossfade.

This interests me too, but I think it’s worthy of it’s own thread and is a bit orthogonal here.