Re: Time signatures for all parts

2021-10-18 Thread Christian
To be honest, Carl's example is far superior and cleaner to my one - I
really have to put a little more thought into my examples and answers, when
I look at the quality stuff all the other people here deliver!

Sorry about the bar check hint. It was only meant for the actual music
variables and it was probably more confusing than helpful. All I wanted to
say was, that the bar checks in the music still work, even if the time
signatures are in a different variable. I assume, this is pretty obivous to
most users that already know a little bit about how Lilypond works, but at
least to me it was not that clear in the beginning - so I assumed it may
help. Looks like the opposite happend - classic example of too much
information. :)

All the best,
Christian

>


fitting fret diagrams on a staff

2021-10-18 Thread Gary Brookman
For future reference. I have no idea if this is the most Lilypondic way of 
accomplishing what I want, but it works.

#(set-global-staff-size 14)
\layout
{
  indent = 0
}

and using
\noBreak

if necessary


Does anybody do MIDI splitting?

2021-10-18 Thread David Kastrup


Hi,

currently entering drum scores for the ensemble I am playing in (getting
a note-savvy living drummer for regular practice is comparatively
challenging) and I frequently have the situation that there are large
pauses in drum play.  At that point in time, I need to cut the MIDI
file, take everything up to the last note before the pause into one file
and start the next file on beat 1 (sometimes 3) leading to the next note
(interestingly, if the next note is on beat 2 or 4 or similar, you still
need to start on 1 or 3 since otherwise the "drummer" fails to convey
right away the tempo they as opposed to everyone else is aiming for).

It's cumbersome writing separate variables and scores manually; it would
be nicer to just drop the cutting points in the middle of the score
(like in the separate time track) and then some automated thing would
slice the score into separate scores for MIDI.

Has anybody done anything like that already?

-- 
David Kastrup



Re: Does anybody do MIDI splitting?

2021-10-18 Thread Thomas Morley
Am Mo., 18. Okt. 2021 um 16:14 Uhr schrieb David Kastrup :
>
>
> Hi,
>
> currently entering drum scores for the ensemble I am playing in (getting
> a note-savvy living drummer for regular practice is comparatively
> challenging) and I frequently have the situation that there are large
> pauses in drum play.  At that point in time, I need to cut the MIDI
> file, take everything up to the last note before the pause into one file
> and start the next file on beat 1 (sometimes 3) leading to the next note
> (interestingly, if the next note is on beat 2 or 4 or similar, you still
> need to start on 1 or 3 since otherwise the "drummer" fails to convey
> right away the tempo they as opposed to everyone else is aiming for).
>
> It's cumbersome writing separate variables and scores manually; it would
> be nicer to just drop the cutting points in the middle of the score
> (like in the separate time track) and then some automated thing would
> slice the score into separate scores for MIDI.
>
> Has anybody done anything like that already?
>
> --
> David Kastrup
>

Years ago I made
https://archiv.lilypondforum.de/index.php/topic,2012.msg12471.html#msg12471
Not exactly what you want, maybe a starting point...

Cheers,
  Harm



Re: Cadenza in a Score

2021-10-18 Thread Greg Lindstrom
\cadenzaOn and \cadenzaOff do exactly what I am looking for; I apologize
for not finding those before asking the list.

As far as "turning off" and the other parts, I've decided to put the
cadenza in the other parts as a CueVoice. Once I get the score completed I
may look at trying to turn the parts off for the cadenza, but it's not a
top priority for me.

There is also an "Alternative Ending" to consider, but that's about 32
measures in the future.

I would like to say how much FUN it is to use Lilypond and Frescobaldi. I
have friends using expensive commercial packages and I think my results are
every bit as beautiful as theirs, if not more so (which may be, in part, of
the effort I am putting into crafting the score). And the support on this
list is far beyond anything I could have expected.  Thanks to all for your
hard work and dedication.

--greg



On Sat, Oct 16, 2021 at 4:36 PM Valentin Petzel  wrote:

