Re: nested beaming
Fortunately I always use the latest development version. I'll try this in a while.Thank you!Paul Sent from my Galaxy Original message From: Carl Sorensen Date: 4/8/24 4:00 PM (GMT-07:00) To: Paul Scott Cc: Simon Albrecht , Lilypond-User Mailing List , Jean Abou Samra Subject: Re: nested beaming On Mon, Apr 8, 2024 at 4:51 PM Carl Sorensen wrote: On Mon, Apr 8, 2024 at 11:14 AM Paul Scott wrote: The case at the moment is with long groups of triplets of which the following is now a part: { \time 2/4 \tuplet 3/2 8 { a'16 16 \set stemRightBeamCount = 1 16 \set stemLeftBeamCount = 1 16 16 16 } } I think that after last summer's GSOC project on beaming, this now works correctly out of the box: My mistake. These changes didn't get in until 2.25 \version "2.25.11" % but earlier 2.25 versions may work { \time 2/4 \set subdivideBeams = ##t \tuplet 3/2 8 { a'16 16 16 16 16 16 } } Carl
Re: nested beaming
On Mon, Apr 8, 2024 at 4:51 PM Carl Sorensen wrote: > > > On Mon, Apr 8, 2024 at 11:14 AM Paul Scott > wrote: > >> >> The case at the moment is with long groups of triplets of which the >> following is now a part: >> >> { >>\time 2/4 >>\tuplet 3/2 8 { >> a'16 16 \set stemRightBeamCount = 1 16 \set stemLeftBeamCount = 1 >> 16 16 16 >>} >> } >> >> I think that after last summer's GSOC project on beaming, this now works >> correctly out of the box: > > > My mistake. These changes didn't get in until 2.25 > \version "2.25.11" % but earlier 2.25 versions may work > { >\time 2/4 >\set subdivideBeams = ##t >\tuplet 3/2 8 { > a'16 16 16 > 16 16 16 >} > } > > Carl
Re: nested beaming
On Mon, Apr 8, 2024 at 11:14 AM Paul Scott wrote: > > The case at the moment is with long groups of triplets of which the > following is now a part: > > { >\time 2/4 >\tuplet 3/2 8 { > a'16 16 \set stemRightBeamCount = 1 16 \set stemLeftBeamCount = 1 > 16 16 16 >} > } > > I think that after last summer's GSOC project on beaming, this now works > correctly out of the box: \version "2.24" { \time 2/4 \set subdivideBeams = ##t \tuplet 3/2 8 { a'16 16 16 16 16 16 } } HTH, Carl
Re: Minimize flats or sharps in transposed key signature?
> I'm using \transpose pretty heavily, and I'm running into an issue I don't > quite know how to solve. I'm aware of the \naturalizeMusic hack described > in the LilyPond documentation. I'm looking for something similar, but for > key signatures. This was discussed in the past, for example I posted a solution here: https://lists.gnu.org/archive/html/lilypond-user/2021-04/msg00025.html signature.asc Description: This is a digitally signed message part
Minimize flats or sharps in transposed key signature?
I'm using \transpose pretty heavily, and I'm running into an issue I don't quite know how to solve. I'm aware of the \naturalizeMusic hack described in the LilyPond documentation. I'm looking for something similar, but for key signatures. When a \key specification gets transposed, I would like to intervene to force the processor to choose the enharmonic equivalent with the smallest signature. For example, if a transposed key ends up being G# major, I would like to use Ab major instead, or if the key ends up as Db minor I would prefer to use C# minor. Just take the key with the least number of sharps or flats. In the case of exactly six sharps or six flats, my preference in my application would be flats instead of sharps, because I am working mostly with jazz musicians, but I understand that some might prefer sharps and some might have no preference. I've searched a little bit for an answer to this, but I haven't found it yet.
Re: nested beaming
On 4/8/24 9:46 AM, Simon Albrecht wrote: On 08.04.24 18:22, Paul Scott wrote: Many years ago I could nest square brackets in Lilypond. How can I write this now incorrect code: a16[[ 16 16] 16[ 16 16]] i.e. two groups of 3 beamed 16th notes joined by a single beam. The question is: what is the context and why do you want this? The case at the moment is with long groups of triplets of which the following is now a part: { \time 2/4 \tuplet 3/2 8 { a'16 16 \set stemRightBeamCount = 1 16 \set stemLeftBeamCount = 1 16 16 16 } } Normally, this is called subdividing beams and there is a context property to turn it on. This is explained in the NR at Rhythms -> Beams -> Setting automatic beam behaviour (or similar). I did look at NR 1.2.4 There have recently been significant improvements to how LilyPond handles this, but IIRC it’s not fully ‘there’ yet and in some situations manual intervention is needed besides defining baseMoment etc. What Jean gave you is the fully manual version of this and may be necessary for ‘non-standard’ notation. My triplet example is definitely not non-standard unless for some reason Gould doesn't like it. I presume the old ability to nest brackets break something else somewhere. Thank you, Paul Best, Simon
Re: nested beaming
On 08.04.24 18:22, Paul Scott wrote: Many years ago I could nest square brackets in Lilypond. How can I write this now incorrect code: a16[[ 16 16] 16[ 16 16]] i.e. two groups of 3 beamed 16th notes joined by a single beam. The question is: what is the context and why do you want this? Normally, this is called subdividing beams and there is a context property to turn it on. This is explained in the NR at Rhythms -> Beams -> Setting automatic beam behaviour (or similar). There have recently been significant improvements to how LilyPond handles this, but IIRC it’s not fully ‘there’ yet and in some situations manual intervention is needed besides defining baseMoment etc. What Jean gave you is the fully manual version of this and may be necessary for ‘non-standard’ notation. Best, Simon
Re: nested beaming
Le lundi 08 avril 2024 à 09:22 -0700, Paul Scott a écrit : > Many years ago I could nest square brackets in Lilypond. How can I write > this now incorrect code: > > a16[[ 16 16] 16[ 16 16]] i.e. two groups of 3 beamed 16th notes joined > by a single beam. > > I have looked at NR 1,2,4 A little bit manual, but you can do \version "2.24.2" { \time 6/8 a'16 16 \set stemRightBeamCount = 1 16 \set stemLeftBeamCount = 1 16 16 16 } https://lilypond.org/doc/v2.24/Documentation/notation/beams.html#manual-beams signature.asc Description: This is a digitally signed message part
nested beaming
Many years ago I could nest square brackets in Lilypond. How can I write this now incorrect code: a16[[ 16 16] 16[ 16 16]] i.e. two groups of 3 beamed 16th notes joined by a single beam. I have looked at NR 1,2,4 TIA, Paul
Re: indicate scordatura at beginning of piece
Hello Dirck, you might be interested in something I recently made for music SE. Essentially this will add two new engravers that automatically annotate the string tuning whenever it changes. Cheers, Valentin\version "2.24" % Used for printing the actual changes. A procedure that takes the tuning and the old tuning % as optional argument and returns a markup. #(set-object-property! 'stringTuningColumnFormatter 'translation-type? procedure?) % Create a tuning column reahearsal mark whenever the string tuning changes #(define (string-tuning-engraver context) (let ((current-tuning #f)) (make-engraver ((process-music engraver) (let ((tuning (ly:context-property context 'stringTunings)) (formatter (ly:context-property context 'stringTuningColumnFormatter))) (if (not (equal? tuning current-tuning)) (let* ((mark (ly:engraver-make-grob engraver 'RehearsalMark '( (ly:grob-set-property! mark 'text (formatter tuning current-tuning)) (ly:grob-set-property! mark 'font-size 0) (ly:grob-set-property! mark 'self-alignment-X LEFT) (set! current-tuning tuning % Print tuning supplied in details.string-tuning on the line positions #(define (key-signature-interface::tuning-column-print grob) (let* ((staff-symbol (ly:grob-object grob 'staff-symbol)) (pos (ly:grob-property staff-symbol 'line-positions #f)) ; With 2.25 line-positions will be used by default. Before this might not be set, so ; in case we recalculate this here to make the code compatible with 2.24 (pos (or pos (let* ((count (ly:grob-property staff-symbol 'line-count))) (map (lambda (i) (- count (* 2 i) 1)) (iota count) (ssp (ly:staff-symbol-staff-space staff-symbol)) (tuning (assoc-get 'string-tuning (ly:grob-property grob 'details))) (mups (map (lambda (p) (markup #:whiteout #:pad-markup 0.1 (note-name->markup p #f))) tuning)) (stcs (map (lambda (m) (ly:stencil-aligned-to (grob-interpret-markup grob m) Y CENTER)) mups)) (common-center (interval-center (ly:stencil-extent (grob-interpret-markup grob "A") X))) (tstcs (map (lambda (s p) (ly:stencil-translate s (cons (- common-center) (* ssp 0.5 p stcs pos))) (apply ly:stencil-add tstcs))) % Create a "tuning key signature" whenever tuning changes #(define (tab-staff-string-tuning-key-engraver context) (let ((current-tuning #f)) (make-engraver ((process-music engraver) (let ((tuning (ly:context-property context 'stringTunings))) (if (not (equal? tuning current-tuning)) (let* ((mark (ly:engraver-make-grob engraver 'KeySignature '( (ly:grob-set-nested-property! mark '(details string-tuning) tuning) (ly:grob-set-property! mark 'stencil key-signature-interface::tuning-column-print) (set! current-tuning tuning % Print a column of all tunings. Optional argument str-nos specifies tho 0 indexed string numbers. % Keyword arg show-change specifies if only the tuning should be printed or also the change from % previous tuning. #(define* (tuning-column::full-formatter tuning #:optional (old-tuning #f) (str-nos #f) #:key (show-change #f)) (if (not str-nos) (set! str-nos (iota (length tuning (let ((mup (map (lambda (n o i) #{ \markup { \vcenter \circle \dynamic #(number->string (1+ i)) \hspace #0.3 \vcenter #(if (or (equal? n o) (not show-change)) (note-name->markup n #f) (make-concat-markup (list (note-name->markup o #f) "→" (note-name->markup n #f } #}) tuning (if old-tuning old-tuning tuning) str-nos))) (markup #:override '(baseline-skip . 3) #:fontsize -4 (make-column-markup mup % Like tuning-column::full-formatter, but with show-change = #t #(define* (tuning-column::full-formatter-change . args) (apply tuning-column::full-formatter (append args (list #:show-change #t % Like tuning-column::full-formatter, but only print strings with changed tuning #(define* (tuning-column::diff-formatter tuning #:optional (old-tuning #f) (str-nos #f) #:key (show-change #f)) (if (not str-nos) (set! str-nos (iota (length tuning (if old-tuning (let* ((triplets (map list tuning old-tuning str-nos)) (triplets (filter (lambda (x) (