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

detect if music is in \repeat volta #17

Open
kastdeur opened this issue Jul 26, 2022 · 1 comment
Open

detect if music is in \repeat volta #17

kastdeur opened this issue Jul 26, 2022 · 1 comment
Labels

Comments

@kastdeur
Copy link
Owner

Not really something that should be in this package, but a function that detects whether the current environment is in a \repeat volta (or instead in a \repeat unfold) would be really cool to have.

This could allow music to transform itself depending on the context.

@kastdeur
Copy link
Owner Author

One use is to switch between slurs and laissezVibrer at the end of a repeat.

e.g. In the following the unfolded repeats work nicely, but doesn't work in volta correctly.

nice unfolded

\version "2.20.0"
\include "lilydrum.ly"


music = \drummode {
    \repeat volta 2  {
        d4 d |
    } \alternative {
      { d4:32( d4:32)( <>)}
      { d4:32( d4:32) }
    }
}

\score {
    \new PipeBandDrumStaff {
        \time 2/4
        \unfoldRepeats \music
    }
}

unfolded: (nice)
repeat preview

volta: (ugly, and wrong)
repeat preview

nice volta

\version "2.20.0"
\include "lilydrum.ly"


music = \drummode {
    \repeat volta 2  {
        d4 d |
    } \alternative {
      { d4:32( d4:32) \laissezVibrer}
      { d4:32( d4:32) }
    }
}

\score {
    \new PipeBandDrumStaff {
        \time 2/4
        \unfoldRepeats \music
    }
}

unfolded: (ugly, and wrong)
repeat preview

volta: (semi-nice)
repeat preview

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

1 participant