Re: Changing the size of the arpeggio's arrow
Am Mi., 22. Apr. 2020 um 01:57 Uhr schrieb Paolo Prete : > > Hello. > > The following code uses a (very, very, very helpful) function that Harm wrote > some months ago. > Unfortunately, it causes a compiler's error if the size of the arrow is too > big (in the following snippet the error is obtained when the size (my-scale) > is >= 2). > Harm (or anyone else), please can you fix it if possible? > Many thanks, > > Best, > P > > > \version "2.19.84" > > biggerArrow = > #(define-music-function (scale)(number?) > "Returns an override for @code{Arpeggio.stencil}, with arrow-heads scaled by > @var{scale}" > #{ > \override Arpeggio.stencil = > #(lambda (grob) > (let* ((arp-dir (ly:grob-property grob 'arpeggio-direction))) > ;; If 'arpeggio-direction is unset use default-stencil > (if (null? arp-dir) > (ly:arpeggio::print grob) > (let* ((arrow-glyph >(format #f > "scripts.arpeggio.arrow.~a1" > (if (negative? arp-dir) "M" ""))) > (font (ly:grob-default-font grob)) > (arrow-head-stil (ly:font-get-glyph font arrow-glyph)) > (arrow (ly:stencil-scale arrow-head-stil scale scale)) > (arrow-y-ext (ly:stencil-extent arrow Y)) > (arrow-x-ext (ly:stencil-extent arrow X)) > (arrow-width (interval-length arrow-x-ext)) > (pos (ly:grob-property grob 'positions))) > > ;; 'positions modified to reflect the height of the arrow-head > (ly:grob-set-property! grob 'positions > (if (positive? arp-dir) > (cons (car pos) (- (cdr pos) arrow-width)) > (cons (+ (car pos) arrow-width) (cdr pos > > ;; unset 'arpeggio-direction to get the default trill-line stencil > (ly:grob-set-property! grob 'arpeggio-direction '()) > > (let* ((stil (ly:arpeggio::print grob)) >(stil-y-ext (ly:stencil-extent stil Y)) >(stil-x-ext (ly:stencil-extent stil X)) >(stil-width (interval-length stil-x-ext)) >;; A scaled arrow-head will be slightly off, find the value >;; to compensate for x-axis, before adding it to the >;; arpeggio-line >(scale-compensate-x (/ (- stil-width arrow-width) 2)) >(new-stil > (ly:stencil-add >(ly:stencil-translate > arrow > (cons >scale-compensate-x >(if (negative? arp-dir) >;; For a down pointing arrow, it's top will be > at >;; arpeggio-line-bottom, move by it's height to >;; let the arrow-basis match with the > line-bottom >(- (car stil-y-ext) > (interval-length arrow-y-ext)) >(cdr stil-y-ext >stil))) > >;; We need to adjust 'X-extent to reflect the enlarged arrow, >;; in order to avoid spacing issues >(ly:grob-set-property! grob 'X-extent > (interval-widen >(ly:arpeggio::width grob) >(* scale-compensate-x -2))) > >;; Do we need to resize the stencil? For now commented >;(ly:make-stencil >; (ly:stencil-expr new-stil) >; (interval-widen stil-x-ext (* scale-compensate-x -2)) >; (ly:stencil-extent new-stil Y)) >new-stil >) > #}) > > %% enlarged > my-scale = 1.5 > > { > \arpeggioArrowUp > \biggerArrow \my-scale > \arpeggio > } Hi Paolo, this function was the example of my talk at the Music Engraving Conference in Salzburg this January. While preparing the talk I cured some glitches in the original function above. Reworked code below. Though, the visual outcome is bad for scaling values > 2, because the "tip" of the arrow-head, meant to join the arpeggio-element, becomes too large and sticks out. Would be better to create a new arrow-head, via markup-command or else. In any case, it looks strange to have a very huge arrow-head sitting on a default-sized trill-like arpeggio-line, imho. Anyway, here the Salzburg-code: scaleArpeggioArrow = #(define-music-function (scale)(number?) #{ \override Arpeggio.stencil = #(lambda (grob) (let ((arp-dir (ly:grob-property grob 'arpeggio-direction))) (if (null? arp-dir) (ly:arpeggio::print grob) (let* ((arrow-glyph (format #f "scripts.arpeggio.arrow.~a1" (if (negative? arp-dir)
MacOSX Catalina Lilypond 2.21 disabled
Is there any way to use Lilypond version 2.21 with Macosx Catalina? The app unfortunately seems to be a disabled app. -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
Re: MacOSX Catalina Lilypond 2.21 disabled
Hello Neyzenemre, Catalina requires the 64 bit version, and 2.20.0 64 runs fine here. Maybe you installed the 32 bit version? JM > Le 22 avr. 2020 à 14:12, neyzenemre a écrit : > > Is there any way to use Lilypond version 2.21 with Macosx Catalina? The app > unfortunately seems to be a disabled app. > > > > -- > Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html >
Re: MacOSX Catalina Lilypond 2.21 disabled
> On 22 Apr 2020, at 14:12, neyzenemre wrote: > > Is there any way to use Lilypond version 2.21 with Macosx Catalina? An installer from MacPorts lilypond-devel might come by, but there are some issues, which Werner is working on.
Re: MacOSX Catalina Lilypond 2.21 disabled
One trick I can mention: use "sudo", but then you must know what you do :-(. (If you don't recognize it, forget it.) Regards, Wim. -- Message: 3 Date: Wed, 22 Apr 2020 05:12:39 -0700 (MST) From: neyzenemre To: lilypond-user@gnu.org Subject: MacOSX Catalina Lilypond 2.21 disabled Message-ID: <1587557559008-0.p...@n5.nabble.com> Content-Type: text/plain; charset=us-ascii
Re: Bar numbers “repeat aware” for music for dancing
-- Forwarded message -- > From: Niols > To: lilypond-user@gnu.org > Date: Wed, 15 Apr 2020 01:13:11 +0200 > Subject: Bar numbers “repeat aware” for music for dancing > Hello everyone, > > This is my first message on this mailing list and I hope I do it > correctly. Welcome! > For such tunes, we are not so interested in the “usual” printed bar > numbers, but rather in the bar numbers (“repeat aware”) from the dance. > In particular, a repeat in the music does not mean a repeat in the > dance: if the first eight bars are repeated in the music, I would like > the bar numbers to go from 1 to 8 and then directly to 17. > > I am unsure how to deal with that in an automated and clean way. I'm not aware of an automated way. On the other hand, I find that it is not really much trouble to just reset the bar numbers as you need to. You're already writing code for \repeat volta and \alternative and possibly \bar "||" and so forth, so what is one additional line of code to reset the bar number? > Also, I would want to not print one bar number but all the bar numbers > within the repeat. If the first eight bars are repeated, I would like to > print 1 9, 2 10, 3 11, etc. This is less a priority for me but I guess > it is linked to the same problem. Would you have pointers for that too? So, here is a function I use to show duplicate bar numbers. You pass in the starting bar number, and the number of repeated bars. Also, the ones I use for triple and quadruple numbers. Usage: \set Score.currentBarNumber = #42 \set Score.barNumberFormatter = #(double-bar-number 16) #(define (double-bar-number increase-amount) (lambda (barnum measure-pos alt-number context) #{ \markup \override #'(baseline-skip . 2) \center-column { #(robust-bar-number-function barnum measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount barnum) measure-pos alt-number context) } #} ) ) #(define (triple-bar-number increase-amount) (lambda (barnum measure-pos alt-number context) #{ \markup \override #'(baseline-skip . 2) \center-column { #(robust-bar-number-function barnum measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount barnum) measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount (+ increase-amount barnum)) measure-pos alt-number context) } #} ) ) #(define (triple-bar-number-plus-offset increase-amount offset-amount) (lambda (barnum measure-pos alt-number context) #{ \markup \override #'(baseline-skip . 2) \center-column { #(robust-bar-number-function barnum measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount barnum) measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount (+ increase-amount (+ barnum offset-amount))) measure-pos alt-number context) } #} ) ) #(define (quadruple-bar-number increase-amount) (lambda (barnum measure-pos alt-number context) #{ \markup \override #'(baseline-skip . 2) { \center-column { #(robust-bar-number-function barnum measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount (+ increase-amount barnum)) measure-pos alt-number context) } \center-column { #(robust-bar-number-function (+ increase-amount barnum) measure-pos alt-number context) #(robust-bar-number-function (+ increase-amount (+ increase-amount (+ increase-amount barnum))) measure-pos alt-number context) } } #} ) ) > > Thank you in advance for your time! > > Best regards, > — Nicolas “Niols” Jeannerod > HTH, Elaine Alt 415 . 341 .4954 "*Confusion is highly underrated*" ela...@flaminghakama.com Producer ~ Composer ~ Instrumentalist ~ Educator -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Equal space between all notes
Please, I cannot find a way to set the same horizontal space between different notes. For example, i would like to have the identical horizontal space between 2/4 notes and 1/4... A greater duration usually takes more space, while I need always the same... Thanks! -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
Re: Equal space between all notes
Lily's proportional notation should be what you're looking for; check out http://lilypond.org/doc/v2.18/Documentation/notation/proportional-notation On Wed, Apr 22, 2020 at 3:20 PM prosfigaki80 wrote: > Please, I cannot find a way to set the same horizontal space between > different notes. For example, i would like to have the identical horizontal > space between 2/4 notes and 1/4... A greater duration usually takes more > space, while I need always the same... Thanks! > > > > -- > Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html > > -- Sam Bivens, Ph.D. Music Theory Faculty Cleveland Institute of Music 11021 East Boulevard Cleveland, OH 44106 sam.biv...@cim.edu
Re: Default accidental style with timing off
After some more work I came up with the attached redefinition of the bar which does what I originally asked for. I’d appreciate any scheme experts critique on what I have as I’m not entirely comfortable with the way I’m switching in and out of scheme. It works, I’m just not sure it’s “proper.” ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ accidental_style.ly Description: Binary data
Re: Equal space between all notes
Does a combination of proportionalNotationDuration and overriding the SpacingSpanner do the trick? The attached example, admittedly a bit of a hack, seems to work. spacing-mwe.ly Description: Binary data
Break visibility for notes?
Is there a way to specify that a note should only appear if it’s the first note on the line? I tried using the break-visibility property but this doesn’t seem to be working (the notes simply disappear entirely. \version "2.19.84" mystart = \override Voice.NoteHead.break-visibility = #begin-of-line-visible myend = \revert Voice.NoteHead.break-visibility music = { \repeat unfold 20 { c' } \mystart g' g' g' g' g' g' g' g' \myend \repeat unfold 20 { c' } } \new Staff { \new Voice = "mel" { \music } } ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ
Re: Default accidental style with timing off
On 2020-04-22 1:10 pm, Fr. Samuel Springuel wrote: After some more work I came up with the attached redefinition of the bar which does what I originally asked for. I’d appreciate any scheme experts critique on what I have as I’m not entirely comfortable with the way I’m switching in and out of scheme. It works, I’m just not sure it’s “proper.” Seems fine. A pattern I could recommend is defining a named procedure as opposed to using a lambda with \applyContext: foo = #(define-music-function () () (define (proc context) (do-something-here)) #{ \applyContext #proc #}) This keeps potentially complex S-expressions outside LilyPond syntax, which should improve readability. Apart from that, I would suggest simplifying your variable names. There is no need to call something "mything" when "thing" would suffice. Remember that bindings have scope; and local bindings trump. You only need unique names if you must have access to both variables. That said, I would prefer "my-thing" over "mything". You have to be careful with smooshing words together lest they read poorly. "curnum" is not ideal as it looks like it could be a word in Latin. "currnum" is slightly better, but "curr-num" would be the preference if abbreviation is required. Mind you, I would sidestep all that by calling it "bar-number": (let* ((score (ly:context-find context 'Score)) (bar-number (ly:context-property score 'internalBarNumber))) (ly:context-set-property! score 'internalBarNumber (1+ bar-number))) -- Aaron Hill
Re: Equal space between all notes
Sam Bivens writes: >> On Wed, Apr 22, 2020 at 3:20 PM prosfigaki80 wrote: >> >>> Please, I cannot find a way to set the same horizontal space between >>> different notes. For example, i would like to have the identical horizontal >>> space between 2/4 notes and 1/4... A greater duration usually takes more >>> space, while I need always the same... Thanks! >>> >>> > > Lily's proportional notation should be what you're looking for; check out > http://lilypond.org/doc/v2.18/Documentation/notation/proportional-notation Uh, that's exactly the opposite of what was desired. -- David Kastrup
Re: Equal space between all notes
Yes, I realized I misread the e-mail, as I clarified to the questioner in a private e-mail. I hope I shared a possible hack in a later message to the full list. On Wed, Apr 22, 2020 at 6:45 PM David Kastrup wrote: > Sam Bivens writes: > > >> On Wed, Apr 22, 2020 at 3:20 PM prosfigaki80 > wrote: > >> > >>> Please, I cannot find a way to set the same horizontal space between > >>> different notes. For example, i would like to have the identical > horizontal > >>> space between 2/4 notes and 1/4... A greater duration usually takes > more > >>> space, while I need always the same... Thanks! > >>> > >>> > > > > Lily's proportional notation should be what you're looking for; check out > > > http://lilypond.org/doc/v2.18/Documentation/notation/proportional-notation > > Uh, that's exactly the opposite of what was desired. > > -- > David Kastrup > -- Sam Bivens, Ph.D. Music Theory Faculty Cleveland Institute of Music 11021 East Boulevard Cleveland, OH 44106 sam.biv...@cim.edu