class_docstr: Convert melody sequences to integer indices, abstract base class.
class_docstr_tok: ["Convert","melody","sequences","to","integer","indices",",","abstract","base","class","."]
docstr: Transform a space-delimited melody string into indices.
  
  Args:
    s: Space delimited string containing a melody sequence, e.g.
        '60 -2 60 -2 67 -2 67 -2 69 -2 69 -2 67 -2 -2 -1' for the first line
        of Twinkle Twinkle Little Star.
  
  Returns:
    ids: List of encoded melody event indices.
code: def encode(self, s):
      """Transform a space-delimited melody string into indices.
  
      Args:
        s: Space delimited string containing a melody sequence, e.g.
            '60 -2 60 -2 67 -2 67 -2 69 -2 69 -2 67 -2 -2 -1' for the first line
            of Twinkle Twinkle Little Star.
  
      Returns:
        ids: List of encoded melody event indices.
      """
      return self._encode_melody_events([int(a) for a in s.split()])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tempfile
  import note_seq
  from note_seq import performance_lib
  import pygtrie
  from tensor2tensor.data_generators import text_encoder
label_desc: Use image node_id 6 for calling the TextMelodyEncoderBase obj's underlying member method code with example usage: obj.encode(s) and returns: self