Signals & Sorcery

Creating Procedural Music -prt.3: Order Of Operations

Steve Hiehn
3 min readFeb 12, 2017

This post and subsequent ones about feature extraction are the most critical to understanding my approach. It’s important to understand that I’m not synthesizing a final composition (audio file). I’m essentially automating an ~11 piece band which continuously outputs audio files. The system thinks in layers. Similar to most digital audio workstations (DAWs) a layer is a audio or MIDI track usually dedicated to a single purpose. For example in my system there is a layer dedicated to just generating a synth bass and another one dedicated to generating melodic lines etc. I’ve tried to make each layer as general purpose as possible. Over time i will surely add more specialized layers. As each layer is added the system extract features to be used for the machine learning. So in the case of my system the later the layer is added the more features and context the machine learning has to work with. The system uses those features and context to perform classification of options like music phrases or synth sounds etc. In later posts i will discuss in detail how and which features are extracted for each layer type.

I hopefully you are already seeing that this not a universal music algorithm. The system relies on heuristics and learns within a structure. A structure that does have an enormous, but finite number of possibilities. For example despite any efforts to train it to produce a waltz it will be in vain because it’s hard coded to generate a song in 4/4 time not ¾ which is the time signature of a waltz.

Another major variation to traditional music production is the order of assembly. When music is traditionally written it is usually composed in different orders. I think there are probably about 4 major approaches: Melody first (think classical), Chords First (often rock, folk, jazz), Rhythm first (funk, electronic dance) or any combination of the above. My system is a hybrid of chords and rhythm first followed by synchronous stacking the remaining layers

ORDER OF EVENTS

1) Create a chord progression

2) Select some loop options containing pitch (let’s call them harmonic loops) that are compatible with the selected chords

3) Find beat/percussion loops options that have been known to work with harmonic loops

4) Generate a midi bass line

5) Add another potential layer of harmonic loops

6) Select more potential beat/percussion loops

7) Generate a midi comp layer. A comp layer is a rhythmical layer with pitch or chords. Examples of comp layers are reggae skank guitar or a percussive organ in funk music.

8) Generate a potential arpeggio layer i.e. a rhythmical pattern using only notes from the current chosen chord pattern

9) Add a ‘fills’ layer i.e drum fills leading up to transitions

10) Add a ‘hits’ layer. Hits can be anything that happens on a downbeat at an infrequent interval. i.e a crash cymbal at the start of every 8 bars.

11) A counter point layer. This layer was an attempt at a melody but i can’t yet claim it writes convincing melodies. But it does compliment the arpeggio layer by having independent harmonies.

12) Finally a layer is dedicated to providing ambience. i.e record noise, wind sounds, synth textures

Please listen to the latest output from my system here:

http://signalsandsorcery.com/

Thanks!

Prt4: Feature Extraction

--

--