(self, s)
return self.encode_note_sequence(ns)
Transforms melody from a midi_file into a list of melody event indices.

    Args:
      s: Path to a MIDI file.

    Returns:
      ids: List of encoded melody event indices.
Transforms melody from a midi_file into a list of melody event indices.
Transforms melody from a midi_file into a list of melody event indices .
def encode(self, s):
    """Transforms melody from a midi_file into a list of melody event indices.

    Args:
      s: Path to a MIDI file.

    Returns:
      ids: List of encoded melody event indices.
    """
    ns = note_seq.midi_file_to_sequence_proto(s)
    return self.encode_note_sequence(ns)
def encode ( self , s ) : ns = note_seq . midi_file_to_sequence_proto ( s ) return self . encode_note_sequence ( ns )