Re: Vertical position of rests in DrumVoice

2020-09-16 Thread David Sumbler


On Tue, 2020-09-15 at 11:57 +0100, David Sumbler wrote:
> I am having difficulty controlling the vertical postioning of rests
> in
> a DrumStaff which has several DrumVoices representing different
> instruments.
> 
> The easy method of using a note-name followed by '\rest' doesn't seem
> to work in a DrumStaff.  I have tried, for instance, 'sn8\rest', but
> this produces a syntax error.
> 
> The other method I tried is overriding Rest.voiced-position and
> MultiMeasureRest.voiced-position in the relevant Voice context, but
> this seems to work inconsistently - something else is overriding it. 
> And in the case of the MultiMeasureRest nothing I do will move a
> whole-
> bar rest below the bottom line of the staff, even though in the same
> voice minim rests are being placed one or two lines below the staff
> by
> Lilypond itself.
> 
> How do I take full control of the vertical positioning of these
> rests?

My apologies to all on the list for wasting bandwidth.  I eventually
stumbled on the answer to my question, which is to use
\override Rest.staff-position = 6
and
\override MultiMeasureRest.staff-position = 6
or similar.

The relevant variable is hidden away in the Internals Reference under
"staff-symbol-referencer-interface".  I confess that, although I had
looked at the lists of variables under the all the other interfaces
listed at the bottom of the IR pages for Rest etc., I hadn't looked at
this one because the name is so unpromising.

Yet I now find that the only variable listed there is the very one I
wanted!

David




Vertical position of rests in DrumVoice

2020-09-15 Thread David Sumbler
I am having difficulty controlling the vertical postioning of rests in
a DrumStaff which has several DrumVoices representing different
instruments.

The easy method of using a note-name followed by '\rest' doesn't seem
to work in a DrumStaff.  I have tried, for instance, 'sn8\rest', but
this produces a syntax error.

The other method I tried is overriding Rest.voiced-position and
MultiMeasureRest.voiced-position in the relevant Voice context, but
this seems to work inconsistently - something else is overriding it. 
And in the case of the MultiMeasureRest nothing I do will move a whole-
bar rest below the bottom line of the staff, even though in the same
voice minim rests are being placed one or two lines below the staff by
Lilypond itself.

How do I take full control of the vertical positioning of these rests?

David




Re: Position of rests

2018-09-10 Thread Lukas-Fabian Moser

Harm,


a walk-through: [...]


Trivial as it may seem to the more experienced LilyPond hackers, this 
might be a candidate for inclusion in the documentation! Especially the 
repeated application of the "display what's on hand" trick is enormously 
helpful, I think. Thank you!


Best
Lukas

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests

2018-09-09 Thread Thomas Morley
2018-09-09 19:47 GMT+02:00 Kieren MacMillan :
> Hi Joram,
>
> How is your Scheme-fu?
> Maybe you can adapt one of the snippets that applies different tweaks (e.g., 
> color, shape) to notes of different duration.

Hi Joram,

a walk-through:

(1) Create code example:

{ r2 r1 }

(2) Initiate a most simple override

a) Try to go for the desired property directly, i.e. \override
Rest.staff-position = ...
b) Set it to a procedure, i.e. \override Rest.staff-position =
#(lambda (grob) ...)
Probably let the grob be displayed in terminal to ensure adressing the
correct one, i.e.:
{
  \override Rest.staff-position = #(lambda (grob) (display grob))
  r2 r1
}

(3) Get the duration
Here the 'duration-log will be enough, let it display to ensure corrrect coding

