Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
random jump to label/conditional jumps/simple variables
#1
I've been playing around with SPFX 00C for a while.  I've found various uses for it- stochastic random melodies with different probabilities per note, or a random chance of jumping into several longer sequences.  What I'd really like to do, though, is have several 4-, 8-, or 16-step subsequences that I can randomly jump to the beginning of every time.

It'd be cool if there were an FX that functions like a 'label' would in C or some assembly languages that we could randomly jump to, then I could play random subsequences but it would always be in sync with other patterns.  Specifically, with no labels, a random jump may go to any step, but with any labels, there would be an equal probability of jumping to any of the labels.

A second jump that interests me is a conditional jump.

This would be a jump to a particular step (low bit arguments 0-63), a random step (lb 64), a random 16-aligned step, a random 8-aligned step, a random 4-aligned step, etc.  The condition could be based on whether CV input, patch, automator, or CV or gate output from another sequence is above a certain threshold.  Perhaps that threshold is determined by the high bit.

It might also be cool to have some FX that interact with a small set of variables, maybe only 16 so that you can represent 2 or 3 of them in an FX argument for binary and ternary operations.  With just unary operations like incrementing, decrementing, and setting to zero there's plenty of versatility.  Of course, you could add more complex options like pow2 (left shift), add random, add random in range (var specified in high 4 bits, range specified in low 8 bits), random increment or decrement, set to 8-bit value, and binary operations like adding, subbing, multiplication, AND/OR/XOR/NOT.

The whole point of these vars is that conditional jumps could be done based on the value of these variables.  Perhaps a CJLE (conditional jump if less than or equal) with the argument representing which vars to compare.  CJGE, CJIE (conditional jump if equal). Since it's hard to encode enough information in the argument for a comparison between 2 vars and to specify a label, perhaps instead this could be broken into 'compare' and 'conditional jump' operations. The compare (CGE, CIE, CLE, CG (greater than), CL (less than), CNE (not equal)) would set a separate 'jump register' boolean var and the the jump would be based on that. I'm not sure if FX run 'in order' with each other, but if they run 1-4 this could be done in one step. Or, instead of a jump register, the comparison can be stored to a separate variable and the conditional jump can be based on the boolean value of a variable. Comparisons would be a ternary operation- first 4 bits is the output var, last two are the left and right inputs. Conditional jumps would specify a var to check the value of in the high 4 bits and in the low 8 bits, they can specify a step (0-63) or some special values like random jumps in the remaining integer values.

If the variables are global, there could be an entire track dedicated to running a sort of modulation program that other tracks use variables from. I think I'd most prefer that half the variables be local to the pattern and the other half be global.
Reply
#2
I got something else in mind for one day when I am bored which definitely will tick all your boxes and much more.

But until that day ( I hope it will come!! ) nothing like that above... instead, check out the new release candidate and especially the playback order with it's random functions. That might be something which might fulfill your random needs, even odd steps, 3rds, 4ths, 5ths and some more. At least something for now...
PLEASE use the search function if something have been asked or discussed before.
Every (unnessesary) forum support means less time to develop! But of course, i am here to help!  Smile
Reply
#3
(03-31-2022, 10:42 AM)XORadmin Wrote: I got something else in mind for one day when I am bored which definitely will tick all your boxes and much more.

But until that day ( I hope it will come!! ) nothing like that above... instead, check out the new release candidate and especially the playback order with it's random functions. That might be something which might fulfill your random needs, even odd steps, 3rds, 4ths, 5ths and some more. At least something for now...

  Well then, I am very excited for mini-assembly nerdseq!

(03-31-2022, 10:42 AM)XORadmin Wrote: I got something else in mind for one day when I am bored which definitely will tick all your boxes and much more.

But until that day ( I hope it will come!! ) nothing like that above... instead, check out the new release candidate and especially the playback order with it's random functions. That might be something which might fulfill your random needs, even odd steps, 3rds, 4ths, 5ths and some more. At least something for now...

By the way, I know it's not set in stone but could you expand on your ideas when it comes to variables/conditional jumps/programming inside of sequences?  That's a very very cool feature to me Smile
Reply
#4
(03-31-2022, 10:36 AM)a_table_saw Wrote: I've been playing around with SPFX 00C for a while.  I've found various uses for it- stochastic random melodies with different probabilities per note, or a random chance of jumping into several longer sequences.  What I'd really like to do, though, is have several 4-, 8-, or 16-step subsequences that I can randomly jump to the beginning of every time.

It'd be cool if there were an FX that functions like a 'label' would in C or some assembly languages that we could randomly jump to, then I could play random subsequences but it would always be in sync with other patterns.  Specifically, with no labels, a random jump may go to any step, but with any labels, there would be an equal probability of jumping to any of the labels.

I think you could achieve something close to the above by using the Markov chain pattern as described under Tips & Tricks.
Or I misunderstood what you are after...

Kind regards,
Michael
Reply
#5
(03-31-2022, 12:34 PM)mgd Wrote:
(03-31-2022, 10:36 AM)a_table_saw Wrote: I've been playing around with SPFX 00C for a while.  I've found various uses for it- stochastic random melodies with different probabilities per note, or a random chance of jumping into several longer sequences.  What I'd really like to do, though, is have several 4-, 8-, or 16-step subsequences that I can randomly jump to the beginning of every time.

It'd be cool if there were an FX that functions like a 'label' would in C or some assembly languages that we could randomly jump to, then I could play random subsequences but it would always be in sync with other patterns.  Specifically, with no labels, a random jump may go to any step, but with any labels, there would be an equal probability of jumping to any of the labels.

I think you could achieve something close to the above by using the Markov chain pattern as described under Tips & Tricks.
Or I misunderstood what you are after...

Kind regards,
Michael

For a while, I misunderstood the STSP fx as being an immediate jump to the next pattern and having them on different steps would mean there might be rhythmic issues. But now I realize that it only takes effect on the last step in the sequence.  So yes, this actually is basically what I need.  Thanks.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)