Moved get random MIDI to helper function