Add the code needed to start exercise 8, and generated MIDI

The generated MIDI files are random, thus modified at each run.

I noticed a peculiarity in the first sequence, were all notes seem
to be in the same octave, different from one run to the next, but
the same for all notes. This is possible but unlikely by picking
the octave at random from a range.
Print the sequence of notes generated by random1() for debugging

The output confirms what I heard: all notes are generated in the same
octave. I have identified the issue in random_notes(), which uses the
same name as the parameter for the variable which is assigned the random
octave selected. As a result, the octave is random but fixed for all notes:
all following notes pick from this single octave instead of the initial list.
Select a random octave for each note in random_notes()

The function used to select a random octave only once,
then use the same octave for all notes.
Remove debug log
Refactoring: add parameters for scale and file name in random*()
Complete exercise 8: generate random notes in major and minor scales

I selected C Major and two variants of A minor: harmonic minor and
ascending melodic minor or "jazz minor".
Remove unused variable in random3()