Abjad API¶
Functions
Read these module-level examples. |
Functions
Annotates |
|
Attaches |
|
Detaches indicators-equal-to- |
Internals
Wrapper. |
Functions
Lists all public classes defined in |
|
Lists all public functions defined in |
|
Yields all modules encountered in |
System configuration
Configuration. |
Classes
An abstract context manager class. |
Context managers
Filesystem state context manager. |
|
A context manager for forbidding score updates. |
|
A context manager that does nothing. |
|
A context manager for printing progress indications. |
|
A context manager for capturing stdout and stderr output. |
|
A temporary directory context manager. |
|
A context manager for temporarily changing the current working directory. |
|
A timing context manager. |
Classes
LilyPond format contributions. |
Enumerations
Contribution sites. |
|
Contribution types. |
Classes
Cyclic tuple. |
Classes
Duration. |
|
Offset. |
Functions
Divides |
|
Changes |
|
Changes |
|
Spells |
Classes
Dynamic. |
Functions
Yields outer product of sequences in |
|
Yields combinations of sequence items. |
|
Yields pairs sequence items. |
|
Yields partitions of sequence. |
|
Yields permutations of sequence. |
|
Yields set partitions of sequence. |
|
Yields subsequences of |
Enumerations.
Enumerations
Enumeration of amount comparisons. |
|
Enumeration of horizontal alignments. |
|
Enumeration of vertical alignments. |
Custom exceptions.
Exceptions
Duration can not be assigned to note, rest or chord. |
|
MetronomeMark is imprecise. |
|
Can not parse input. |
|
No context found. |
|
No metronome mark found. |
|
A parentage error. |
|
Persistent indicator already attached at same context. |
|
SchemeParser has finished parsing. |
|
Time interval has no bounds. |
|
Score not well formed. |
Classes
A hidden doctest directive. |
|
A shell directive. |
|
A thumbnail directive. |
|
Functions
Functions
Formats |
|
Removes site comments from |
Classes
Lineage of a component. |
Functions
Gets after grace containers attached to component. |
|
Gets annotation. |
|
Gets annotation wrappers. |
|
Is true when |
|
Gets before-grace container attached to leaf. |
|
Gets contents. |
|
Gets descendants. |
|
Gets duration. |
|
Gets effective indicator. |
|
Gets effective staff. |
|
Gets effective wrapper. |
|
Is true when |
|
Is true when |
|
Is true when |
|
Gets indicator. |
|
Get indicators. |
|
Gets leaf |
|
Gets lineage. |
|
Gets logical tie. |
|
Gets markup. |
|
Gets measure number. |
|
Gets parentage. |
|
Gets pitches. |
|
Gets sounding pitch of note. |
|
Gets sounding pitches. |
|
Is true when |
|
Gets timespan. |
|
Gets wrapper. |
|
Gets wrappers. |
Functions
LilyPond workaround. |
|
Wraps |
|
Changes |
|
Illustrates |
|
Gets LilyPond format of |
|
Makes piano score from |
Indicators.
Classes
Arpeggio. |
|
Articulation. |
|
Bar line. |
|
LilyPond |
|
Fall or doit. |
|
Breath mark. |
|
Clef. |
|
Color fingering. |
|
Fermata. |
|
LilyPond |
|
LilyPond |
|
Key cluster. |
|
Key signature. |
|
Laissez vibrer. |
|
LilyPond literal. |
|
LilyPond markup. |
|
MetronomeMark. |
|
Mode. |
|
LilyPond |
|
Rehearsal mark. |
|
Repeat. |
|
LilyPond |
|
LilyPond |
|
Staff change. |
|
LilyPond |
|
LilyPond |
|
Hairpin indicator. |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
Stem tremolo. |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
LilyPond |
|
Time signature. |
|
LilyPond |
Instruments.
Classes
Instrument. |
|
String number. |
|
Tuning. |
|
Classes
Abjad grapher. |
|
Illustrator. |
|
LilyPond IO. |
|
Player. |
Functions
Compares file |
|
Counts function calls required to execute |
|
Executes file |
|
Executes |
|
Finds executable |
|
Graphs |
|
Makes Popen instance. |
|
Opens |
|
Opens LilyPond log file in operating system-specific text editor. |
|
Profiles |
|
Runs command in subprocess. |
|
Runs LilyPond on |
|
Shows |
|
Spawns subprocess and runs |
Functions
Iterates components in |
|
Iterates leaves in |
|
Iterates logical ties in |
|
Iterates pitches in |
|
Iterates leaves in |
Functions
Iterates out-of-range notes and chords in |
|
Respells pitches in |
|
Respells pitches in |
|
Returns true when all pitches in |
|
Transpose notes and chords in |
|
Transposes notes and chords in |
Classes
Color map. |
Functions
Colors leaves in |
|
Colors contents of |
|
Colors leaves in |
|
Colors note note-heads. |
|
Removes markup from leaves in |
|
Labels vertical moments. |
|
Labels logical ties in |
|
Labels logical ties in |
|
Labels consecutive notes in |
|
Labels logical ties in |
|
Labels selections |
|
Labels logical ties in |
Classes
LilyPond file block. |
|
LilyPond file. |
Classes
LilyPond context. |
|
LilyPond engraver. |
|
LilyPond grob. |
|
LilyPond grob interface. |
Functions
Makes leaves from |
|
Makes notes from |
|
Makes tuplet from |
|
Makes tuplet from |
|
Makes tuplet from nonreduced |
Abjad’s math library.
Classes
Infinity. |
|
Negative infinity. |
Functions
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Gets arithmetic mean of |
|
Gets binomial coefficient of |
|
Gets cumulative products of |
|
Gets cumulative sums of |
|
Gets difference series of |
|
Divides integer |
|
Gets positive divisors of |
|
Gets prime factors less than or equal to |
|
Changes |
|
Calculates greatest common divisor of |
|
Gets greatest integer power of two less than or equal to positive |
|
Changes integer-equivalent |
|
Changes nonnegative integer |
|
Changes positive integer |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Gets least common multiple of positive |
|
Partitions positive integer-equivalent |
|
Partitions integer |
|
Gets sign of |
|
Gets weight of |
|
Yields all compositions of positive integer |
Tools for modeling musical meter.
Classes
Meter models a common practice understanding of beats and other levels of rhythmic organization structured as a tree. |
|
Metric accent kernel. |
Functions
Illustrates meters. |
Classes
Metric modulation. |
Functions
Copies argument. |
|
Ejects |
|
Extracts |
|
Fuses |
|
Changes logical tie to tuplet. |
|
Replaces |
|
Scales |
|
Splits |
|
Swaps |
|
Transposes notes and chords in |
|
Wraps |
Containers
On-beat grace container. |
Functions
Makes on-beat grace container (with |
Classes
Base class from which grob, setting and tweak interfaces inherit. |
|
LilyPond grob override. |
|
LilyPond context setting. |
|
Override interface. |
|
LilyPond setting interface. |
Functions
Makes LilyPond grob override interface. |
|
Makes LilyPond setting name interface. |
Classes
Parentage of a component. |
Functions
Parses LilyPond |
Classes
Abstract base class for Abjad parsers. |
Classes
Abjad model of the LilyPond AST context-specced music node. |
|
Emulates LilyPond music functions. |
|
Model of a duration in LilyPond. |
|
Model of an arbitrary event in LilyPond. |
|
Model of a fraction in LilyPond. |
|
Generates a syntax skeleton from LilyPond grammar files. |
|
The lexical definition of LilyPond's syntax. |
|
A LilyPond syntax parser. |
|
The syntactical definition of LilyPond's syntax. |
|
LilyPond markup command. |
|
Abjad model of the LilyPond AST music node. |
|
Abjad model of the LilyPond AST sequential music node. |
|
Abjad model of the LilyPond AST simultaneous music node. |
|
A node in an abstract syntax tree (AST). |
Classes
Parses the "reduced-ly" syntax, a modified subset of LilyPond syntax. |
Functions
Parse the reduced LilyPond rhythmic syntax: |
Classes
Abjad model of Scheme code. |
|
|
Classes
Pattern. |
|
Pattern tuple. |
Classes
Numbered pitch-class segment. |
|
Numbered pitch-class set. |
|
Pitch range. |
|
Named pitch segment. |
|
Numbered pitch set. |
|
Twelve-tone row. |
Functions
Makes interval-class vector. |
|
Voices named |
|
Voices named |
Functions
Persists |
|
Persists |
|
Persists |
|
Persists |
Classes
Accidental. |
|
Abstract interval. |
|
Abstract interval-class. |
|
Named interval. |
|
Named interval-class. |
|
Named inversion-equivalent interval-class. |
|
Named pitch. |
|
Named pitch-class. |
|
Numbered interval. |
|
Numbered interval-class. |
|
Numbered inversion-equivalent interval-class. |
|
Numbered pitch. |
|
Numbered pitch-class. |
|
Octave. |
|
Abstract pitch. |
|
Abstract pitch-class. |
|
Staff position. |
Tools for modeling IRCAM-style rhythm trees.
Classes
Rhythm-tree container. |
|
Rhythm-tree leaf. |
|
Abstract rhythm-tree node. |
|
Rhythm-tree parser. |
Functions
Creates rhythm tree from RTM |
Classes
Component baseclass. |
|
Leaf baseclass. |
Containers
After grace container. |
|
Grace container. |
|
Cluster. |
|
Container. |
|
Tremolo container. |
|
Tuplet. |
Contexts
LilyPond context. |
|
Score. |
|
Staff. |
|
Staff group. |
|
Voice. |
Leaves
Chord. |
|
Multimeasure rest. |
|
Note. |
|
Rest. |
|
LilyPond skip. |
Note-heads
Drum note-head. |
|
Note-head. |
|
Note-head list. |
Classes
Logical tie of a component. |
Functions
Selects chord |
|
Selects chords in |
|
Selects components. |
|
Excludes items at |
|
Filters |
|
Flattens |
|
Gets items in |
|
Groups |
|
Groups items in |
|
Groups items in |
|
Groups items in |
|
Groups items in |
|
Groups items in |
|
Groups items in |
|
Selects leaf |
|
Selects leaves in |
|
Selects logical tie |
|
Selects logical ties in |
|
Selects nontrivial items in |
|
Selects note |
|
Selects notes in |
|
Partitions items in |
|
Partitions items in |
|
Partitions items in |
|
Selects rest |
|
Selects rests in |
|
Selects run |
|
Selects runs in |
|
Selects top components in |
|
Selects tuplet |
|
Selects tuplets in |
|
Extends |
|
Extends |
Functions
Filters |
|
Flattens |
|
Groups |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Is true when |
|
Join subsequences in |
|
Iterates |
|
Partitions |
|
Partitions |
|
Partitions |
|
Partitions |
|
Permutes |
|
Removes |
|
Removes repeats from |
|
Repeats |
|
Repeats |
|
Repeats |
|
Replaces every |
|
Replaces items at |
|
Retains |
|
Reverses |
|
Rotates |
|
Splits |
|
Sums consecutive |
|
Truncates |
|
Gets weight of |
|
Zips |
Classes
Set-class. |
Classes and functions for modeling spanners: beams, hairpins, slurs, etc.
Functions
Attaches beam indicators. |
|
Attaches glissando indicators. |
|
Attaches hairpin indicators. |
|
Attaches group indicators. |
|
Attaches ottava indicators. |
|
Attaches phrasing slur indicators. |
|
Attaches piano pedal indicators. |
|
Attaches slur indicators. |
|
Attaches text span indicators. |
|
Attaches tie indicators. |
|
Attaches trill spanner indicators. |
Functions
Capitalizes start of string. |
|
Delimits words in string. |
|
Changes string from Roman numeral to digits. |
|
Is true when string starts with a letter and either 1. |
|
Is true when string is Roman numeral. |
|
Is true when string and is shoutcase. |
|
Normalizes string. |
|
Pluralizes English string. |
|
Sorts strings containing Roman numerals. |
|
Strips roman numerals from right of string. |
|
Changes string to shout case. |
|
Changes |
|
Changes |
|
Changes string to upper camel case. |
Classes
Tag. |
Functions
Activates |
|
Deactivates |
|
Double tags |
|
Left shifts tags in |
|
Removes all tags from |
Tools for modeling and manipulating timespans.
Classes
Offset counter. |
Timespans
Timespan. |
|
Timespan list. |
Classes
Bundled indicator. |
|
Tweak. |
Functions
Bundles |
|
Appends |
Classes
Vertical moment. |
Functions
Iterates leaf pairs. |
|
Iterates pitch pairs. |
|
Iterates vertical moments. |
Functions
Checks beamed lone notes. |
|
Checks beamed long notes. |
|
Checks duplicate IDs. |
|
Checks empty containers. |
|
Checks missing parents. |
|
Checks notes and chords on wrong clef. |
|
Checks out-of-range notes. |
|
Checks overlapping beams. |
|
Checks overlapping text spanners. |
|
Checks unmatched stop text spans. |
|
Checks unterminated hairpins. |
|
Checks unterminated text spanners. |
|
Tabulates wellformedness. |
|
Is true when |
Extension for quantizing rhythm, based on Paul Nauert’s Q-Grid technique.
abjadext.nauert.attackpointoptimizers
Abstract Classes
Abstract attack-point optimizer. |
Classes
Measurewise attack-point optimizer. |
|
Naive attack-point optimizer. |
|
Null attack-point optimizer. |
Abstract Classes
Abstract grace-handler. |
Classes
Collapsing grace-handler. |
|
Concatenating grace-handler. |
|
Discarding grace-handler. |
Abstract Classes
Abstract heuristic. |
Classes
Distance heuristic. |
Abstract Classes
Abstact job-handler. |
Classes
Parallel job-handler. |
|
Parallel job-handler worker. |
|
Serial job-handler. |
Classes
Q-event proxy. |
Abstract Classes
Abstract Q-event. |
Classes
Pitched q-event. |
|
Silent q-event. |
|
Terminal q-event. |
abjadext.nauert.qeventsequence
Classes
Q-event sequence. |
Classes
Q-grid. |
|
Q-grid container. |
|
Q-grid leaf. |
Abstract Classes
Abstract q-schema item. |
Classes
Beatwise q-schema item. |
|
Measurewise q-schema item. |
Abstract Classes
Abstract Q-schema. |
Classes
Beatwise q-schema. |
|
Measurewise q-schema. |
Abstract Classes
Abstract class for QTargetBeat and QTargetMeasure. |
Classes
Q-target beat. |
|
Q-target measure. |
Abstract Classes
Abstract q-target. |
Classes
Beatwise q-target. |
|
Measurewise quantization target. |
abjadext.nauert.quantizationjob
Classes
Quantization job. |
Functions
Quantizer function. |
Abstract Classes
Abstract search tree. |
Classes
Unweighted search tree based on Paul Nauert's model. |
|
Weighted search tree. |
Rhythm-makers.
The rmakers classes.
Specifiers
Incise specifier. |
|
Interpolation specifier. |
|
Duration spelling specifier. |
|
Talea specifier. |
The rmakers functions.
Functions
Makes (and attaches) after-grace containers. |
|
|
|
Beams runs of notes in each component in |
|
Beams groups in |
|
Makes (and attaches) before-grace containers. |
|
Sets tuplet ratio denominator of tuplets in |
|
Applies duration bracket to tuplets in |
|
Makes example LilyPond file. |
|
Extracts rest-filled tuplets from |
|
Extracts trivial tuplets from |
|
Feather-beams leaves in |
|
Spells tuplets in |
|
Spells tuplets in |
|
Sets |
|
Replaces leaves in |
|
Replaces ties in |
|
Replaces leaves in |
|
Hides skip-filled tuplets in |
|
Hides trivial tuplets in |
|
Makes interpolation. |
|
Makes |
|
Selects nongrace leaves in each tuplet. |
|
Makes on-beat grace containers. |
|
Reduces multipliers of tuplets in |
|
Attaches repeat-ties to leaves in |
|
Rewrites dots of tuplets in |
|
Rewrites meter of components in |
|
Rewrites rest-filled tuplets in |
|
Rewrites sustained tuplets in |
|
Splits measures in |
|
Swaps length-1 tuplets in |
|
Swaps skip-filled tuplets in |
|
Swaps trivial tuplets in |
|
Attaches ties to notes in |
|
Makes time signatures from |
|
Replaces notes in |
|
Trivializes tuplets in |
|
Unbeams leaves in |
|
Unties leaves in |
|
Wraps |
|
Sets written duration of leaves in |
Makers.
Functions
Makes one accelerando (or ritardando) for each duration in |
|
Makes one even-division tuplet for each duration in |
|
Makes one incised tuplet for each duration in |
|
Makes one leaf with multiplier for each duration in |
|
Makes one note for every duration in |
|
Reads |
|
Makes one tuplet for each duration in |
Examples that show how to work with rmakers in a statal way.
Functions
Makes Sphinx read this module. |