XOR Userforum

Full Version: Tip: Randomly selecting alternating patterns
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have been experimenting with adding more randomness to my Nerdseq patterns, especially for percussion tracks where it can really spice things up. Tables are a great tool for adding simple fills, and the PRTB effect can make this random which is great (random triplet fills on hihat-type patterns are fun). But I have been wanting to have a way to select one of several completely different alternate patterns for a snare fill and had a hard time getting it to work. I finally did so I thought I'd write up a little tip in case anyone else wants to do this. 

My intent is to have pattern 00 be the "base" snare pattern, and have it alternate with a pattern randomly selected from 01, 02, 03, and 04. So like 00 -> 01 -> 00 -> 03 -> 00 -> 01 -> 00 -> 04 etc. 

The key thing I realized was that if you hit multiple STSP fx before the end of the pattern the last one wins, and in any case nothing happens until you reach a BRK or the end of the full pattern.

So in my Sequencer view I have the snare track like so (in track 1): 

00
--
01 
02
03
04

Then in the last 6 steps of the Pattern 00 FX1 and FX2 columns: 

PRF1 019  ; set prob of FX1 to 25%
STSP 102  ; 25% chance to jump to 01
STSP 103  ; 25% chance to jump to 02
STSP 104  ; 25% chance to jump to 03
STSP 105  ; 25% chance to jump to 04, otherwise play 00 again
BRK 000  PRF1 064   ; end pattern and reset FX1 prob to 100% 

And in the last steps of patterns 01 -- 04: 

STSP 100 ; start pattern 00 again
BRK 000 ; end pattern

The mathematically-minded will recognize that there's not exactly 25% chance of each pattern being jumped to; the earlier ones are more likely to win (it's about 25% for 01, 19% for 02, 14% for 03, 10% for 04, and 31% that 00 will be played again) but that's good enough for me. You can tweak PRF1 from step to step if you want to even it out. 

EDIT: My probabilities are wrong above Sad  Since the last one wins and all 4 steps get executed, the later ones are more likely to win! More like 10% for 01, 14% for 02, 19% for 03, 25% for 04, 31% that 00 is played again. 

Enjoy!
bg
Nice! And i can already tease you that there might be another option with the next firmware. (cough)
Thanks for the tip! I am going to try it and see.
Hello grib,

your adjusted probabilities are correct, but unless I misunderstood your description of your assignment of the probabilities the attribution to the pattern is wrong. The way I underrstood your description the correct attribution is:
P(00) = 31,6% (that you had right)
P(01) = p(01) = 25% (first decision, 25%, 75% invers event p(!01) )
P(02) = 75% * 25% = 18,8% (second decision, p(!01) * p(02))
P(03) = 75% * 75% * 25% = 14% (third decision, p(!01) * p(!02) * p(03))
P(04) = 75% * 75% * 75% * 25% = 10,5% (forth decision, p(!01) * p(!02) * p(!03) * p(04))
And for completeness sake:
P(00) = 75% * 75% * 75% * 75% = 31,6% (inveres of forth decision, p(!01) * p(!02) * p(!03) * p(!04))

The sum of these is 100% (ignoring rounding errors), so it is complete, as expected.

If you want 01, 02, 03 and 04 with 25% chance each and no pattern 00 after pattern 00 just played then you'd have to adjust the probabilities as follows:
p(01) = 25% (remains unchanged)
p(02) = 33,33333333%
p(03) = 50%
p(04) = 100%

That will also remove your previous "other 00" step.

With the formulas above you could also compute any other set of resulting probabilities Smile

Kind regards,
Michael
Your P(0x) were what I computed initially. The complicating factor is that the last pattern wins if multiple rows have their FX1 evaluated.

So for pattern 01 to be jumped to, we don't only have to get lucky on our 25% chance on the first row, but also we have to avoid any of the other rows getting lucky with theirs. So I still believe the probabilities in my "EDIT" above, P(01) = 0.25 * 0.75 * 0.75 * 0.75 = 10.5%

