Re: Changing Clef horizontal-skylines

2023-09-07 Thread brin solomon
On Thu, Sep 7, 2023 at 5:44 PM Jean Abou Samra  wrote:

> Le jeudi 07 septembre 2023 à 17:31 -0400, brin solomon a écrit :
> > I'm using a modified version of this LSR snippet
> > https://lsr.di.unimi.it/LSR/Item?id=900 to re-engrave a historical
> score that
> > uses a curly-style bass clef. The clef shape is a little wider than a
> standard
> > bass clef, and this means that it sometimes collides with notes and
> rests when
> > used in actual music. After looking at the internals manual, I want to
> try
> > adjusting the horizontal-skylines property, but I can't find any
> documentation
> > on what a "pair of skylines" should look like (as opposed to a boolean,
> pair
> > of numbers, etc). Can anyone point me in the right direction so I can
> give
> > this custom clef a little more space? Is there a different approach that
> would
> > be better here?
>
> A skyline pair is, well, a pair of skylines. (In current versions, anyway;
> there
> used to be special "skyline pair" objects, but now they're plain normal
> Scheme
> pairs of skylines.) And if you want to visualize what a skyline is, you
> can do
>
> \layout {
>   \context {
> \Score
> \override Clef.show-horizontal-skylines = ##t
> \override Clef.show-vertical-skylines = ##t
>   }
> }
>
>
> to see that they're basically object outlines in a given direction.
> You can construct them with functions like
>
> ly:make-skylines
> ly:skylines-for-stencil
> ly:skyline-pad
>
> of which the documentation is at
>
> https://lilypond.org/doc/v2.24/Documentation/internals/scheme-functions
>
> With that being said, this will be inconvenient; I think it would
> be much simpler to just add the padding to your shape itself.
> (For example, construct it as \markup \with-dimensions #... #... \path ...)
>
> Jean
>
>
Hi Jean,

Thanks for the quick response! I'm always happy to do something simpler,
but I admit that I'm a bit at a loss as to how to convert the linked
snippet to the construct you described. The snippet stores the \path for
the clef in a variable ("my-clef") and then sets is at the stencil for the
bass clef using a layout block like this:

\layout {
  \context {
\Score
\override Clef.stencil =
  #(lambda (grob)
 (let* ((sz (ly:grob-property grob 'font-size 0))
(mlt (magstep sz))
(glyph (ly:grob-property grob 'glyph-name)))
 (cond
  ((equal? glyph "clefs.F")
 (ly:stencil-scale my-clef (* 1 mlt) (* 1 mlt)))
  ((equal? glyph "clefs.F_change")
(ly:stencil-scale my-clef (* .8 mlt) (* .8 mlt)))
  (else (ly:clef::print grob)
  }
}

Where in that block would I indicate that kind of extra padding?

Thanks,
brin


Changing Clef horizontal-skylines

2023-09-07 Thread brin solomon
Hello,

I'm using a modified version of this LSR snippet
https://lsr.di.unimi.it/LSR/Item?id=900 to re-engrave a historical score
that uses a curly-style bass clef. The clef shape is a little wider than a
standard bass clef, and this means that it sometimes collides with notes
and rests when used in actual music. After looking at the internals manual,
I want to try adjusting the horizontal-skylines property, but I can't find
any documentation on what a "pair of skylines" should look like (as opposed
to a boolean, pair of numbers, etc). Can anyone point me in the right
direction so I can give this custom clef a little more space? Is there a
different approach that would be better here?

Many thanks for any thoughts!
brin solomon


Re: Changing Header Mid-Score

2022-12-10 Thread brin solomon
On Sat, Dec 10, 2022 at 6:09 AM Jean Abou Samra  wrote:

> Le 09/12/2022 à 23:04, Kieren MacMillan a écrit :
> > As far as I know:
> > 1. a separate bookpart is required to change the properties that the
> titling mechanism can read; and
> > 2. a bookpart will always force a page break.
> >
> > Cue Jean providing code to contradict my claim in 3… 2… 1…  ;)
>
>
> [Although 2.23 is the unstable release series, the stable
> release 2.24 is going to come out of it very soon, so I
> will stick with it.]
>
>
> For a start, you can use \if \on-page #2 to print some
> text only on page 2, so you could get along manually with
>
>\if \on-page #1 ...
>\if \on-page #2 ...
>...
>
>
> Doing that automatically is ... not exactly straightforward,
> but possible too.
>
>
> \version "2.23.82"
>
> sceneMark = \tweak details.is-scene-mark ##t \textMark \etc
>
> \layout {
>\context {
>  \Score
>  \consists
>#(lambda (context)
>   (let ((scene-text ""))
> (make-engraver
>  (acknowledgers
>   ((text-mark-interface engraver grob source-engraver)
>(when (assq-ref (ly:grob-property grob 'details)
>'is-scene-mark)
>  (set! scene-text (ly:grob-property grob 'text)
>  ((stop-translation-timestep engraver)
>   (let ((col (ly:context-property context
> 'currentCommandColumn)))
> (ly:grob-set-nested-property!
>  col
>  '(details scene-text)
>  scene-text))
>}
> }
>
> #(define-markup-command (scene-text layout props gauge) (markup?)
> (let ((page-number (chain-assoc-get 'page:page-number props))
>   (gauge-stil (interpret-markup layout props gauge)))
>   (ly:make-stencil
>`(delay-stencil-evaluation
>  ,(delay
>(ly:stencil-expr
> (interpret-markup
>  layout
>  props
>  (hashv-ref (ly:output-def-lookup layout
> 'page-number-scene-text-table)
> page-number)
>(ly:stencil-extent gauge-stil X)
>(ly:stencil-extent gauge-stil Y
>
> \paper {
>oddHeaderMarkup = \markup
>\fill-line {
>  ""
>  \unless \on-first-page-of-part \fontsize #2 \concat {
>\fromproperty #'header:title
>": "
>%% The argument to \scene-text is used to approximate the dimensions
>%% of the final text.
>\scene-text "Act X, Scene X"
>  }
>  \if \should-print-page-number \fromproperty #'page:page-number-string
>}
>evenHeaderMarkup = \markup
>\fill-line {
>  \if \should-print-page-number \fromproperty #'page:page-number-string
>  \unless \on-first-page-of-part \fontsize #2 \concat {
>\fromproperty #'header:title
>": "
>\scene-text "Act X, Scene X"
>  }
>  ""
>}
>#(use-modules (srfi srfi-1))
>page-post-process =
>  #(lambda (paper pages)
> (for-each
>  (lambda (page)
>(let* ((page-number (ly:prob-property page 'page-number))
>   (lines (ly:prob-property page 'lines))
>   (table (or (ly:output-def-lookup paper
> 'page-number-scene-text-table #f)
>  (let ((table (make-hash-table)))
>(ly:output-def-set-variable! paper
> 'page-number-scene-text-table table)
>table)))
>   (first-system
>(any (lambda (line)
>   (ly:prob-property line 'system-grob #f))
> lines))
>   (scene-text
>(if first-system
>(let ((first-column (ly:spanner-bound
> first-system LEFT)))
>  (assq-ref (ly:grob-property first-column 'details)
>'scene-text))
>"")))
>  (hashv-set! table page-number scene-text)))
>  pages))
> }
>
>
> %%% EXAMPLE
>
> \header {
>title = "Silly Opera"
> }
>
> {
>\sceneMark "Act I, Scene i"
>c'1 1 1
>\pageBreak
>c'1 1 1
>\pageBreak
>c'1 1 \sceneMark "Act I, Scene ii" 1
>\pageBreak
>c'1 1 1
> }
>
>
>
>
> Cheers,
> Jean
>
>
Hi Jean,

Wow, this is really phenomenal! Thank you so much for this code! This
should work perfectly for what I need.

Many many thanks,
brin


Re: Changing Header Mid-Score

2022-12-09 Thread brin solomon
On Fri, Dec 9, 2022 at 3:40 PM Kieren MacMillan 
wrote:

> Hi Brin,
>
> > It seems I may have been overzealous in paring down my minimal example
>
> That's better than erring on the other side…  ;)
>
> > I actually am breaking the big score file down into scenes/sub-scenes
> that can then be stitched together later in various combinations. But I'm
> missing the step of how to get the header at the top of the page to reflect
> what the current scene is at a given moment, since evenHeaderMarkup and
> oddHeaderMarkup in the paper block don't seem to be able to pull
> title/subtitle information from any except the top-level \header block. So
> now I feel like I'm missing something that's right in front of my face! Can
> you point me to the missing piece?
>
> Put each contiguous chunk of pages in a \bookpart.
> A page break will automagically appear between each \bookpart.
> The header inside the \bookpart will be what the titling blocks use.
> A silly MWE is included below.
>
> Hope that helps!
> Kieren.
>

Hi Kieren,

Thanks for this example! This definitely feels close to what I'm looking
for, but I was hoping to find a way that didn't force a page break (or even
necessarily a line break) between scenes. Is that something that's
possible, or is the page break required?

Many thanks,
brin


Re: Changing Header Mid-Score

2022-12-09 Thread brin solomon
On Fri, Dec 9, 2022 at 2:56 PM Kieren MacMillan 
wrote:

> Hi Brin,
>
> > I am working on an opera and would like to use text in the header to
> help the performers keep track of where they are in the score. So ideally,
> the header on each page should say something like "Title of Opera: Act I,
> scene ii", with the scene reflecting whatever the current scene is. Since
> there aren't musical stops between the scenes, I would like the scenes to
> flow into one another in the same \score block (so that a scene might start
> in the middle of a line of music, say), which is pretty standard from the
> opera scores and parts I'm used to.
>
> Having engraved many of my own musicals, operas, and the like, I can say
> that breaking things into scenes — or even smaller chunks — is really
> useful, and gives you ultimate flexibility: you can break the scene
> wherever you want (e.g., the middle of a line of music), keeping each
> “building block” separate, and then “stitch them together” in any number of
> score formats/outputs.
>
> At that point, having the header reflect the exact “building block” in
> question is really simple.
>
> Just my 2¢ (from twenty years of Lilypond-ing my music dramas) — hope it’s
> helpful!
> Kieren.


Hi Kieren,

This is helpful, thanks! It seems I may have been overzealous in paring
down my minimal example: I actually am breaking the big score file down
into scenes/sub-scenes that can then be stitched together later in various
combinations. But I'm missing the step of how to get the header at the top
of the page to reflect what the current scene is at a given moment, since
evenHeaderMarkup and oddHeaderMarkup in the paper block don't seem to be
able to pull title/subtitle information from any except the top-level
\header block. So now I feel like I'm missing something that's right in
front of my face! Can you point me to the missing piece?

Many thanks,
brin


Changing Header Mid-Score

2022-12-09 Thread brin solomon
Hello!

I am working on an opera and would like to use text in the header to help
the performers keep track of where they are in the score. So ideally, the
header on each page should say something like "Title of Opera: Act I, scene
ii", with the scene reflecting whatever the current scene is. Since there
aren't musical stops between the scenes, I would like the scenes to flow
into one another in the same \score block (so that a scene might start in
the middle of a line of music, say), which is pretty standard from the
opera scores and parts I'm used to.

Looking at the "Custom titles headers and footers" section of the 2.22.2
user manual, I can see how to create a custom header for the whole
document, but I can't figure out a way to pull information for the header
from specific moments in a \score block, or even how to pull information
for the header from a \score block when there are multiple \scores in a
given \book. Does anyone have any ideas on how to make this happen? I've
attached a minimal file that indicates the kind of headers I want over the
course of a few dummy pages. Any help would be greatly appreciated!

Thanks in advance,
brin
\version "2.22.2"

\header {
  dedication = \markup { \smallCaps "Title of Opera" }
}

\score {
  \new Staff {
c1^"Act I, scene i starts here" |
\repeat unfold 50 { c1 } | \pageBreak
c1^"Header on this page should read “Title of Opera: Act I, scene i”" |
\repeat unfold 50 { c } | \pageBreak
c \bar "||"
c^"Act I, scene ii starts here, header on this page should read “Title of Opera: Act I, scene ii”" |
\repeat unfold 50 { c } |
  }
}

title-test.pdf
Description: Adobe PDF document


MIDI Output from Pitched and Unpitched Percussion on the Same Staff?

2020-06-30 Thread brin solomon
Hi all,

I'm engraving a percussion part that has the player switch from vibraphone
to suspended cymbal. I can use the \stopStaff and \startStaff commands to
change the number of staff lines and make the layout look like what I want,
but I'm having trouble with getting the MIDI output, since it seems that
unpitched percussion sounds are only available in the DrumStaff context. Is
there a way to switch from a Staff to a DrumStaff mid-score for the
purposes of MIDI output, or do I need to go in and write out two additional
percussion parts, one pitched and one unpitched, to use for the MIDI
version?

Many thanks,
brin


Re: Non-Standard Rhythmic Durations

2017-07-02 Thread Brin Solomon
On Sun, Jul 2, 2017 at 5:34 AM, Robin Bannister  wrote:

> Brin Solomon wrote:
>
> I get something that looks like an eighth note instead of a
>> half tied to an eighth.
>>
>
> It gets closer when you add the line
>
>   \set completionUnit = #(ly:make-moment 1 8)
>
> If this needs further improvement, try to understand what
> completionUnit and completionFactor do.  [I haven't ...]
>
>
> Cheers,
> Robin
>
>
>
>
Robin,

Thank you so much, that works perfectly!

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


Re: Non-Standard Rhythmic Durations

2017-07-01 Thread Brin Solomon
On Tue, Jun 27, 2017 at 4:41 PM, Simon Albrecht 
wrote:

> On 27.06.2017 05:47, Brin Solomon wrote:
>
>> Is there a way to send an arbitrary rhythmic value (i.e. one that can't
>> be described with the 8, 4, 4., etc system) to the
>> Completion_heads_engraver,
>>
>
> Just write your durations like
> { c8*17 }
> and the Completion_heads_engraver will handle them fine.
>
> Best, Simon
>

Hi Simon,

That's very close to what I need! The only time it doesn't work is when the
note doesn't wind up crossing a bar line: If I'm in 4/4 and write "c8*5" on
the downbeat, I get something that looks like an eighth note instead of a
half tied to an eighth. Is there a way to force that expansion, or should I
look into Abjad as Nathan suggested?

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


Non-Standard Rhythmic Durations

2017-06-26 Thread Brin Solomon
Hey all,

I'm working on an algorithmic piece where all the rhythmic durations are an
integer number of eighth notes long. I'm using Completion_heads_engraver to
handle the bar lines, but I'm running into trouble when I need to write
notes that are five eighth notes long. Is there a way to send an arbitrary
rhythmic value (i.e. one that can't be described with the 8, 4, 4., etc
system) to the Completion_heads_engraver, or do I need to enter all the
"half note plus an eighth" rhythmic values by hand without automatic note
splitting?

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


Re: mmrest-of-length and \cadenzaOn

2016-12-05 Thread Brin Solomon
On Mon, Dec 5, 2016 at 7:37 PM, Thomas Morley 
wrote:

> 2016-12-06 0:48 GMT+01:00 Brin Solomon :
> >
> >
> > On Mon, Dec 5, 2016 at 4:35 PM, Thomas Morley 
> > wrote:
> >>
> >> 2016-12-05 16:52 GMT+01:00 Brin Solomon :
> >> > Hello all,
> >> >
> >> > I'm trying to typeset a piece where one player has an unmetered
> cadenza
> >> > while every other player rests. I'm trying to use mmrest-of-length to
> >> > generate the rests, but if I use \cadenzaOn, I get the error
> >> > "programming
> >> > error: Multi_measure_rest::get_rods (): I am not spanned!" and the
> rests
> >> > are
> >> > not printed. This error doesn't happen if I use skip-of-rest instead,
> >> > but in
> >> > that case, I don't get the rests.
> >> >
> >> > Here is a minimal example that demonstrates the problem:
> >> >
> >> > %%
> >> >
> >> > \version "2.18.2"
> >> >
> >> > MyCadenza = \relative c' {
> >> >   c4 d8 e f g g4
> >> >   f2 g4 g \bar "|"
> >> > }
> >> >
> >> > \new GrandStaff <<
> >> >   \new Staff {
> >> > \cadenzaOn
> >> > \MyCadenza
> >> > \cadenzaOff c'1
> >> >   }
> >> >   \new Staff {
> >> > \cadenzaOn
> >> > #(mmrest-of-length MyCadenza)
> >> > \cadenzaOff
> >> > c'1
> >> >   }
> >> >>>
> >> >
> >> > %%%
> >> >
> >> > I'm running version 2.18.2 on Mac OS 10.11.6. Is there a different
> >> > command I
> >> > should be using to get a full measure rest while I'm using \cadenzaOn?
> >> >
> >> > Thanks in advance,
> >> > Brin
> >>
> >>
> >> Hi,
> >> found some code on the list (can't say anymore who posted it
> >> initially) and extended it a bit. See attached.
> >> It completely avoids \cadenzaOn/Off, because of the hassle you
> >> experienced.
> >> midi may come out strange (not tested), I don't care about midi, though
> >> ...
> >>
> >> It's 2.15.24 code, but still working. Anyway running convert-ly over
> >> it may be a good idea.
> >>
> >> Maybe it helps,
> >>   Harm
> >
> >
> > Harm,
> >
> > Thanks for finding this! Ideally it would be nice to not have the
> fermatas
> > over the rests, but if that's tricky to do, then this version is fine.
> >
> > Thanks again,
> > Brin
>
> \cadenzaNotes takes three arguments. The first is a boolean, set it
> false to get rid of the fermata over the MultiMeasureRest.
>
> Cheers,
>   Harm
>

Ah, great, thank you!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: mmrest-of-length and \cadenzaOn

2016-12-05 Thread Brin Solomon
On Mon, Dec 5, 2016 at 4:35 PM, Thomas Morley 
wrote:

> 2016-12-05 16:52 GMT+01:00 Brin Solomon :
> > Hello all,
> >
> > I'm trying to typeset a piece where one player has an unmetered cadenza
> > while every other player rests. I'm trying to use mmrest-of-length to
> > generate the rests, but if I use \cadenzaOn, I get the error "programming
> > error: Multi_measure_rest::get_rods (): I am not spanned!" and the rests
> are
> > not printed. This error doesn't happen if I use skip-of-rest instead,
> but in
> > that case, I don't get the rests.
> >
> > Here is a minimal example that demonstrates the problem:
> >
> > %%
> >
> > \version "2.18.2"
> >
> > MyCadenza = \relative c' {
> >   c4 d8 e f g g4
> >   f2 g4 g \bar "|"
> > }
> >
> > \new GrandStaff <<
> >   \new Staff {
> > \cadenzaOn
> > \MyCadenza
> > \cadenzaOff c'1
> >   }
> >   \new Staff {
> > \cadenzaOn
> > #(mmrest-of-length MyCadenza)
> > \cadenzaOff
> > c'1
> >   }
> >>>
> >
> > %%%
> >
> > I'm running version 2.18.2 on Mac OS 10.11.6. Is there a different
> command I
> > should be using to get a full measure rest while I'm using \cadenzaOn?
> >
> > Thanks in advance,
> > Brin
>
>
> Hi,
> found some code on the list (can't say anymore who posted it
> initially) and extended it a bit. See attached.
> It completely avoids \cadenzaOn/Off, because of the hassle you experienced.
> midi may come out strange (not tested), I don't care about midi, though ...
>
> It's 2.15.24 code, but still working. Anyway running convert-ly over
> it may be a good idea.
>
> Maybe it helps,
>   Harm
>

Harm,

Thanks for finding this! Ideally it would be nice to not have the fermatas
over the rests, but if that's tricky to do, then this version is fine.

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


Re: mmrest-of-length and \cadenzaOn

2016-12-05 Thread Brin Solomon
On Mon, Dec 5, 2016 at 1:16 PM, SoundsFromSound 
wrote:

> Nick Baskin wrote
> > Hello all,
> >
> > I'm trying to typeset a piece where one player has an unmetered cadenza
> > while every other player rests. I'm trying to use mmrest-of-length to
> > generate the rests, but if I use \cadenzaOn, I get the error "programming
> > error: Multi_measure_rest::get_rods (): I am not spanned!" and the rests
> > are not printed. This error doesn't happen if I use skip-of-rest instead,
> > but in that case, I don't get the rests.
> >
> >
> > Thanks in advance,
> > Brin
> >
> > ___
> > lilypond-user mailing list
>
> > lilypond-user@
>
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> Hello,
>
> Not sure this 100% answers your question, but for what it's worth, I just
> copied and pasted your code into my Frescobaldi and the log showed no
> errors
> and it engraved "correctly" as is. No "programming error" at all.
>
> I used LilyPond 2.19.52.
>
> See attached for screenshot.
>
> Ben
>
> works_ok_.png
> 
>
>
>
> -
> composer | sound designer
> LilyPond Tutorials (for beginners) --> http://bit.ly/bcl-lilypond
> --
> View this message in context: http://lilypond.1069038.n5.
> nabble.com/mmrest-of-length-and-cadenzaOn-tp197634p197654.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
>

Hello Ben,

Maybe it's an issue with the screen shot, but it looks like there's no rest
in the lower staff in the screenshot? But it's interesting that the error
message disappears with the development version as opposed to the stable
one; any thoughts on what might have changed?

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


mmrest-of-length and \cadenzaOn

2016-12-05 Thread Brin Solomon
Hello all,

I'm trying to typeset a piece where one player has an unmetered cadenza
while every other player rests. I'm trying to use mmrest-of-length to
generate the rests, but if I use \cadenzaOn, I get the error "programming
error: Multi_measure_rest::get_rods (): I am not spanned!" and the rests
are not printed. This error doesn't happen if I use skip-of-rest instead,
but in that case, I don't get the rests.

Here is a minimal example that demonstrates the problem:

%%

\version "2.18.2"

MyCadenza = \relative c' {
  c4 d8 e f g g4
  f2 g4 g \bar "|"
}

\new GrandStaff <<
  \new Staff {
\cadenzaOn
\MyCadenza
\cadenzaOff c'1
  }
  \new Staff {
\cadenzaOn
#(mmrest-of-length MyCadenza)
\cadenzaOff
c'1
  }
>>

%%%

I'm running version 2.18.2 on Mac OS 10.11.6. Is there a different command
I should be using to get a full measure rest while I'm using \cadenzaOn?

Thanks in advance,
Brin
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user