original_docstring: Generates a four-part score from a sequence of chords.
  
      Soprano and alto parts are displayed on the top (treble) clef, while tenor
      and bass parts are displayed on the bottom (bass) clef, with correct stem
      directions.
      
docstring: Generates a four-part score from a sequence of chords.
  Soprano and alto parts are displayed on the top (treble) clef, while tenor
  and bass parts are displayed on the bottom (bass) clef, with correct stem
  directions.
docstring_tokens: Generates a four - part score from a sequence of chords . Soprano and alto parts are displayed on the top ( treble ) clef while tenor and bass parts are displayed on the bottom ( bass ) clef with correct stem directions .
code: def generateScore(chords, lengths=None, ts="4/4"):
      """Generates a four-part score from a sequence of chords.
  
      Soprano and alto parts are displayed on the top (treble) clef, while tenor
      and bass parts are displayed on the bottom (bass) clef, with correct stem
      directions.
      """
      if lengths is None:
          lengths = [1 for _ in chords]
      voices = [Voice([Piano()]) for _ in range(4)]
      for chord, length in zip(chords, lengths):
          bass, tenor, alto, soprano = [
              Note(p, quarterLength=length) for p in chord.pitches
          ]
          bass.addLyric(chord.lyric)
          bass.stemDirection = alto.stemDirection = "down"
          tenor.stemDirection = soprano.stemDirection = "up"
          voices[0].append(soprano)
          voices[1].append(alto)
          voices[2].append(tenor)
          voices[3].append(bass)
  
      female = Part([TrebleClef(), TimeSignature(ts), voices[0], voices[1]])
      male = Part([BassClef(), TimeSignature(ts), voices[2], voices[3]])
      score = Score([female, male])
      return score
code_tokens: def generateScore ( chords , lengths = None , ts = "4/4" ) : if lengths is None : lengths = [ 1 for _ in chords ] voices = [ Voice ( [ Piano ( ) ] ) for _ in range ( 4 ) ] for chord , length in zip ( chords , lengths ) : bass , tenor , alto , soprano = [ Note ( p , quarterLength = length ) for p in chord . pitches ] bass . addLyric ( chord . lyric ) bass . stemDirection = alto . stemDirection = "down" tenor . stemDirection = soprano . stemDirection = "up" voices [ 0 ] . append ( soprano ) voices [ 1 ] . append ( alto ) voices [ 2 ] . append ( tenor ) voices [ 3 ] . append ( bass ) female = Part ( [ TrebleClef ( ) , TimeSignature ( ts ) , voices [ 0 ] , voices [ 1 ] ] ) male = Part ( [ BassClef ( ) , TimeSignature ( ts ) , voices [ 2 ] , voices [ 3 ] ] ) score = Score ( [ female , male ] ) return score
short_docstring: Generates a four-part score from a sequence of chords.
short_docstring_tokens: Generates a four - part score from a sequence of chords .
comment: """Generates a four-part score from a sequence of chords.
  
      Soprano and alto parts are displayed on the top (treble) clef, while tenor
      and bass parts are displayed on the bottom (bass) clef, with correct stem
      directions.
      """