NoteList class¶
-
class
NoteList(*args)¶ Base class that other note lists (e.g.
ChordorSequence) inherit from.Parameters: *args – An iterable or nested iterable up to
max_depthof eitherNoteobjects orints representing MIDI numbers. Can also take aNoteListas a constructor, mainly intended for use by child classes.Raises: - ValueError – If the
max_depthis exceeded but no valid objects are found. - TypeError – If a non-iterable is passed to the constructor.
-
max_depth¶
Default is 5. Class attribute for how deep the constructor searches for valid variables.
-
notes¶
This attribute is a property. Returns a sorted
tupleofNoteobjects. When setting this attribute, it expects an iterable ofNoteobjects, that it will then sort and store as a tuple.-
classmethod
from_ascii(note_string)¶
Parameters: note_string (str) – Space or comma-space separated ASCII notes Returns: NoteListor child class with theNotes.Return type: NoteList or child class -
classmethod
from_midi_list(midi_list)¶
Parameters: midi_list (list) – List of integers representing MIDI note codes. Returns: NoteListor child class with theNotes.Return type: NoteList or child class - ValueError – If the