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

The "direction" argument of abjad.Staccato() is not producing the expected output #1064

Closed
gilbertohasnofb opened this issue Dec 16, 2018 · 2 comments
Assignees
Labels

Comments

@gilbertohasnofb
Copy link

The direction argument of abjad.Staccato is not producing the expected output while the same argument of abjad.Articulation works as expected:

import abjad
articulation1 = abjad.Articulation('staccato', direction=abjad.Up)
articulation2 = abjad.Staccato(direction=abjad.Up)
print(articulation1.direction)  # => Up
print(articulation2.direction)  # => Up
note1 = abjad.Note("c'4")
note2 = abjad.Note("c'4")
abjad.attach(articulation1, note1)
abjad.attach(articulation2, note2)
staff = abjad.Staff([note1, note2])
abjad.show(staff)

image

@trevorbaca trevorbaca changed the title The direction argument of abjad.Staccato() is not producing the expected output The "direction" argument of abjad.Staccato() is not producing the expected output Aug 9, 2019
@trevorbaca trevorbaca self-assigned this Aug 12, 2019
@trevorbaca trevorbaca added the bug label Aug 12, 2019
@trevorbaca
Copy link
Member

Confirmed that this is a bug:

staff = abjad.Staff("c'4 c'4")
articulation = abjad.Articulation('staccato', direction=abjad.Up)
abjad.attach(articulation, staff[0])
staccato = abjad.Staccato(direction=abjad.Up)
abjad.attach(staccato, staff[1])
abjad.f(staff)
\new Staff
{
    c'4
    ^ \staccato
    c'4
    \staccato
}

abjad.Articulation respects direction while abjad.Staccato does not.

trevorbaca added a commit that referenced this issue Aug 12, 2019
    staff = abjad.Staff("c'4 c'4")
    articulation = abjad.Articulation('staccato', direction=abjad.Up)
    abjad.attach(articulation, staff[0])
    staccato = abjad.Staccato(direction=abjad.Up)
    abjad.attach(staccato, staff[1])

    abjad.f(staff)
    \new Staff
    {
        c'4
        ^ \staccato
        c'4
        ^ \staccato
    }
@trevorbaca
Copy link
Member

Will open a PR to merge into main after checking other articulation classes.

staccato-API

trevorbaca added a commit that referenced this issue Aug 12, 2019
trevorbaca added a commit that referenced this issue Aug 12, 2019
    staff = abjad.Staff("c'4 c'4")
    articulation = abjad.Articulation('staccato', direction=abjad.Up)
    abjad.attach(articulation, staff[0])
    staccato = abjad.Staccato(direction=abjad.Up)
    abjad.attach(staccato, staff[1])

    abjad.f(staff)
    \new Staff
    {
        c'4
        ^ \staccato
        c'4
        ^ \staccato
    }

FIXED:

    * abjad.Dynamic.direction
    * abjad.RepeatTie.direction
    * abjad.Staccatissimo.direction
trevorbaca added a commit that referenced this issue Aug 12, 2019
FIXED: abjad.Staccato now formats direction. Closes #1064.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants