Reverting TimeSignature after box notation

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Reverting TimeSignature after box notation

Erik Natanael Gustafsson
Hi!

I'm working on a piece while learning lilypond. It uses a bit of box notation so I have the time signatures hidden in the beginning, but then I want them back.

After using
\override Staff.TimeSignature.stencil = ##f
to remove my time signatures, I can revert back using
\revert Staff.TimeSignature.stencil
if I place it before this block of code (making boxes for my box notation)

s2-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \override #'(thickness . 3)
  \box
  \with-dimensions #'(-2 . 100) #'(-10 . 10)
  \null} s4.  \bar""|
  s4.-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \box
  \with-dimensions #'(-2 . 15) #'(0 . 10)
  \null}  s4.-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \box
  \with-dimensions #'(-2 . 9) #'(0 . 10)
  \null}|

but if I place it after this code it has no effect (and gives no error). What am I doing wrong, is it a bug, is there a workaround? I'm on lilypond 2.18.2.

Cheers,
Erik Natanael Gustafsson

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reverting TimeSignature after box notation

Knute Snortum
You'll probably get more responses if you create a Minimal Working Example (MWE).  This is the smallest amount of code that will reproduce the problem.

I often find that I stumble over a solution when I'm creating my MWE.


---
Knute Snortum
(via Gmail)

On Thu, Aug 3, 2017 at 3:27 AM, Erik Natanael Gustafsson <[hidden email]> wrote:
Hi!

I'm working on a piece while learning lilypond. It uses a bit of box notation so I have the time signatures hidden in the beginning, but then I want them back.

After using
\override Staff.TimeSignature.stencil = ##f
to remove my time signatures, I can revert back using
\revert Staff.TimeSignature.stencil
if I place it before this block of code (making boxes for my box notation)

s2-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \override #'(thickness . 3)
  \box
  \with-dimensions #'(-2 . 100) #'(-10 . 10)
  \null} s4.  \bar""|
  s4.-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \box
  \with-dimensions #'(-2 . 15) #'(0 . 10)
  \null}  s4.-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \box
  \with-dimensions #'(-2 . 9) #'(0 . 10)
  \null}|

but if I place it after this code it has no effect (and gives no error). What am I doing wrong, is it a bug, is there a workaround? I'm on lilypond 2.18.2.

Cheers,
Erik Natanael Gustafsson

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reverting TimeSignature after box notation

Erik Natanael Gustafsson
Whoops, I accidentally sent my reply only to Holland. Here it is again:

"
Good idea! I made a minimal example and in the process I realised that time signatures stopped being printed after I used "\set Staff.timeSignatureFraction = 4/4" (the box markup had nothing to do with it). Is there any way of continuing to print the default time signature after one bar of polymetric notation?

Thanks for the code! Could you point me to a resource for how to use it? I mean, where I put that file, how I invoke it in my score etc.

Cheers,
Erik"

lör 5 aug. 2017 kl 17:02 skrev Knute Snortum <[hidden email]>:
You'll probably get more responses if you create a Minimal Working Example (MWE).  This is the smallest amount of code that will reproduce the problem.

I often find that I stumble over a solution when I'm creating my MWE.


---
Knute Snortum
(via Gmail)

On Thu, Aug 3, 2017 at 3:27 AM, Erik Natanael Gustafsson <[hidden email]> wrote:
Hi!

I'm working on a piece while learning lilypond. It uses a bit of box notation so I have the time signatures hidden in the beginning, but then I want them back.

After using
\override Staff.TimeSignature.stencil = ##f
to remove my time signatures, I can revert back using
\revert Staff.TimeSignature.stencil
if I place it before this block of code (making boxes for my box notation)

s2-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \override #'(thickness . 3)
  \box
  \with-dimensions #'(-2 . 100) #'(-10 . 10)
  \null} s4.  \bar""|
  s4.-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \box
  \with-dimensions #'(-2 . 15) #'(0 . 10)
  \null}  s4.-\markup {
  \with-dimensions #'(0 . 0) #'(0 . 0)
  \box
  \with-dimensions #'(-2 . 9) #'(0 . 10)
  \null}|

