Re: Relative rhythms across bars for time changes?

2023-11-17 Thread Alasdair McAndrew
Thanks for the advice - I can certainly give that a go!

Alasdair

On Sat, 18 Nov 2023 at 06:14, Knute Snortum  wrote:

> On Fri, Nov 17, 2023 at 8:15 AM Alasdair McAndrew 
> wrote:
>
>> I'm typesetting some 16th century music which has a lot of time changes.
>> And I'd like to add equivalences of notes across bar-lines, to indicate for
>> example, that a quarter note in one bar is equal in time to a half note in
>> the next bar.
>>
>> The sort of notation I want is in this snippet:
>>
>>
>> https://lilypond.org/doc/v2.24/Documentation/snippets/rhythms#rhythms-creating-metronome-marks-in-markup-mode
>>
>> However, I want that equals sign to be aligned with the barline.  I have
>> two questions: (a) how can I do this? and (b) is there an easier way than
>> the markup given in the snippet?
>>
>
> I don't know of an automatic way to align the markup with the barline, but
> you could tweak the X-offset of the MetronomeMark to get it where you want.
>


-- 
Alasdair McAndrew (he/him)
mob: 0432 854 858

https://numbersandshapes.net


Re: LilyPond 2.25.10

2023-11-17 Thread Michael Gerdau
I will try to create a MWE if that is required to track down the 
problem.



A *minimal* example is not strictly required (though helpful), but
*some* example is — otherwise, there is nothing we can do, sorry.


Attached is a fairly short example that shows the described behaviour 
with 2.25.10


The problem seems to be created by the code copied from LSR snippet 888. 
When the \layout{} section is commented out, everything compiles fine. 
So maybe it's not a lilypond problem but one of LSR snippet 888.


The attached example from the previous email did have a function 
\paradyn not removed. The attached version does have it removed. Sorry 
for sending the wrong file.


As an additional finding:
Not only removing the \layout{} does make the error go away, removing 
the  '\new ChoirStaff <<' with the corresponding '>>' makes the error go 
away as well.


Not sure what the problem could be.

Kind regards,
Michael
--
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver\version "2.25.9"

%% Start LSR snippet 888

%% http://lsr.di.unimi.it/LSR/Item?id=888

%LSR by Wolf Alight
%=>http://lists.gnu.org/archive/html/lilypond-user/2010-02/msg00444.html
%=>http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00800.html

%LSR modified by Alexander Kobel
%=>http://permalink.gmane.org/gmane.comp.gnu.lilypond.general/89675

%LSR modified by Thomas Morley
%=>http://lilypond.1069038.n5.nabble.com/LyricText-center-on-word-breaks-lyricMelismaAlignment-tt183456.html

%% Note: Only characters of the string used to define space-set
%% are recognized by 'center-on-word'
#(define space-set
  (list->char-set
(string->list ".?-;,:„“”‘’–— */()[]{}|<>!`~&…‥")))