{
  \override Rest.staff-position =
  #(lambda (grob)
(let ((dur (ly:grob-property grob 'duration-log)))
(newline)
(display dur)))
  r2 r1
}

(4) Add a condition relying on the value of duration-log and provide
appropriate values for 'staff-position

{
\override Rest.staff-position =
#(lambda (grob)
  (let ((dur (ly:grob-property grob 'duration-log)))
(if (= 0 dur)
6
-6)))
r2 r1
}

Ofcours 6, -6 are not really appropriate values ...



HTH,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Position of rests

2018-09-09 Thread Mark Stephen Mrotek
Kieren,

Thank you for the caveat.
Since I set piano scores, I rarely transpose (well maybe when I type!)

Mark

-Original Message-
From: Kieren MacMillan [mailto:kieren_macmil...@sympatico.ca] 
Sent: Sunday, September 09, 2018 10:45 AM
To: Mark Stephen Mrotek 
Cc: Noeck ; Lilypond-User Mailing List 

Subject: Re: Position of rests

Hi Mark (and Joram),

> Consider using
> pitch duration\rest, e.g.
> b4\rest would place a quarter rest on "b."

If you do, remember that this doesn’t "survive" transposition:

\version "2.19.80"

restmusic = { g'4\rest }

{
  \restmusic
  \transpose c d \restmusic
  \transpose c e \restmusic
  \transpose c f  \restmusic
}

Cheers,
Kieren.



Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests

2018-09-09 Thread Kieren MacMillan
Hi Joram,

How is your Scheme-fu?
Maybe you can adapt one of the snippets that applies different tweaks (e.g., 
color, shape) to notes of different duration.

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Position of rests

2018-09-09 Thread Mark Stephen Mrotek
Joran,

Perhaps

\version "2.19.81"

\new Staff <<
  \new Voice \relative {
\voiceOne c''4 d
b'2\rest
r4 r
b2\rest
   
  }
  \new Voice \relative {
\voiceTwo e'4 f
\override Rest.staff-position = -6
r2
\revert Rest.staff-position
r4 r
\override Rest.staff-position = -6
r2
  }
>>

-Original Message-
From: lilypond-user
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Noeck
Sent: Sunday, September 09, 2018 10:28 AM
To: lilypond-user@gnu.org
Subject: Re: Position of rests

A MWE would be:

\new Staff <<
  \new Voice \relative {
\voiceOne c''4 d
\override Rest.staff-position = 6
r2
\revert Rest.staff-position
r4 r
\override Rest.staff-position = 6
r2
  }
  \new Voice \relative {
\voiceTwo e'4 f
\override Rest.staff-position = -6
r2
\revert Rest.staff-position
r4 r
\override Rest.staff-position = -6
r2
  }
>>

That's what I can do with overrides (or I could use \once) but if I want to
do the same thing again depending on the note value, I am stuck.

Best,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests

2018-09-09 Thread Kieren MacMillan
Hi Mark (and Joram),

> Consider using
> pitch duration\rest, e.g.
> b4\rest would place a quarter rest on "b."

If you do, remember that this doesn’t "survive" transposition:

\version "2.19.80"

restmusic = { g'4\rest }

{
  \restmusic
  \transpose c d \restmusic
  \transpose c e \restmusic
  \transpose c f  \restmusic
}

Cheers,
Kieren.



Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Position of rests

2018-09-09 Thread Mark Stephen Mrotek
Joram

Consider using
pitch duration\rest, e.g.
b4\rest would place a quarter rest on "b."

Mark

-Original Message-
From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] 
On Behalf Of Noeck
Sent: Sunday, September 09, 2018 9:30 AM
To: lilypond-user 
Subject: Position of rests

Hi,

I know I can set the position of individual rests by

\override Rest.staff-position = …

In a two-voice part, I want to change the staff-position of rests, but 
differently for half-note rests and full-note rests.

Is there a way to do that besides adding \overrides for each rest?

Cheers,
Joram


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests

2018-09-09 Thread Noeck
A MWE would be:

\new Staff <<
  \new Voice \relative {
\voiceOne c''4 d
\override Rest.staff-position = 6
r2
\revert Rest.staff-position
r4 r
\override Rest.staff-position = 6
r2
  }
  \new Voice \relative {
\voiceTwo e'4 f
\override Rest.staff-position = -6
r2
\revert Rest.staff-position
r4 r
\override Rest.staff-position = -6
r2
  }
>>

That's what I can do with overrides (or I could use \once) but if I want
to do the same thing again depending on the note value, I am stuck.

Best,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Position of rests

2018-09-09 Thread Noeck
Hi,

I know I can set the position of individual rests by

\override Rest.staff-position = …

In a two-voice part, I want to change the staff-position of rests, but
differently for half-note rests and full-note rests.

Is there a way to do that besides adding \overrides for each rest?

Cheers,
Joram


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests inside beamed groups

2017-09-22 Thread Gilberto Agostinho
Hello Harm,

Thanks for your reply.


Thomas Morley-2 wrote
> Best I can think of is:
> 
> {
>   \override Staff.Stem.stemlet-length = #1.25
>   c'16[ d'
>   \once\override NoteColumn.X-offset = 1
>   r deses']
> }

This works quite well! I've made some quick tests and the scores are looking
much better (I am algorithmically adjusting the value of the
NoteColumn.X-offset depending on the size of the beamed group). I will make
some more tests, but it looks like this solves my issue. Many thanks!

Cheers,
Gilberto



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests inside beamed groups

2017-09-21 Thread Thomas Morley
2017-09-21 13:56 GMT+02:00 Gilberto Agostinho :
> Hello all,
>
> I am writing a composition in which all rests inside beamed groups have
> stemlets. The problem is that because of my use of accidentals on every
> single note and because spacing is sometimes a bit critical, there is very
> little space between the rests's stemlets and the previous regular stem:
>
> 
>
> I thought of using Rest.X-extent to solve this, but the problem is that I
> only need to increase the X-extent on the left side of rests and
> unfortunately the stemlet position is always calculated as the half point
> between two other stems. See:
>
> \version "2.19.53"
> {
>   \override Staff.Stem.stemlet-length = #1.25
>   c'16[ d' r f']
>   \override Rest.X-extent = #'(-3.0 . 1.0)
>   c'16[ d' r f']
> }
>
> 
>
> Would anyone have some advice on how to better tackle this?
>
> Many thanks!
> Gilberto



Hi Gilberto,

I played around with the SpacingSpanner and
proportionalNotationDuration but to no convincing avail.

Best I can think of is:

{
  \override Staff.Stem.stemlet-length = #1.25
  c'16[ d'
  \once\override NoteColumn.X-offset = 1
  r deses']
}

Perhaps someone else comes up with a better method...

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Position of rests inside beamed groups

2017-09-21 Thread Gilberto Agostinho
Hello all,

I am writing a composition in which all rests inside beamed groups have
stemlets. The problem is that because of my use of accidentals on every
single note and because spacing is sometimes a bit critical, there is very
little space between the rests's stemlets and the previous regular stem:

 

I thought of using Rest.X-extent to solve this, but the problem is that I
only need to increase the X-extent on the left side of rests and
unfortunately the stemlet position is always calculated as the half point
between two other stems. See:

\version "2.19.53"
{
  \override Staff.Stem.stemlet-length = #1.25
  c'16[ d' r f'] 
  \override Rest.X-extent = #'(-3.0 . 1.0)
  c'16[ d' r f'] 
}

 

Would anyone have some advice on how to better tackle this?

Many thanks!
Gilberto



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Fwd: Re: Re Position of rests in cue notes (Peter Gentry)

2015-12-25 Thread Peter Gentry
Hello Jacques Yes it would. I was quickly clipping out a tiny example 
(without reading glasses).

Old fogie trouble - but you get the gist.

 On 25/12/2015 15:22, Jacques Menu wrote: > Hello Peter, "Wouldn’t  
{\set Score.skipBars = ##t s2*6 } be more explicit and less confusing? >



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Re Position of rests in cue notes (Peter Gentry)

2015-12-25 Thread Jacques Menu
Hello Peter,

> Le 24 déc. 2015 à 19:13, Peter Gentry  a écrit :
> 
> Brian Barker has supplied the solution.
> 
> That is replace say r8 by b8\rest in the set of cue notes - see   a8. (  [  
> g16 ]  r8 )  b8\rest  |  % 3 - I have left on r8 to
> illustrate the problem.
> 
> It's a bit of a fag to change all the rest in the cueNotes files as I have (5 
> * 4) 20 files one for each part and each movement.
> 
> \version "2.19.25"
> 
> cueNotes= \relative c' { 
> f8-. bes8-. (  d8-. bes8-. )   |  % 2
> a8. (  [  g16 ]  r8 )  b8\rest  |  % 3
> f8-. es'8-. (  c8-. a8-. )   |  % 4
> bes16 (  [  c32 bes32 ]  a32 [  bes32 c16 ]  d8 )  f8\mp (   |  % 5
> g8 )  es8 (  f8 )  d8 (   |  % 6
> es8 )  c8 (  d8 )  bes8 (   |  % 7
> a8\< )  a8\! r16 (  [  g16 f16 r16 )  ]   |  % 8
> }
> \addQuote "cueNotes" { \cueNotes }
> \relative c' {
> \set Score.midiInstrument = "flute"
> \set Score.skipBars = ##t
> \set Score.markFormatter = #format-mark-box-alphabet
> \accidentalStyle "modern-voice-cautionary"
> \clef "treble"
> \key bes\major
> \numericTimeSignature
> \time 2/4
> \tempo "Andante con moto"4=69
> \new CueVoice \with {
>   instrumentCueName="clt3"
>  }
> \cueDuring #"cueNotes"  #UP 
> {\set Score.skipBars = ##t s1*6/8*4 }  

Wouldn’t:

  {\set Score.skipBars = ##t s2*6 }

be more explicit and less confusing?

JM


>  d8\p r8  r8  d8  |  % 2
>  es8 r8  r8  es8  |  % 3
>  c8 r8  r8  c8  |  % 4
> }
> 
> regards
> Peter Gentry 
> 
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re Position of rests in cue notes (Peter Gentry)

2015-12-24 Thread Peter Gentry
Brian Barker has supplied the solution.

That is replace say r8 by b8\rest in the set of cue notes - see   a8. (  [  g16 
]  r8 )  b8\rest  |  % 3 - I have left on r8 to
illustrate the problem.

It's a bit of a fag to change all the rest in the cueNotes files as I have (5 * 
4) 20 files one for each part and each movement.

\version "2.19.25"

cueNotes= \relative c' { 
 f8-. bes8-. (  d8-. bes8-. )   |  % 2
 a8. (  [  g16 ]  r8 )  b8\rest  |  % 3
 f8-. es'8-. (  c8-. a8-. )   |  % 4
 bes16 (  [  c32 bes32 ]  a32 [  bes32 c16 ]  d8 )  f8\mp (   |  % 5
 g8 )  es8 (  f8 )  d8 (   |  % 6
 es8 )  c8 (  d8 )  bes8 (   |  % 7
 a8\< )  a8\! r16 (  [  g16 f16 r16 )  ]   |  % 8
}
\addQuote "cueNotes" { \cueNotes }
\relative c' {
\set Score.midiInstrument = "flute"
\set Score.skipBars = ##t
 \set Score.markFormatter = #format-mark-box-alphabet
 \accidentalStyle "modern-voice-cautionary"
 \clef "treble"
 \key bes\major
 \numericTimeSignature
 \time 2/4
 \tempo "Andante con moto"4=69
 \new CueVoice \with {
   instrumentCueName="clt3"
  }
 \cueDuring #"cueNotes"  #UP 
 {\set Score.skipBars = ##t s1*6/8*4 }  
  d8\p r8  r8  d8  |  % 2
  es8 r8  r8  es8  |  % 3
  c8 r8  r8  c8  |  % 4
}

regards
Peter Gentry 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Position of rests in cue notes

2015-12-24 Thread Peter Gentry

I am using cuenotes in parts with extensive rests to give players reassurance 
with counting. 
The only issue is that rest are placed on the top leger line ie the F of treble 
clef. 
Is there a way to move these down to the midle leger line ie the B of the 
treble clef?

Merry Christmas to all Ponders...

regards
Peter Gentry 



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests in cue notes

2015-12-24 Thread Jacques Menu
Hello Peter,

Not sure what you’re after without an example.

Does this suit your need?

JM

\version "2.19.22"



\relative {
  \clef "alto"
  \key d \major
  \time 2/4

  a16 ( [ cis16 a16 cis16 ) ] a8 -. r8 | % 232
  R2*2

  <<
\new Voice {
  \voiceTwo
  R2 R2 R2
  \tweak staff-position #-6 R2
  \cueClefUnset
}
\new CueVoice {
  \set instrumentCueName = "Flöte"
  \cueClef "treble"
  \relative {
a'8 -. [ a8 -. a8 -. a8 -. ] | % 234
a4. r8 | % 235
a8 -. [ a8 -. a8 -. a8 -. ] | % 236
a8 -. [ b8 -. cis8 -. ] r8
  }
}
  >>

  d,2 | % 239
  8 -. [ -. [ 8 -. -. 8 -. ] -. ] r8 | % 240
}



\relative {
  \clef "bass"
  \key d \major
  \time 2/4

  \transpose d d, {
\relative {
  a16 ( [ cis16 a16 cis16 ) ] a8 -. r8 | % 232
  R2*2

  <<
\new Voice {
  \voiceTwo
  R2 R2 R2
  \tweak staff-position #-6 R2
  \cueClefUnset
}
\new CueVoice {
  \set instrumentCueName = "Flöte"
  \cueClef "treble"
  \relative {
a'8 -. [ a8 -. a8 -. a8 -. ] | % 234
a4. r8 | % 235
a8 -. [ a8 -. a8 -. a8 -. ] | % 236
a8 -. [ b8 -. cis8 -. ] r8
  }
}
  >>

  d,2 | % 239
  8 -. [ -. [ 8 -. -. 8 -. ] -. ] r8 | % 240
}
  }
}


> Le 24 déc. 2015 à 13:42, Peter Gentry  a écrit :
> 
> 
> I am using cuenotes in parts with extensive rests to give players reassurance 
> with counting. 
> The only issue is that rest are placed on the top leger line ie the F of 
> treble clef. 
> Is there a way to move these down to the midle leger line ie the B of the 
> treble clef?
> 
> Merry Christmas to all Ponders...
> 
> regards
> Peter Gentry 
> 
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position of rests in cue notes

2015-12-24 Thread Greg

On 24/12/2015 12:42, Peter Gentry wrote:


I am using cuenotes in parts with extensive rests to give players reassurance 
with counting.
The only issue is that rest are placed on the top leger line ie the F of treble 
clef.
Is there a way to move these down to the midle leger line ie the B of the 
treble clef?

Merry Christmas to all Ponders...

regards
Peter Gentry



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



Hi Peter,

Are you using \cueDuring? If so, you can change #direction to #UP or 
#DOWN, which places the small cue notes either above or below the rests. 
See 
http://lilypond.org/doc/v2.18/Documentation/notation/writing-parts#formatting-cue-notes


If not, perhaps you could provide a minimal example? See 
http://www.lilypond.org/tiny-examples.html


Thanks,
Greg.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-04 Thread Paul Morris
To conclude the saga...  Thanks to David Kastrup's tip my function can now 
automatically position all rests and their dots where they need to be, no 
matter what voice they are in.  Once again LilyPond can handle just about 
anything.  See attached file.

I'm now curious about the difference between using ly:grob-property-data and 
ly:grob-property.   The docs say:

  Function: ly:grob-property grob sym val
  Return the value for property sym of grob. If no value is found, return val 
or '() if val is not specified. 

  Function: ly:grob-property-data grob sym
  Return the value for property sym of grob, but do not process callbacks.

http://www.lilypond.org/doc/v2.16/Documentation/internals/scheme-functions

I assume this means that if a property is set to a function rather than a 
static value, then ly:grob-property would process the function to return a 
value, but ly:grob-property-data would not.  Is that right?  

Thanks again,
-Paul Morris




restShifter.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-04 Thread David Kastrup
Paul Morris p...@paulwmorris.com writes:

 To conclude the saga...  Thanks to David Kastrup's tip my function
 can now automatically position all rests and their dots where they
 need to be, no matter what voice they are in.  Once again LilyPond can
 handle just about anything.  See attached file.

 I'm now curious about the difference between using
 ly:grob-property-data and ly:grob-property.  The docs say:

   Function: ly:grob-property grob sym val
   Return the value for property sym of grob. If no value is found,
 return val or '() if val is not specified.

   Function: ly:grob-property-data grob sym
   Return the value for property sym of grob, but do not process callbacks.

 http://www.lilypond.org/doc/v2.16/Documentation/internals/scheme-functions

 I assume this means that if a property is set to a function rather
 than a static value, then ly:grob-property would process the function
 to return a value, but ly:grob-property-data would not.  Is that
 right?

Yes.  For things like stem directions, there may be a default callback
which makes the decision about whether to put the stem upwards or
downwards, and calling this fallback might trigger other typesetting
decisions prematurely.  Also, one does not get to see whether the
ultimate direction decision was due to \voiceOne or such a tie-breaking
callback.

This may or may not be the case for rest direction, but because I was
too lazy to double-check, I went for ly:grob-property-data.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-04 Thread Paul Morris
dak wrote
 Yes.  For things like stem directions, there may be a default callback
 which makes the decision about whether to put the stem upwards or
 downwards, and calling this fallback might trigger other typesetting
 decisions prematurely.  Also, one does not get to see whether the
 ultimate direction decision was due to \voiceOne or such a tie-breaking
 callback.
 
 This may or may not be the case for rest direction, but because I was
 too lazy to double-check, I went for ly:grob-property-data.

Ok, good to know.  It sounds like if ly:grob-property-data works for a given
case, then it's the safer choice of the two.  Thanks for the explanation.

-Paul Morris



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Vertical-position-of-rests-on-a-custom-staff-tp146537p146669.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-04 Thread David Kastrup
Paul Morris p...@paulwmorris.com writes:

 dak wrote
 Yes.  For things like stem directions, there may be a default callback
 which makes the decision about whether to put the stem upwards or
 downwards, and calling this fallback might trigger other typesetting
 decisions prematurely.  Also, one does not get to see whether the
 ultimate direction decision was due to \voiceOne or such a tie-breaking
 callback.
 
 This may or may not be the case for rest direction, but because I was
 too lazy to double-check, I went for ly:grob-property-data.

 Ok, good to know.  It sounds like if ly:grob-property-data works for a given
 case, then it's the safer choice of the two.  Thanks for the explanation.

Well, depends on what kind of data one tries testing for.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-03 Thread Paul Morris
Hi Pierre,  I tried your suggestion:

 restmusic =   \relative f {
   \override Rest #'Y-offset = #0
   \cadenzaOn
   ...
 }

But it put the whole and half rests on a ledger line in the middle of the 
custom staff, which was not really what I wanted.  

I tried to figure out a way to globally override the rest positioning for 
different voices on the same staff -- something like this:
http://www.lilypond.org/doc/v2.16/Documentation/notation/changing-context-default-settings#changing-all-contexts-of-the-same-type

But it doesn't look like it's possible to specify, at the level of a custom 
staff context, that the rests in the 1st voice on this type of staff get 
positioned here, and those in the 2nd voice get positioned there, etc.

So I revised my function so it would let you manually turn off/on the custom 
rest positions when you have more than one voice on a staff (see attached 
files).

After getting that working I checked to see if anything changed between v. 2.16 
to 2.17.19  And I'm really glad to say that in 2.17.19 the positioning of the 
rests was almost exactly what I wanted by default!  The only ones that needed 
re-positioning were the rarer ones that were longer than a whole rest.  Also 
the dots on about half of the rests also still needed re-positioning.  

If I'd known this before I probably wouldn't have gone to the trouble of 
writing my function.  It seems like overkill now.  (A good reason to start 
using or at least testing with the dev version sooner in the future.)  At any 
rate, big thanks to all those working on improving LilyPond with each new 
version.

I revised my function for use with 2.17.19 -- see attached.  While it would be 
nice if you didn't have to manually turn the overrides on and off when there 
are more than one voice on a staff, at least now this is only needed for rests 
that are longer than a whole rest, which do not occur that often.

-Paul Morris



shiftRests2.pdf
Description: Adobe PDF document




shiftRests2.ly
Description: Binary data


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-03 Thread David Kastrup
Paul Morris p...@paulwmorris.com writes:

 I am working on adjusting the vertical position of rests on a custom
 staff and have run into a problem.  I basically want the rests to be
 positioned as they are on the standard staff, but in my custom staff
 there is no center line so the rests become oriented to the next line
 above that (except for whole rests which stay the same).  See the
 attached files.

 I wrote an override function that moves the rests down to where I want
 them.  Half rests move down further, and I had to adjust the position
 of the dots for dotted rests as well.

 So far so good.  The problem I ran into is that when the music
 includes \voiceOne and \voiceTwo, the rests appear in the right place
 by default, and my adjustment then puts them in the wrong place.  You
 can see this on the right hand side of the PDF.

 Any thoughts on how to work around this?

Make your function do different things depending on the value of
(ly:grob-property-data 'direction grob)

This will be +1 or -1 for \voiceOne and \voiceTwo (or their
equivalents), and something else (0 or a function) when in \oneVoice
mode.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-03 Thread David Kastrup
Paul Morris p...@paulwmorris.com writes:

 After getting that working I checked to see if anything changed
 between v. 2.16 to 2.17.19 And I'm really glad to say that in 2.17.19
 the positioning of the rests was almost exactly what I wanted by
 default!  The only ones that needed re-positioning were the rarer ones
 that were longer than a whole rest.  Also the dots on about half of
 the rests also still needed re-positioning.

Could you elaborate?

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-03 Thread Paul Morris
David Kastrup wrote
 Make your function do different things depending on the value of
 (ly:grob-property-data 'direction grob)
 
 This will be +1 or -1 for \voiceOne and \voiceTwo (or their
 equivalents), and something else (0 or a function) when in \oneVoice
 mode.

Thank you!  This will do the trick.
-Paul Morris



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Vertical-position-of-rests-on-a-custom-staff-tp146537p146634.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-06-03 Thread Paul Morris
  The only ones that needed re-positioning were the rarer ones
  that were longer than a whole rest.  Also the dots on about half of
  the rests also still needed re-positioning.
 
 Could you elaborate?

See the attached files.  This one makes it clearer than the previous one.  The 
red rests and blue dots are the ones my function has moved.  

The 3 longest rests are lower on the custom staff than I wanted, so my function 
moves them up to where they usually are on the standard staff, but then the 
dots became centered vertically on the longest two rests.  So my function moves 
those dots up where they usually appear.

Dots were also centered vertically on quarter, 8th, and 16th rests on the 
custom staff, so my function moves them up to their usual position.  

I also show some staves with different line patterns where the Y-offset of the 
rests is manually set to 0.  Sometimes the dots are centered on the rests, and 
sometimes they are in their usual position (half a staff space higher).  

This is odd since the dot position apparently depends on the staff line 
pattern.  I suppose that the dots might be centered by default on the rest and 
then be shifted up to avoid a line through the middle of the rest.  (However, 
on one of the staves they appear in their usual position even though there is 
no line to avoid.)

-Paul Morris



shiftRests3.pdf
Description: Adobe PDF document



shiftRests3.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Vertical position of rests on a custom staff

2013-05-31 Thread Paul Morris
Hello everyone,  

I am working on adjusting the vertical position of rests on a custom staff and 
have run into a problem.  I basically want the rests to be positioned as they 
are on the standard staff, but in my custom staff there is no center line so 
the rests become oriented to the next line above that (except for whole rests 
which stay the same).  See the attached files.

I wrote an override function that moves the rests down to where I want them.  
Half rests move down further, and I had to adjust the position of the dots for 
dotted rests as well.  

So far so good.  The problem I ran into is that when the music includes 
\voiceOne and \voiceTwo, the rests appear in the right place by default, and my 
adjustment then puts them in the wrong place.  You can see this on the right 
hand side of the PDF.

Any thoughts on how to work around this?  I'm away from email for a day or two, 
but wanted to go ahead and send this while I was working on it.

-Paul Morris



adjustRests.pdf
Description: Adobe PDF document




adjustRests.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical position of rests on a custom staff

2013-05-31 Thread Pierre Perol-Schneider
2013/6/1 Paul Morris p...@paulwmorris.com

 Hello everyone,

 I am working on adjusting the vertical position of rests on a custom staff
 and have run into a problem.  I basically want the rests to be positioned
 as they are on the standard staff, but in my custom staff there is no
 center line so the rests become oriented to the next line above that
 (except for whole rests which stay the same).  See the attached files.

 I wrote an override function that moves the rests down to where I want
 them.  Half rests move down further, and I had to adjust the position of
 the dots for dotted rests as well.

 So far so good.  The problem I ran into is that when the music includes
 \voiceOne and \voiceTwo, the rests appear in the right place by default,
 and my adjustment then puts them in the wrong place.  You can see this on
 the right hand side of the PDF.

 Any thoughts on how to work around this?  I'm away from email for a day or
 two, but wanted to go ahead and send this while I was working on it.


Hi Paul,

try this :

restmusic =   \relative f {
  \override Rest #'Y-offset = #0
  \cadenzaOn
  ...
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user