Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace abjad.NoteMaker, abjad.LeafMaker with abjad.makers.make_notes(), -make_leaves() #1478

Closed
trevorbaca opened this issue Sep 19, 2022 · 0 comments · Fixed by #1500
Closed
Assignees
Labels
Milestone

Comments

@trevorbaca
Copy link
Member

trevorbaca commented Sep 19, 2022

The two classes will be replaced by functions:

OLD: abjad.NoteMaker
NEW: abjad.makers.make_notes()

OLD: abjad.LeafMaker
NEW: abjad.makers.make_leaves()

In Abjad 3.11, only the old classes exist:

pitches = [0, 2, 4]
durations = [(1, 8), (1, 16)]
maker = abjad.NoteMaker()
notes = maker(pitches, durations)

pitches = [0, 2, None]
durations = [(1, 8), (1, 16)]
maker = abjad.LeafMaker(skips_instead_of_rests=True)
leaves = maker(pitches, durations)

In Abjad 3.12, both the old classes and their replacement functions will be allowed:

DEPRECATED:

pitches = [0, 2, 4]
durations = [(1, 8), (1, 16)]
maker = abjad.NoteMaker()
notes = maker(pitches, durations)

pitches = [0, 2, None]
durations = [(1, 8), (1, 16)]
maker = abjad.LeafMaker(skips_instead_of_rests=True)
leaves = maker(pitches, durations)

RECOMMENDED:

notes = abjad.makers.make_notes(pitches, durations)

leaves = abjad.makers.make_leaves(pitches, durations, skips_instead_of_rests=True)

In Abjad 3.14, the old classes will be removed; only the new functions will be allowed:

notes = abjad.makers.make_notes(pitches, durations)

leaves = abjad.makers.make_leaves(pitches, durations, skips_instead_of_rests=True)

These class-to-function replacements parallel similar changes happening in the rhythm-makers in Abjad 3.12 and 3.13.

@trevorbaca trevorbaca added this to the 3.12 milestone Sep 19, 2022
@trevorbaca trevorbaca self-assigned this Sep 19, 2022
trevorbaca added a commit that referenced this issue Sep 19, 2022
Deprecated abjad.NoteMaker, abjad.LeafMaker.

Tag #1478.
trevorbaca added a commit that referenced this issue Sep 19, 2022
Deprecated abjad.NoteMaker, abjad.LeafMaker.

Tag #1478.
trevorbaca added a commit that referenced this issue Sep 19, 2022
Deprecated abjad.NoteMaker, abjad.LeafMaker.

Tag #1478.
trevorbaca added a commit that referenced this issue Sep 19, 2022
Deprecated abjad.NoteMaker, abjad.LeafMaker.

Tag #1478.
@trevorbaca trevorbaca modified the milestones: 3.12, 3.14 Oct 12, 2022
trevorbaca added a commit that referenced this issue Nov 1, 2022
trevorbaca added a commit that referenced this issue Nov 1, 2022
trevorbaca added a commit that referenced this issue Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant