I built a MIDI song generator

01 Jan 2020

I built a simple midi song generator in javscript.

It is strongly based on popular western music.

8 notes repeating 12 times.

It includes 2 virtual ‘musicians’:

Starting with a run of 8 increasing notes, and then simply repeating it. No AI and no development of the initial 8 notes. The lack of development means the idea loops without evolving.

Additional percussion sounds

The song generator has some development of the initial 8 notes.

The development of the song uses random changes to the pitch of each note.

No AI, just random alterations to notes.

New drum sounds (GM toms - high and low) on the 1 & 4.

What next?

The sound is interesting but sounds random.

The notes are all one length with no pauses or breaks.

The notes do not follow a key signature.

Limiting the randomness

Limiting the randomness to 4 octaves of C major.

Includes rest notes to try and make it a bit more interesting.

Perlin noise

This song generator develops the idea with the use of Perlin noise. It makes the changes in pitch slightly less random sounding.

What next?

The sound still feels random.

How can I make it sound more like its going somewhere? Perhaps I need to introduce more structure using chord progressions.

Real synths triggered by MIDI rather than the GM sounds in the browser might sound better.

MIDI and real synths

Untrained data but now flowing through MIDI into real synths: XP80, Spark LE, Ableton Live 8. Nearly an end to end system!

What next? Automatically recording audio and MIDI and sending it to a data store. Pushing the audio to a radio stream.

System design

3 components:

Recording studio

Song generator code (Javascript). MIDI connections to ableton and synths. Audio recording controlled via the web browser.

Song library

Node web API, Mysql database. Stores the song and associated metadata. Generates playlists from the song metadata.

Radio station

Take the playlists and the songs and stream to icecast.

Nearly an end to end system

Progress.

Listen to how basic it is.

The last piece of the puzzle for an end to end system is buttons for listeners to feedback.



<< Back home