#(define (width grob text)
  (let* ((X-extent
   (ly:stencil-extent (grob-interpret-markup grob text) X)))
   (if (interval-empty? X-extent)
   0
   (cdr X-extent

#(define (center-on-word grob)
  (let* ((text (ly:grob-property-data grob 'text))
 (syllable (markup->string text))
 (word-position
   (if (string-skip syllable space-set)
   (string-skip syllable space-set)
   0))
 (word-end
   (if (string-skip-right syllable space-set)
   (+ (string-skip-right syllable space-set) 1)
   (string-length syllable)))
 (preword (substring syllable 0 word-position))
 (word (substring syllable word-position word-end))
 (preword-width (width grob preword))
 (word-width (width grob (if (string-null? syllable) text word)))
 (note-column (ly:grob-parent grob X))
 (note-column-extent (ly:grob-extent note-column note-column X))
 (note-column-width (interval-length note-column-extent)))

  (-
(*
  (/ (- note-column-width word-width) 2)
  (1+ (ly:grob-property-data grob 'self-alignment-X)))
preword-width)))

%% For general use this take this layout-setting
%% In the example below the override is applied to selected Lyrics only
%%
\layout {
  \context {
\Lyrics
\override LyricText.X-offset = #center-on-word
  }
}

%% End LSR snippet 888



sopranoOne = \relative bes' {
  \time 3/2
  R1*3/2*2 | bes2.\f c4 d2 | f2. es4 d2 \bar "||"
  \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} 
#UP "]" } 1=62
  es1~\mp | es1 | d1 | r2 bes8[ c d es] f4. es8 d4 d |
  \bar "|."
}

sopranoOneVerse = \lyricmode {
  Ho -- di -- e, ho -- di -- e, Chri -- stus, na -- _ _ _ tus est,
  No -- e, __ No -- e, No -- e, No -- e, No -- e, No -- e.
}

\score {
  %\new ChoirStaff <<
\new Staff \with {
  midiInstrument = "acoustic grand"
  instrumentName = "Soprano I"
}
\new Voice = "soprano1" \sopranoOne
\new Lyrics \lyricsto "soprano1" { \sopranoOneVerse }
  %>>
}


Re: Relative rhythms across bars for time changes?

2023-11-17 Thread Knute Snortum
On Fri, Nov 17, 2023 at 8:15 AM Alasdair McAndrew  wrote:

> I'm typesetting some 16th century music which has a lot of time changes.
> And I'd like to add equivalences of notes across bar-lines, to indicate for
> example, that a quarter note in one bar is equal in time to a half note in
> the next bar.
>
> The sort of notation I want is in this snippet:
>
>
> https://lilypond.org/doc/v2.24/Documentation/snippets/rhythms#rhythms-creating-metronome-marks-in-markup-mode
>
> However, I want that equals sign to be aligned with the barline.  I have
> two questions: (a) how can I do this? and (b) is there an easier way than
> the markup given in the snippet?
>

I don't know of an automatic way to align the markup with the barline, but
you could tweak the X-offset of the MetronomeMark to get it where you want.


Re: Mensural Lines in Choir Staff

2023-11-17 Thread Shane Brandes
\override Staff.BarLine.transparent = ##t

On Fri, Nov 17, 2023 at 1:50 PM Johannes Roeßler  wrote:

> Hi guys,
>
> there is a nice example for "Mensurstriche"
>
> \layout {  \context {\StaffmeasureBarType = "-span|"  }}
> music = \fixed c'' {  c1  d2 \section e2  f1 \fine}
> \new StaffGroup <<  \new Staff \music  \new Staff \music>>
>
> Unfortunately it doesn't work in a \ChoirGroup
>
> Any idea?
> Best,
> Joei
>
>


Mensural Lines in Choir Staff

2023-11-17 Thread Johannes Roeßler

Hi guys,

there is a nice example for "Mensurstriche"

\layout{
\context{
\Staff
measureBarType="-span|"
}
}

music=\fixedc''{
c1
d2\sectione2
f1\fine
}

\newStaffGroup<<
\newStaff\music
\newStaff\music

 Unfortunately it doesn't work in a \ChoirGroup Any idea? Best, Joei


Relative rhythms across bars for time changes?

2023-11-17 Thread Alasdair McAndrew
I'm typesetting some 16th century music which has a lot of time changes.
And I'd like to add equivalences of notes across bar-lines, to indicate for
example, that a quarter note in one bar is equal in time to a half note in
the next bar.

The sort of notation I want is in this snippet:

https://lilypond.org/doc/v2.24/Documentation/snippets/rhythms#rhythms-creating-metronome-marks-in-markup-mode

However, I want that equals sign to be aligned with the barline.  I have
two questions: (a) how can I do this? and (b) is there an easier way than
the markup given in the snippet?

Many thanks!

cheers,
Alasdair

-- 
Alasdair McAndrew (he/him)
mob: 0432 854 858

https://numbersandshapes.net


Re: Parenthesizing multiple events

2023-11-17 Thread Luca Fascione
Yes, I was thinking more about parenthesizing say a chord or a scale,
rather than a head vs a flat/sharp sign.
I think that next to a chord (say 8) I'd want parentheses around the
heads, but not the stem, because it feels like an ascender like in your
"flat" example

Thanks Jean,
L

On Fri, Nov 17, 2023 at 11:58 AM Jean Abou Samra  wrote:

> Le vendredi 17 novembre 2023 à 11:44 +0100, Luca Fascione a écrit :
>
> Nice. Thanks Jean. This solves it for my current score
>
> In general, what's the background for this not working though?
> You seem to imply it's intended behaviour that it would only work on a
> single event, or am I misreading?
>
>
>
> The restriction is not parenthesizing a single event but parenthesizing a
> single grob, because the parenthesis grob needs something to attach to.
> Making a Parentheses spanner between two points of the score would be
> theoretically possible to implement, it's just not implemented right now.
>
> Also, can't lilypond support a mechanism like TeX's \left \right system to
> gauge delimiter sizes?
>
>
>
> It can — in fact, it has the \markup \parenthesize command. The issue with
> (non-\markup) \parenthesize is that it is implemented by looking up font
> glyphs according to font size, which works better in some contexts like
> accidentals, because you want the parentheses on a flat to look like
>
>
>
>
> and not
>
>
>
> Again, there's no theoretical limitation preventing auto-scaling, but it
> might need a heuristic to decide when it's appropriate.
>
>

-- 
Luca Fascione


Re: Parenthesizing multiple events

2023-11-17 Thread Jean Abou Samra
Le vendredi 17 novembre 2023 à 11:44 +0100, Luca Fascione a écrit :
> Nice. Thanks Jean. This solves it for my current score
> 
> In general, what's the background for this not working though?
> You seem to imply it's intended behaviour that it would only work on a single
> event, or am I misreading?


The restriction is not parenthesizing a single event but parenthesizing a single
grob, because the parenthesis grob needs something to attach to. Making a
Parentheses spanner between two points of the score would be theoretically
possible to implement, it's just not implemented right now.

> Also, can't lilypond support a mechanism like TeX's \left \right system to
> gauge delimiter sizes?


It can — in fact, it has the \markup \parenthesize command. The issue with (non-
\markup) \parenthesize is that it is implemented by looking up font glyphs
according to font size, which works better in some contexts like accidentals,
because you want the parentheses on a flat to look like




and not



Again, there's no theoretical limitation preventing auto-scaling, but it might
need a heuristic to decide when it's appropriate.



signature.asc
Description: This is a digitally signed message part


Re: Parenthesizing multiple events

2023-11-17 Thread Luca Fascione
Nice. Thanks Jean. This solves it for my current score

In general, what's the background for this not working though?
You seem to imply it's intended behaviour that it would only work on a
single event, or am I misreading?

Also, can't lilypond support a mechanism like TeX's \left \right system to
gauge delimiter sizes?

Cheers
L

On Fri, Nov 17, 2023 at 11:18 AM Jean Abou Samra  wrote:

> Le vendredi 17 novembre 2023 à 10:58 +0100, Luca Fascione a écrit :
>
> Hi all,
>
>
>
> Try
>
> https://lsr.di.unimi.it/LSR/Item?id=902
>
>

-- 
Luca Fascione


Re: Parenthesizing multiple events

2023-11-17 Thread Jean Abou Samra
Le vendredi 17 novembre 2023 à 10:58 +0100, Luca Fascione a écrit :
> Hi all,
> I noticed that in \chordmode the \parenthesize command only seems to word with
> one chord
> 
> If I use
> 
> \new ChordNames { \chordmode { \parenthesize a:m7 } }
> 
> I get a chord in parentheses.
> If I use
> 
> \new ChordNames { \chordmode { \parenthesize { a:m7 d:7}  } }
> 
> I do not get two chords in parentheses (chords are there but parens are not)
> 
> Also, 
> 
> \new ChordNames { \chordmode { \parenthesize { a:m7 } } }
> 
> produces the chord symbol and no parentheses


Try

https://lsr.di.unimi.it/LSR/Item?id=902


> \parenthesisOpenSymbol also is rejected inside \chordmode 

parenthesisOpenSymbol isn't relevant to what you're doing — it was a special
variable that you could configure in order to change the meaning of "(" from the
default meaning of "start slur".

It's also  long been obsolete, the current syntax being

"(" = ...

(since 2.17.25).

Best,
Jean




signature.asc
Description: This is a digitally signed message part


Re: MIDI Drums to lilypond

2023-11-17 Thread Luca Fascione
Yes, sorry. I did find that after typing the email...

It is the GM mapping, it's just that I didn't want to retype it all by
hand, if I could parse it from somewhere, you see

Thanks!

L

On Fri, Nov 17, 2023 at 11:05 AM Mark Knoop  wrote:

> You'll find it in drumpitch-init.ly, I believe it's just the
> standard General MIDI percussion keymap.
>
> At 10:52 on 17 Nov 2023, Luca Fascione wrote:
> > Hi,
> > I'm converting a MIDI file to lilypond with a drumset track.
>
> > My process goes through MusicXML, but the `musicxml2ly` script I have
> > (2.22.2) emits pitches instead of percussion notes.
>
> > I can write a script to map those, but if anyone had a starting point,
> > that'd be grand.
>
> > In my mind, the mapping lilypond uses to go from the percussion notes to
> > its MIDI output is all I need (and then I can reverse that). If someone
> > could get me a breadcrumb to that, that'd be grand.
>
> > Thanks
> > Luca
>
> --
> Mark Knoop
>


-- 
Luca Fascione


Re: MIDI Drums to lilypond

2023-11-17 Thread Mark Knoop
You'll find it in drumpitch-init.ly, I believe it's just the
standard General MIDI percussion keymap.

At 10:52 on 17 Nov 2023, Luca Fascione wrote:
> Hi,
> I'm converting a MIDI file to lilypond with a drumset track.

> My process goes through MusicXML, but the `musicxml2ly` script I have
> (2.22.2) emits pitches instead of percussion notes.

> I can write a script to map those, but if anyone had a starting point,
> that'd be grand.

> In my mind, the mapping lilypond uses to go from the percussion notes to
> its MIDI output is all I need (and then I can reverse that). If someone
> could get me a breadcrumb to that, that'd be grand.

> Thanks
> Luca

--
Mark Knoop



Parenthesizing multiple events

2023-11-17 Thread Luca Fascione
Hi all,
I noticed that in \chordmode the \parenthesize command only seems to word
with one chord

If I use

\new ChordNames { \chordmode { \parenthesize a:m7 } }

I get a chord in parentheses.
If I use

\new ChordNames { \chordmode { \parenthesize { a:m7 d:7}  } }

I do not get two chords in parentheses (chords are there but parens are not)

Also,

\new ChordNames { \chordmode { \parenthesize { a:m7 } } }

produces the chord symbol and no parentheses

\parenthesisOpenSymbol also is rejected inside \chordmode

Cheers
L

-- 
Luca Fascione


MIDI Drums to lilypond

2023-11-17 Thread Luca Fascione
Hi,
I'm converting a MIDI file to lilypond with a drumset track.

My process goes through MusicXML, but the `musicxml2ly` script I have
(2.22.2) emits pitches instead of percussion notes.

I can write a script to map those, but if anyone had a starting point,
that'd be grand.

In my mind, the mapping lilypond uses to go from the percussion notes to
its MIDI output is all I need (and then I can reverse that). If someone
could get me a breadcrumb to that, that'd be grand.

Thanks
Luca

-- 
Luca Fascione


Re: Separation of the musical notation.

2023-11-17 Thread Silvain Dupertuis

Thanks for the indication.
I did not know \markup could be used to place entire scores on the page.

Le 16.11.23 à 16:08, Kieren MacMillan a écrit :

Hi all,


No idea how to do it with Lilypond, may-be other people have an idea.

\version "2.25.2"

teststaff = \new Staff \repeat unfold 12 c''4
test = \new ChoirStaff << \teststaff \teststaff \teststaff >>

\markup {
   \fill-line {
 \score { \test }
 \score { \test }
   }
}


As for me, I would do this kind of thing using Lilypond to produce two separate 
pages of smaller size, and use Scribus to arrange the partial PDF files on the 
final page and produce the final PDF.

I think it’s ultimately easier to do it natively in Lilypond…?

Hope this helps!
Kieren.
__

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org