but if I place it after this code it has no effect (and gives no error). What am I doing wrong, is it a bug, is there a workaround? I'm on lilypond 2.18.2.

Cheers,
Erik Natanael Gustafsson

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


--
Erik Natanael Gustafsson
-----------------------------------------------------------------------
► Composer, musician ◄
❂ Website: https://eriknatanael.com/
❂ SoundCloud: https://soundcloud.com/enatanael

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reverting TimeSignature after box notation

Thomas Morley-2
2017-08-05 19:28 GMT+02:00 Erik Natanael Gustafsson
<[hidden email]>:
> Whoops, I accidentally sent my reply only to Holland. Here it is again:
>
> "
> Good idea! I made a minimal example

Where is it?

> and in the process I realised that time
> signatures stopped being printed after I used "\set
> Staff.timeSignatureFraction = 4/4" (the box markup had nothing to do with
> it). Is there any way of continuing to print the default time signature
> after one bar of polymetric notation?

"polymetric notation?"
Minimal example please!

>
> Thanks for the code!

Which code?
I'm tired of looking into the archives whether there is some code somewhere.
Finding:










>Could you point me to a resource for how to use it? I
> mean, where I put that file, how I invoke it in my score etc.

No idea what you're talking about.


-Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reverting TimeSignature after box notation

Erik Natanael Gustafsson
Sorry for the confusion. Seems like the first reply I got also only went to me and not to the list. This was written by Holland Hopson:

"Hi Erik,
Your example doesn’t compile for me. Maybe you can make a minimal working example?

I’ve had good results using frameEngraver-bars-and-boxes.ily for box notation.
Best,
Holland"

So I made a minimal example and found the error in the process ("\set Staff.timeSignatureFraction = 4/4" disables all time signatures after that point, it had nothing to do with the markup). But what about if I only want to print an "alternative" time signature (fraction) for one bar and then go back to the normal ones?

Holland also attached the frameEngraver-bars-and-boxes.ily and I asked for how to use it and he answered that so that's solved.

Here is the MWE I arraived at (I don't know how much of the structure code is usually posted here so I'm posting the whole file with score definition and all):

\version "2.18.2"

\header {
  title = "Rymdmusik"
  composer = "Erik Natanael Gustafsson"
  poet = "Jane Barlow"
  tagline = ##f
}

global = {
  \key c \major
  \time 4/4
  \tempo "Svävande" 4 = 70
}

altoVoice = \relative c' {
  \global
  \dynamicUp
  % Music follows here.
  s1 |
  a'2 d8 c a g | \time 5/4 d4. g8 e g a,2 \bar "||"|
  \time 4/4 a'2 d8 c a g | \time 5/4 d4. g8 a g d'2 \bar "||" |
  \time 5/8 dis8 cis b cis a \bar"|"| \time 4/4 f g es des a'2 |
 
  % Mellanbit
 
  \time #'(3 2 2) 7/8  r4. r2 | \time 3/4 r2. \bar "||"|
 
  \time #'(2 2 4 1) 9/8  r2 r2 r8 | \time #'(3 4) 7/8 r4. r2 \bar "||"|
  \time 4/4 r1 | \time 3/4 r2. | cis2.~\< | cis4\> r2\! |
}

left = \relative c' {
  \global
  % Music follows here.
  a8 e' d
  a'8 g d' c g' \bar"" |
  %\override Staff.TimeSignature.stencil = ##f
  s1 | s1 s4 | s1 | s1 s4 | %\revert Staff.TimeSignature.stencil
  \clef "treble"
  %\set Staff.timeSignatureFraction = 4/4     % If I add this in no more time signature will be shown
  \scaleDurations 5/8{
  g,8 cis b
  f' dis a' g cis |}

  s1 |
 
  \scaleDurations 7/6 {
    f,8 bes as  des  ces  e }
 
  %\set Staff.timeSignatureFraction = 4/4
  \scaleDurations 6/8 {
    gis8 fis e'4^"x3"
    ais,8 gis e'4^"x3"
  }
  \change Staff = "left"
  s1 s8 | s2 s4. |
  r2. \tuplet 3/2 { fis,,8 gis a } |
  eis''2 \tuplet 3/2 { fis,,8 gis a } |
  eis''8 cis4. \ottava #1 \tuplet 3/2 {fis8 eis cis } |
 
}

