It documents the process of me smashing my head against the keyboard to build a game called LETSGO
Itās gotten long enough to break into several sections:
Music Systems: The Design of Sound
Music systems are culturally defined rules to organize sound. Those rules create complex systems, that when navigated intelligently, can bring a human to tears.
Examples include Arabic Maqamatās or Indian Shrutiās, or Western 12 Tone Even Temperament.
A few simple rules that establish the soundtrack of entire peoples.
The thing about these music systems is that the rules are constant- especially when musicianās bend those rules.
There are 12 notes in western music. Even when making microtonal music (in the western music system), those microtones are being thought of in terms of being ābetweenā the 12 notes.
These constants allow for sprawl into deep complexity.
Music systems are relatively simple rulesets with deep complexity.
Music is the cellular automaton of how sounds make humans feel.
Rules + Constraints = Design
In one essence, the rules are arbitrary. There are some mathematical correlations- which are exploited by musicians to give their music a specific effect.
But these rules exist because of the effect it has on the listener- not the mathematics.
Music systems develop culturally over time, successively building atop already established rules.
For my purposes, these arbitrary rules are awesome, because clear rules make for clear software design.
- Prefer simple rules that act mathematically
- Mathematical rules are more likely able to be internally consistent (less likely to directly violate each other as the edge cases scale)
- Internally consistent rules allow for the creation of complex systems.
You rarely create these rules in a vacuum. Those rules have to work around certain constraints- the tools you use, the time you have, etc.
The neat thing about constraints is they are actually the best thing for designing beautiful systems.
Knowing what you *canāt* do focuses what you can do.
The stronger your constraints, the clearer your design.
So, to build a music engine, I want clear rules and a well defined problem.
In researching this, I found a very interesting book on The Mathematics of Musical Set Theory.
Something Iām putting here as an inefficient bookmark:
The Problem to Solve
Why do I need a āmusic theory engineā?
Well I completed a Audio Trigger Experiment - a box that plays a musical note when you step on it.
I then made a Music Platform Spawner that will create one of these boxes with a random note.
The problem to solve is to replace āRandomā notes with something that sounds āgoodā.
How the hell are you supposed to tell the computer how to select notes that humans feel good about?
If only we had arbitrary rules to define good combinations of sounds!
There's limitations:
Soulless (but the game includes player input, ie. Soul)
Aaaaand which notes to play is only half the equation.
When to play those notes is just as complex a question to answer as what notes to play.
For now we focus on the What. When comes later.
The next chapter we start creating the rules of music into software: