DCC831 Generative AI for Music · UFMG 2026/2 · Assignment 1

A genetic algorithm that arranges songs for the NES sound chip

Every song has three renderings: the original input, the generated arrangement with General MIDI timbres, and the same arrangement on our NES chip synthesizer. The video plays the chip version and draws each channel as a glowing line.

For an ABC tune, the original is the lead sheet played plainly. For a MIDI song, it is the fan-made MIDI file itself, rendered with the same soundfont and cut to the same bars.

P1 pulse · melody P2 pulse · harmony TR triangle · bass NO noise · drums

Reading the settings of each song

seed
Starts the random generator. The same seed and settings always give the same piece; another seed gives another arrangement of the same song.
fidelity weight
How much the fitness rewards keeping the melody in its written octave (default 0.5). At 0 the GA is free to move melody bars up or down an octave.
generations, stagnation
The GA stops after a maximum number of generations, or earlier when the best plan has not improved for a window of generations (default 3000 and 300; 4000 and 400 for the longer MIDI songs).
melody, bars, parts
For a MIDI song: the track read as the melody, the excerpt that is arranged, and the part labels; a chorus part gets a denser accompaniment through the contrast criterion.

Orange settings differ from the default configuration. The full list of hyperparameters is in the README.