altoVoicePart = \new Staff \with {
  instrumentName = "Alto"
  midiInstrument = "choir aahs"
} { \altoVoice }

pianoPart = \new PianoStaff \with {
  \override StaffGrouper.staffgroup-staff-spacing.padding = #20
  instrumentName = "Piano"
 
} <<
  \new Staff = "left" \with {
    midiInstrument = "acoustic grand"
  } { \clef bass \left }
>>

\score {
  <<
    \altoVoicePart

    \pianoPart
  >>
  \layout {
    \context {
      \Score
      \override StaffGrouper.staff-staff-spacing.padding = #1
    }
    \context {
      \Staff
    }
  }
  \midi {
    \tempo 4=70
  }
}



lör 5 aug. 2017 kl 19:53 skrev Thomas Morley <[hidden email]>:
2017-08-05 19:28 GMT+02:00 Erik Natanael Gustafsson
<[hidden email]>:
> Whoops, I accidentally sent my reply only to Holland. Here it is again:
>
> "
> Good idea! I made a minimal example

Where is it?

> and in the process I realised that time
> signatures stopped being printed after I used "\set
> Staff.timeSignatureFraction = 4/4" (the box markup had nothing to do with
> it). Is there any way of continuing to print the default time signature
> after one bar of polymetric notation?

"polymetric notation?"
Minimal example please!

>
> Thanks for the code!

Which code?
I'm tired of looking into the archives whether there is some code somewhere.
Finding:










>Could you point me to a resource for how to use it? I
> mean, where I put that file, how I invoke it in my score etc.

No idea what you're talking about.


-Har
--
Erik Natanael Gustafsson
-----------------------------------------------------------------------
► Composer, musician ◄
❂ Website: https://eriknatanael.com/
❂ SoundCloud: https://soundcloud.com/enatanael

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reverting TimeSignature after box notation

Thomas Morley-2
2017-08-05 21:09 GMT+02:00 Erik Natanael Gustafsson
<[hidden email]>:

> Here is the MWE I arraived at (I don't know how much of the structure code
> is usually posted here so I'm posting the whole file with score definition
> and all):
[skipping the "whole file"]

A minimal would be:

\version "2.18.2"

{
  \time 4/4 r1
  \set Staff.timeSignatureFraction = 4/4
  \time 2/4 r2
  \time 3/4 r2.
}

Two suggestions:

{
  \time 4/4 r1
  \once \set Staff.timeSignatureFraction = 4/4
  \time 2/4 r2
  \time 3/4 r2.
}

{
  \time 4/4 r1
  \set Staff.timeSignatureFraction = 4/4
  \time 2/4 r2
  \unset Staff.timeSignatureFraction
  \time 3/4 r2.
}

-Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reverting TimeSignature after box notation

Erik Natanael Gustafsson
Brilliant! Thanks!

Erik

lör 5 aug. 2017 kl 21:54 skrev Thomas Morley <[hidden email]>:
2017-08-05 21:09 GMT+02:00 Erik Natanael Gustafsson
<[hidden email]>:

> Here is the MWE I arraived at (I don't know how much of the structure code
> is usually posted here so I'm posting the whole file with score definition
> and all):
[skipping the "whole file"]

A minimal would be:

\version "2.18.2"

{
  \time 4/4 r1
  \set Staff.timeSignatureFraction = 4/4
  \time 2/4 r2
  \time 3/4 r2.
}

Two suggestions:

{
  \time 4/4 r1
  \once \set Staff.timeSignatureFraction = 4/4
  \time 2/4 r2
  \time 3/4 r2.
}

{
  \time 4/4 r1
  \set Staff.timeSignatureFraction = 4/4
  \time 2/4 r2
  \unset Staff.timeSignatureFraction
  \time 3/4 r2.
}

-Harm
--
Erik Natanael Gustafsson
-----------------------------------------------------------------------
► Composer, musician ◄
❂ Website: https://eriknatanael.com/
❂ SoundCloud: https://soundcloud.com/enatanael

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Loading...