Skip to content

Commit

Permalink
Added abjad.makers.make_notes(), abjad.makers.make_leaves().
Browse files Browse the repository at this point in the history
Deprecated abjad.NoteMaker, abjad.LeafMaker.

Tag #1478.
  • Loading branch information
trevorbaca committed Sep 19, 2022
1 parent 818a9e1 commit 5d777a2
Show file tree
Hide file tree
Showing 25 changed files with 514 additions and 640 deletions.
3 changes: 1 addition & 2 deletions abjad/illustrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ def _illustrate_pitch_range(range_):

def _illustrate_pitch_segment(segment):
named_pitches = [_pitch.NamedPitch(x) for x in segment]
maker = _makers.NoteMaker()
notes = maker(named_pitches, [1])
notes = _makers.make_notes(named_pitches, [1])
score = make_piano_score(leaves=notes)
_overrides.override(score).TimeSignature.stencil = False
_overrides.override(score).BarLine.stencil = False
Expand Down
3 changes: 1 addition & 2 deletions abjad/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,7 @@ def from_pitches(class_, pitches) -> "Clef":
.. container:: example
>>> maker = abjad.NoteMaker()
>>> notes = maker(list(range(-12, -6)), [(1, 4)])
>>> notes = abjad.makers.make_notes(list(range(-12, -6)), [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> pitches = abjad.iterate.pitches(staff)
>>> abjad.Clef.from_pitches(pitches)
Expand Down
15 changes: 5 additions & 10 deletions abjad/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,8 @@ def with_intervals(argument, direction=_enums.UP, prototype=None) -> None:
Labels consecutive notes with interval names:
>>> maker = abjad.NoteMaker()
>>> pitch_numbers = [0, 25, 11, -4, -14, -13, 9, 10]
>>> notes = maker(pitch_numbers, [(1, 4)])
>>> notes = abjad.makers.make_notes(pitch_numbers, [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> abjad.label.with_intervals(staff, prototype=None)
>>> abjad.override(staff).TextScript.staff_padding = 4
Expand Down Expand Up @@ -1090,9 +1089,8 @@ def with_intervals(argument, direction=_enums.UP, prototype=None) -> None:
Labels consecutive notes with interval-class names:
>>> maker = abjad.NoteMaker()
>>> pitch_numbers = [0, 25, 11, -4, -14, -13, 9, 10]
>>> notes = maker(pitch_numbers, [(1, 4)])
>>> notes = abjad.makers.make_notes(pitch_numbers, [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> prototype = abjad.NamedIntervalClass
>>> abjad.label.with_intervals(staff, prototype=prototype)
Expand Down Expand Up @@ -1130,9 +1128,8 @@ def with_intervals(argument, direction=_enums.UP, prototype=None) -> None:
Labels consecutive notes with interval numbers:
>>> maker = abjad.NoteMaker()
>>> pitch_numbers = [0, 25, 11, -4, -14, -13, 9, 10]
>>> notes = maker(pitch_numbers, [(1, 4)])
>>> notes = abjad.makers.make_notes(pitch_numbers, [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> prototype = abjad.NumberedInterval
>>> abjad.label.with_intervals(staff, prototype=prototype)
Expand Down Expand Up @@ -1170,9 +1167,8 @@ def with_intervals(argument, direction=_enums.UP, prototype=None) -> None:
Labels consecutive notes with interval-class numbers:
>>> maker = abjad.NoteMaker()
>>> pitch_numbers = [0, 25, 11, -4, -14, -13, 9, 10]
>>> notes = maker(pitch_numbers, [(1, 4)])
>>> notes = abjad.makers.make_notes(pitch_numbers, [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> prototype = abjad.NumberedIntervalClass
>>> abjad.label.with_intervals(staff, prototype=prototype)
Expand Down Expand Up @@ -1210,9 +1206,8 @@ def with_intervals(argument, direction=_enums.UP, prototype=None) -> None:
Labels consecutive notes with inversion-equivalent interval-class numbers:
>>> maker = abjad.NoteMaker()
>>> pitch_numbers = [0, 25, 11, -4, -14, -13, 9, 10]
>>> notes = maker(pitch_numbers, [(1, 4)])
>>> notes = abjad.makers.make_notes(pitch_numbers, [(1, 4)])
>>> staff = abjad.Staff(notes)
>>> prototype = abjad.NumberedInversionEquivalentIntervalClass
>>> abjad.label.with_intervals(staff, prototype=prototype)
Expand Down
Loading

0 comments on commit 5d777a2

Please sign in to comment.