For want of a better term, I’m working on a piece of code/composition that has grown to the point of complexity where it’s hard to manage all the variables interspersed within the code, leading to my desire to create a ¨non-graphical user interface¨, to make working with the code easier. By NGUI I mean an interface made from code that does not require knobs, sliders, buttons, or other forms of interaction derived from traditional synths and other forms of hardware. The desire to not create a GUI is not just laziness, I’m finding a charm to working in code, and seeing my thinking represented in it, and I don’t intend for this particular code to be used by others, so it only has to be intelligible to me.
My first question is: is this an existing field of thought? While I know there are ways for arranging code in general, in the specific field of ¨creative coding¨ and, more specifically, music composition and instrument design, does something exist?
The second question is: are there any working principles that people on this forum have developed in their own practice?
My plan currently is to create a section at the top of the code where I can turn all the important variables into global variables and use comments to arrange and clarify their use. I have some trepidation about this however, as by making lots of global variables that do not currently exist, I’m worried I might muddy the code that’s already there, and sacrifice the clarity of its workings for the clarity of interaction.
I’m curious to know how other people deal with this problem: keeping one’s code intelligible and interactive as a project grows in complexity. I have an uncle who is a very good journalist, and I remember him saying to me good writing is just clear thinking, my guess is the same applies to code.