In any case, as I said initially, the goal is to add a bit of structured randomness to the snare pattern, so it doesn't matter exactly what the chances are as long as the net result sounds good Smile
Maybe I misunderstand your setup. Your P(01) is my P(04) and vice versa. Same for P(02) and P(03).

However when the first decision made is "Pattern 01 or not" then that's the 25% chance for 01. When I understand your setup correctly, there is no other possible path to pattern 01 and therefor that's it. A similar argument goes for the rest.

But since you basically solved your problem (nice one actually Smile ) this is not really important

Kind regards,
Michael
(01-22-2021, 03:23 PM)XORadmin Wrote: [ -> ]Nice! And i can already tease you that there might be another option with the next firmware. (cough)

I was about to ask a general question about getting help doing evolving note patterns similar to what Que-bit Bloom Fractal Sequencer can do (I have one). I found the Nerd menu to randomize a series of notes. But of course that remains static after that. So should I hold my water for the next release before I concern myself with this question? Or is it worth asking for help using the existing randomize features with something I have not found yet to make them evolve over time? Automation?
I don't really know what Bloom does "under the hood". The branching part seems pretty easily implemented by means of probabilities (which you already figured and thus responded to this thread Wink

What I do not understand is what they call "fractal algorithms". AFAICT that has nothing to do with fractal algorithms as they are used elsewhere. To me it seems the "fractal" comes from them changing parts (fractions) of the original sequence. Could someone knowledgeable either correct me or confirm this?

Inversion and reversal of parts seems simple enough. Mutating seems another buzz word for changing (notes).

Before I try to find ways to emulate Blooms behaviour could someone elaborate a bit more about what it really does?

Kind regards,
Michael
(02-23-2021, 11:18 PM)mntbighker Wrote: [ -> ]I was about to ask a general question about getting help doing evolving note patterns similar to what Que-bit Bloom Fractal Sequencer can do (I have one). I found the Nerd menu to randomize a series of notes. But of course that remains static after that. So should I hold my water for the next release before I concern myself with this question? Or is it worth asking for help using the existing randomize features with something I have not found yet to make them evolve over time? Automation?

I too have a Bloom.

While the release candidate NerdSEQ firmware is gaining more control over its existing randomization functionality, it won’t (that I know of) yet be gaining the kind of a) generated repeating variation or b) slow evolution of its randomization, either of which you’d be anticipating from Bloom. On the upside, the NerdSEQ isn’t a hot mess of UX issues and bugs. Big Grin

These might make for some interesting feature requests, though.

Perhaps, as an example, an FX command that permanently perturbs the note value in the row where it appears, within a controlled range, each time the FX command is executed. That could then be driven probabilistically using NerdSEQs existing probability FX.
(02-24-2021, 04:06 PM)mvdirty Wrote: [ -> ]
(02-23-2021, 11:18 PM)mntbighker Wrote: [ -> ]I was about to ask a general question about getting help doing evolving note patterns similar to what Que-bit Bloom Fractal Sequencer can do (I have one). I found the Nerd menu to randomize a series of notes. But of course that remains static after that. So should I hold my water for the next release before I concern myself with this question? Or is it worth asking for help using the existing randomize features with something I have not found yet to make them evolve over time? Automation?

I too have a Bloom.

While the release candidate NerdSEQ firmware is gaining more control over its existing randomization functionality, it won’t (that I know of) yet be gaining the kind of a) generated repeating variation or b) slow evolution of its randomization, either of which you’d be anticipating from Bloom. On the upside, the NerdSEQ isn’t a hot mess of UX issues and bugs. Big Grin

These might make for some interesting feature requests, though.

Perhaps, as an example, an FX command that permanently perturbs the note value in the row where it appears, within a controlled range, each time the FX command is executed. That could then be driven probabilistically using NerdSEQs existing probability FX.

You mean like a 1 shot table with a random value within a selected range on it's first row and a hop 0 so it happens only once and this happens probabilistic (does this word happen anyway??? you understand me). Well...it's there Big Grin
Pages: 1 2