QSchema

abstract class quantizationtools.QSchema(*arguments, **keywords)

Abstract Q-schema.

>>> import abjad
>>> from abjad.tools import quantizationtools

QSchema allows for the specification of quantization settings diachronically, at any time-step of the quantization process.

In practice, this provides a means for the composer to change the tempo, search-tree, time-signature etc., effectively creating a template into which quantized rhythms can be “poured”, without yet knowing what those rhythms might be, or even how much time the ultimate result will take. Like Abjad indicators the settings made at any given time-step via a QSchema instance are understood to persist until changed.

All concrete QSchema subclasses strongly implement default values for all of their parameters.

QSchema is abstract.

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_quantizationtools { graph [label=quantizationtools]; "abjad.tools.quantizationtools.BeatwiseQSchema.BeatwiseQSchema" [color=3, group=2, label=BeatwiseQSchema, shape=box]; "abjad.tools.quantizationtools.MeasurewiseQSchema.MeasurewiseQSchema" [color=3, group=2, label=MeasurewiseQSchema, shape=box]; "abjad.tools.quantizationtools.QSchema.QSchema" [color=black, fontcolor=white, group=2, label=<<B>QSchema</B>>, shape=oval, style="filled, rounded"]; "abjad.tools.quantizationtools.QSchema.QSchema" -> "abjad.tools.quantizationtools.BeatwiseQSchema.BeatwiseQSchema"; "abjad.tools.quantizationtools.QSchema.QSchema" -> "abjad.tools.quantizationtools.MeasurewiseQSchema.MeasurewiseQSchema"; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.quantizationtools.QSchema.QSchema"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Bases

Attribute summary

item_class The schema’s item class.
items The item dictionary.
search_tree The default search tree.
target_class The schema’s target class.
target_item_class The schema’s target class’ item class.
tempo The default tempo.
__call__(duration) Calls QSchema on duration.
__eq__(argument) Is true when ID of argument equals ID of Abjad object.
__format__([format_specification]) Formats q-event.
__getitem__(argument) Gets item or slice identified by argument.
__hash__() Hashes Abjad object.
__ne__(argument) Is true when Abjad object does not equal argument.
__repr__() Gets interpreter representation of Abjad object.

Read-only properties

abstract QSchema.item_class

The schema’s item class.

QSchema.items

The item dictionary.

QSchema.search_tree

The default search tree.

abstract QSchema.target_class

The schema’s target class.

abstract QSchema.target_item_class

The schema’s target class’ item class.

QSchema.tempo

The default tempo.

Special methods

QSchema.__call__(duration)

Calls QSchema on duration.

(AbjadObject).__eq__(argument)

Is true when ID of argument equals ID of Abjad object. Otherwise false.

Returns true or false.

QSchema.__format__(format_specification='')

Formats q-event.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

QSchema.__getitem__(argument)

Gets item or slice identified by argument.

(AbjadObject).__hash__()

Hashes Abjad object.

Required to be explicitly redefined on Python 3 if __eq__ changes.

Returns integer.

(AbjadObject).__ne__(argument)

Is true when Abjad object does not equal argument. Otherwise false.

Returns true or false.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.