Re: Flat flared hairpins
Am 31.12.18 um 06:00 schrieb Andrew Bernard: I need some special flat, flared ended hairpins to indicate pulsing in a string quartet I am setting for a friend. So far, I managed to adapt a textspanner to do the job. It's fiddly but OK. However, because I use a custom graphic path markup for the spanner, the code does not deal with line breaks. It's best to refer to the attached image to see what I mean. I'll put my code here. Would anybody be willing to help out on this? Line break continuation code in lilypond has always been outside my grasp and skill level. Alternatively, if there is a more nice way to achieve this, I'd be really grateful to hear it. You could try to make a stencil using elbowed-hairpin, the generic function that is used for simple-hairpin, flared-hairpin, and constante-hairpin: \version "2.19.82" { \override Hairpin.stencil = #(elbowed-hairpin '((0 . 0) (0.9 . 0) (1 . 1)) #t) <>\< \repeat unfold 8 c'8 1\< <>\! } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: The composition process doesn't get disrupted using Lily Pond?
On Mon, 31 Dec 2018, 04:29 Yakir Arbib Dear list, > > > First of all, happy New Year to everybody! > > I wanted to ask you a more general question related to composition and > LilyPond: > > Can anyone here who is a composer and uses LilyPond to compose give me > some little insight about the process? > > I mean if you are composing for more than one stave (I.E. piano and > cello or string quartet) how do you keep track of the music if each > stave has to be coded separately? > > Do you composers use Lily only after you notate the pieces on regular > paper, or is it possible to make some sort of easier structure in Lily > to make sense of a multi-instrument piece of music so your composition > process is not constantly being interrupted by technicalities? > > I am visually impaired and don't have a primary way of notating the > music "for myself" first. Any tips would be incredibly appreciated!! > > Thank you very much and all the best in music! > > Yakir > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user I usually have a pretty good idea of the music before it goes to Lilypond. Only final touches happen later. Would it be useful for you to work in a MIDI sequencer, and then use midi2ly to get it into Lilypond? Vaughan > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Flat flared hairpins
I need some special flat, flared ended hairpins to indicate pulsing in a string quartet I am setting for a friend. So far, I managed to adapt a textspanner to do the job. It's fiddly but OK. However, because I use a custom graphic path markup for the spanner, the code does not deal with line breaks. It's best to refer to the attached image to see what I mean. I'll put my code here. Would anybody be willing to help out on this? Line break continuation code in lilypond has always been outside my grasp and skill level. Alternatively, if there is a more nice way to achieve this, I'd be really grateful to hear it. Andrew % \version "2.19.82" % dench style flat hairpins with flared ends % by acb % Make custom hairpins out of text spanner. startHpinFlatFlared = #(define-event-function (type left-pad right-pad) (symbol? (number? 2.5) (number? 1.8)) "Make flat hairpin out of a text spanner with flares at left or right or both ends. " (cond ((eq? type 'left) (begin ;(dbg "left - do left part") #{ \tweak TextSpanner.staff-padding #4 \tweak TextSpanner.style #'line \tweak TextSpanner.thickness #1.5 \tweak TextSpanner.bound-details.left.padding #left-pad \tweak TextSpanner.bound-details.right.padding #right-pad \tweak TextSpanner.bound-details.left.text \markup { \path #0.15 #'((moveto 0 0) (lineto -1 1) (moveto 0 0) (lineto -1 -1) (closepath)) } \startTextSpan #} )) ((eq? type 'right) (begin ;(dbg "right - do right part") #{ \tweak TextSpanner.staff-padding #4 \tweak TextSpanner.style #'line \tweak TextSpanner.thickness #1.5 \tweak TextSpanner.bound-details.left.padding #left-pad \tweak TextSpanner.bound-details.right.padding #right-pad \tweak TextSpanner.bound-details.right.text \markup { \path #0.15 #'((moveto 0 0) (lineto 1 1) (moveto 0 0) (lineto 1 -1) (closepath)) } \startTextSpan #} )) ((eq? type 'both) (begin ;(dbg "both - do both parts") #{ \tweak TextSpanner.staff-padding #4 \tweak TextSpanner.style #'line \tweak TextSpanner.thickness #1.5 \tweak TextSpanner.bound-details.left.padding #left-pad \tweak TextSpanner.bound-details.right.padding #right-pad \tweak TextSpanner.bound-details.right.text \markup { \path #0.15 #'((moveto 0 0) (lineto 1 1) (moveto 0 0) (lineto 1 -1) (closepath)) } \tweak TextSpanner.bound-details.left.text \markup { \path #0.15 #'((moveto 0 0) (lineto -1 1) (moveto 0 0) (lineto -1 -1) (closepath)) } \startTextSpan #} stopHpin = \stopTextSpan % ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Attempt at divisi automating engraver
Updating this with cleaned up code and a clearer example in four parts. Realized a few things: 1) The context property changes are working as I expected and staves are correctly hiding or showing. There is no need to use remove-layers here. 2) When keepAliveInterfaces is set to '() in the first moment of a system, the new value only applies starting after the line break, so if the staff was alive on the previous system it will be kept alive on this system. The workaround is to apply changes to keepAliveInterfaces at a moment just before they are meant to take effect. This makes for awkward user input, but doing it automatically would require the engraver looking a moment into the future. Is looking ahead a feasible thing for an engraver to do? Should this be written as an iterator instead? \version "2.19.82" % From define-context-properties.scm #(define (translator-property-description symbol type? description) (if (not (and (symbol? symbol) (procedure? type?) (string? description))) (throw 'init-format-error)) (if (not (equal? #f (object-property symbol 'translation-doc))) (ly:error (_ "symbol ~S redefined") symbol)) (set-object-property! symbol 'translation-type? type?) (set-object-property! symbol 'translation-doc description) (set! all-translation-properties (cons symbol all-translation-properties)) symbol) #(translator-property-description 'sharingParts list? "List of consecutive ints, indices of parts sharing this staff.") #(translator-property-description 'combineWithNext boolean? "Is it okay for this music to share a staff with the music in the next staff?") #(define (segment pred lst) "Segments a list into sublists, such that all elements satisfy pred except the last element of each sublist." (fold-right (lambda (x y) (if (pred x) (cons (cons x (car y)) (cdr y)) (cons (list x) y))) '(() . ()) lst)) % #(display (segment cdr '((1 . #f) (2 . #t) (3 . #t Staff_sharing_engraver = #(lambda (ctx) (let* ((all-staves '()) (solo-staves '())) (make-engraver (acknowledgers ((hara-kiri-group-spanner-interface engraver grob source-engraver) ; We need an alist of child contexts, but getting them this way ; means the engraver can't operate on the first measure. ; Not sure what the proper way to get them is? (let* ( (child-ctx (ly:translator-context source-engraver)) (child-id (ly:context-id child-ctx)) (child-parts (ly:context-property child-ctx 'sharingParts)) ) (set! all-staves (assoc-set! all-staves child-parts child-ctx)) ; Build alist of just the staves for a single part. (if (and (eq? 1 (length child-parts)) (not (assoc child-parts solo-staves))) (set! solo-staves (merge solo-staves (acons child-parts child-ctx '()) (lambda (x y) (< (caar x) (caar y))) )) ((start-translation-timestep translator) (let* ( ; Build alist of index: combineWithNext value for solo staves (combine-which-parts (fold-right (lambda (kv result) (acons (car kv) (ly:context-property (cdr kv) 'combineWithNext) result)) '() solo-staves)) ; Split the list by which parts can be combined ; Then just keep the part indices (groups (map (lambda (sublst) (map caar sublst)) (segment cdr combine-which-parts))) ; Use the index lists to select staves (live-ctxs (if (pair? (car groups))
Re: Shorten TextSpanner dashed line
Hi Davide, You could play with this: \override TextSpanner.bound-details.right.padding = 1 Have a look at the internals reference. Andrew On Mon, 31 Dec 2018 at 09:47, Davide Liessi wrote: > Is it possible to automatically shorten the dashed line in > TextSpanners so that the line of the first TextSpanner ends before the > left text of the second TextSpanner (and thus the two TextSpanners can > align vertically)? > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Shorten TextSpanner dashed line
Hi all. Is it possible to automatically shorten the dashed line in TextSpanners so that the line of the first TextSpanner ends before the left text of the second TextSpanner (and thus the two TextSpanners can align vertically)? \version "2.19.82" { \override TextSpanner.bound-details.left.text = "test" b1\startTextSpan b1\stopTextSpan\startTextSpan b1\stopTextSpan } In alternative, is it possible to shorten the TextSpanners' X-extent by the appropriate amount? Best wishes. Davide ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: The composition process doesn't get disrupted using Lily Pond?
On 2018-12-30 10:04 am, Malte Meyn wrote: Am 30.12.18 um 18:28 schrieb Yakir Arbib: I mean if you are composing for more than one stave (I.E. piano and cello or string quartet) how do you keep track of the music if each stave has to be coded separately? Many people write exactly one measure per line, use bar checks (the symbol | that checks whether there is a bar line where you expect it), write a bar number comment every 5 bars etc. There is also the parallel music feature. In this way, you can keep all of the parts together, which seems to be helpful for piano parts. I presume it could work for additional staves for other instruments as well. What I would suggest is breaking up a score into many small sections (or subsections). That way, you can keep the related parts ordered together in the input even if they are in series. It also makes it faster to locate where to make a change, in contrast to having one, monolithic variable for each part. sectionI.piano.rightHand = ... sectionI.piano.leftHand = ... sectionI.viola = ... sectionI.cello = ... sectionII.piano.rightHand = ... sectionII.piano.leftHand = ... sectionII.viola = ... sectionII.cello = ... % etc. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: The composition process doesn't get disrupted using Lily Pond?
Hi Yakir, Am 30.12.18 um 18:28 schrieb Yakir Arbib: Can anyone here who is a composer and uses LilyPond to compose give me some little insight about the process? I’m not a professional composer but I use LilyPond to do my composing homework for university ;) I mean if you are composing for more than one stave (I.E. piano and cello or string quartet) how do you keep track of the music if each stave has to be coded separately? I use Frescobaldi (http://frescobaldi.org) which shows the resulting PDF on one half of the screen. There I can click on any note to get to the corresponding place in the LilyPond code. That’s probably not an option for you, is it? But there are other techniques that might help you: Many people write exactly one measure per line, use bar checks (the symbol | that checks whether there is a bar line where you expect it), write a bar number comment every 5 bars etc. I know that there are several blind composers who use LilyPond and I also transcribed a piano piece some time ago for a blind pianist who used the LilyPond code to learn to play that piece. So LilyPond seems to be a appropriate tool for those people. Of course, I’m not an expert in that matter. Happy New Year to you too! Malte ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
The composition process doesn't get disrupted using Lily Pond?
Dear list, First of all, happy New Year to everybody! I wanted to ask you a more general question related to composition and LilyPond: Can anyone here who is a composer and uses LilyPond to compose give me some little insight about the process? I mean if you are composing for more than one stave (I.E. piano and cello or string quartet) how do you keep track of the music if each stave has to be coded separately? Do you composers use Lily only after you notate the pieces on regular paper, or is it possible to make some sort of easier structure in Lily to make sense of a multi-instrument piece of music so your composition process is not constantly being interrupted by technicalities? I am visually impaired and don't have a primary way of notating the music "for myself" first. Any tips would be incredibly appreciated!! Thank you very much and all the best in music! Yakir ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
"as fast as possible" pseudo-tuplets
Hi List, I'm working on a realization of Stockhausen's "Plus Minus", and one of its frequent features is the instruction to play a group of notes "as fast as possible". In contemporary music notation there is a common practice of notating rapid passages with a single slashed beam and irregular note spacing, giving the duration as a note value with a tuplet bracket. I see in the LSR the following: http://lsr.di.unimi.it/LSR/Snippet?id=721 and http://lsr.di.unimi.it/LSR/Item?id=797 which together seem like they'd provide the necessary function, but I don't know how to implement them together as a single command. What I would like is the following, if possible: I can treat the passage as a tuplet, allowing me to calculate the entire duration, which I can then specify to be displayed instead of a tuplet number, the passage will be contained under a single, slashed beam, and (optionally) the note-spacing can be irregular (does Lily even have this capability? To apply randomized x-offsets to specific notes without interfering with the alignment of other voices?) LSR 721 makes it look like even getting slashed beams involves a lot of Scheme code; is there a more elegant way to do this? Thanks in advance for the help. A ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Whole measure rest in 9/4 time
On 2018-12-30 1:21 am, Andrew Bernard wrote: Hi David, What does usable-duration-logs mean? The NR internals section says: usable-duration-logs (list): '(-3 -2 -1 0) List of duration-logs that can be used in typesetting the grob. If I am not mistaken, the value refers to the base-two logarithm of the reciprocal duration of a note. (I think it's the reciprocal, but I might have it backwards.) So, -3 = maxima, -2 = longa, -1 = breve, 0 = whole, 1 = half, 2 = quarter, etc. That means setting the usable-duration-logs list to just '(0) means it can only use the whole rest symbol for the multi-measure rest. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Whole measure rest in 9/4 time
Am 30.12.18 um 10:21 schrieb Andrew Bernard: Hi David, What does usable-duration-logs mean? The NR internals section says: usable-duration-logs (list): '(-3 -2 -1 0) List of duration-logs that can be used in typesetting the grob. This says which rests can be used for a whole measure (depending on its length). -3 maxima -2 longa -1 breve (that’s default for 9/4 time) 0 whole/semibreve 1 half/minim 2 quarter/crotchet 3 eighth/quaver … Normally, you wouldn’t use positive logs (rest durations shorter than whole) even for shorter measures like 3/8. But longer measures like 4/2 or 9/4 will get longer rest durations because negative logs are allowed. Setting usable-duration-logs to '(0) allows only whole rests for measures of all lengths. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Whole measure rest in 9/4 time
Hi David, What does usable-duration-logs mean? The NR internals section says: usable-duration-logs (list): '(-3 -2 -1 0) List of duration-logs that can be used in typesetting the grob. I am aware the NR is reference not tutorial, but this entry has very little explanatory value. What do the logarithms do? Why do you set it to a list containing 0? These manual entries are not illuminating because it just says that the usable durations log list is a list of usable duration logs, and that they can be used in typesetting. It would be great of we could improve this entry at least. I am reminded of those all too common software user manuals that have an entry for File->Open saying open a file and that's it. Great. Andrew On Sun, 30 Dec 2018 at 10:43, David Sumbler wrote: > > \version "2.19.82" > > { > \time 9/4 > \override MultiMeasureRest.usable-duration-logs = #'(0) > R1*9/4 | > > \numericTimeSignature \time 4/4 R1 | > } > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user