So more testing more head scratching, and more debugging code, and then Kontakt started to crash – badly, often and spectacularly (like dump logs of HEX stuff – for those of you doing dev with Kontakt). This is bad, very bad – perhaps it was a bug in Kontakt 5.5? However persistence, and adding a metric ton of debugging code, paid off as eventually I began to see Orbiter fail to count correctly. Yeah the stuff we all do 1,2,3,4,5,6…. Orbiter was doing stuff like this; 1,2,3,4,6,7,8…. Hey! Where did “5” go?
Now as it was counting 24 times every beat, missing an occasional number that I had incremented would show up as not a delay in timing but a speed up in timing(which is what I was seeing/hearing), and it meant it was something in my code, not in Kontakt (actually a relief). I spent a whole day chasing this down, and yes “User Error”. But (in the spirit of true honesty here), once I’d found the symptom I was having difficulty finding the problem, in the end I cast about a bit and changed a few initialisation values and checks and it started to work rock-solid again.
To be honest this sort of fix is horrible for your confidence as a coder, all your really good debugging and analysis code tells you its working properly, in fact I over-loaded Orbiter turning on all 4 loops, setting a sub-loop playback of 4 slices and then turning on ALL the repeats on ALL slices. A cacophony of noise(though sort of usable actually) but the code was rock-solid on timing; well as rock solid as it ever could be(within 1-4ms). BUT…..
You really are not 100% sure how you fixed it, you sort of are, but it nags at you…..and I’m sure this will nag me : forever. And of course I hadn’t fixed it, well I had but I’d broken something else on the way, so I had to back track a few versions(days) to get to something that I could rely upon. So yeah broken, bug-fix, test, re-fix, more tests yada yada. I’m still doing it, what is really clear is at this point I badly need a break – the fun has gone completely out of this.
Still all this testing, actually playing the instrument, gave me lots of insights into how it might get used as a playable “thing”. I noticed I was spending an amount of time setting a whole lot of pad effect parameters to the same value. So what might be nice would be to have a user-friendly MACRO tab where I could have a number (6) of pots and that for each of these pots I could assign one or two different pad effect parameters, repeat count, envelope attack, Send 1 amount, whatever, and I could “play with” these as the loops were running: Done, and for example running a loop whilst moving a macro that changes all the envelope Attack and Decay settings gives yet another really really cool effect.
Screen shot attached where you can see the first macro pot is changing the envelope attack(“Env:A”) and the envelope decay(“Env:D”). The second macro is changing the likelihood of any reverse happening where a pad is set to do reverses, macro three is affecting the number of repeats for pads that are doing repeats, etc. etc.