Re: Dividing a measure with a dotted bar line
2015-01-17 18:32 GMT+01:00 Knute Snortum ksnor...@gmail.com: Thanks to everyone. I think I have all the pieces now. Knute Snortum (via Gmail) Hi, I'm a little late to the party, though, below you'll find a more generic suggestion to set intermediate BarLines. Line-breaks are forbidden with this additional BarLine. It can be done selective. The glyph for the bar can be chosen freely, as well as the musical moment. Limitations: It has to be set for the current context. Longer notes, continuing over the added bar will preserve printing the additional BarLine. \version 2.18.2 #(define (define-translator-property symbol type? description) (if (not (and (symbol? symbol) (procedure? type?) (string? description))) (ly:error error in call of define-translator-property)) (if (not (equal? (object-property symbol 'translation-doc) #f)) (ly:error (_ symbol ~S redefined) symbol)) (set-object-property! symbol 'translation-type? type?) (set-object-property! symbol 'translation-doc description) symbol) #(for-each (lambda (x) (apply define-translator-property x)) `( (intermediate-bar-line ,boolean? Should an intermediate bar-line be printed?))) #(define* ((intermediate-bar-line-engraver moment #:optional (glyph !)) context) inserts additional BarLines at @var{moment} a line-break there is forbidden the bar-line-glyph to insert @var{glyph} is made optional, default is \!\ limitation: no intermediate BarLine is printed, if a longer note continues `( ;; Not sure if the following 'acknowledgers' is needed at all (acknowledgers (paper-column-interface . ,(lambda (engraver grob source-engraver) (let ((internal-bar (ly:context-property context 'internalBarNumber)) (measurepos (ly:context-property context 'measurePosition))) (if (eq? moment (ly:moment-main measurepos)) (set! (ly:grob-property grob 'line-break-permission) '())) (process-music . ,(lambda (engraver) (let ((measurepos (ly:context-property context 'measurePosition)) (intermediate-bar-line? (ly:context-property context 'intermediate-bar-line))) (if (and (= moment (ly:moment-main measurepos)) intermediate-bar-line?) (let* ((event '()) (newgrob (ly:engraver-make-grob engraver 'BarLine event))) (set! (ly:grob-property newgrob 'glyph) glyph #(define* (intermediateBars moment #:optional (glyph !)) shortcut to insert the @code{intermediate-bar-line-engraver} into layout #{ \layout { \context { \Staff \consists #(intermediate-bar-line-engraver moment glyph) } } #}) intermediateBarLineOff = \set Score.intermediate-bar-line = ##f intermediateBarLineOn = \unset Score.intermediate-bar-line % EXAMPLES \paper { ragged-last-bottom = ##f } \header { title = \markup \column { intermediate-bar-line-engraver \vspace #2 } } \layout { \override TextScript.font-size = #-2 } Noten = { \repeat unfold #7 { c2 c4 \break b b as g } } annotation = ^\markup \override #'(baseline-skip . 2) \rounded-box \column { Intermediate BarLine is unset in this bar. } staff = \new Staff { \compoundMeter #'((4 4) (3 4)) \set Timing.beamExceptions = #'() \set Timing.beatStructure = #'(2 2 3) \relative c'' { \Noten \intermediateBarLineOff \annotation \repeat unfold 14 c8 \intermediateBarLineOn \Noten } } \score { \staff \layout { $(intermediateBars 4/4) } %% omitting \layout would work as well %$(intermediateBars 4/4) \header { piece = \markup \bold Example 1, dashed BarLine after 4th quarter } } \score { \staff \layout { $(intermediateBars 3/4) } \header { piece = \markup \bold Example 2, dashed BarLine after 3rd quarter } } \score { \staff \layout { $(intermediateBars 4/4 ||) } \header { piece = \markup \bold Example 3, double BarLine after 4th quarter } } \score { \new Staff { \compoundMeter #'((4 4) (3 4)) c2.~ c1 c2.~ c1 } \layout { $(intermediateBars 4/4 ||) } \header { piece = \markup \bold Example 4, Limitation: no intermediate BarLine is printed, if a longer note continues. } } HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Enlarging tenuto marks
2015-01-17 14:11 GMT+01:00 David Sumbler da...@aeolia.co.uk: I find that tenuto lines in Lilypond are rather too thin and short. Hi David, you know http://lsr.di.unimi.it/LSR/Item?id=858 ? Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
2015-01-17 20:41 GMT+01:00 David Nalesnik david.nales...@gmail.com: Kieren, On Sat, Jan 17, 2015 at 1:38 PM, Kieren MacMillan kieren_macmil...@sympatico.ca wrote: Hi Harm, As always, an awesome answer! =) One thing: when I compile it (2.19.15), I get a ton of warning: forced break was overridden by some other event, should you be using bar checks? Is that expected? Removing the \break from the definition of Noten will get rid of them. --David I inserted the break for final testings, should have removed it. Sorry, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
Hi Harm, As always, an awesome answer! =) One thing: when I compile it (2.19.15), I get a ton of warning: forced break was overridden by some other event, should you be using bar checks? Is that expected? Thanks, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Getting pitch out of a pair
2015-01-17 11:15 GMT+01:00 and...@andis59.se and...@andis59.se: On 2015-01-17 00:02, and...@andis59.se wrote: I store two pitches in a pair variable x = #'(b . cis') I woke up this morning I have figured out that I don't want to store the pitches in a pair but in a list. Did you notice that my last proposal returns a list? ;) Though, list or pair, the problem where/how it is done, LilyPond or scheme, will be the same. -Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Re: small caps
Thanks for the advice everyone. I've managed to bend it to my will! Craig On Sat Jan 17 2015 at 5:14:19 AM Nick Payne nick.pa...@internode.on.net wrote: Accidentally sent this only to the OP rather than to the list... Forwarded Message Subject: Re: small caps Date: Fri, 16 Jan 2015 20:55:30 +1100 From: Nick Payne nick.pa...@internode.on.net nick.pa...@internode.on.net To: Craig Dabelstein craig.dabelst...@gmail.com craig.dabelst...@gmail.com I think you have encountered bug #1482: https://code.google.com/p/lilypond/issues/detail?id=1482 On 16/01/2015 20:00, Craig Dabelstein wrote: Hi Shane, \version 2.19.11 Even with \smallCaps (how did I miss that!?!!?) the test stays the same. Bold and Large are both working but not the small caps. Craig On Fri Jan 16 2015 at 4:39:22 PM Shane Brandes sh...@grayskies.net wrote: Which version are you using? and is it not \smallcaps that you need to issue? Also does the font actually have small caps natively? Shane On Fri, Jan 16, 2015 at 12:54 AM, Craig Dabelstein craig.dabelst...@gmail.com wrote: Hi List, Can anyone tell me why I can't get small caps working with this code? Many thanks, Craig scoreTitleMarkup = \markup { \column { \on-the-fly \print-all-headers { \bookTitleMarkup \hspace #1 } \fill-line { \large \bold \caps \fromproperty #'header:piece } } } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing listlilypond-user@gnu.orghttps://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
Kieren, On Sat, Jan 17, 2015 at 1:38 PM, Kieren MacMillan kieren_macmil...@sympatico.ca wrote: Hi Harm, As always, an awesome answer! =) One thing: when I compile it (2.19.15), I get a ton of warning: forced break was overridden by some other event, should you be using bar checks? Is that expected? Removing the \break from the definition of Noten will get rid of them. --David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Command Line call to LilyPond with PDF auto open
Oops this is actually superfluous because the preview app on Mac OS X updates with any changes as soon as I click on it, so just leaving the pdf open when compiling works no problem. (I'm a newb) .mjb On Sat, Jan 17, 2015 at 10:54 PM, Matthew James Briggs matthew.james.bri...@gmail.com wrote: When calling LilyPond from the command line (I'm on Mac OS X) like this exec /Applications/LilyPond.app/Contents/Resources/bin/lilypond pathtomy.ly is there a flag to tell the program to open the compiled PDF when it's finished like the GUI program does? .mjb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Command Line call to LilyPond with PDF auto open
When calling LilyPond from the command line (I'm on Mac OS X) like this exec /Applications/LilyPond.app/Contents/Resources/bin/lilypond pathtomy.ly is there a flag to tell the program to open the compiled PDF when it's finished like the GUI program does? .mjb ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: lilypond-user Digest, Vol 146, Issue 81
Dear David, it was not my intention to imply that you don’t know that. I just wanted to mention in this thread that non-trivial rules in music notation lead to non-trivial implementations in music notation software. For sure, this does not mean that the documentation could not be improved or the implementation could not be easier to use. Cheers, Joram ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Getting pitch out of a pair
On 2015-01-17 00:02, and...@andis59.se wrote: I store two pitches in a pair variable x = #'(b . cis') I woke up this morning I have figured out that I don't want to store the pitches in a pair but in a list. Thanks to all that have answered how to use pair in a music-function. I'm sure I will get to use it sometime! // Anders -- English isn't my first language. So any error or strangeness is due to the translation. Please correct my English so that I may become better. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: Understanding Lilypond
Thanks for your reply Kieran - I'm not sure that my response is suitable for the list but will post it there anyway. Please feel free to critisize scorn or otherwise flame. 1. This is difficult. My background is chiefly in Fortran and Visual Basic although I have dabbled with machine code. These codes have well defined structures variables are defined there are multi dimensional arrays and subroutines are similarly well defined as far as parameters and scopes are concerned. When I look through the Lilypond source code I see (a) at least three different languages being used C++, Scheme, and Python. It is not clear how these are integrated or why they are needed. (b) the syntax and scope of variables is hard to follow through the various procedures probably mainly due to a lack of understanding of the way scheme objects are stored in memory. I have started to learn these codes but often find various definitions and example scripts only work in one variety of the code. (c) As with most learning tasks it is important to start out with correct descriptions and definitions. The tyro can be led astray by ill founded assumptions as to how the code elements work and fit together. In short you can see difficulties that don't exist or try to implement unnecessary coding. A simple example being lists and regression in scheme the use and philosophy is different from say Fortran and similar languages where the basic principles allow you to guess how to use unfamiliar procedures rather as you would use paper and pencil. You can often read code and see at a glance the gist of what is going on. (d) summing up when looking at the source code there is a dazzling array of procedures but how and when they are called is not clear - nor how they relate to each other. I would be looking for a main programme and branches to various sub programmes or routines I.E. a flow diagram! 2. (a) The philosophy is outlined but is short on detailed explanation in terms of code. The ideas of engravers, grobs etc is understood but the details of their parameters and how they are altered in ly scripts is hard to find in a systematic way. There are excellent aids to get one writing ly scripts and producing quite complex scores but not to make those individual tweaks. Looking at the various tweaks published on the list can be bewildering the common first impression is why? how? Where was that in the documentation? Maybe I'm just to long in the tooth for grasping new concepts. More experienced programmers will rightly say we are not spoon feeding and you should put in the hard graft yourself. I agree with that but would love some signposts to reduce the feeling of being lost in a sea of hieroglyphs. -Original Message- From: Kieren MacMillan [mailto:kieren_macmil...@sympatico.ca] Sent: Friday, January 16, 2015 9:40 PM To: Peter Gentry Cc: Lilypond-User Mailing List Subject: Re: Understanding Lilypond Hi Peter, many of us have struggled for many months to get to grips with the structure and philosophy of Lilypond. 1. Regarding the structure, what are you struggling with exactly? 2. Regarding the philosophy, what are you struggling with exactly? Hope I can help! Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Adjusting the position of tempo indications
On Fri, 2015-01-16 at 14:11 +, Kevin Barry wrote: Dear David, \score { \new StaffGroup \override Score.MetronomeMark.padding = #2 \topLine \bottomLine } Here if you replace the `padding' property with `outside-staff-padding' it should work, i.e. \override Score.MetronomeMark.outside-staff-padding = #2 hth, Kevin Thanks for that - it's just what I needed. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
Am 17.01.2015 um 13:09 schrieb Peter Gentry: Thanks for your reply Kieran - I'm not sure that my response is suitable for the list but will post it there anyway. Please feel free to critisize scorn or otherwise flame. Yes, this is suitable for the list. 1. This is difficult. My background is chiefly in Fortran and Visual Basic although I have dabbled with machine code. These codes have well defined structures variables are defined there are multi dimensional arrays and subroutines are similarly well defined as far as parameters and scopes are concerned. When I look through the Lilypond source code I see (a) at least three different languages being used C++, Scheme, and Python. It is not clear how these are integrated or why they are needed. C++ and Scheme are the languages that are used for LilyPond itself. I can't fully comment on that but at least I can tell you that Scheme is a fundamental part of GUILE, the GNU framework or application environment. One advantage of using Scheme as opposed to a plain C++ program is that very much can be done by users, without needing to recompile the program. The more of LilyPond's own working can be done with Scheme the more fundamental extensions can be created in the user space. If I'm not completely mistaken Python is only used for separate scripts like convert-ly or lilypond-book, but also for the build system. (b) the syntax and scope of variables is hard to follow through the various procedures probably mainly due to a lack of understanding of the way scheme objects are stored in memory. I have started to learn these codes but often find various definitions and example scripts only work in one variety of the code. (c) As with most learning tasks it is important to start out with correct descriptions and definitions. The tyro can be led astray by ill founded assumptions as to how the code elements work and fit together. In short you can see difficulties that don't exist or try to implement unnecessary coding. A simple example being lists and regression in scheme the use and philosophy is different from say Fortran and similar languages where the basic principles allow you to guess how to use unfamiliar procedures rather as you would use paper and pencil. You can often read code and see at a glance the gist of what is going on. (d) summing up when looking at the source code there is a dazzling array of procedures but how and when they are called is not clear - nor how they relate to each other. I would be looking for a main programme and branches to various sub programmes or routines I.E. a flow diagram! In short I'd say you're still struggling with the fundamental principles of Scheme. Which is more than natural - I think the number of people having mastered this is only a small fraction here (and I definitely don't counte me to that fraction). So the question would boil down to the question: why Scheme? As said above it's the official extension language of the framework, so there's not much of a choice here. But I start to comprehend that Scheme is quite generic. This is what makes it so hard to learn but this also makes it extremely versatile and fundamental. 2. (a) The philosophy is outlined but is short on detailed explanation in terms of code. The ideas of engravers, grobs etc is understood but the details of their parameters and how they are altered in ly scripts is hard to find in a systematic way. There are excellent aids to get one writing ly scripts and producing quite complex scores but not to make those individual tweaks. Looking at the various tweaks published on the list can be bewildering the common first impression is why? how? Where was that in the documentation? Maybe I'm just to long in the tooth for grasping new concepts. More experienced programmers will rightly say we are not spoon feeding and you should put in the hard graft yourself. I agree with that but would love some signposts to reduce the feeling of being lost in a sea of hieroglyphs. This is exactly what we have been discussing about more than once (and actually currently in a private discussion). I fully agree with you that there should be much more documentation material giving users help with the challenge to walk over that step. The problem is simply that there are too few people who are able to create that kind of documentaion, and those who are there are probably too busy doing other work. Concretely I see the problem in a sequence of related issues: - Scheme itself *is* difficult to get into - There are so many Scheme dialects, and it is confusing to find out which information would actually apply to the Scheme in LilyPond - The way to interact with LilyPond through Scheme is quite obscure (and that's where better documentation would be needed most IMO) Urs -Original Message- From: Kieren MacMillan [mailto:kieren_macmil...@sympatico.ca] Sent: Friday, January 16, 2015 9:40 PM To: Peter Gentry
Enlarging tenuto marks
I find that tenuto lines in Lilypond are rather too thin and short. With the help of this list, as well as the Lilypond documentation, I am gradually starting to understand more about how Lilypond functions. So I was reasonably confident that I could at least increase the font size of tenuto lines to see if this would give me a satisfactory combination of length and thickness. I had a couple of false starts, because I found it difficult to determine what the name of the relevant grob was. But eventually, having decided that the name is, in fact 'Script', I was almost certain that this was going to work: { \tweak Script.font-size #6 g-- } But it completely fails to change the tenuto line. I see that the Snippets document has a couple of ways I could achieve what I want, and they might be a better bet in any case for practical reasons in the coding. But why doesn't '\tweak Script.font-size' work? David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
On Sat, 2015-01-17 at 13:37 +0100, Urs Liska wrote: Concretely I see the problem in a sequence of related issues: - Scheme itself *is* difficult to get into actually, Scheme syntax is incredibly simple - Scheme expressions are lists (a b c) with the first element being the procedure and the subsequent ones the parameters. So if you come across (if a b) you look up the procedure if in the documentation, rather than having to learn a bunch of keywords (if, case, else ...) which have special syntax peculiar to them. - There are so many Scheme dialects, the only one relevant to LilyPond is the guile-1.8 interpreter. In Denemo we have moved on to guile-2.0 but I haven't come across other interpreters for Scheme, though I've noticed them mentioned in the Guile documentation. HTH Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
Am 17.01.2015 um 14:13 schrieb Richard Shann: On Sat, 2015-01-17 at 13:37 +0100, Urs Liska wrote: Concretely I see the problem in a sequence of related issues: - Scheme itself *is* difficult to get into actually, Scheme syntax is incredibly simple - Scheme expressions are lists (a b c) with the first element being the procedure and the subsequent ones the parameters. So if you come across (if a b) you look up the procedure if in the documentation, rather than having to learn a bunch of keywords (if, case, else ...) which have special syntax peculiar to them. Yes. But the way until you get familiar with this simple foundation and with all its implications is incredibly steep. - There are so many Scheme dialects, the only one relevant to LilyPond is the guile-1.8 interpreter. In Denemo we have moved on to guile-2.0 but I haven't come across other interpreters for Scheme, though I've noticed them mentioned in the Guile documentation. Of course, but when you are searching for solutions, approaches or even tutorials on Scheme you'll get a bunch of different resources, some for Racket, some for MIT Scheme, some for guile-1.8, some for guile-2.0 and so on. While often there is something to the solution that you can use for the problem at hand often the suggestions don't work in LilyPond - and you don't have a clue why. The correct Scheme version is stated somewhere at the beginning of the Extending manual, but it's done so in a way that you will only understand the meaning of it after having learned quite some Scheme. Urs HTH Richard -- Urs Liska www.openlilylib.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Enlarging tenuto marks
Hi David, But why doesn't '\tweak Script.font-size' work? It must be how \tweak behaves, since music = { \once \override Script.font-size = #16 g-- } \score { \music } works “as expected”, yes? Cheers, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Enlarging tenuto marks
Hi David, Hi Kieren, David, you should try : { g-\tweak Script.font-size #6 -- } BTW, how about : \version 2.18.2 myTenuto = -\tweak stencil #(lambda (grob) ly:clef::print (grob-interpret-markup grob #{ \markup\magnify #3 \musicglyph #scripts.tenuto #} )) \tenuto { c'' \myTenuto c'' _\myTenuto } HTH, Pierre 2015-01-17 14:11 GMT+01:00 David Sumbler da...@aeolia.co.uk: I find that tenuto lines in Lilypond are rather too thin and short. With the help of this list, as well as the Lilypond documentation, I am gradually starting to understand more about how Lilypond functions. So I was reasonably confident that I could at least increase the font size of tenuto lines to see if this would give me a satisfactory combination of length and thickness. I had a couple of false starts, because I found it difficult to determine what the name of the relevant grob was. But eventually, having decided that the name is, in fact 'Script', I was almost certain that this was going to work: { \tweak Script.font-size #6 g-- } But it completely fails to change the tenuto line. I see that the Snippets document has a couple of ways I could achieve what I want, and they might be a better bet in any case for practical reasons in the coding. But why doesn't '\tweak Script.font-size' work? David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: arpeggioArrowUp
Thank you Harm. Cheers, Pierre ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Enlarging tenuto marks
David Sumbler wrote: But why doesn't '\tweak Script.font-size' work? The note g and the tenuto belong together musicwise, but in the input stream they are two separate items. Your tweak command is applied to the note g. { \tweak font-size #6 g-- } will change the notehead's font size. But you specifically tweaked Script, so the notehead size stays unaffected. To apply the \tweak to the tenuto item, place it after the note item: { g-\tweak font-size #6 -- } Read about this halfway down http://www.lilypond.org/doc/v2.18/Documentation/learning/tweaking-methods#the-tweak-command Cheers, Robin ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
Am Samstag, 17. Januar 2015 14:13 CET, Richard Shann rich...@rshann.plus.com schrieb: actually, Scheme syntax is incredibly simple - Scheme expressions are lists (a b c) with the first element being the procedure and the subsequent ones the parameters. So if you come across (if a b) you look up the procedure if in the documentation, rather than having to learn a bunch of keywords (if, case, else ...) which have special syntax peculiar to them. Hmm, as a general intro this is o.k. - but be aware that syntax is coupled with semantics and with Lisp/Scheme sematically differnt things do have the same (non)syntax. Some consider this elegant, some feel they get lost. BTW, 'if', like 'let' or 'cond' or 'begin' etc., is _not_ a procedure but either a macro or a special operator. - There are so many Scheme dialects, the only one relevant to LilyPond is the guile-1.8 interpreter. In Denemo we have moved on to guile-2.0 but I haven't come across other interpreters for Scheme, though I've noticed them mentioned in the Guile documentation. Autsch. Racket, DrScheme, MIT-Scheme, Bigloo, Chicken, Stalin, ChezScheme or, relevant for us musicians S7 ... Cheers (and a happy new year) Ralf Mattes HTH Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: box around notes
Hi David, one more big THANK YOU for your fast reply. Yes, it was very helpful. I have updated music-boxer-stencil so that it works again with the boxEngraver. Finally I did some cleanup to my messy code in make-box. Greetings from Germany, Klaus Am 16.01.2015 um 20:30 schrieb David Nalesnik: Hi Klaus, In the attached, I simply added new properties: acknowledge-finger-interface and acknowledge-script-interface. In the engraver, I used ly:grob-property to read the setting. You'll notice that if something is ignored it doesn't get pushed out of the way, though. Adding properties like this would get cumbersome. It would be nice to have a property which takes a flexible list of interfaces to include (over and above interfaces which need to be acknowledged, like note-column-interface). If a box is split due to a line break, it would be cool to have those two boxes open at the right/left side. For this, musicBoxerEngraver would need to tell if a box is started/stopped by a line break instead of a manual command. This is not a problem. I use the function ly:item-break-status on the spanner bounds to determine the state of brokenness, then add in the left or right vertical only if that bound has a break-status of 0 (indicating an unbroken bound). I tried to keep music-boxer-stencil and make-box separate. In so doing, I had to add two more parameters to make-box. (You may decide to merge the two functions in the end.) Hope this is helpful, David \version 2.19.15 \header { tagline = ##f } #(define-event-class 'music-boxer-event 'span-event) #(define-event-class 'box-event 'music-event) #(define (add-grob-definition grob-name grob-entry) (let* ((meta-entry (assoc-get 'meta grob-entry)) (class(assoc-get 'class meta-entry)) (ifaces-entry (assoc-get 'interfaces meta-entry))) ;; change ly:grob-properties? to list? to work from 2.19.12 back to at least 2.18.2 (set-object-property! grob-name 'translation-type? ly:grob-properties?) (set-object-property! grob-name 'is-grob? #t) (set! ifaces-entry (append (case class ((Item) '(item-interface)) ((Spanner) '(spanner-interface)) ((Paper_column) '((item-interface paper-column-interface))) ((System) '((system-interface spanner-interface))) (else '(unknown-interface))) ifaces-entry)) (set! ifaces-entry (uniq-list (sort ifaces-entry symbol?))) (set! ifaces-entry (cons 'grob-interface ifaces-entry)) (set! meta-entry (assoc-set! meta-entry 'name grob-name)) (set! meta-entry (assoc-set! meta-entry 'interfaces ifaces-entry)) (set! grob-entry (assoc-set! grob-entry 'meta meta-entry)) (set! all-grob-descriptions (cons (cons grob-name grob-entry) all-grob-descriptions #(define (define-grob-property symbol type? description) (if (not (equal? (object-property symbol 'backend-doc) #f)) (ly:error (_ symbol ~S redefined) symbol)) (set-object-property! symbol 'backend-type? type?) (set-object-property! symbol 'backend-doc description) symbol) #(map (lambda (x) (apply define-grob-property x)) `( (filled ,boolean? Should we fill in this box?) (fill-color ,color? Background color for filling the rectangle) (acknowledge-finger-interface ,boolean? Include fingerings in box?) (acknowledge-script-interface ,boolean? Include scripts in box?) ; add more properties here )) #(define (make-box thick padding filled fill-color open-on-left open-on-right xext yext) (let* ((xext (interval-widen xext padding)) (yext (interval-widen yext padding))) (ly:stencil-add (if filled (ly:make-stencil (list 'color fill-color (list 'round-filled-box (- (- (car xext) thick)) (+ (cdr xext) thick) (- (car yext)) (cdr yext) 0.0) xext yext)) empty-stencil) (if ( thick 0) (make-filled-box-stencil (cons (- (car xext) thick) (+ (cdr xext) thick)) (cons (- (car yext) thick) (car yext))) empty-stencil) (if ( thick 0) (make-filled-box-stencil (cons (- (car xext) thick) (+ (cdr xext) thick)) (cons (cdr yext) (+ (cdr yext) thick))) empty-stencil) (if (and (not open-on-right) ( thick 0)) (make-filled-box-stencil (cons (cdr xext) (+ (cdr xext) thick)) yext) empty-stencil) (if (and (not open-on-left) ( thick 0)) (make-filled-box-stencil (cons (- (car xext) thick) (car xext)) yext) empty-stencil) ))) #(define (music-boxer-stencil grob) (let* ((elts (ly:grob-object grob 'elements)) (refp-X
Manual tuplet breaks and e-reader
I'm writing document generator for using with e-book readers. I've a large database with score data and template for a document. So it's intended for creating PDF without manual editing score data. Generated pdf fits 6in x 4.5in page nicely, but lilypond can't auto wrap tuplets. Documentation says I need to write something like \times 2/3 { ... \bar \break ... }. I want to replace it with \times 2/3 { ... #(some-func) ... }, where some-func calculates absolute offset and inserts break where needed (X-offset is near 4.5\in or something like that). What I need to know to write that function? -- Eli ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Dividing a measure with a dotted bar line
I have a prelude I'm transcribing that's got a lot of challenges right in the first bar. I looks like this: So far what I have is this: (The minimal lilypond file is at the end.) What I don't have is the barline between the third and fourth beat, the parenthesized time signature lowered, and a (fake?) time signature of 3/4 (or do use 3/4 and 2/4 measures and fake the 5/4?) The time signature is just at the beginning of the piece; the dotted barline will show up several times. Here's the lilypond source file: %%% -- Begin \version 2.19.15 \language english timeSigParenth = \once \override Staff.TimeSignature.stencil = #(lambda (grob) (parenthesize-stencil (ly:time-signature::print grob) 0.1 0.4 0.4 0.1 )) upperStaffTop = \relative c' { \timeSigParenth \time 5/4 \oneVoice r4 \voiceOne e e'8 ( a a' bf d e bf'4 e, e' ) \oneVoice r | } upperStaffBottom = \relative c'' { s4 a cs4 s2. | } lowerStaffTop = \relative c' { r4 a cs d e g e, r | } lowerStaffBottom = \relative c, { a4-. e''8 ( a bf4 e, ) e,-. ( | a,4-. ) } dynamics = { \tempo Modéré 4 = 84 s4 \pp s s \ s \! s | } %% --- Boilerplate upperStaff = { \clef treble \key a \major \new Voice { \voiceOne \upperStaffTop } \new Voice { \voiceTwo \upperStaffBottom } } lowerStaff = { \clef bass \key a \major \new Voice { \voiceThree \lowerStaffTop } \new Voice { \voiceFour \lowerStaffBottom } } \score { \removeWithTag #'played \new PianoStaff \new Staff = upper { \upperStaff } \new Dynamics = dyns { \dynamics } \new Staff = lower { \lowerStaff } \layout { } } %%% -- End Knute Snortum (via Gmail) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
Hi Peter, I'm not sure that my response is suitable for the list It *definitely* is! Please feel free to critisize scorn or otherwise flame. I’m sorry your default expectation is to be critisized, scorned, or flamed — that hasn’t been my primary experience on this list (as a newbie more than a decade ago, or since), although there are of course exceptions. (As I recall, the lilypond-devel list is more severe.) There are excellent aids to get one writing ly scripts and producing quite complex scores but not to make those individual tweaks. Looking at the various tweaks published on the list can be bewildering the common first impression is why? how? Where was that in the documentation? Can you give a concrete example? Either it is in the documentation and you were unable to find it, or it’s not in the documentation — either way, there may be a solution which will assist future users/readers. Thanks, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
Urs Liska wrote Of course, but when you are searching for solutions, approaches or even tutorials on Scheme you'll get a bunch of different resources, some for Racket, some for MIT Scheme, some for guile-1.8, some for guile-2.0 and so on. While often there is something to the solution that you can use for the problem at hand often the suggestions don't work in LilyPond - and you don't have a clue why. For learning Scheme itself I found myself just using the GUILE manuals, and this has worked well for me. They are terse but comprehensive and you know it's the same type of Scheme used in LilyPond. https://www.gnu.org/software/guile/docs/docs.html There's an all-in-one-page version of these manuals which is easy to search using your browser's search-in-page feature. That's how I usually look for something I'm trying to understand, when reading an LSR snippet, etc. For a more friendly tutorial-style walk-through of Scheme to familiarize yourself with it in general... I like this series of videos: https://www.youtube.com/watch?v=byofGyW2L10 But I agree that the LilyPond-Scheme interfaces are more obscure and could use more documentation. For this I've learned most from examples from the LSR (that were similar to what I was trying to do). One of the problems is that what you need to know varies greatly with what you want to do. Are you overriding grob properties? Are you writing a custom engraver? Are you altering contexts (their properties or sets of engravers)? Are you altering the musical input before it gets very far? Those are each different ways of intervening, at different points, in different ways, that one would use for different purposes. Hmmm... It would be interesting and maybe helpful to develop such a typology of common techniques. What have I left out above? (Also, my sense is that LilyPond may or may not have the kind of systematic consistency that some are looking for?) Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Understanding-Lilypond-tp170550p170609.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
Thanks Kevin, that solves the bar line problem. Any ideas for the time signatures? Knute Snortum (via Gmail) On Sat, Jan 17, 2015 at 8:29 AM, Kevin Barry barr...@gmail.com wrote: Dear Knute, If I understand what you want correctly, you can simply insert the barline by adding: \bar ; at the appropriate moment, e.g.: \version 2.18.2 \relative { \time 5/4 b b b \bar ; b b } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Understanding Lilypond
Am 17.01.2015 um 17:22 schrieb Kieren MacMillan: Hi Peter, I'm not sure that my response is suitable for the list It *definitely* is! Please feel free to critisize scorn or otherwise flame. I’m sorry your default expectation is to be critisized, scorned, or flamed — that hasn’t been my primary experience on this list (as a newbie more than a decade ago, or since), although there are of course exceptions. (As I recall, the lilypond-devel list is more severe.) There are excellent aids to get one writing ly scripts and producing quite complex scores but not to make those individual tweaks. Looking at the various tweaks published on the list can be bewildering the common first impression is why? how? Where was that in the documentation? Can you give a concrete example? Either it is in the documentation and you were unable to find it, or it’s not in the documentation — either way, there may be a solution which will assist future users/readers. I think the problem is more fundamental than individual missing items. What we'd need is something similarly slow-paced as the Learning Manual but for the Extending Manual. In a way the tutorials in Scores of Beauty (http://lilypondblog.org/category/using-lilypond/tutorials/) are a start, but I'd always want to have more material there. Just yesterday we had the question how to store pitches in a Scheme pair. The solution involved switching parsing modes between LilyPond, Scheme and LilyPond-in-Scheme. Such questions would really warrant tutorials, and these tutorials would actually help people get into it. Urs Thanks, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Urs Liska www.openlilylib.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
What about adding a Dynamics context and change that to print the time signature? Then parenthesize that and display the time sigs in the visible staves as 3/4. Can't try this out currently so I don't know if it works. But in any case I think you should use a real 5/4 time signature and add the rest. HTH Urs Am 17.01.2015 um 17:22 schrieb Knute Snortum: I have a prelude I'm transcribing that's got a lot of challenges right in the first bar. I looks like this: So far what I have is this: (The minimal lilypond file is at the end.) What I don't have is the barline between the third and fourth beat, the parenthesized time signature lowered, and a (fake?) time signature of 3/4 (or do use 3/4 and 2/4 measures and fake the 5/4?) The time signature is just at the beginning of the piece; the dotted barline will show up several times. Here's the lilypond source file: %%% -- Begin \version 2.19.15 \language english timeSigParenth = \once \override Staff.TimeSignature.stencil = #(lambda (grob) (parenthesize-stencil (ly:time-signature::print grob) 0.1 0.4 0.4 0.1 )) upperStaffTop = \relative c' { \timeSigParenth \time 5/4 \oneVoice r4 \voiceOne e e'8 ( a a' bf d e bf'4 e, e' ) \oneVoice r | } upperStaffBottom = \relative c'' { s4 a cs4 s2. | } lowerStaffTop = \relative c' { r4 a cs d e g e, r | } lowerStaffBottom = \relative c, { a4-. e''8 ( a bf4 e, ) e,-. ( | a,4-. ) } dynamics = { \tempo Modéré 4 = 84 s4 \pp s s \ s \! s | } %% --- Boilerplate upperStaff = { \clef treble \key a \major \new Voice { \voiceOne \upperStaffTop } \new Voice { \voiceTwo \upperStaffBottom } } lowerStaff = { \clef bass \key a \major \new Voice { \voiceThree \lowerStaffTop } \new Voice { \voiceFour \lowerStaffBottom } } \score { \removeWithTag #'played \new PianoStaff \new Staff = upper { \upperStaff } \new Dynamics = dyns { \dynamics } \new Staff = lower { \lowerStaff } \layout { } } %%% -- End Knute Snortum (via Gmail) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Urs Liska www.openlilylib.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
Hi Knute, What I don't have is the barline between the third and fourth beat, the parenthesized time signature lowered, and a (fake?) time signature of 3/4 (or do use 3/4 and 2/4 measures and fake the 5/4?) The time signature is just at the beginning of the piece; the dotted barline will show up several times. Below is a modified snippet showing one possible solution to some of the issues you are facing. Notice also that I moved shared information to a global variable — makes it much easier to maintain (IMO). I would probably just add the parenthesized time signature as a markup in the Dynamics context (though there are other ways of making it happen). Hope this helps! Kieren. __ \version 2.19.15 \language english global = { \tempo Modéré 4 = 84 \key a \major \time 5/4 \set Staff.timeSignatureFraction = 3/4 s2. \bar ! s2 } upperStaffTop = \relative c' { \oneVoice r4 \voiceOne e e'8 ( a a' bf d e bf'4 e, e' ) \oneVoice r | } upperStaffBottom = \relative c'' { s4 a cs4 s2. | } lowerStaffTop = \relative c' { r4 a cs d e g e, r | } lowerStaffBottom = \relative c, { a4-. e''8 ( a bf4 e, ) e,-. ( | a,4-. ) } dynamics = { s4 s -\tweak #'X-offset #-4 \pp s16 s8. -\tweak #'to-barline ##f \ s2\! | } %% --- Boilerplate upperStaff = { \clef treble \global \new Voice { \voiceOne \upperStaffTop } \new Voice { \voiceTwo \upperStaffBottom } } lowerStaff = { \clef bass \global \new Voice { \voiceThree \lowerStaffTop } \new Voice { \voiceFour \lowerStaffBottom } } \score { \removeWithTag #'played \new PianoStaff \new Staff = upper { \upperStaff } \new Dynamics = dyns { \dynamics } \new Staff = lower { \lowerStaff } \layout { } } %%% -- End ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
Any ideas for the time signatures? As others have suggested you can place it in markup in its own dynamics context between the staves like this (it's not an elegant solution, but you only need to do it once): \version 2.18.2 fakeThreeFour = { \override Score.TimeSignature #'stencil = #ly:text-interface::print \override Score.TimeSignature #'text = \markup { \override #'(baseline-skip . 0) \column { \number 3 \number 4 } } } parenFiveFour = \markup { \concat \normal-text { \fontsize #5 \lower #1.25 ( \override #'(baseline-skip . 0) \column { \number 5 \number 4 } \fontsize #5 \lower #1.25 ) } } \new PianoStaff \new Staff { \time 5/4 \fakeThreeFour b b b \bar ! b b } \new Dynamics { s -\tweak X-offset #-5 -\markup { \parenFiveFour } } \new Staff { \clef bass b b b b b } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Dividing a measure with a dotted bar line
Thanks to everyone. I think I have all the pieces now. Knute Snortum (via Gmail) On Sat, Jan 17, 2015 at 9:06 AM, Kevin Barry barr...@gmail.com wrote: Any ideas for the time signatures? As others have suggested you can place it in markup in its own dynamics context between the staves like this (it's not an elegant solution, but you only need to do it once): \version 2.18.2 fakeThreeFour = { \override Score.TimeSignature #'stencil = #ly:text-interface::print \override Score.TimeSignature #'text = \markup { \override #'(baseline-skip . 0) \column { \number 3 \number 4 } } } parenFiveFour = \markup { \concat \normal-text { \fontsize #5 \lower #1.25 ( \override #'(baseline-skip . 0) \column { \number 5 \number 4 } \fontsize #5 \lower #1.25 ) } } \new PianoStaff \new Staff { \time 5/4 \fakeThreeFour b b b \bar ! b b } \new Dynamics { s -\tweak X-offset #-5 -\markup { \parenFiveFour } } \new Staff { \clef bass b b b b b } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user