Patch Lock is completed, I got a bit sidetracked and added random patch button, I feature I love on one of my hardware synths. It made mostly garbage sounds so I've added some code to so that it mostly will make a nice sounding a patch but still has a lesser chance of going a bit more wild on the parameters, it's made a couple of real nice sounds for me, I had to take a photo of the displayed patch code for later use! I also added another feature from real synths, they generally have a pitch wheel or ribbon to the left of the keyboard, so I've added that in.
Here is the video, it's actually quite fun to mess around with.
Which leads to some bad news and some good news, as I get more and more complicated the code the arrays are not seeming to cope and trying to find workarounds to bugs that make no sense seems time not well spent. the newly added randomizer, which you would never want to press while the sequencer was running, would you? would you!? well it crashes the synth. Timer for the sequencer just seems to bug out the arrays when it's running. On the other hand the pitchbender would be a blast to use while the sequencer is playing, imagine how much fun that would be but nope, array once again no longer recognises itself if the timer is running and crashes if you touch the pitch bender.
I would normally not ever post or publish code that I know can crash, I could disable these features while the sequencer is running to prevent the crashing but I'm hoping this is just a temporary issue with the fuze software, or even something I've done wrong. So the bad news is, I'm going to leave it using a single voice with a single sequencer until the array bug is resolved. The good news is, it's almost finished, if I didn't spend so much time writing these giant posts I'd have finished it already.
I am going to add keyboard tracking (what Nisse5 called Ratios) that increases the modulation frequency inline with the frequency changes from pressing keys, this is a pretty standard thing on real synthesizers, might make it a toggle , we'll see.
and then I'll add the step recorder, clean up the code and make sure it has lots of commenting and share it with my friend code. Next post here will be the finished program.