Skip to content

Abjad 2.20

Compare
Choose a tag to compare
@josiah-wolf-oberholtzer josiah-wolf-oberholtzer released this 04 May 04:00

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 via pip install abjad[accelerated].
  • Taught systemtools.ImportManager about Cython .pyx files.
  • Extended scripts:
    • Added ajv doctest --abjad-only option to suppress implicit from 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.

Improvements (by package):

  • expressiontools:

    • Collapsed expressiontools.Callback, expressiontools.LabelExpression,
      and expressiontools.SequenceExpression into
      expressiontools.Expression.
    • Added expressiontools.Expression.__eq__().
    • Added expressiontools.Signature decorator.
  • indicatortools:

    • Added indicatortools.LilyPondLiteral.
    • Added sfffz to known dynamic names.
  • lilypondfiletools:

    • Added lilypondfiletools.LilyPondFile anonymous context retrieval.
    • Added lilypondfiletools.LilyPondFile custom context retrieval.
  • markuptools:

    • Added markuptools.MarkupInventory.center_column().
    • Added markuptools.MarkupInventory.combine().
    • Added markuptools.MarkupInventory.concat().
    • Added markuptools.MarkupInventory.__illustrate__().
    • Added markuptools.MarkupInventory.__lt__().
  • mathtools:

    • Added Infinity.__float__().
  • patterntools:

    • Added patterntools.CompoundPattern.get_matching_items().
    • Added patterntools.Pattern.get_matching_items().
  • 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.
  • scoretools:

    • Added scoretools.make_leaves(skips_instead_of_rests=False) keyword.
    • Taught scoretools.Container to initialize mixed selection / component
      input.
  • 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().
  • 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.
  • systemtools:

    • Taught systemtools.StorageFormatAgent about keyword-only parameters.
  • timespantools:

    • Added timespantools.Timespan.__illustrate__(scale=None) keyword.
    • Added timespantools.TimespanInventory.__invert__().
  • topleveltools:

    • Added topleveltools.tweak() function.

Changes (global)

  • Changed _lilypond_format property to _get_lilypond_format() method.
  • Changed args to arguments in most places in the codebase.
  • Changed expr to argument in most places in the codebase.
  • Changed kwargs to keywords in most places in the codebase.
  • Changed note head to note-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.
  • documentationtools:

    • All Graphviz* classes have been moved into a new graphtools
      subpackage.
  • durationtools:

    • Removed durationtools.Division.
  • indicatortools:

    • Changed ClefInventory to ClefList.
    • Moved ClefInventory from indicatortools to instrumenttools.
    • Removed IsAtSoundingPitch.
    • Removed IsUnpitched.
    • Removed SpacingIndication.
  • lilypondfiletools:

    • Removed lilypondfiletools.make_basic_lilypond_file().
      Use lilypondfiletools.LilyPondFile.new() instead.
  • markuptools:

    • Removed Markup.make_*() methods.
    • Changed Markup.super_() to Markup.super().
    • Changed Markup.line() to static method.
    • Changed MarkupInventory to MarkupList.
    • 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'])
    • Changed Markup.combine() signature:
      • OLD: Markup.combine(markup_1, markup_2)
      • NEW: Markup.combine([markup_1, markup_2])
    • Reimplemented all markuptools pytests as doctests.
  • pitchtools:

    • Removed PitchArray* classes.
    • Changed Rotation.transpose default from True to None.
    • 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 to Octave.number.
    • Renamed Octave.octave_tick_string to Octave.tick_string.
    • Renamed Pitch.octave_number to Pitch.octave.number.
    • Renamed .index to .n:
      • Multiplication.index to Multiplication.n
      • Rotation.index to Rotation.n
      • Transposition.index to Transposition.n
    • Renamed PitchOperation to CompoundOperator.
    • Renamed Retrogression to Retrograde.
    • 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)
  • 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().
  • sequencetools:

    • Changed all sequencetools functions to Sequence methods.
      • Renamed Sequence.rotate(index=0) to Sequence.rotate(n=0).
      • Renamed sequencetools.join_subsequences() to Sequence.join().
      • Renamed sequencetools.permute_sequence() to Sequence.permute().
      • Renamed sequencetools.split_sequence() to Sequence.split().
      • Renamed sequencetools.flatten_sequence() to Sequence.flatten().
      • Renamed sequencetools.reverse_sequence() to Sequence.reverse().
      • Renamed sequencetools.rotate_sequence() to Sequence.rotate().
      • Renamed sequencetools.repeat_sequence() to Sequence.repeat().
      • Renamed sequencetools.repeat_sequence() to Sequence.repeat().
      • Renamed sequencetools.partition_sequence_by_counts() to
        Sequence.partition_by_counts().
      • Renamed sequencetools.zip_sequences() to Sequence.zip().
      • Renamed sequencetools.truncate_sequence() to Sequence.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() to Sequence.remove().
      • Renamed sequencetools.replace_elements() to Sequence.replace().
      • Renamed sequencetools.retain_elements() to Sequence.retain().
      • Renamed sequencetools.Enumeration.yield_pairs() to
        Enumeration.yield_outer_product().
      • Renamed Enumeration.yield_unordered_pairs() to
        Enumeration.yield_pairs().
    • 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()
  • spannertools:

    • Renamed Glissando.allow_repeated_pitches to Glissando.allow_repeat_pitches.
  • systemtools:

    • Removed Memoize decorator.
    • Changed _storage_format_specification property to
      _get_storage_format_specification() method.
    • Changed IOManager.profile_expr() to IOManager.profile().

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 respect beam_rests setting.