musicscore.simpleformat

class musicscore.simpleformat.SimpleFormat(quarter_durations=None, midis=None, default_midi=71, *args, **kwargs)[source]

Bases: object

It is useful tool to generate list of chords and also do some simple algorithmic changes to it if needed.

add_chord(chord)[source]
change_chords(function)[source]

The given function will be applied to all chords.

extend(simple_format)[source]

Chords of another SimpleFormat will be added at the end of self.chords.

get_chord_at_position(position)[source]
get_midis()[source]
get_quarter_durations()[source]
get_quarter_positions()[source]
mirror(pivot=None)[source]

Chords will be changed to get a mirrored version of the original. Pivot is a midi value that will be used as mirror axis. If not set the first midi will be the axis.

multiply_quarter_durations(factor)[source]
retrograde()[source]
static sum(*simple_formats, no_duplicates=False)[source]
transpose(interval_midi)[source]
property chords
property default_midi

If only quarter_durations are provided the midi of chord will be set to default_midi. Default value is 71.

property midis
property quarter_duration