-
Notifications
You must be signed in to change notification settings - Fork 10
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
Q: how to create end bar? #29
Comments
Thanks. I'm unsure why I was adding a line break after bar checks. I've removed this now. In your example it was probably failing because of the line splitting inside the quotes for your literal bar. Your approach should work now (no line break). But I've also added better support for adding various types of bars at the end of a phrase with the You can still insert a bar check with |
Thanks Matt, this works fine. Not clear to me what a bar check is/does: I tried to insert the pipe symbol in the phrase (in combination with |
bar checkJust inserting a pipe by itself is a bar check. This is used to make the LilyPond code more readable by breaking up measures and also help LilyPond check for sections of music whose time adds up to one or multiple measures rather than some invalid fraction of a measure. The bar check does not create bar notation in the output like for example better bar injection for phrasesThanks for the reference! I'll give some thought to how I may be able to integrate something similar into other stuffThere are also time helper functions in As the package has developed, I have really downplayed the use of integer-format octave numbering because of various limitations and generality compared to tick marks. It was a mistake on my part in early releases to promote integer format as the default and use it in lots of examples. I have worked that back over time. I continue to support it, but it is definitely the more restrictive format. Sorry about the lack of handling of repeated white space and untrimmed whitespace with phrase concatentation. That was super easy to fix and should work now with It makes sense if you are trying to append a string to a phrase like in your example, but recently the package has gained a lot of generic method implementations for various classes like
But generally speaking it is really nice to be able to use generic methods where possible. If I can create less need over time for |
Thank you Matt for your thoughts on this (and of course for the change in Following up on your ideas I created a new blog entry with my experiences. Summary:
Regards Han |
Here are some time-related functions based on beats and measures. I will probably add more; these are pretty new and limited. I like your idea of some kind of hook character used for inserting arbitrary text in phrases subsequently. This gives the user a lot more power. I will give this some thought. Adding or changing syntax can be a lot of work because of the potential side effects it can have throughout the functions in the package. When I recently added support for LilyPond-style note articulations this required more generalization of the behavior of the hyphen character in note info strings and in total it took me 7 hours to rework all the affected package code. This kind of change could be challenging because it means I need the ability to carry along some special hook or placeholder character without ever changing it, but always ignoring it, no matter what function performs some kind of transformation on the data. It also is strictly applicable to phrases (for LilyPond transcription) and would otherwise serve no purpose in noteworthy, noteinfo, or music objects. Perhaps the best place to specify the timesteps at which hooks are placed is with an argument in the call to |
I am trying to insert an end bar with (as an example)
voice1 <- pc(p("a3 a3 e4 e4","4 8 4 8",string=NULL),'\\bar "|."' )
With
lilypond
this generates (note the line split (CRLF) after the|
) :melodyA = {
\global
\override StringNumber #'transparent = ##t
a4 a8 e'4 e'8 \bar "|
."
}
and this does not create the end bar. After removing the CRLF from the .ly file the end bar shows up. Any suggestions to let this work in one go?
NB I think the split is caused by
lilypond.R line 287/315
but do not know if this can easily be removed. E.g. 287 :x <- paste0(x0, "\\override StringNumber #'transparent = ##t\n ",
gsub("\n\n", "\n", gsub("\\|", "\\|\n", x)), "}\n\n",
collapse = "\n")
The text was updated successfully, but these errors were encountered: