I'm a newbie at reaktor (though I'm an experienced programmer). I'm trying to build a samchillian, and I'm most of the way there, but I'm stuck on what I hope is something simple.
In case you don't know what a samchillian is, it's a remapping of the keyboard, so that each key doesn't represent an absolute midi value, but instead an amount of change. So, e.g., C4 might move the note down a scale degree, B3 down by 2 scale degrees, E4 up a scale degree, F4 up 2 degrees, etc. Very fun, and an innovative way to improvise melodies in a particular key. If you want to see it in action, there are youtube videos.
But there's the rub. The amount of absolute midi notes to change varies on the scale you're using and your current position in that scale. So, if I'm going to move up 3 scale degrees, I need to figure out where I'm starting, and for each step figure out how many semitones that scale degree change is. Going from the third to the fourth in a major scale is one semitone, while fourth to fifth is two.
So I've built up scale maps using snap value arrays, and I wrote a macro to process one degree change at a time. I pass in the amount of change already accumulated (initializing it to 0 on the first call), then the macro returns the new amount, which I stick into a value object, which then feeds back into the next round of macro processing.
My problem is, how do I iterate calling the macro recursively, and then stop calling it when I'm out of steps to process? I can't quite figure out how to use the iterator object to skin this cat. The processing itself is quite complex, to accommodate multiple scales, and encapsulating it inside a macro is the only way to keep things manageable.
Can anyone help me?
Thanks!