'Loads default MIDI primer file.
Also assigns the steps per bar of this file to be the model\'s defaults.'

def load_primer(self):

    if (not os.path.exists(self.midi_primer)):
        tf.logging.warn('ERROR!    No    such    primer    file    exists!    %s', self.midi_primer)
        return
    self.primer_sequence = midi_io.midi_file_to_sequence_proto(self.midi_primer)
    quantized_seq = sequences_lib.quantize_note_sequence(self.primer_sequence, steps_per_quarter=4)
    (extracted_melodies, _) = melodies_lib.extract_melodies(quantized_seq, min_bars=0, min_unique_pitches=1)
    self.primer = extracted_melodies[0]
    self.steps_per_bar = self.primer.steps_per_bar
