(self, s)
return self.encode_note_sequence(ns)
Transform a MIDI filename into a list of performance event indices.

    Args:
      s: Path to the MIDI file.

    Returns:
      ids: List of performance event indices.
Transform a MIDI filename into a list of performance event indices.
Transform a MIDI filename into a list of performance event indices .
def encode(self, s):
    """Transform a MIDI filename into a list of performance event indices.

    Args:
      s: Path to the MIDI file.

    Returns:
      ids: List of performance event indices.
    """
    if s:
      ns = note_seq.midi_file_to_sequence_proto(s)
    else:
      ns = note_seq.NoteSequence()
    return self.encode_note_sequence(ns)
def encode ( self , s ) : if s : ns = note_seq . midi_file_to_sequence_proto ( s ) else : ns = note_seq . NoteSequence ( ) return self . encode_note_sequence ( ns )