I have been working for some time on a polyphonic synthesizer, however I have been running into a lot of scalability issues due to some very spaghetti code and difficulty interfacing between my sketch and the audio library. A potential solution I have been considering is creating some custom objects for the audio library. I've made some rough diagrams of what I'm thinking of making, but i could do with some advice on the feasibility and difficulty of creating them. Any help is much appreciated.
https://imgur.com/a/SwYSYGc