Re: Ossia problem - different timing
On Thu, Jan 21, 2016 at 8:52 AM, David Kastrupwrote: > Kevin Barry writes: > > > Reverting does not depend on whether the override happened in a \with > expression or with an explicit \override. However, the overrides in > context definitions and \with expressions _accumulate_ on the stack > while normal \override _replaces_ the topmost override. > > So if you want to get back a _previous_ context-specific value (many > grob property values are just established as global defaults and are > impervious to reverting) through reverting, you need to use > \temporary\override instead of \override. > > > 2) check what the default value is in the internals manual and use > > that as a value for an override > > If there _is_ a default value, reverting should get you there. > > Here is an example for accumulating overrides: > > > > > -- > David Kastrup > > Many thanks to Kevin and David Kastrup - I was able to use "non-temporary" \overrides while being explicit about the context. That is, I used \revert StaffGroup.SpanBar.glyph-name while using regular \overrides, and it worked like a charm. Thanks again, Ralph -- Ralph Palmer Brattleboro, VT USA palmer.r.vio...@gmail.com % Ossia above and below the staves \version "2.19.33" \language "english" #(set-global-staff-size 20) upper = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f d4^"main staff" d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e \revert StaffGroup.SpanBar.glyph-name \bar "|." | } lower = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f e4^"lower staff" e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d \bar "|." | } upperOssia = \relative c'' { s1*5 | d4^"Facilité"_"upper ossia" e f g | d4 e f g | d4 e f g | } lowerOssiaA = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) g4^"Facilité"_"lower ossia" a b c g4 a b c g4 a b c } } lowerOssiaB = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) c4 b a g c4 b a g c4 b a g } } % Ossia score \score { \new StaffGroup \with { \override SpanBar.glyph-name = #"!" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) } << \upperOssia >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff << \upper >> \new Staff << \lower >> >> >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaA >> \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaB >> >> >> >> \header { piece = "Ossia : single staff above; grand staff below, with different timing" } \layout { \context { \Score \remove "Timing_translator" \remove "Default_bar_line_engraver" } \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } \context { \Staff \consists "Timing_translator" \consists "Default_bar_line_engraver" } } % \midi {} } multiOssia.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ossia problem - different timing
Kevin Barrywrites: > On 21 January 2016 at 13:02, Ralph Palmer wrote: > >> I can't figure out how to revert for that one bar > > > There are two ways to do this: > 1) move your \override from the \with {} block into the beginning of the > music expression so that you can \revert it later on, when you need to Reverting does not depend on whether the override happened in a \with expression or with an explicit \override. However, the overrides in context definitions and \with expressions _accumulate_ on the stack while normal \override _replaces_ the topmost override. So if you want to get back a _previous_ context-specific value (many grob property values are just established as global defaults and are impervious to reverting) through reverting, you need to use \temporary\override instead of \override. > 2) check what the default value is in the internals manual and use > that as a value for an override If there _is_ a default value, reverting should get you there. Here is an example for accumulating overrides: \layout { \context { \Staff \override NoteHead.color = #red \override NoteHead.color = #blue } } \fixed c' \new Staff \with { \override NoteHead.color = #green } { c1 \revert Staff.NoteHead.color g \revert Staff.NoteHead.color e \revert Staff.NoteHead.color c } -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ossia problem - different timing
On Fri, Jan 15, 2016 at 10:39 AM, Kevin Barrywrote: > Hi Ralph, > > This snippet might help: > > http://www.lilypond.org/doc/v2.19/Documentation/snippets/rhythms#rhythms-changing-time-signatures-inside-a-polymetric-section-using-_005cscaledurations > > I've attached my version; the only thing I wasn't able to do was get the > spacing on the ossia staves to ignore the others. I don't know how to fix > that. > > Kevin > Thanks, Kevin, and sorry I didn't respond earlier. It took a lot of frustrating time for me to incorporate your changes into my original, more complex, score. I'm left with one small problem - the last bar line. The changes to the SpanBar made necessary by the ossia have affected the final SpanBar, and I can't figure out how to revert for that one bar. Any help would be greatly appreciated. In gratitude to Kevin and to the whole community, Ralph -- Ralph Palmer Brattleboro, VT USA palmer.r.vio...@gmail.com % Ossia above and below the staves \version "2.19.33" \language "english" #(set-global-staff-size 20) upper = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f d4^"main staff" d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e \bar "|." | } lower = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f e4^"lower staff" e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d \bar "|." | } upperOssia = \relative c'' { s1*5 | d4^"Facilité"_"upper ossia" e f g | d4 e f g | d4 e f g | } lowerOssiaA = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) g4^"Facilité"_"lower ossia" a b c g4 a b c g4 a b c } } lowerOssiaB = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) c4 b a g c4 b a g c4 b a g } } % Ossia score \score { \new StaffGroup \with { \override SpanBar.glyph-name = #"!" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) } << \upperOssia >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff << \upper >> \new Staff << \lower >> >> >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaA >> \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaB >> >> >> >> \header { piece = "Ossia : single staff above; grand staff below, with different timing" } \layout { \context { \Score \remove "Timing_translator" \remove "Default_bar_line_engraver" } \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } \context { \Staff \consists "Timing_translator" \consists "Default_bar_line_engraver" } } % \midi {} } multiOssia.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ossia problem - different timing
On 21 January 2016 at 13:02, Ralph Palmerwrote: > I can't figure out how to revert for that one bar There are two ways to do this: 1) move your \override from the \with {} block into the beginning of the music expression so that you can \revert it later on, when you need to 2) check what the default value is in the internals manual and use that as a value for an override In general, for tricky stuff like this I would go with 1) since it's a bit easier to tinker with overrides and reverts while working, but since it's quicker to do 2) in the code you sent I just did that by adding the following override right before the last span bar: \override StaffGroup.SpanBar.glyph-name = #ly:span-bar::calc-glyph-name I found this value by looking up SpanBar in the internals reference and checking the default value for glyph-name. Code is attached if this isn't clear. Kevin % Ossia above and below the staves \version "2.19.33" \language "english" #(set-global-staff-size 20) upper = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f d4^"main staff" d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e \override StaffGroup.SpanBar.glyph-name = #ly:span-bar::calc-glyph-name \bar "|." | } lower = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f e4^"lower staff" e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d \bar "|." | } upperOssia = \relative c'' { s1*5 | d4^"Facilité"_"upper ossia" e f g | d4 e f g | d4 e f g | } lowerOssiaA = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) g4^"Facilité"_"lower ossia" a b c g4 a b c g4 a b c } } lowerOssiaB = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) c4 b a g c4 b a g c4 b a g } } % Ossia score \score { \new StaffGroup \with { \override SpanBar.glyph-name = #"!" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) } << \upperOssia >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff << \upper >> \new Staff << \lower >> >> >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaA >> \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaB >> >> >> >> \header { piece = "Ossia : single staff above; grand staff below, with different timing" } \layout { \context { \Score \remove "Timing_translator" \remove "Default_bar_line_engraver" } \context { \Staff \RemoveEmptyStaves \override VerticalAxisGroup.remove-first = ##t } \context { \Staff \consists "Timing_translator" \consists "Default_bar_line_engraver" } } % \midi {} } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ossia problem - different timing
Hi Ralph, This snippet might help: http://www.lilypond.org/doc/v2.19/Documentation/snippets/rhythms#rhythms-changing-time-signatures-inside-a-polymetric-section-using-_005cscaledurations I've attached my version; the only thing I wasn't able to do was get the spacing on the ossia staves to ignore the others. I don't know how to fix that. Kevin On 15 January 2016 at 13:59, Ralph Palmerwrote: > Greetings - > > I'm running LilyPond 2.19.33 under Win8. > > I have a piece with multiple ossia challenges. I think I'm almost there > (unless I have to make fundamental changes). I'm attaching what I have so > far. > > There are two changes I need to make. I can provide you with a pdf of what > I'm looking for, but I'll have to transcribe it by hand. I think an > explanation should be sufficient; if it's not, please let me know and I'll > send a hand transcription. > > 1) The lower ossia replaces *four* bars in the main grand staff (i.e., the > last bar line in the lower ossia grand staff needs to line up with the bar > line ending the fourth bar in the third line of the main grand staff). And > I would like the spacing of the bars in the lower ossia to look "normal" > within the ossia itself. > > 2) Because the bar lines in the lower ossia will be offset from the bar > lines in the main grand staff (except for the final one of the ossia), I > need to eliminate the "span bars" between the main grand staff and the > lower ossia (again, except for the final one of the ossia). I want to keep > the span bar dashed. > > If both of these are not possible, I at least need to match the three bars > of the lower ossia to four bars of the main grand staff. > > I'm attaching my current .ly file and my current pdf. > > Thank you in advance for any help and/or pointers you can provide. Maybe > we can turn this into a snippet for the LSR. > > All the best, > > Ralph > > > -- > Ralph Palmer > Brattleboro, VT > USA > palmer.r.vio...@gmail.com > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > > % Ossia above and below the staves \version "2.19.33" \language "english" #(set-global-staff-size 20) upper = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f d4^"main staff" d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break d4 d e e | d4 d e e | d4 d e e | d4 d e e | d4 d e e | \break } lower = \relative c' { \key g \major \clef treble \time 4/4 \override Score.NonMusicalPaperColumn.line-break-permission = ##f e4^"lower staff" e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break e4 e d d | e4 e d d | e4 e d d | e4 e d d | e4 e d d | \break } upperOssia = \relative c'' { s1*5 | d4^"Facilité"_"upper ossia" e f g | d4 e f g | d4 e f g | } lowerOssiaA = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) g4^"Facilité"_"lower ossia" a b c g4 a b c g4 a b c } } lowerOssiaB = \relative c'' { s1*10 \scaleDurations 4/3 { \set Timing.measureLength = #(ly:make-moment 4/3) c4 b a g c4 b a g c4 b a g } } % Ossia score \score { \new StaffGroup \with { \override SpanBar.glyph-name = #"!" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) } << \upperOssia >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff << \upper >> \new Staff << \lower >> >> >> << \new GrandStaff \with { \override SpanBar.glyph-name = #"|" } << \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaA >> \new Staff \with { \remove "Time_signature_engraver" fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) \override StaffSymbol.thickness = #(magstep -3) %firstClef = ##f } << \lowerOssiaB >> >> >> >> \header { piece = "Ossia : single staff above; grand staff below, with different timing" } \layout { \context { \Score \remove "Timing_translator" \remove "Default_bar_line_engraver" } \context { \Staff \RemoveEmptyStaves \override