Re: Rules for beam subdivision
On Sun, 31 May 2020 at 22:15, Thomas Morley wrote: > > Am Sa., 30. Mai 2020 um 05:06 Uhr schrieb Vaughan McAlley > : > > > > Hi, > > > > Beam subdivision is great, but is there a way of automatically turning it off for just sixteenths? So recreating this example, but without constantly turning subdivision on and off. > > > > Cheers, > > Vaughan > > > > > > A first sketch: > > \layout { > \context { > \Voice > \consists > #(lambda (ctx) > (make-engraver > (listeners > ((rhythmic-event this-engraver event) > (ly:context-set-property! ctx 'subdivideBeams > (if (equal? (ly:event-property event 'length) > (ly:make-moment 1/16)) > '() > #t)) > } > } > > \relative c'' { > \time 4/4 > \set baseMoment = #(ly:make-moment 1/8) > \set beatStructure = 2,2,2,2 > c32 c c c c c c c > c16 c c c > \tuplet 3/2 8 { c16 c c c c c } > c16 c c c > } > Thanks Harm, that works perfectly for my use case- my music almost never gets more complicated than that rhythmically. > The coding does a plethora of settings for 'subdivideBeams. Oh gosh, I bet it does… > It should be limited to situations where a Beam is actually present/initiated. > Thus I wrote a _first_ sketch... > > Cheers, > Harm Cheers, Vaughan
Re: Absolute font-size for TextScript
On 2020-06-02 2:00 pm, Paolo Prete wrote: On Tue, Jun 2, 2020 at 8:57 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: Hi Paolo, > is it possible to set an absolute font-size for *all* the TextScript objects? As is tradition, I am almost certainly over-engineering here. However, would the following approach be of any use: \version "2.20.0" transformText = #(define-music-function (grob-path proc) ((key-list? 'TextScript) procedure?) #{ \override $grob-path . before-line-breaking = #(grob-transformer 'before-line-breaking (lambda (grob orig) (ly:grob-set-property! grob 'text (proc (ly:grob-property grob 'text) #}) boxIt = #(lambda (text) (markup #:box text)) flipIt = #(lambda (text) (markup #:rotate 180 text)) sizeIt = #(define-scheme-function (size) (number?) (lambda (text) (markup #:abs-fontsize size text))) \layout { \context { \Staff \transformText \sizeIt #8 } } \score { \new Staff { b'2.^"Lorem" \once \transformText \boxIt b'4_"ipsum" } \layout { #(layout-set-staff-size 8) } } \score { \new Staff { b'2.^"Lorem" b'4_"ipsum" } \layout { #(layout-set-staff-size 13) } } \score { \new Staff { \once \transformText \flipIt b'2.^"Lorem" b'4_"ipsum" } \layout { #(layout-set-staff-size 21) } } -- Aaron Hill
Re: Absolute font-size for TextScript
On Tue, Jun 2, 2020 at 11:18 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Paolo, > > > how exactly do I have to call \absFontSize > > > \version "2.19.83" > > allowGrobCallback = > #(define-scheme-function (parser location syms) (symbol-list?) >(let ((interface (car syms)) > (sym (cadr syms))) > #{ >\with { > \consists #(lambda (context) > `((acknowledgers . > ((,interface . ,(lambda (engraver grob > source-engraver) > (let ((prop (ly:grob-property > grob sym))) > (if (procedure? prop) > (ly:grob-set-property! grob sym (prop grob))) > > )) > ) >} > #})) > > absFontSize = > #(define-scheme-function (parser location pt)(number?) >(lambda (grob) > (let* ((layout (ly:grob-layout grob)) > (ref-size (ly:output-def-lookup (ly:grob-layout grob) > 'text-font-size 12))) >(magnification->font-size (/ pt ref-size)) >))) > > % LilyBin > \score { > > { c'1^"foobar" d'2-> \once \override Script.font-size = \absFontSize > #72 2-> } > > \layout { > \context { > \Score > \allowGrobCallback font-interface.font-size > \override TextScript.font-size = \absFontSize #22 > } > } > } > > > Just tested, it works greatly! Thanks
Re: Absolute font-size for TextScript
Hi Paolo, > how exactly do I have to call \absFontSize \version "2.19.83" allowGrobCallback = #(define-scheme-function (parser location syms) (symbol-list?) (let ((interface (car syms)) (sym (cadr syms))) #{ \with { \consists #(lambda (context) `((acknowledgers . ((,interface . ,(lambda (engraver grob source-engraver) (let ((prop (ly:grob-property grob sym))) (if (procedure? prop) (ly:grob-set-property! grob sym (prop grob))) )) ) } #})) absFontSize = #(define-scheme-function (parser location pt)(number?) (lambda (grob) (let* ((layout (ly:grob-layout grob)) (ref-size (ly:output-def-lookup (ly:grob-layout grob) 'text-font-size 12))) (magnification->font-size (/ pt ref-size)) ))) % LilyBin \score { { c'1^"foobar" d'2-> \once \override Script.font-size = \absFontSize #72 2-> } \layout { \context { \Score \allowGrobCallback font-interface.font-size \override TextScript.font-size = \absFontSize #22 } } } Hope that helps! Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info
Re: Absolute font-size for TextScript
On Tue, Jun 2, 2020 at 8:57 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Paolo, > > > is it possible to set an absolute font-size for *all* the TextScript > objects? > > I use this (from an include file): > > > allowGrobCallback = > #(define-scheme-function (parser location syms) (symbol-list?) >(let ((interface (car syms)) > (sym (cadr syms))) > #{ >\with { > \consists #(lambda (context) > `((acknowledgers . > ((,interface . ,(lambda (engraver grob > source-engraver) > (let ((prop (ly:grob-property > grob sym))) > (if (procedure? prop) > (ly:grob-set-property! grob sym (prop grob))) > > )) > ) >} > #})) > > absFontSize = > #(define-scheme-function (parser location pt)(number?) >(lambda (grob) > (let* ((layout (ly:grob-layout grob)) > (ref-size (ly:output-def-lookup (ly:grob-layout grob) > 'text-font-size 12))) >(magnification->font-size (/ pt ref-size)) >))) > > \layout { > \context { > \Score > \allowGrobCallback font-interface.font-size > } > } > > > Thanks!! But how exactly do I have to call \absFontSize ? I tried in the following way, but could not obtain the wanted result: %% allowGrobCallback = #(define-scheme-function (parser location syms) (symbol-list?) (let ((interface (car syms)) (sym (cadr syms))) #{ \with { \consists #(lambda (context) `((acknowledgers . ((,interface . ,(lambda (engraver grob source-engraver) (let ((prop (ly:grob-property grob sym))) (if (procedure? prop) (ly:grob-set-property! grob sym (prop grob))) )) ) } #})) absFontSize = #(define-scheme-function (parser location pt)(number?) (lambda (grob) (let* ((layout (ly:grob-layout grob)) (ref-size (ly:output-def-lookup (ly:grob-layout grob) 'text-font-size 12))) (magnification->font-size (/ pt ref-size)) ))) % LilyBin \score{ { \absFontSize 16 c'^"foobar" } \layout { \context { \Score \allowGrobCallback font-interface.font-size } } } %% Best, P
Re: Absolute font-size for TextScript
Hi Paolo, > is it possible to set an absolute font-size for *all* the TextScript objects? I use this (from an include file): allowGrobCallback = #(define-scheme-function (parser location syms) (symbol-list?) (let ((interface (car syms)) (sym (cadr syms))) #{ \with { \consists #(lambda (context) `((acknowledgers . ((,interface . ,(lambda (engraver grob source-engraver) (let ((prop (ly:grob-property grob sym))) (if (procedure? prop) (ly:grob-set-property! grob sym (prop grob))) )) ) } #})) absFontSize = #(define-scheme-function (parser location pt)(number?) (lambda (grob) (let* ((layout (ly:grob-layout grob)) (ref-size (ly:output-def-lookup (ly:grob-layout grob) 'text-font-size 12))) (magnification->font-size (/ pt ref-size)) ))) \layout { \context { \Score \allowGrobCallback font-interface.font-size } } > if this has already been implemented as a built-in feature No… but I would love to see it (or something "better"?) added to the base distro. Hope that helps! Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info
Re: IMSLP upload policy (was: Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.)
On 6/2/20, Rutger Hofman wrote: > I know that pdftk can add attachments to PDFs. Is that now also built > into Lilypond? Well… yes! https://git.savannah.gnu.org/cgit/lilypond.git/commit/?id=0fa6f042cccacb643d46781dde23617c71a9753e Man, I wish more people would know about that feature. I need to take a look at the docs because right now it’s only buried here: http://lilypond.org/doc/v2.21/Documentation/usage/command_002dline-usage > My preference for uploading parts is the other way around, i.e. the way > I did it. The parts alone for this typeset total to 311 pages. I don't > like the idea of 100 orchestra members each downloading that huge thing, > also enhanced with a few megabytes of lilypond source Well, that’s mainly because you have a huge raster image in there :-) To each their own; your reasons are as valid as mine depending on the point of view. > I would of course never urge anybody to get an IMSLP membership :-), but > the fee is (un)reasonably small (a few collaboration actions for IMSLP > would already suffice). Are you spared the waiting time as an IMSLP contributor? I know I’m not. > But in any case, 10 seconds delay would be dwarfed by > the alternative of downloading and perusing 311 pages. I guess it depends how they work; if that’s for printing individual parts as two-sided booklets (for example with a spiral binding), your approach is indeed the most convenient. If that’s for downloading everything as quickly as possible and then being able to keep a copy at hand, mine works. (By the way, when it comes to “perusing 311 pages”, LilyPond also supports creating a table of content :-) Cheers, -- V.
Absolute font-size for TextScript
Hello, is it possible to set an absolute font-size for *all* the TextScript objects? I saw this thread: http://lilypond.1069038.n5.nabble.com/feature-request-abs-fontsize-available-for-all-text-grobs-td148053.html Which is old, and I don't understand if there is a working solution in it; nor I know if this has already been implemented as a built-in feature, meanwhile. Thanks! P
Re: BendBefore / BendSpanner examples?
Am Di., 2. Juni 2020 um 18:54 Uhr schrieb Pierre Perol-Schneider : > > Le mar. 2 juin 2020 à 18:33, Thomas Morley a écrit > : > >> >> Hi Pierre, >> >> maybe I'm overtired, can't see a typo... >> >> Cheers, >> Harm > > > Sorry, my mistake, it works with v2.21 _I_ have to apologize, really should have stated the version.
Re: forced \break or \pageBreak with ragged-right
On cursory glance this looks like a viable solution. Perhaps I can tweak it to people to use it at the end of a system as opposed to the beginning of a system. That would make my life a bit easier but not completely necessary. Jun 2, 2020, 09:31 by r...@dabble.ch: > Michael Winter wrote: > >> >> I thought about something like that but I have tied notes that would be >> interrupted by that approach. Which is also why I cannot use multiple single >> scores. >> >> It also seems like trying to fit a square peg in a round whole. Again, I >> think there should be a way to have ragged-right for a single system after a >> \break or \pageBreak. That is the correct solution. >> > > Have a look at http://lsr.di.unimi.it/LSR/Item?id=1098 > (and be sure to read all the small print) > > > Cheers, > Robin >
Re: BendBefore / BendSpanner examples?
Le mar. 2 juin 2020 à 18:33, Thomas Morley a écrit : > Hi Pierre, > > maybe I'm overtired, can't see a typo... > > Cheers, > Harm > Sorry, my mistake, it works with v2.21. Cheers, Pierre
Re: BendBefore / BendSpanner examples?
Am Di., 2. Juni 2020 um 17:31 Uhr schrieb Pierre Perol-Schneider < pierre.schneider.pa...@gmail.com>: > Hi Harm, > Thank you, nice work.! > Cheers, > Pierre > PS. There's a typo here: > ... > (make-tie-stencil start (last cps) thick DOWN ;; <= (make-tie-stencil > start (last cps) thick DOWN height > Hi Pierre, maybe I'm overtired, can't see a typo... Cheers, Harm
IMSLP upload policy (was: Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.)
On 6/1/20 10:45 PM, Valentin Villenave wrote: On 6/1/20, Rutger Hofman wrote: [snip] On that note: One elaborate example of my experiences is found in the score and parts of "3 Bruchstücke aus Wozzeck" by Alban Berg, see https://imslp.org/wiki/Wozzeck%2C_Op.7_(Berg%2C_Alban) I appreciate that you’re making available your source code, but you could simply embed it within the PDF files (LilyPond can do that now!). See for example https://imslp.org/wiki/Oboe_Concerto_No.1_in_E-flat_major_(Herschel%2C_William) (btw, I generally prefer publishing all individual parts as a single PDF; people can then print whatever they want within it, but it makes it *much* easier for ensembles out there in my experience, particularly when IMSLP starts imposing a 15-second delay for all downloads.) I know that pdftk can add attachments to PDFs. Is that now also built into Lilypond? My preference for uploading parts is the other way around, i.e. the way I did it. The parts alone for this typeset total to 311 pages. I don't like the idea of 100 orchestra members each downloading that huge thing, also enhanced with a few megabytes of lilypond source, and then each selecting their own part from it. And to make things worse, orchestra members might just not print the title page for their part, thereby ruining the possibility to print double-sided because my carefully crafted page turns are bogged. I would of course never urge anybody to get an IMSLP membership :-), but the fee is (un)reasonably small (a few collaboration actions for IMSLP would already suffice). And if only the orchestra librarian has an IMSLP membership, it would allow her to download all parts as a zip and then distribute them. But in any case, 10 seconds delay would be dwarfed by the alternative of downloading and perusing 311 pages. Rutger
Re: Error while trying to put a Text above a notehead
On Tue, Jun 2, 2020 at 4:41 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Paolo, > > > it's of course _erroneous_ output, because it leads to what in common > programming is called UB: > > It’s perfectly defined behaviour: > > http://lilypond.org/doc/v2.18/Documentation/internals/fingering > > font-encoding (symbol): > 'fetaText > The font encoding is the broadest category for selecting a font. > Currently, only lilypond’s system fonts (Emmentaler) are using this > property. Available values are fetaMusic (Emmentaler), fetaBraces, fetaText > (Emmentaler). > > This is not a defined *behaviour*. This is a defined _default_. The UB is the result of the compiler, which behaves in two different ways if you change the backend without changing the input, due to the inapplicability of Feta font for normal text. It's like if you access the 11th element of an array of size 10 (defined default). It can crash or it can give weird results (---> undefined behavior) Cheers, P
Re: Error while trying to put a Text above a notehead
Hi Paolo, > it's of course _erroneous_ output, because it leads to what in common > programming is called UB: It’s perfectly defined behaviour: http://lilypond.org/doc/v2.18/Documentation/internals/fingering font-encoding (symbol): 'fetaText The font encoding is the broadest category for selecting a font. Currently, only lilypond’s system fonts (Emmentaler) are using this property. Available values are fetaMusic (Emmentaler), fetaBraces, fetaText (Emmentaler). Cheers, Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info
Re: Error while trying to put a Text above a notehead
On Tue, Jun 2, 2020 at 4:09 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Paolo, > > > I just verified that your previous snippet produces erroneous output > > It’s only "erroneous output" if you don’t know what it’s supposed to put > out… ;) > > Hi Kieren, In my humble opinion, even if absolutely not important (and not worthy to be signaled as an issue in the bugs ML) it's of course _erroneous_ output, because it leads to what in common programming is called UB: https://en.wikipedia.org/wiki/Undefined_behavior And the SVG backend doesn't even compile. Best, P >
Re: Error while trying to put a Text above a notehead
Paolo Prete wrote: But this is not what I want; I would like to specify font-series and font-family as a parameter (as I did for \abs-fontsize)... Well, you could define your own markup command(s). Have a look at /scm/define-markup-commands.scm for examples, including \abs-fontsize. Cheers, Robin
Re: Error while trying to put a Text above a notehead
On Tue, Jun 2, 2020 at 3:53 PM Robin Bannister wrote: > > > Is there an alternative for it? > > It is defaulting to another font. > To avoid this, say > text \markup \normal-text "Some text" > > > Cheers, > Robin > Thanks Robin, BTW, how can I override font-family and font-series in a "parametric" way? I tried in several ways, for example: c'-\tweak text \markup { \normal-text \abs-fontsize #16 \override #'(font-series . italic) "Some text" } -1 But none worked. I could obtain the wanted result by using explicit commands, like \italic or \typewriter: c'-\tweak text \markup { \normal-text \abs-fontsize #16 \italic "Some text" } -1 But this is not what I want; I would like to specify font-series and font-family as a parameter (as I did for \abs-fontsize)... Best, P
Re: Error while trying to put a Text above a notehead
Hi Paolo, > I just verified that your previous snippet produces erroneous output It’s only "erroneous output" if you don’t know what it’s supposed to put out… ;) Fingerings are in Feta font — try using normal text instead: { \override Fingering.staff-padding = #'() \stemDown c'-\tweak text \markup \normal-text "Some text" -1 } Hope that helps! Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: i...@kierenmacmillan.info
Re: Error while trying to put a Text above a notehead
Is there an alternative for it? It is defaulting to another font. To avoid this, say text \markup \normal-text "Some text" Cheers, Robin
Error while trying to put a Text above a notehead
Hello David (and Lilypond people), I just verified that your previous snippet produces erroneous output on pdf and a compiler error with -dbackend=svg: (look at : http://lilybin.com/7derud/1 ) Tested on 2.19.84 and 2.19.45 (Lilybin) { \override Fingering.staff-padding = #'() \stemDown c'-\tweak text "Some text" -1 } Is there an alternative for it? Thanks
Re: forced \break or \pageBreak with ragged-right
Michael Winter wrote: I thought about something like that but I have tied notes that would be interrupted by that approach. Which is also why I cannot use multiple single scores. It also seems like trying to fit a square peg in a round whole. Again, I think there should be a way to have ragged-right for a single system after a \break or \pageBreak. That is the correct solution. Have a look at http://lsr.di.unimi.it/LSR/Item?id=1098 (and be sure to read all the small print) Cheers, Robin
Re: forced \break or \pageBreak with ragged-right
Le mar. 2 juin 2020 à 13:58, Michael Winter a écrit : > I thought about something like that but I have tied notes that would be > interrupted by that approach. Which is also why I cannot use multiple > single scores. > ... (Therefore: lilypond.org/tiny-examples.html) This should not be a problem: \version "2.20.0" { \repeat unfold 20 s1 \shape #'((0 . 0)(0 . 0)(-4 . 0)(-4 . 0)) Tie c'1~ \stopStaff \once\hideNotes 1 \bar ""\break \startStaff \set Score.currentBarNumber = 21 c'1 \repeatTie \repeat unfold 20 s1 \bar "|." } \layout { system-count = 8 } For midi output, you can use tags. Cheers, Pierre
Re: string-split procedure
Thank you, all 3 work. ƒg On Tue, Jun 2, 2020 at 8:17 AM Valentin Villenave wrote: > > On 6/2/20, Thomas Morley wrote: > > (string-split "root x 0 0 root /root /bin/bash" #\SPACE) > > I think the recommended syntax is #\space (which is internally an > alias for #\sp if I understand correctly). > > Cheers, > -- V.
Re: string-split procedure
On 6/2/20, Thomas Morley wrote: > (string-split "root x 0 0 root /root /bin/bash" #\SPACE) I think the recommended syntax is #\space (which is internally an alias for #\sp if I understand correctly). Cheers, -- V.
Re: forced \break or \pageBreak with ragged-right
Thanks, I thought about something like that but I have tied notes that would be interrupted by that approach. Which is also why I cannot use multiple single scores. It also seems like trying to fit a square peg in a round whole. Again, I think there should be a way to have ragged-right for a single system after a \break or \pageBreak. That is the correct solution. Perhaps I should note that another solution for me would be to have ragged-right = ##t if it were actually possible to have proportional notation where every beat is EXACTLY the same horizontal space. But that really just does not seem to be possible. No matter what, I have measures of the same time signature that are not the same length and thus break at different spots when ragged-right = ##t for (for example, two 4/4 systems where one automatically breaks after 4 measures and the other after 3 with minimal-breaking on). Best, Michael Jun 2, 2020, 07:35 by pierre.schneider.pa...@gmail.com: > How about: > > \version "2.20.0" > { > \repeat unfold 20 s1 \bar "||" > \stopStaff s1 \bar ""\break > \startStaff > \set Score.currentBarNumber = 21 > \repeat unfold 20 s1 > } > > \layout { > system-count = 8 > } > > Otherwise you can do two single scores. > HTH, cheers, > Pierre > > PS. > http://lilypond.org/tiny-examples.html > > Le mar. 2 juin 2020 à 13:23, Michael Winter <> mwin...@unboundedpress.org> > > a écrit : > >> Thanks Pierre, >> >> ragged-last only works on the last system of the score. I would like to have >> a specific system within a score have a ragged-right even if it is not the >> last system in the score. >> >> I can imagine that this should be able to be done after a forced \break or >> \pageBreak. >> >> Thanks, >> >> Michael >> >> >> Jun 2, 2020, 24:48 by >> pierre.schneider.pa...@gmail.com>> : >> >>> Hi Michael, >>> try: >>> >>> ragged-last = ##t >>> >>> Cheers >>> Pierre >>> >>> Le mar. 2 juin 2020 à 06:13, Michael Winter via LilyPond user discussion >>> <>>> lilypond-user@gnu.org>>> > a écrit : >>> Hello, Is it possible to have ragged-right = ##f but then allow a single system to be ragged-right after a forced \break or \pageBreak? Any help on how to do this will be much appreciated. Thanks in advance. Michael >> >>
Re: string-split procedure
Am Di., 2. Juni 2020 um 13:20 Uhr schrieb Freeman Gilmore : > > Example: > (string-split "root:x:0:0:root:/root:/bin/bash" #\:) ⇒ ("root" "x" "0" > "0" "root" "/root" "/bin/bash") > > Now if i replace the ":"s with " "s, what do I put in the place of the ":" in: > (string-split "root x 0 0 root /root /bin/bash" #\:) ⇒ ("root" "x" "0" > "0" "root" "/root" "/bin/bash") > > Thank you, ƒg > (string-split "root x 0 0 root /root /bin/bash" #\SPACE) HTH, Harm
Re: forced \break or \pageBreak with ragged-right
How about: \version "2.20.0" { \repeat unfold 20 s1 \bar "||" \stopStaff s1 \bar ""\break \startStaff \set Score.currentBarNumber = 21 \repeat unfold 20 s1 } \layout { system-count = 8 } Otherwise you can do two single scores. HTH, cheers, Pierre PS. http://lilypond.org/tiny-examples.html Le mar. 2 juin 2020 à 13:23, Michael Winter a écrit : > Thanks Pierre, > > ragged-last only works on the last system of the score. I would like to > have a specific system within a score have a ragged-right even if it is not > the last system in the score. > > I can imagine that this should be able to be done after a forced \break or > \pageBreak. > > Thanks, > > Michael > > > Jun 2, 2020, 24:48 by pierre.schneider.pa...@gmail.com: > > Hi Michael, > try: > > ragged-last = ##t > > Cheers > Pierre > > Le mar. 2 juin 2020 à 06:13, Michael Winter via LilyPond user discussion < > lilypond-user@gnu.org> a écrit : > > Hello, > > Is it possible to have ragged-right = ##f but then allow a single system > to be ragged-right after a forced \break or \pageBreak? > > Any help on how to do this will be much appreciated. > > Thanks in advance. > > Michael > > >
Re: forced \break or \pageBreak with ragged-right
Thanks Pierre, ragged-last only works on the last system of the score. I would like to have a specific system within a score have a ragged-right even if it is not the last system in the score. I can imagine that this should be able to be done after a forced \break or \pageBreak. Thanks, Michael Jun 2, 2020, 24:48 by pierre.schneider.pa...@gmail.com: > Hi Michael, > try: > > ragged-last = ##t > > Cheers > Pierre > > Le mar. 2 juin 2020 à 06:13, Michael Winter via LilyPond user discussion <> > lilypond-user@gnu.org> > a écrit : > >> Hello, >> >> Is it possible to have ragged-right = ##f but then allow a single system to >> be ragged-right after a forced \break or \pageBreak? >> >> Any help on how to do this will be much appreciated. >> >> Thanks in advance. >> >> Michael >>
string-split procedure
Example: (string-split "root:x:0:0:root:/root:/bin/bash" #\:) ⇒ ("root" "x" "0" "0" "root" "/root" "/bin/bash") Now if i replace the ":"s with " "s, what do I put in the place of the ":" in: (string-split "root x 0 0 root /root /bin/bash" #\:) ⇒ ("root" "x" "0" "0" "root" "/root" "/bin/bash") Thank you, ƒg
Re: When (in seconds) does each page begin?
Am Di., 2. Juni 2020 um 10:19 Uhr schrieb Valentin Villenave : > > On 5/30/20, Matt Wallis wrote: > > But I'd still like to know how to find out when a page of a score begins > > Well, there is something to be done with the 'page-number and > 'rank-on-page properties, as demonstrated in this regtest: > https://git.savannah.gnu.org/cgit/lilypond.git/plain/input/regression/multi-measure-rest-reminder.ly > > The problem is that the page-breaking algorithm runs fairly late in > the process, so whenever I try adding that to the aforementioned > Grob_metadata_engraver, either ly:grob-system doesn’t return anything > or it remains stuck on 0. (The regtest I mentioned works around that > in a pretty convoluted way, by creating a new grob and then suiciding > it.) > > You might want to have a look; maybe your guess’s gonna be better than mine. > > Cheers, > -- V. > I think best bet would be to post-process the final file. We already have a post-process-hook (see Application Usage). Below I use it to print the first BarNumber of each page. If you know the used \tempo it should be straight forward to calculate the passed seconds. Ofcourse any calculation of passed time fails if multiple scores are in the file. The provided procedure is not able to distinguish. Here the code (example _has_ multiple scores) Output is done in terminal, output to a .log-file is possible as well, see comment. \version "2.19.32" #(define* (print-pages-first-bar-numbers layout pages #:optional print-to-file) ;; If `print-to-file' is set #t the output is written to a file ;; otherwise usually displayed in Terminal (let* ((lines (map (lambda (page) (ly:prob-property page 'lines)) pages)) ;; list of systems of each pages (sys (map (lambda (line) (append-map (lambda (l) (let ((system-grob (ly:prob-property l 'system-grob))) (if (not (null? system-grob)) (list system-grob) system-grob)) ) line)) lines)) ;; list of rhythmic-locations of first sys ;; returning a BarNumber and a moment, the moment is usually zero (sys-rhythmic-location (map (lambda (s) (if (and (not (null? s)) (ly:grob? (car s))) (grob::rhythmic-location (car s)) #f)) sys)) (start-bar-numbers (map (lambda (r-l) (if (pair? r-l) (car r-l) #f)) sys-rhythmic-location)) (formatted-output (map (lambda (page b-nr) (if b-nr (format #f "page ~a starts with BarNumber ~a\n" page b-nr) (format #f "page ~a contains no music\n" page))) (iota (length pages) 1 1) start-bar-numbers))) (if (not (null? start-bar-numbers)) (if print-to-file (let* ((output-name (ly:parser-output-name)) (outfilename (format "~a-page-first-bars.log" output-name)) (outfile (open-output-file outfilename))) (if (output-port? outfile) (begin (format #t "\n\tprinting to ~a" outfilename) (for-each (lambda (i) (display i outfile)) formatted-output)) (ly:warning (_ "Unable to open output file ~a to print the information") outfilename)) (close-output-port outfile)) (for-each display formatted-output) \paper { #(define (page-post-process layout pages) (print-pages-first-bar-numbers layout pages #f)) } %%% %% EXAMPLE %%% \header { title = "TITLE" } \pageBreak \score { \new Staff { \repeat unfold 2 { \time 4/4 c''1 \time 3/4 d''2. \time 3/8 e''8 8 8 \pageBreak } } } \markup "MARKUP" \pageBreak \score { \new Staff { \repeat unfold 2 { \time 4/4 c''1 \time 3/4 d''2. \time 3/8 e''8 8 8 \pageBreak } } } Cheers, Harm
Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.
On Mon, 1 Jun 2020 at 22:16, Rutger Hofman wrote: > > I am thinking of sharing my experiences as a user in this field by > contributing a tutorial or a practical experiences story (or whatever) > on this topic. It would make a distinction between: > > 1) temporary staves > 2) divisi allocation over groups of staves > > since these are different concepts, and they are handled differently by > the Lilypond user, although both depend on keepAliveInterfaces. > > And I could contribute a bit on techniques to have >2 voices per staff, > rhythmically homophonic or rhythmically polyphonic, especially in the > context of divisi staves. > > What would be the best venue for this? Lilypond docs? User list? Scores > of Beauty? If it gets into the Lilypond docs, it is there to "stay > forever" which would be nice. > > One elaborate example of my experiences is found in the score and parts > of "3 Bruchstücke aus Wozzeck" by Alban Berg, see > https://imslp.org/wiki/Wozzeck%2C_Op.7_(Berg%2C_Alban) (travel to the > tab [Arrangements and Transcriptions]). One can have a look at e.g. the > Violins I part, mvt. 1, Bars 396-404; there is a 5-fold divisi which is > folded into one staff in the full score. Or practically any instrument > group, for that matter. > > Rutger Hi, that would be awesome, and thank you so much for sharing the code for Wozzeck, that's exactly what I was looking for. I've been trying to find my way out for days, and even though I'm making steps in the good direction, it's not an easy job. A commented example on how to organise a modern large orchestral score and parts with divisi, desks, solos, temporary staves, and so on would be extremely useful, at least for me. I couldn't find such an example in the otherwise awesome documentation, and I was thinking to contribute myself once I'll be more familiar. Thank you! Lib > > On 5/28/20 10:33 AM, Lib Lists wrote: > > On Wed, 27 May 2020 at 18:10, Valentin Villenave > > wrote: > >> > >> On 5/27/20, Lib Lists wrote: > >>> merge the stems so > >>> that the final result looks like one voice. > >> > >> In that case, what you want clearly is \partcombine (\partCombine since > >> 2.21). > >> > >> If you have more than two voices, then you can always apply another > >> \partCombine on top of the first two voices, or use other tricks to > >> deal with the more complex situations. > > > > I understand. Unfortunately I cannot find a way to use the > > remove-layer technique with \partcombine (see attached file). I'd like > > to hide the top staff while maintaining the staff group between bar > > 19-24 for the difficult passage. Is there a way to achieve this? In > > other words there are four notations that I'd need to achieve for > > divisi: unisono, divisi (a2, a3, etc.) on same voice & same staff, > > divisi on different voices & same staff, divisi on different staves. > > > >> > >>> Finally, adding a \shortInstrumentName in the StaffGroup gives an > >>> error, but the resulting pdf is otherwise correct. > >> > >> instrumentName and shortInstrumentName are both siple property > >> definitions, not variables or functions so the \ is not needed; just > >> instrumentName = "something". > > > > That worked, thank you! > > > >> > >> Cheers, > >> -- V. >
Re: When (in seconds) does each page begin?
On 5/30/20, Matt Wallis wrote: > But I'd still like to know how to find out when a page of a score begins Well, there is something to be done with the 'page-number and 'rank-on-page properties, as demonstrated in this regtest: https://git.savannah.gnu.org/cgit/lilypond.git/plain/input/regression/multi-measure-rest-reminder.ly The problem is that the page-breaking algorithm runs fairly late in the process, so whenever I try adding that to the aforementioned Grob_metadata_engraver, either ly:grob-system doesn’t return anything or it remains stuck on 0. (The regtest I mentioned works around that in a pretty convoluted way, by creating a new grob and then suiciding it.) You might want to have a look; maybe your guess’s gonna be better than mine. Cheers, -- V.