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

Finish statal parts of rhythm-makers #5

Open
19 tasks
trevorbaca opened this issue Aug 12, 2018 · 0 comments
Open
19 tasks

Finish statal parts of rhythm-makers #5

trevorbaca opened this issue Aug 12, 2018 · 0 comments
Assignees

Comments

@trevorbaca
Copy link
Member

trevorbaca commented Aug 12, 2018

Write statal doctests:

  • AccelerandoRhythmMaker.beam_specifier
  • AccelerandoRhythmMaker.division_masks
  • AccelerandoRhythmMaker.interpolation_specifiers
  • AccelerandoRhythmMaker.logical_tie_masks
  • AccelerandoRhythmMaker.previous_state
  • AccelerandoRhythmMaker.state
  • AccelerandoRhythmMaker.tie_specifier
  • NoteRhythmMaker.beam_specifier
  • NoteRhythmMaker.burnish_specifier
  • NoteRhythmMaker.division_masks
  • NoteRhythmMaker.logical_tie_masks
  • NoteRhythmMaker.previous_state
  • NoteRhythmMaker.state
  • NoteRhythmMaker.tie_specifier
  • TaleaRhythmMaker.beam_specifier
  • TaleaRhythmMaker.extra_counts_per_division
  • TaleaRhythmMaker.previous_state
  • TaleaRhythmMaker.tie_specifier

Generalize statal selectors:

This output (with pattern object) is statal. This is correct. Selector selects logical ties 6 and 7:

staff = abjad.Staff("c'8 d' ~ { d' e' r f'~ } f' r")
logical_ties = abjad.select(staff).logical_ties()
previous = len(logical_ties)
pattern = abjad.index([4, 5, 6, 7])
result = abjad.select(staff, previous=previous)
result.logical_ties()[pattern]
Selection([LogicalTie([Note("c'8")]), LogicalTie([Note("d'8"), Note("d'8")])])

This output (with slice) is not statal. This is incorrect. Selector selects logical ties 4 and 5:

staff = abjad.Staff("c'8 d' ~ { d' e' r f'~ } f' r")
logical_ties = abjad.select(staff).logical_ties()
previous = len(logical_ties)
result = abjad.select(staff, previous=previous)
result = result.logical_ties()[4:8]
Selection([LogicalTie([Note("f'8"), Note("f'8")]), LogicalTie([Rest('r8')])], previous=6)
  • Allow for statal selectors with integer and slice indexing
@trevorbaca trevorbaca self-assigned this Aug 12, 2018
@trevorbaca trevorbaca changed the title Write state tests Finish statal parts of rhythm-makers Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant