I'll admit I don't understand enough about music or music programming to tweak with the examples myself, but it does look nice. Does it "compose" the music on the fly, or is it pre-determined by functions like generate_kick_beat and generate_chords?
Viewing post in Rusty Music jam comments
Basically you feed it some beats and chords that contain notes (the pitch) and the "strength" of the note.
Strength corresponds to the intensity, so "strong" notes are only played when intensity is high.
Then for every beat every different instrument has a little algorithm to decide what note to play for that particular "instrument" - a sample basically.
For the solo instrument, it also actually records a small number of "bars" to make the music feel less random.
Increasing the intensity can then mean that we play more beats on the drums or go up in pitch on the solo instruments.
It uses something like this:
Beat 0 1 2 3
And the every beat has a "sixteenth" that goes 0 1 2 3 as well, and this lets me control when to time beats and notes.
My next step is to make all this easier to set up, save or define in files etc.
It won't be a complete solution but for jams it could be useful for just generating some music in the background.