Previous topic

music21.documentation.library.documenters

Next topic

music21.documentation.library.writers

Table Of Contents

Table Of Contents

This Page

music21.documentation.library.iterators

ClassIterator

class music21.documentation.library.iterators.ClassIterator(verbose=True)

Iterates over music21’s packagesystem, yielding all classes discovered:

>>> iterator = documentation.ClassIterator(verbose=False)
>>> classes = sorted([x for x in iterator],
...     key=lambda x: (x.__module__, x.__name__))
>>> for cls in classes[:10]:
...     cls
...
<class 'music21.abcFormat.__init__.ABCAccent'>
<class 'music21.abcFormat.__init__.ABCBar'>
<class 'music21.abcFormat.__init__.ABCBrokenRhythmMarker'>
<class 'music21.abcFormat.__init__.ABCChord'>
<class 'music21.abcFormat.__init__.ABCCrescStart'>
<class 'music21.abcFormat.__init__.ABCDimStart'>
<class 'music21.abcFormat.__init__.ABCDownbow'>
<class 'music21.abcFormat.__init__.ABCFile'>
<class 'music21.abcFormat.__init__.ABCFileException'>
<class 'music21.abcFormat.__init__.ABCGraceStart'>

ClassIterator bases

ClassIterator read-only properties

Read-only properties inherited from Iterator:

CodebaseIterator

class music21.documentation.library.iterators.CodebaseIterator(verbose=True)

Iterate over music21’s packagesystem, yielding all classes and functions.

CodebaseIterator bases

CodebaseIterator read-only properties

Read-only properties inherited from Iterator:

FunctionIterator

class music21.documentation.library.iterators.FunctionIterator(verbose=True)

Iterates over music21’s packagesystem, yielding all functions discovered:

>>> from music21 import documentation
>>> iterator = documentation.FunctionIterator(verbose=False)
>>> functions = [x for x in iterator]
>>> for function in sorted(functions,
...     key=lambda x: (x.__module__, x.__name__))[:10]:
...     function.__module__, function.__name__
...
('music21.abcFormat.__init__', 'mergeLeadingMetaData')
('music21.abcFormat.translate', 'abcToStreamOpus')
('music21.abcFormat.translate', 'abcToStreamPart')
('music21.abcFormat.translate', 'abcToStreamScore')
('music21.abcFormat.translate', 'reBar')
('music21.analysis.discrete', 'analyzeStream')
('music21.analysis.metrical', 'labelBeatDepth')
('music21.analysis.metrical', 'thomassenMelodicAccent')
('music21.analysis.neoRiemannian', 'L')
('music21.analysis.neoRiemannian', 'LRP_combinations')

FunctionIterator bases

FunctionIterator read-only properties

Read-only properties inherited from Iterator:

IPythonNotebookIterator

class music21.documentation.library.iterators.IPythonNotebookIterator(verbose=True)

Iterates over music21’s documentation directory, yielding .ipynb files.

IPythonNotebookIterator bases

IPythonNotebookIterator read-only properties

Read-only properties inherited from Iterator:

Iterator

class music21.documentation.library.iterators.Iterator(verbose=True)

Abstract base class for documentation iterators.

Iterator read-only properties

Iterator.verbose

If true, print extra information.

ModuleIterator

class music21.documentation.library.iterators.ModuleIterator(verbose=True)

Iterates over music21’s packagesystem, yielding module objects:

>>> iterator = documentation.ModuleIterator(verbose=False)
>>> modules = [x for x in iterator]
>>> for module in sorted(modules, key=lambda x: x.__name__)[:8]:
...     module.__name__
...
'music21.__init__'
'music21.abcFormat.__init__'
'music21.abcFormat.translate'
'music21.analysis.__init__'
'music21.analysis.correlate'
'music21.analysis.discrete'
'music21.analysis.metrical'
'music21.analysis.neoRiemannian'

ModuleIterator bases

ModuleIterator read-only properties

Read-only properties inherited from Iterator: