Procedural Music Generator banner

Procedural Music Generator

1 devlogs
47h 50m 8s

Click button, make music (huge if true)
Using a seeded random number generator, the application applies a series of operations given a medley of parameters to create a novel musical sequence with some amount of musical progression.
This project was originally part of my MIT technical portfolio submission. It works but relies heavily on diatonic chords and isn’t as rhythmically verbose as I originally intended. But, if it works it works and I’ll probably expand upon it in the future.

Loading README...

Andrew Yang

// (this + some of my citations was what I submitted for the actual mit portfolio form)

Goal

Create novel musical sequences given a seeded random number generator and a set of configurable options.

Restraints

My original technical portfolio submission was going to be a sight-reading trainer. However, I realized too late in the process that it was not possible for me to make it feature-complete and thus dropped it. On receiving a deferral, I learned that I could submit a project for RD consideration, leaving me with 20 days to complete a substitute project while still busy with midterms and other applications.

Timeline

I began work on the project on December 17th, 2025, and completed it January 4th, 2026. It took me until 6:16 on January 5th to make the frontend Apple-device compatible after realizing that Safari could not properly resize SVG files. I spent a total of 47 hours and 41 minutes over 13 days.

Methodology

Generate a sequence of n notes whose pitch is determined by weighted RNG (prioritizing changes in pitch that more often occur in actual music)

For each measure, attempt to find a diatonic chord (the diatonic chords available to use are based off the melody’s scale) that includes all the pitches in the measure. If impossible, attempt to find a chord that includes all the first (n) - (# of failures) notes.

Take each chosen chord and based off the 2nd octave, apply a random voicing in the range of 0 to (# of notes) - (1) (inclusive)

Apply transformations to the melody and chord progression to fit them in their respective series of measures

Merge either series of measures

Present product to front-end

Attachment
Attachment
0