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

Clean up instrument classes #1460

Closed
trevorbaca opened this issue Jun 2, 2022 · 0 comments · Fixed by #1462
Closed

Clean up instrument classes #1460

trevorbaca opened this issue Jun 2, 2022 · 0 comments · Fixed by #1462
Assignees
Labels
Milestone

Comments

@trevorbaca
Copy link
Member

Abjad 3.10 reimplements Abjad's instrument classes as frozen data classes, removes four properties from all instrument classes, and changes the name of one property.

REMOVED:

    * abjad.Instrument.markup
    * abjad.Instrument.name
    * abjad.Instrument.short_markup
    * abjad.Instrument.short_name

CHANGED:

    OLD: abjad.Instrument.allowable_clefs=("treble", "bass")
    NEW: abjad.Instrument.clefs==("treble", "bass")

This means that instrument classes are left with four basic properties:

 >>> abjad.Flute()
Flute(clefs=('treble',), context='Staff', middle_c_sounding_pitch=NamedPitch("c'"), pitch_range=PitchRange(range_string='[C4, D7]'))

Use abjad.InstrumentName and abjad.ShortInstrumentName to handle those properties independently.

@trevorbaca trevorbaca added this to the 3.10 milestone Jun 2, 2022
@trevorbaca trevorbaca self-assigned this Jun 2, 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