Package jazzparser :: Package misc :: Package chordlabel :: Module realize :: Class ChordSequenceRealizer
[hide private]
[frames] | no frames]

Class ChordSequenceRealizer

source code

object --+
         |
        ChordSequenceRealizer

Factory to take the output from the labeler and realize the chord sequence as a midi file.

Very basic - not going to sound great, but it's easier than playing it myself.

Instance Methods [hide private]
 
__init__(self, labels, chord_vocab, resolution=120, chord_length=2, text_events=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
generate(self, overlay=None, offset=0)
Generates a midi stream.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, labels, chord_vocab, resolution=120, chord_length=2, text_events=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • labels (list of jazzparser.misc.chordlabel.data.ChordLabels) - chord labels output by the model
  • chord_vocab (dict) - mapping from the chord labels that may appear in labels to the notes of the chord
  • resolution (int) - midi resolution to give the result (midi ticks per beat)
  • chord_length (int) - length of each chord as a number of beats
  • text_events (bool) - include chord labels in the midi as text events
Overrides: object.__init__