> Hello Greg!
>
> Maybe \RemoveEmptyStaves (or equivalently
> \override VerticalAxisGroup.remove-empty = ##t ) would do the trick?
>
> Also suspending bars in case of cadenzas is exactly what \cadenzaOn and
> \cadenzaOff are for. But keep in mind that cadenzaOn will prevent
> automatic
> breaking, as no bar lines exists. So you either have no manually insert
> \bar ""
> Or you could also do
> \set Score.defaultBarType = ""
> \set Score.barAlways = ##t
> For the Cadenza and
> \set Score.defaultBarType = "|"
> \unset Score.barAlways
> After the cadenza.
>
> Cheers,
> Valentin


Re: Does anybody do MIDI splitting?

2021-10-18 Thread David Kastrup
Thomas Morley  writes:

> Am Mo., 18. Okt. 2021 um 16:14 Uhr schrieb David Kastrup :
>>
>>
>> Hi,
>>
>> currently entering drum scores for the ensemble I am playing in (getting
>> a note-savvy living drummer for regular practice is comparatively
>> challenging) and I frequently have the situation that there are large
>> pauses in drum play.  At that point in time, I need to cut the MIDI
>> file, take everything up to the last note before the pause into one file
>> and start the next file on beat 1 (sometimes 3) leading to the next note
>> (interestingly, if the next note is on beat 2 or 4 or similar, you still
>> need to start on 1 or 3 since otherwise the "drummer" fails to convey
>> right away the tempo they as opposed to everyone else is aiming for).
>>
>> It's cumbersome writing separate variables and scores manually; it would
>> be nicer to just drop the cutting points in the middle of the score
>> (like in the separate time track) and then some automated thing would
>> slice the score into separate scores for MIDI.
>>
>> Has anybody done anything like that already?
>>
>> --
>> David Kastrup
>>
>
> Years ago I made
> https://archiv.lilypondforum.de/index.php/topic,2012.msg12471.html#msg12471
> Not exactly what you want, maybe a starting point...

A bit cumbersome to adapt to my use case.  I'll probably try my luck
running the whole score through repeatedly while fiddling with
skipTypesetting such that it is #f while generating segment $x just
between \segmentStart $x and \segmentEnd $x .  Maybe that's all it
takes.  Or not.

-- 
David Kastrup



Pagebreak to next verso page

2021-10-18 Thread Peter Mielke
Is there a command to page break to the next verso (even numbered) page?

This would add a blank page if the current page number was even or simply
put in a page break if the page number was odd.


Re: Does anybody do MIDI splitting?

2021-10-18 Thread David Kastrup
Thomas Morley  writes:

> Am Mo., 18. Okt. 2021 um 16:14 Uhr schrieb David Kastrup :
>>
>>
>> Hi,
>>
>> currently entering drum scores for the ensemble I am playing in (getting
>> a note-savvy living drummer for regular practice is comparatively
>> challenging) and I frequently have the situation that there are large
>> pauses in drum play.  At that point in time, I need to cut the MIDI
>> file, take everything up to the last note before the pause into one file
>> and start the next file on beat 1 (sometimes 3) leading to the next note
>> (interestingly, if the next note is on beat 2 or 4 or similar, you still
>> need to start on 1 or 3 since otherwise the "drummer" fails to convey
>> right away the tempo they as opposed to everyone else is aiming for).
>>
>> It's cumbersome writing separate variables and scores manually; it would
>> be nicer to just drop the cutting points in the middle of the score
>> (like in the separate time track) and then some automated thing would
>> slice the score into separate scores for MIDI.
>>
>> Has anybody done anything like that already?
>>
>> --
>> David Kastrup
>>
>
> Years ago I made
> https://archiv.lilypondforum.de/index.php/topic,2012.msg12471.html#msg12471
> Not exactly what you want, maybe a starting point...

Essentially, something like

#(set-object-property! 'segmentKey 'translation-type? key?)

segmentStart =
#(define-music-function (k) (key?)
   #{ \tag midi \context Score \applyContext
  #(lambda (c)
(set! (ly:context-property c 'skipTypesetting)
 (not (eqv? (ly:context-property c 'segmentKey) k
   #})

segmentStop = \tag midi \set skipTypeSetting = ##t

timeI =
{
  \segmentStart 0
  \time 4/4
  \tempo "Maesto marziale" 4 = 104
  \skip 1*30
  \segmentStart 1
  \mark "A"
  \time 3/4
  \tempo "Allegretto" 4 = 152
  \skip 2.*2 \skip 4
}

[...]

$@(map
(lambda (n)
#{
\score {
  \header
  {
title = "Rossini"
  }
  \keepWithTag midi
  \new Score \with { segmentKey = #n }
  \articulate << \new DrumStaff  \with { midiInstrument = "orchestra kit" } 
\drumpartI
 \new Staff  \with { midiInstrument = "timpani" } \timpanipartI
 \context Staff \timeI
   >>
  \midi {
\midifixes
  }
}
#}) (iota 2))

appears to do the trick.  Obviously, this is not a minimal example, with
lots of content missing.  And squeezing in the "segmentKey" via a score
property seems rather awkward.

So: 

Allows doing it through the \midi block.

-- 
David Kastrup



Markup functions and punctuation in lyrics

2021-10-18 Thread R. Padraic Springuel
I’m using some functions to allow me to select words in the lyrics of some 
hymns in a systematic way so that the same hymn can be used referring to one or 
more persons (and in some cases, either a man or a woman).  These functions 
work just fine when they appear in the lyrics by themselves, but when there is 
punctuation immediately after one of these functions, the punctuation gets 
shifted to its own syllable.  Is there a way to have the function interact with 
punctuation more intelligently?  I’m thinking I need to use \concat somehow, 
but how do I write the function so that it only does the concatenation when the 
next character is punctuation?

Attached is an example showing one of my simple word selection functions 
followed by a comma.

✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


gender-test.ly
Description: Binary data


Re: Markup functions and punctuation in lyrics

2021-10-18 Thread Jean Abou Samra

Le 18/10/2021 à 21:22, R. Padraic Springuel a écrit :

I’m using some functions to allow me to select words in the lyrics of some 
hymns in a systematic way so that the same hymn can be used referring to one or 
more persons (and in some cases, either a man or a woman).  These functions 
work just fine when they appear in the lyrics by themselves, but when there is 
punctuation immediately after one of these functions, the punctuation gets 
shifted to its own syllable.  Is there a way to have the function interact with 
punctuation more intelligently?  I’m thinking I need to use \concat somehow, 
but how do I write the function so that it only does the concatenation when the 
next character is punctuation?

Attached is an example showing one of my simple word selection functions 
followed by a comma.



It's slightly tricky. What you may want is a
function recognizing the comma as its argument,
but not taking any argument if the next input
element is not punctuation. This is not possible
because optional function arguments in last position
can only omitted with \default, not implicitly.
However, you can make a function that takes the
next element in all cases, and inserts it back
in the input, either together with your lyric
event as a single event, or separately in a second
event as you got it. The only disadvantage is that
putting \man at the end of an expression
(\lyricmode { ... \man }) will not work since \man
will be expecting an argument. As long as you're
not doing that (I assume you would want a period
at the end anyway), all should be fine.


\version "2.22.1"

#(use-modules (srfi srfi-11)
  (ice-9 regex))

#(define punctuation (make-regexp "^[.,;:?!]+$"))

gender = #'other

man =
#(define-music-function (next) (ly:music?)
   (let-values
 (((text)
   (case gender
 ((male) "man")
 ((plural) "men")
 (else "man/men")))
  ((next-is-punctuation punctuation-text)
   (if (music-is-of-type? next 'lyric-event)
   (let ((other-text (ly:music-property next 'text)))
 (if (and (string? other-text)
  (regexp-match? (regexp-exec punctuation other-text)))
 (values #t other-text)
 (values #f #f)))
   (values #f #f
 (case gender
   ((male plural)
    (if next-is-punctuation
    #{ \lyricmode { #(string-append text punctuation-text) } #}
    #{ \lyricmode { #text #next } #}))
   (else
    (if next-is-punctuation
    #{ \lyricmode { \markup \concat { \italic #text 
#punctuation-text } } #}

    #{ \lyricmode { \markup \italic #text #next } #})


music = { c' c' c' c' c' c' c' c' c' c' c' }

verseI = \lyricmode {
  In glad re -- mem -- brance of this ho -- ly \man, \skip 4
  Who sought to fol -- low you in faith and love.
}

\new Staff <<
    \new Voice = "mel" { \music \music }
    \new Lyrics \lyricsto "mel" { \verseI }
>>



Note the use of symbols, which are better suited
for discrete values than strings (comparison is
cheaper at least in theory, and you get nice
specific idioms like case).

Best,
Jean



Re: Markup functions and punctuation in lyrics

2021-10-18 Thread David Kastrup
Jean Abou Samra  writes:

> Le 18/10/2021 à 21:22, R. Padraic Springuel a écrit :
>> I’m using some functions to allow me to select words in the lyrics
>> of some hymns in a systematic way so that the same hymn can be used
>> referring to one or more persons (and in some cases, either a man or
>> a woman).  These functions work just fine when they appear in the
>> lyrics by themselves, but when there is punctuation immediately
>> after one of these functions, the punctuation gets shifted to its
>> own syllable.  Is there a way to have the function interact with
>> punctuation more intelligently?  I’m thinking I need to use \concat
>> somehow, but how do I write the function so that it only does the
>> concatenation when the next character is punctuation?
>>
>> Attached is an example showing one of my simple word selection
>> functions followed by a comma.
>
>
> It's slightly tricky. What you may want is a
> function recognizing the comma as its argument,
> but not taking any argument if the next input
> element is not punctuation.

I'd lean towards defining \man like in the question and a function \maN
that takes the following markup and concatenates it.  That's viciously
unclever but sometimes not having to worry whether the computer gets
everything right is its own reward.

-- 
David Kastrup



Re: ANN: Spontini-Editor 1.0 released

2021-10-18 Thread Saul Tobin
Any possibility of using this with a Lilypond 2.18 project?

On Sun, Oct 17, 2021 at 6:21 PM Jon Arnold 
wrote:

> Looks promising. The ability to edit slurs with a mouse is huge.
>
> On Sun, Oct 17, 2021 at 2:07 PM Paolo Prete  wrote:
>
>> Hello all,
>>
>> I just drafted a new release (1.0) of Spontini-Editor, which is now
>> compatible with LilyPond 2.23.0 to 4
>>
>> https://github.com/paopre/Spontini
>>
>> Furthermore, it offers a tool that allows you to include or exclude
>> blocks from the building process of the score.
>>
>> I encourage the use of the editor, which I could test intensively,
>> because it is essentially bug-free, it works perfectly on a Raspberry PI
>> (or any similar cheap hw) and it allows you to create *very complex* piano
>> scores.
>>
>> Any feedback is greatly appreciated!
>>
>> HTH
>> P.
>>
>


How to display adjacent segno and coda symbols?

2021-10-18 Thread Kenneth Wolcott
Hi;

  I have a piece which I am trying to engrave using Lilypond 2.22.1
which has adjacent segno and coda symbols. See attached screenshot.  I
am not engraving the lyrics at this time, so that word "free" in the
screenshot can be ignored.

I have the following in my lilypond source (excepted):

  \mark \markup { \musicglyph "scripts.segno" }
  \mark \markup { \musicglyph "scripts.coda" }

When executing lilypond, I get this:

...
Raindrops_Keep_Fallin_on_my_Head_not_so_easy.ly:111:3: warning:
conflict with event: `mark-event'

  \mark \markup { \musicglyph "scripts.segno" }

Raindrops_Keep_Fallin_on_my_Head_not_so_easy.ly:112:3: warning:
discarding event: `mark-event'

  \mark \markup { \musicglyph "scripts.coda" }

...

  So, what is the correct method to obtain these symbols displayed
adjacent to each other?

Thanks,
Ken Wolcott


Re: ANN: Spontini-Editor 1.0 released

2021-10-18 Thread Paolo Prete
Sorry, this is not possibile.

Best,
Paolo

On Tuesday, October 19, 2021, Saul Tobin  wrote:

> Any possibility of using this with a Lilypond 2.18 project?
>
> On Sun, Oct 17, 2021 at 6:21 PM Jon Arnold 
> wrote:
>
>> Looks promising. The ability to edit slurs with a mouse is huge.
>>
>> On Sun, Oct 17, 2021 at 2:07 PM Paolo Prete  wrote:
>>
>>> Hello all,
>>>
>>> I just drafted a new release (1.0) of Spontini-Editor, which is now
>>> compatible with LilyPond 2.23.0 to 4
>>>
>>> https://github.com/paopre/Spontini
>>>
>>> Furthermore, it offers a tool that allows you to include or exclude
>>> blocks from the building process of the score.
>>>
>>> I encourage the use of the editor, which I could test intensively,
>>> because it is essentially bug-free, it works perfectly on a Raspberry PI
>>> (or any similar cheap hw) and it allows you to create *very complex* piano
>>> scores.
>>>
>>> Any feedback is greatly appreciated!
>>>
>>> HTH
>>> P.
>>>
>>


Re: How to display adjacent segno and coda symbols?

2021-10-18 Thread Lukas-Fabian Moser

Hi Kenneth,

Am 19.10.21 um 07:57 schrieb Kenneth Wolcott

   So, what is the correct method to obtain these symbols displayed
adjacent to each other?

Thanks,
Ken Wolcott


Would

\version "2.22"

{
  g'2 8 4.
  \mark \markup {
    \musicglyph "scripts.segno"
    \musicglyph "scripts.coda"
  }
  b'2
}

be good enough? (Strictly speaking, we would like to have the center of 
the markup exactly on the space between the to glyphs, but since they 
are roughly the same width, maybe this solution already works.


To decrease the space between the two symbols, try adding \concat after 
\markup.


Lukas




Re: ANN: Spontini-Editor 1.0 released

2021-10-18 Thread Valentin Petzel
Hello Saul,

in many cases a 2.23 ly file will be compatible with a 2.18 Lilypond.

The only problematic cases should be when Spontini uses overrides that did not 
exist in 2.18 (which shouldn't be that many) or if you are using music function 
that have changes names or syntax, which can also be amended by renaming the 
new ones to old ones or creating wrapper music functions, so you can have a few 
definitions that can simply be removed for 2.18.

But is there any reason for using such an old Lilypond version?

Cheers,
Valentin

19.10.2021 01:39:59 Saul Tobin :

> Any possibility of using this with a Lilypond 2.18 project?
> 
> On Sun, Oct 17, 2021 at 6:21 PM Jon Arnold  wrote:
>> Looks promising. The ability to edit slurs with a mouse is huge.
>> 
>> On Sun, Oct 17, 2021 at 2:07 PM Paolo Prete  wrote:
>>> Hello all,
>>> 
>>> I just drafted a new release (1.0) of Spontini-Editor, which is now 
>>> compatible with LilyPond 2.23.0 to 4
>>> 
>>> https://github.com/paopre/Spontini
>>> 
>>> Furthermore, it offers a tool that allows you to include or exclude blocks 
>>> from the building process of the score.
>>> 
>>> I encourage the use of the editor, which I could test intensively, because 
>>> it is essentially bug-free, it works perfectly on a Raspberry PI (or any 
>>> similar cheap hw) and it allows you to create *very complex* piano scores.
>>> 
>>> Any feedback is greatly appreciated!
>>> 
>>> HTH
>>> P.