03-31-2022, 10:36 AM
(This post was last modified: 03-31-2022, 10:47 AM by a_table_saw.)
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.
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.

