Re: Why does -dbackend=svg -dcrop remove system-system-spacing?
On Wed, Jan 6, 2021 at 2:29 PM David Wright wrote: > On Wed 06 Jan 2021 at 11:34:24 (-0500), Trevor Bača wrote: > > On Tue, Jan 5, 2021 at 11:31 PM David Wright wrote: > > > On Tue 05 Jan 2021 at 19:05:30 (-0500), Trevor Bača wrote: > > > > I love the functionality for cropped SVGs! (Added back in 2019, or > around > > > > then?) > > > > > > > > Question: it appears that cropped multisystem SVGs remove all > whitespace > > > > between systems. Is this supposed to happen? > > > > > > I think that removing all the margins is the functionality "crop" is > > > supposed to add to LP. To generate the equivalent cropped and packed > > > image without this facility would be quite tedious to do (unless > > > someone has a trick for doing it?). > > > > > > > %%% BEGIN %%% > > > > […] > > > > %%% END %%% > > > > > > > > Called with ... > > > >lilypond -dbackend=svg -dcrop test.ly > > > > ... produces test.cropped.svg as attached here. > > > > > > > > Screenshot: > > > > […] > > > > > > > > Seems like cropping should be around the edges of the image (rather > than > > > > between systems)? > > > > > > If you just want to crop the whole page image, you can do that easily > > > at the end of a normal run with the usual utilities. If you require > > > LP to set the entire score on a single page, just use a very long > > > custom page (as in NR §4.1.2: width, then length). > > > > I'm sorry; I don't understand. > > > > What I want Lily to do: remove whitespace from the *edges* of an SVG. > > As I said, you run LP as normal, and then trim to taste. So, taking > your example, I ran it with > $ lilypond-2.21.80-1.linux-64/bin/lilypond --svg -dno-point-and-click > Bača.ly > and then edited the first line of Bača.svg, resulting in Bača-trimmed.svg. > The end of the first line is modified from > width="210.00mm" height="297.00mm" viewBox="0 0 119.5016 169.0094"> > to > width="192.00mm" height="297.00mm" viewBox="4.5 0 109.5016 169.0094"> > which I did by inspection. As you use SVG files in your workflow, > I assume you can carry this out more easily and precisely¹ with some > particular tool. (I'm PDF-centric myself.) I only considered X because > I was inspecting the file on a landscape screen (and you didn't remove > the tagline anyway). > > > What Lily actually does when -dcrop is set: removes whitespace from the > > edges *and from between all systems* of an SVG. > > That's right, so that your file contains all the information, > unencumbered by margins, ready for some sort of further processing. > Obviously, I don't know what that will be in your case. > > It reminds me of those PNG files that you find in browsers' cache, > which have a strip or grid of little images that are used internally, > either as a toolbar, or displayed sequentially like a movie. > > > So my question is: is Lily supposed to remove whitespace from *between* > > systems when -d[c]rop is set? > > AIUI yes. But this is policy: I await pronouncements from higher-ups. > > ¹ I believe the modifications need to be kept proportional, in order > to preserve the aspect ratio. > Hi David, I really appreciate the responses, but I'm even more confused than before. When you ran ... $ lilypond-2.21.80-1.linux-64/bin/lilypond --svg -dno-point-and-click Bača.ly ... why didn't you include the -dcrop option? -- Trevor Bača www.trevorbaca.com soundcloud.com/trevorbaca
Re: Automatic cross-staff chords - testing help
Am Do., 7. Jan. 2021 um 13:08 Uhr schrieb Davide Bonetti : > > Hi, > > Great work. > > I've done some testing and found some bugs. Below the code I've tested, > attached the PDF with the result (on second page, first page are your > examples). > > \autoSplitChord doesn't works with curly braces, it returns blank output > (like a blank space in the score), so it's not possible to work with: > - chordmode > - more than one chord a time > - moltiple voices > > Also, \autoSplitChord doesn't works with single notes, it returns blank > space. > > It accepts variables, but the result is the same. > > Pippo = 1 > PippoDue = \chordmode {c1:/g} > PippoTre = c1 > PippoQuattro = {} > > \new PianoStaff > \with { \consists #Span_stem_engraver } > << >\new Staff = "up" >{ > \key c\major > %chord with stem up > \autoSplitChord #UP 2 %works > %chord without stem > \autoSplitChord 4%works > %chord with stem down > \autoSplitChord #DOWN %works > %chord, whole note > \autoSplitChord 1%works > %chordmode > \autoSplitChord \chordmode {c:/g} %blank output > %chord entered in curly braces > \autoSplitChord {} %blank output > %more than one chord, in curly braces > \autoSplitChord { } %blank output > %single note > \autoSplitChord c %blank output > %single note in a chord > \autoSplitChord %works > %chord entered in polyphonic style > \autoSplitChord <>%works > %polyphonic style, different durations > \autoSplitChord <>%warning & strange output > %polyphonic style, with some curly braces > \autoSplitChord <>%notes in curly braces are > not printed > %polyphonic style, with curly braces > \autoSplitChord << >{c4 d e f} >\\ >{c' d' e' f'} > >>%blank output > %chord in a variable > \autoSplitChord \Pippo%works > %chord in a variable with chordmode > \autoSplitChord \PippoDue%blank output > %single note in a variable > \autoSplitChord \PippoTre%blank output > %chord in curly braces in a variable > \autoSplitChord \PippoQuattro%blank output >} >\new Staff = "down" >{ > \key c\major > \clef bass > s1 >} > >> > > Thank you for the work. > > Cheers > > Davide Hi Davide, many thanks for testing. Though, `autoSplitChord` is meant ot be a tool applied to chords, i.e. event-chords. All of: \chordmode { c:/g } { } << {c4 d e f} \\ {c' d' e' f'} >> is sequential or simultaneous music. A single note-event like c'4 is not an event-chord as well. In all those cases `autoSplitChord` is not expected to work. \autoSplitChord << b \\ e' \\ g'' >> works more by accident. Below is an improved function which will simply returns the input, if it's not an event-chord, avoiding the blank space. \autoSplitChord << b \\ e' \\ g'' >> will stop working as well, all notes are returned unchanged. autoSplitChord = #(define-music-function (stem-dir staff-names pitch chord) ((ly:dir? 0) (pair? '("up" . "down")) (ly:pitch?) ly:music?) (_i "Split @var{chord} at optional @var{pitch}. The default of @var{pitch} is @code{#f}, which is interpreted by the called procedure @code{make-autosplit-chord} as @code{c'}. The splitted chords are distributed to named staves, relying on optional @var{staff-names}. The optional @var{stem-dir}, determines the direction of the stems and whether the chords may be connected by a cross-staff stem. The default results in unconnected chords. If the @code{Span_stem_engraver} is consisted, the chords may be connected by a cross-staff stem.") (if (music-is-of-type? chord 'event-chord) (let* ((skip (make-duration-of-length (ly:music-length chord))) (devided-pitches (make-autosplit-chord chord pitch)) (upper-chord (if (pair? (car devided-pitches)) (make-event-chord (car devided-pitches)) (make-skip-music skip))) (lower-chord (if (pair? (cdr devided-pitches)) (make-event-chord (cdr devided-pitches)) (make-skip-music skip #{ << \context Staff = #(car staff-names) \context Voice { $(if (negative? stem-dir) #{ \once \override Stem.cross-staff = #cross-staff-connect \once \override Flag.style = #'no-flag <>\noBeam #}) $(if (not (zero? stem-dir)) #{ \once \override Stem.direction = #stem-dir #}) #upper-chord } \context Staff = #(cdr staff-names) \context Voice { $(if (positive? stem-dir) #{
Re: Cross-staff ottava brackets with breaked line
Am Do., 7. Jan. 2021 um 18:33 Uhr schrieb Davide Parisi : > > Goodmorning, > I'm transcribing "Scarbo" from Gaspard de la Nuit with Lilypond. > There is a method for create a cross-staff ottava bracket with breaked line > like this example? > https://ibb.co/rwLwd19 > Thanks for your attention! How about below? Note the inlined comments. \version "2.21.6" \score { \new PianoStaff << \new Staff = "top" %% unrelated staff-staff-spacing %% Though, changing the values here has impact on the needed values %% for overriding the OttavaBracket.stencil \with { \override VerticalAxisGroup.staff-staff-spacing.padding = 4 } { \omit Score.TimeSignature \time 3/8 \key gis \minor s4.*7 R4.*2 } \new Staff = "bottom" { \time 3/8 \key gis \minor %% get simple numbers. \set Staff.ottavationMarkups = #ottavation-numbers %% makes crossing staves possible for OttavaBracket \override Staff.OttavaBracket.cross-staff = ##t %% increase thickness of the (dashed line) \override Staff.OttavaBracket.thickness = 2 %% oberride the stencil using `make-connected-line` the values for %% the point-list are found by try and error. %% OttavaBracket starts a bit to the left and a little higher than %% default to facilitate tailoring the (dashed) line and for %% aesthetic reasons \override Staff.OttavaBracket.stencil = #(lambda (grob) (ly:stencil-translate (ly:stencil-add (grob-interpret-markup grob (ly:grob-property grob 'text)) (make-connected-line '((1.35 . 1.65) (7 . 15.5) (83 . 15.5) (83 . 14.5)) grob)) '(-2 . 0))) \ottava #1 \repeat tremolo 6 { \once \stemUp %% unreated Slur shaping %% Remark, I often use other overrides before applying \shape in %% order to avoid too extreme values %% Nevertheless, the Slur is not as flat as in the original... \override Slur.positions = #'(8 . 0) \override Slur.height-limit = 0.5 \shape #'((0 . -4.5) (-5 . 7) (0 . -1) (0 . -0.5)) Slur 32( \change Staff = "top" } \repeat tremolo 6 { \change Staff = "bottom" \once \stemUp 32 \change Staff = "top" } \repeat tremolo 6 { \change Staff = "bottom" \once \stemUp 32 \change Staff = "top" } \repeat tremolo 6 { \change Staff = "bottom" \once \stemUp 32 \change Staff = "top" } \repeat tremolo 6 { \change Staff = "bottom" \once \stemUp 32 \change Staff = "top" } \repeat tremolo 6 { \change Staff = "bottom" \once \stemUp 32 \change Staff = "top" } \repeat tremolo 6 { \change Staff = "bottom" \once \stemUp 32 \change Staff = "top" ) } \ottava #0 \change Staff = "bottom" R4.*2 } >> \layout { indent = 0 ragged-right = ##f } } HTH, Harm atest-104-excerpt.pdf Description: Adobe PDF document
Cross-staff ottava brackets with breaked line
Goodmorning, I'm transcribing "Scarbo" from Gaspard de la Nuit with Lilypond. There is a method for create a cross-staff ottava bracket with breaked line like this example? https://ibb.co/rwLwd19 Thanks for your attention!
getting an extra beam, not sure why
I have a piece in 5/8 which includes a passage of 32nd notes. I would like to have it so that the beams are subdivided. I would like the first 10 notes beamed with subdivisions of 4 and then 6 32nd notes, then a repeat of that for the second 10. Here is what I tried to do to make that happen. \version "2.20.0" \score { << \new Staff << { \time 5/8 \set baseMoment = #(ly:make-moment 1 64) \set beatStructure = #'( 8 12 8 12 ) \set subdivideBeams = ##t b32[ b b b b b b b b b] b32[ b b b b b b b b b] } >> >> } The first set of 10 looks perfect, but the second set of 10 has a secondary beam connecting the group of 4 to the group of 6. Can you help me out with why this is happening and what I can do to correct it?
Making very complex cross-staff scores with Spontini-Editor
Hi everyone, as I promised in the previous post, I have added increasingly complex cross-staff notation examples to Spontini-Editor. Other examples will follow. In particular, you can find two bars from Sorabji's Sonata No. 1, where there are MANY cross-staff objects in THREE piano staves (but additional staves can be added). As you can see, the creation of such complex scores is perfectly achievable by Spontini-Editor through a standard algorithm, which makes use of cross-staff layers. You can compare the implementation of Sorabji's measures with the historical B&H edition on IMSLP: https://github.com/paolo-prete/Spontini/blob/master/examples/easy-cross-staff-example-9.svg https://imslp.org/wiki/Piano_Sonata_No.1_(Sorabji%2C_Kaikhosru_Shapurji) https://github.com/paolo-prete/Spontini/blob/master/examples/easy-cross-staff-example-9.ly Some errors of the historical edition have been intentionally corrected, others have remained intact in order to show how Spontini-Editor can also handle cross-staff scores with inconsistencies on the voices. HTH P
Automatic cross-staff chords - testing help
Hi, Great work. I've done some testing and found some bugs. Below the code I've tested, attached the PDF with the result (on second page, first page are your examples). \autoSplitChord doesn't works with curly braces, it returns blank output (like a blank space in the score), so it's not possible to work with: - chordmode - more than one chord a time - moltiple voices Also, \autoSplitChord doesn't works with single notes, it returns blank space. It accepts variables, but the result is the same. Pippo = 1 PippoDue = \chordmode {c1:/g} PippoTre = c1 PippoQuattro = {} \new PianoStaff \with { \consists #Span_stem_engraver } << \new Staff = "up" { \key c\major %chord with stem up \autoSplitChord #UP 2 %works %chord without stem \autoSplitChord 4 %works %chord with stem down \autoSplitChord #DOWN %works %chord, whole note \autoSplitChord 1 %works %chordmode \autoSplitChord \chordmode {c:/g} %blank output %chord entered in curly braces \autoSplitChord {} %blank output %more than one chord, in curly braces \autoSplitChord { } %blank output %single note \autoSplitChord c %blank output %single note in a chord \autoSplitChord %works %chord entered in polyphonic style \autoSplitChord <> %works %polyphonic style, different durations \autoSplitChord <> %warning & strange output %polyphonic style, with some curly braces \autoSplitChord <> %notes in curly braces are not printed %polyphonic style, with curly braces \autoSplitChord << {c4 d e f} \\ {c' d' e' f'} >> %blank output %chord in a variable \autoSplitChord \Pippo %works %chord in a variable with chordmode \autoSplitChord \PippoDue %blank output %single note in a variable \autoSplitChord \PippoTre %blank output %chord in curly braces in a variable \autoSplitChord \PippoQuattro %blank output } \new Staff = "down" { \key c\major \clef bass s1 } >> Thank you for the work. Cheers Davide -- Questa e-mail è stata controllata per individuare virus con Avast antivirus. https://www.avast.com/antivirus \version "2.20.0" #(define (make-autosplit-chord chord . ref-pitch) "Return a pair of lists, containing the pitches of @var{chord}, splitted at a reference pitch. The reference pitch is derived from @var{ref-pitch}. If @var{ref-pitch} is empty, @code{c'} is regarded as reference. " (define ref-pitch-steps (if (and (pair? ref-pitch) (car ref-pitch)) (ly:pitch-steps (car ref-pitch)) 0)) (call-with-values (lambda () (partition (lambda (note) (> (ly:pitch-steps (ly:music-property note 'pitch)) ref-pitch-steps)) (event-chord-notes chord))) (lambda (x y) (cons x y autoSplitChord = #(define-music-function (stem-dir staff-names pitch chord) ((ly:dir? 0) (pair? '("up" . "down")) (ly:pitch?) ly:music?) (_i "Split @var{chord} at optional @var{pitch}. The default of @var{pitch} is @code{#f}, which is interpreted by the called procedure @code{make-autosplit-chord} as @code{c'}. The splitted chords are distributed to named staves, relying on optional @var{staff-names}. The optional @var{stem-dir}, determines the direction of the stems and whether the chords may be connected by a cross-staff stem. The default results in unconnected chords. If the @code{Span_stem_engraver} is consisted, the chords may be connected by a cross-staff stem.") (let* ((skip (make-duration-of-length (ly:music-length chord))) (devided-pitches (make-autosplit-chord chord pitch)) (upper-chord (if (pair? (car devided-pitches)) (make-event-chord (car devided-pitches)) (make-skip-music skip))) (lower-chord (if (pair? (cdr devided-pitches)) (make-event-chord (cdr devided-pitches)) (make-skip-music skip #{ << \context Staff = #(car staff-names) \context Voice { $(if (negative? stem-dir) #{ \once \override Stem.cross-staff = #cross-staff-connect \once \override Flag.style = #'no-flag <>\noBeam #}) $(if (not (zero? stem-dir)) #{ \once \override Stem.direction = #stem-dir #}) #upper-chord } \context Staff = #(cdr staff-names) \context Voice { $(if (positive? stem-dir) #{ \once \override Stem.cross-staff = #cross-staff-connect \once \override Flag.style = #'no-flag <>\noBeam #}) $(if (not (zero? stem-dir)) #{ \once \override Stem.direction = #st
Re: ANN: Frescobaldi 3.1.3
> Despite my best efforts and decades of experience with UNIX, I am > utterly unable to get Frescobaldi document view working on current > Arch Linux. The python-poppler-qt5 refuse to build with complex > dependencies on sip that are beyond my ken. I am just alerting you to > this. Others here seem to have got it working by rebuilding these > dependencies, but Arch system, can vary widely as they are so > customised. > > It's at the point that I have to use Ubuntu to use Frescobaldi, but > this is not my desired outcome. > fwiw I built my poppler stuff on Arch with yay, not pip might be worth a try Damian
split chord in two staves, split multiple voices in two staves
Hi, I am working on accordion left-hand educational scores; I need to split chords (entered with chordmode) in two staves, and I also need to split multiple voices (4 or more) in two staves. I am trying to find a way to do this automatically, because I have much material to work with. I have tried \autochange, but the result is not what I am searching. Attached is a minimal example, just to have an idea. \version "2.20.0" % autochange example with a chord \markup "autochange example with a chord" \score { \new PianoStaff \with {instrumentName = #"1"} \autochange \chordmode {c:/g} } % autochange example with multiple voices \markup "autochange example with multiple voices" \score { \new PianoStaff \with {instrumentName = #"2"} \autochange << \autochange {e'} \\ \autochange {g} \\ \autochange {c'} >> } % desidered result \markup "desidered result" \score{ \new PianoStaff \with {instrumentName = #"3"} \autochange << \autochange \\ \autochange {g} >> } Thank you and best regards. Davide Bonetti -- Questa e-mail è stata controllata per individuare virus con Avast antivirus. https://www.avast.com/antivirus \version "2.20.0" % autochange example with a chord \markup "autochange example with a chord" \score { \new PianoStaff \with {instrumentName = #"1"} \autochange \chordmode {c:/g} } % autochange example with multiple voices \markup "autochange example with multiple voices" \score { \new PianoStaff \with {instrumentName = #"2"} \autochange << \autochange {e'} \\ \autochange {g} \\ \autochange {c'} >> } % desidered result \markup "desidered result" \score{ \new PianoStaff \with {instrumentName = #"3"} \autochange << \autochange \\ \autochange {g} >> } autochange minimal example.pdf Description: Adobe PDF document
Re: Staff space size
> On 2021-01-06 6:41 pm, Andrew Bernard wrote: >> If staff height is 20 points, then what is the staff space size? Maybe >> I am overthinking this but suddenly I thought there may be some factor >> of including or not including the staff lines in the measurement. It >> is not immediately apparent to me where staff space is defined in the >> NR. > > If you are open to looking at the code, see > layout-set-absolute-staff-size-in-module in paper.scm. [...] Is your good explanation part of the NR? If not, could you submit a patch to add it or make it more visible? It probably helps too if there are more index entries... Werner