mingus.containers.bar¶
-
class
mingus.containers.bar.
Bar
[source]¶ -
-
__setitem__
(self, index, value)[source]¶ Enable the use of [] = notation on Bars.
The value should be a NoteContainer, or a string/list/Note understood by the NoteContainer.
-
bar
¶ Attribute of type: list
[]
-
change_note_duration
(self, at, to)[source]¶ Change the note duration at the given index to the given duration.
-
current_beat
¶ Attribute of type: float
0.0
-
determine_chords
(self, shorthand=False)[source]¶ Return a list of lists [place_in_beat, possible_chords].
-
determine_progression
(self, shorthand=False)[source]¶ Return a list of lists [place_in_beat, possible_progressions].
-
is_full
(self)[source]¶ Return False if there is room in this Bar for another NoteContainer, True otherwise.
-
key
¶ Attribute of type: str
'C'
-
length
¶ Attribute of type: float
0.0
-
meter
¶ Attribute of type: tuple
(4, 4)
-
place_notes
(self, notes, duration)[source]¶ Place the notes on the current_beat.
Notes can be strings, Notes, list of strings, list of Notes or a NoteContainer.
Raise a MeterFormatError if the duration is not valid.
Return True if succesful, False otherwise (ie. the Bar hasn’t got enough room for a note of that duration).
-
place_rest
(self, duration)[source]¶ Place a rest of given duration on the current_beat.
The same as place_notes(None, duration).
-
set_meter
(self, meter)[source]¶ Set the meter of this bar.
Meters in mingus are represented by a single tuple.
If the format of the meter is not recognised, a MeterFormatError will be raised.
-