Abjad 2.20
Abjad 2.20
Improvements (global)
- Greatly expanded Abjad global namespace:
['Accelerando', 'Annotation', 'Arpeggio', 'Arrow', 'Articulation', 'BarLine', 'Beam', 'BendAfter', 'BowContactPoint', 'BowContactSpanner', 'BowMotionTechnique', 'BowPressure', 'BreathMark', 'Chord', 'Clef', 'ClefSpanner', 'Cluster', 'ColorFingering', 'ComplexBeam', 'ComplexTrillSpanner', 'Component', 'Container', 'Context', 'Crescendo', 'CyclicTuple', 'Decrescendo', 'DuratedComplexBeam', 'Duration', 'Dynamic', 'Expression', 'Fermata', 'FixedDurationTuplet', 'Fraction', 'GeneralizedBeam', 'Glissando', 'GraceContainer', 'Hairpin', 'HiddenStaffSpanner', 'HorizontalBracketSpanner', 'Infinity', 'Inversion', 'KeyCluster', 'KeySignature', 'LaissezVibrer', 'Leaf', 'LilyPondCommand', 'LilyPondComment', 'LilyPondFile', 'LilyPondLiteral', 'LineSegment', 'Markup', 'MarkupList', 'Measure', 'MeasuredComplexBeam', 'Meter', 'MetricModulation', 'MultimeasureRest', 'MultipartBeam', 'Multiplication', 'Multiplier', 'NamedInterval', 'NamedIntervalClass', 'NamedPitch', 'NamedPitchClass', 'NonreducedFraction', 'NonreducedRatio', 'Note', 'NumberedInterval', 'NumberedIntervalClass', 'NumberedPitch', 'NumberedPitchClass', 'OctavationSpanner', 'Offset', 'PageBreak', 'Pattern', 'PhrasingSlur', 'PianoPedalSpanner', 'PitchClassSegment', 'PitchClassSet', 'PitchRange', 'PitchSegment', 'PitchSet', 'Ratio', 'Registration', 'RehearsalMark', 'Repeat', 'Rest', 'Retrograde', 'Ritardando', 'Rotation', 'Scheme', 'SchemeMoment', 'SchemePair', 'SchemeSymbol', 'SchemeVector', 'Score', 'Selection', 'Selector', 'Sequence', 'SetClass', 'Skip', 'Slur', 'Spanner', 'Staff', 'StaffChange', 'StaffGroup', 'StaffLinesSpanner', 'StemTremolo', 'StemTremoloSpanner', 'StringContactPoint', 'StringNumber', 'SystemBreak', 'Tempo', 'TempoSpanner', 'TextSpanner', 'Tie', 'TimeSignature', 'Timespan', 'Transposition', 'Tremolo', 'TrillSpanner', 'Tuning', 'Tuplet', 'TwelveToneRow', 'TypedOrderedDict', 'Voice', 'abctools', 'abjad_configuration', 'agenttools', 'attach', 'commandlinetools', 'datastructuretools', 'demos', 'detach', 'documentationtools', 'durationtools', 'exceptiontools', 'expressiontools', 'ext', 'f', 'graph', 'indicatortools', 'inspect_', 'instrumenttools', 'ipythontools', 'iterate', 'label', 'lilypondfiletools', 'lilypondnametools', 'lilypondparsertools', 'ly', 'markuptools', 'mathtools', 'metertools', 'mutate', 'new', 'override', 'parse', 'patterntools', 'persist', 'pitchtools', 'play', 'print_function', 'quantizationtools', 'rhythmmakertools', 'rhythmtreetools', 'schemetools', 'scoretools', 'select', 'select_all', 'select_every', 'select_first', 'select_last', 'selectiontools', 'selectortools', 'sequence', 'sequencetools', 'set_', 'show', 'silence', 'silence_all', 'silence_every', 'silence_except', 'silence_first', 'silence_last', 'spannertools', 'stringtools', 'sustain', 'sustain_all', 'sustain_every', 'sustain_first', 'sustain_last', 'systemtools', 'templatetools', 'timespantools', 'tonalanalysistools', 'topleveltools', 'tweak']
- Integrated
quicktions
library for optional C-accelerated calculations with
rational numbers. Install viapip install abjad[accelerated]
. - Taught
systemtools.ImportManager
about Cython.pyx
files. - Extended scripts:
- Added
ajv doctest
--abjad-only
option to suppress implicitfrom abjad import *
imports at the beginning of each doctest. - Taught
ajk script
to ignore EPS files and private_doc
directories. - Taught
ajk script
to ignore private_doc
directories.
- Added
Improvements (by package):
-
expressiontools
:- Collapsed
expressiontools.Callback
,expressiontools.LabelExpression
,
andexpressiontools.SequenceExpression
into
expressiontools.Expression
. - Added
expressiontools.Expression.__eq__()
. - Added
expressiontools.Signature
decorator.
- Collapsed
-
indicatortools
:- Added
indicatortools.LilyPondLiteral
. - Added
sfffz
to known dynamic names.
- Added
-
lilypondfiletools
:- Added
lilypondfiletools.LilyPondFile
anonymous context retrieval. - Added
lilypondfiletools.LilyPondFile
custom context retrieval.
- Added
-
markuptools
:- Added
markuptools.MarkupInventory.center_column()
. - Added
markuptools.MarkupInventory.combine()
. - Added
markuptools.MarkupInventory.concat()
. - Added
markuptools.MarkupInventory.__illustrate__()
. - Added
markuptools.MarkupInventory.__lt__()
.
- Added
-
mathtools
:- Added
Infinity.__float__()
.
- Added
-
patterntools
:- Added
patterntools.CompoundPattern.get_matching_items()
. - Added
patterntools.Pattern.get_matching_items()
.
- Added
-
pitchtools
:- Added
NumberedPitch.from_pitch_class_octave()
. - Added
Pitch.pitch_class
. - Added
Pitch.name
. - Added
Pitch.number
. - Added
PitchClassSet.__illustrate__()
. - Added
PitchClassSegment.permute(row=None)
. - Added
PitchClassSegment.to_pitch_classes()
. - Added
PitchClassSegment.to_pitches()
. - Added
PitchSegment.to_pitch_classes()
. - Added
PitchSegment.to_pitches()
. - Added
PitchSet.__illustrate__()
. - Added
SetClass
.
- Added
-
scoretools
:- Added
scoretools.make_leaves(skips_instead_of_rests=False)
keyword. - Taught
scoretools.Container
to initialize mixed selection / component
input.
- Added
-
selectortools
:- Added
Selector.group_by_pitch()
. - Added
Selector.by_leaf(head=None)
keyword. - Added
Selector.by_leaf(pitched=True)
keyword. - Added
Selector.by_leaf(prototype=None)
keyword. - Added
Selector.by_leaf(tail=None)
keyword. - Added
Selector.by_leaf(trim=None)
keyword. - Added
Selector.select()
.
- Added
-
sequencetools
:- Added
sequencetools.Enumeration
class:Enumeration.yield_combinations()
Enumeration.yield_outer_product()
Enumeration.yield_pairs()
Enumeration.yield_partitions()
Enumeration.yield_permutations()
Enumeration.yield_subsequences()
- Added
Sequence.reverse(recurse=False)
keyword. - Added
Sequence.sort()
method.
- Added
-
systemtools
:- Taught
systemtools.StorageFormatAgent
about keyword-only parameters.
- Taught
-
timespantools
:- Added
timespantools.Timespan.__illustrate__(scale=None)
keyword. - Added
timespantools.TimespanInventory.__invert__()
.
- Added
-
topleveltools
:- Added
topleveltools.tweak()
function.
- Added
Changes (global)
- Changed
_lilypond_format property
to_get_lilypond_format()
method. - Changed
args
toarguments
in most places in the codebase. - Changed
expr
toargument
in most places in the codebase. - Changed
kwargs
tokeywords
in most places in the codebase. - Changed
note head
tonote-head
globally. - Taught
LilyPondOutputProxy
to omit empty layout and paper blocks.
Changes (by package)
-
datastructuretools
:- Removed
datastructuretools.Matrix
. - Removed
datastructuretools.CyclicMatrix
. - Replaced
TypedTuple.__getslice__()
with__getitem__()
. - Rewired
CyclicTuple
to remove multiple inheritance.
- Removed
-
documentationtools
:- All
Graphviz*
classes have been moved into a newgraphtools
subpackage.
- All
-
durationtools
:- Removed
durationtools.Division
.
- Removed
-
indicatortools
:- Changed
ClefInventory
toClefList
. - Moved
ClefInventory
fromindicatortools
toinstrumenttools
. - Removed
IsAtSoundingPitch
. - Removed
IsUnpitched
. - Removed
SpacingIndication
.
- Changed
-
lilypondfiletools
:- Removed
lilypondfiletools.make_basic_lilypond_file()
.
Uselilypondfiletools.LilyPondFile.new()
instead.
- Removed
-
markuptools
:- Removed
Markup.make_*()
methods. - Changed
Markup.super_()
toMarkup.super()
. - Changed
Markup.line()
to static method. - Changed
MarkupInventory
toMarkupList
. - Changed the following methods to accept markup list:
Markup.center_column(markup_list)
Markup.column(markup_list)
Markup.concat(markup_list)
Markup.left_column(markup_list)
Markup.line(markup_list)
Markup.overlay(markup_list)
Markup.right_column(markup_list)
- Changed
Markup
interpreter representation- OLD:
Markup(contents=('Allegro assai',))
- NEW:
Markup(contents=['Allegro assai'])
- OLD:
- Changed Markup.combine() signature:
- OLD:
Markup.combine(markup_1, markup_2)
- NEW:
Markup.combine([markup_1, markup_2])
- OLD:
- Reimplemented all
markuptools
pytests as doctests.
- Removed
-
pitchtools
:- Removed
PitchArray*
classes. - Changed
Rotation.transpose
default fromTrue
toNone
. - Changed
has_duplicates
property to method:IntervalClassSegment.has_duplicates()
IntervalSegment.has_duplicates()
PitchClassSegment.has_duplicates()
PitchSegment.has_duplicates()
Segment.has_duplicates()
TwelveToneRow.has_duplicates()
- Renamed
Octave.octave_number
toOctave.number
. - Renamed
Octave.octave_tick_string
toOctave.tick_string
. - Renamed
Pitch.octave_number
toPitch.octave.number
. - Renamed
.index
to.n
:Multiplication.index
toMultiplication.n
Rotation.index
toRotation.n
Transposition.index
toTransposition.n
- Renamed
PitchOperation
toCompoundOperator
. - Renamed
Retrogression
toRetrograde
. - Named Stravinsky-style rotation explicitly:
PitchClassSegment.rotate(n=-1, transpose=True)
to
PitchClassSegment.rotate(n=-1, stravinsky=True)
TwelveToneRow.rotate(n=-1, transpose=True)
to
TwelveToneRow.rotate(n=-1, stravinsky=True)
- Removed
-
selectortools
:- Renamed
select_all_but_first_logical_tie_in_pitched_runs()
to
select_nonfirst_logical_tie_in_pitched_runs()
. - Renamed
select_all_but_last_logical_tie_in_pitched_runs()
to
select_nonlast_logical_tie_in_pitched_runs()
.
- Renamed
-
sequencetools
:- Changed all
sequencetools
functions toSequence
methods.- Renamed
Sequence.rotate(index=0)
toSequence.rotate(n=0)
. - Renamed
sequencetools.join_subsequences()
toSequence.join()
. - Renamed
sequencetools.permute_sequence()
toSequence.permute()
. - Renamed
sequencetools.split_sequence()
toSequence.split()
. - Renamed
sequencetools.flatten_sequence()
toSequence.flatten()
. - Renamed
sequencetools.reverse_sequence()
toSequence.reverse()
. - Renamed
sequencetools.rotate_sequence()
toSequence.rotate()
. - Renamed
sequencetools.repeat_sequence()
toSequence.repeat()
. - Renamed
sequencetools.repeat_sequence()
toSequence.repeat()
. - Renamed
sequencetools.partition_sequence_by_counts()
to
Sequence.partition_by_counts()
. - Renamed
sequencetools.zip_sequences()
toSequence.zip()
. - Renamed
sequencetools.truncate_sequence()
toSequence.truncate()
. - Renamed
sequence.partition_sequence_by_value_of_elements()
to
Sequence.group_by()
. - Renamed
sequencetools.partition_sequence_by_ratio_of_lengths()
to
Sequence.partition_by_ratio_of_lengths()
. - Renamed
sequencetools.partition_sequence_by_ratio_of_weights()
to
Sequence.partition_by_ratio_of_weights()
. - Renamed
sequencetools.partition_sequence_by_weights()
to
Sequence.partition_by_weights()
. - Renamed
sequencetools.iterate_sequence_nwise()
to
Sequence.nwise()
. - Renamed
sequencetools.sum_consecutive_elements_by_sign()
to
Sequence.sum_by_sign()
. - Renamed
sequencetools.repeat_sequence_to_length()
to
Sequence.repeat_to_length()
. - Renamed
sequencetools.repeat_sequence_to_weight()
to
Sequence.repeat_to_weight()
. - Renamed
sequencetools.remove_repeated_elements()
to
Sequence.remove_repeats()
. - Renamed
sequencetools.remove_elements()
toSequence.remove()
. - Renamed
sequencetools.replace_elements()
toSequence.replace()
. - Renamed
sequencetools.retain_elements()
toSequence.retain()
. - Renamed
sequencetools.Enumeration.yield_pairs()
to
Enumeration.yield_outer_product()
. - Renamed
Enumeration.yield_unordered_pairs()
to
Enumeration.yield_pairs()
.
- Renamed
- Removed the following sequencetools functions (because composer-specific
or too complex to belong in the public API):sequencetools.join_subsequences_by_sign_of_elements()
sequencetools.increase_elements()
sequencetools.interlace_sequences()
sequencetools.iterate_sequence_boustrophedon()
sequencetools.negate_elements()
sequencetools.overwrite_elements()
sequencetools.partition_sequence_by_sign_of_elements()
sequencetools.remove_subsequence_of_weight_at_index()
sequencetools.repeat_elements()
sequencetools.splice_between_elements()
- Changed all
-
spannertools
:- Renamed
Glissando.allow_repeated_pitches
toGlissando.allow_repeat_pitches
.
- Renamed
-
systemtools
:- Removed
Memoize
decorator. - Changed
_storage_format_specification
property to
_get_storage_format_specification()
method. - Changed
IOManager.profile_expr()
toIOManager.profile()
.
- Removed
Deprecated
Will be removed in Abjad 2.21:
Pitch.named_pitch
Pitch.named_pitch_class
Pitch.numbered_pitch
Pitch.numbered_pitch_class
Pitch.pitch_class_name
Pitch.pitch_class_number
Pitch.pitch_class_octave_label
Pitch.pitch_name
Pitch.pitch_number
Retrogression.period
Rotation.period
Bugfixes
- Fixed definition of
pitchtools.NumberedPitch.multiply()
. - Fixed edge-cases in
abjad.new(expression)
. - Taught
rhythmmakertools.BeamSpecifier
to respectbeam_rests
setting.