Experiment 1
This is the first experiment I undertook to start learning to work with Tone.js, with assistance from TonalJs as well.
It is a simple, random two-part melody with ostinato bass accopaniment. It picks a random musical root note, then randomly plays notes from the minor scale of that root using the first voice. Randomization is used to insert rests on the first voice. The first voice is also filtered (which is modulated by an LFO, whose rate is modulated by another LFO) and run through a dotted-quarter delay. The bass voice is played with a second synth, with some logic to start the sequence on the root, then play the root after every 16 notes played. Some reverb is also added to the mix.
Click the button to start a two-part generative piece of music.