Re: Multiple clefs in one Staff

2023-10-29 Thread Werner LEMBERG


>> Having this functionality is certainly useful for Piano music.
>> However, it's quite rare, and an LSR snippet should be sufficient
>> (possibly integrated into LilyPond's documentation).
> 
> I see that you have shown an example that repeats the clef for every
> measure.  If that's the convention, the approach in my code is not
> likely helpful.

I think there is not a universal convention whether the small bass
clef gets repeated or not.  It probably depends on the situation.

> Correction: it is easy to make it do that.

Excellent, thanks!


Werner



Re: Multiple clefs in one Staff

2023-10-28 Thread David Kastrup
David Kastrup  writes:

> Werner LEMBERG  writes:
>
>>> Inspired by
>>> 
>>> 
>>> Should we be offering something like that?
>>
>> What exactly do you mean with 'offering'?
>
> Provide it as core functionality called with dedicated commands.
>
>> Having this functionality is certainly useful for Piano music.
>> However, it's quite rare, and an LSR snippet should be sufficient
>> (possibly integrated into LilyPond's documentation).
>
> I see that you have shown an example that repeats the clef for every
> measure.  If that's the convention, the approach in my code is not
> likely helpful.

Correction: it is easy to make it do that.

\version "2.24.2"
\language "italiano"

\header {
  tagline = ##f
}

\layout {
  \context {
\Staff
\accepts PseudoClefStaff
  }
  \context {
\name PseudoClefStaff
\type Engraver_group
\alias Staff
\accepts Voice
\consists Clef_engraver
\override Clef.font-size = #-4
\override Clef.break-align-symbol = #'cue-clef
\override Clef.break-visibility = #end-of-line-invisible
  }
}

\midi {
  \context {
\Staff
\accepts PseudoClefStaff
  }
  \context {
\name PseudoClefStaff
\type Performer_group
\alias Staff
\accepts Voice
  }
}

pseudoClef =
#(define-music-function (offset clef-type) ((number?) string?)
  #{ \new PseudoClefStaff = "pseudo" \with { firstClef = ##f } { }
 \change Staff = "pseudo"
 #(if offset #{ \override Staff.Clef.Y-offset = #offset #})
 \clef #clef-type
   #})

% Any ideas for an automated endPseudoClef?

\score {
\new Staff = "lower" {
\key re \minor
\numericTimeSignature
\time 3/4
\clef bass
\relative do' {
  \voices 1,""
<<
{
s2. r4 r8. \clef treble
\tuplet 3/2 16 { sol'32 (la sib }
do8.) do16--
do16-- sib sol la
sol8. 
\omit TupletBracket
\tuplet 3/2 16 { fa32 (sol la }
sib8.) sib16
  } \\
{
  re,,,8.-- re16-- re2--~ 2.~
  \pseudoClef #-3 "bass"
  \voiceTwo
  2.~ \break 2.~2.
  \oneVoice
  \change Staff = "lower" % change back to standard staff
}
>>
}
}
}


-- 
David Kastrup


Re: Multiple clefs in one Staff

2023-10-27 Thread Benkő Pál
David Kastrup  ezt írta (időpont: 2023. okt. 27., P, 11:46):
>
> Werner LEMBERG  writes:
>
> >> Inspired by
> >> 
> >>
> >> Should we be offering something like that?
> >
> > What exactly do you mean with 'offering'?
>
> Provide it as core functionality called with dedicated commands.
>
> > Having this functionality is certainly useful for Piano music.
> > However, it's quite rare, and an LSR snippet should be sufficient
> > (possibly integrated into LilyPond's documentation).
>
> I see that you have shown an example that repeats the clef for every
> measure.  If that's the convention, the approach in my code is not
> likely helpful.

another example is the first movement of Ligeti's String quartet no2,
bars 25-35 (cello playing harmonics sul III while holding a C sul IV)
https://youtu.be/rMd6EEqukWo?t=75
where every bar has _both_ clefs.
(I can't hide my embarrassment seeing that the bass clef doesn't act
as an f-clef.)



Re: Multiple clefs in one Staff

2023-10-27 Thread Graham King

On Fri, 2023-10-27 at 11:46 +0200, David Kastrup wrote:
> > On the other hand, I think I have seen some mensural(?) clef that
> > combined two equal-weight different clefs (possibly both C clefs on
> > different staff lines) in order to put two singing voices into one
> > staff.  That's sort of a related problem space but with a
> > differently-weighted solution.  I think that one would be more
> > special,
> > though.

A famous example is Ockeghem's Missa Prolationum (in the Chigi Codex:  
https://imslp.org/wiki/Special:ReverseLookup/327083 at pp.44-59 of the PDF) in 
which each line of music encodes a mensuration canon in two voices at an 
interval determined (usually) by the pair of clefs.  The first kyrie is at the 
unison, the Christe at the second, the second kyrie at the third, etc.


Re: Multiple clefs in one Staff

2023-10-27 Thread David Kastrup
Werner LEMBERG  writes:

>> Inspired by
>> 
>> 
>> Should we be offering something like that?
>
> What exactly do you mean with 'offering'?

Provide it as core functionality called with dedicated commands.

> Having this functionality is certainly useful for Piano music.
> However, it's quite rare, and an LSR snippet should be sufficient
> (possibly integrated into LilyPond's documentation).

I see that you have shown an example that repeats the clef for every
measure.  If that's the convention, the approach in my code is not
likely helpful.

If there is some common convention, that might be useful to give native
support to, to the degree where a user's source reflects mostly musical
content rather than code detracting from the readability.

On the other hand, I think I have seen some mensural(?) clef that
combined two equal-weight different clefs (possibly both C clefs on
different staff lines) in order to put two singing voices into one
staff.  That's sort of a related problem space but with a
differently-weighted solution.  I think that one would be more special,
though.

-- 
David Kastrup



Re: Multiple clefs in one Staff

2023-10-27 Thread Thomas Morley
Am Fr., 27. Okt. 2023 um 11:29 Uhr schrieb Werner LEMBERG :
>
>
> > Inspired by
> > 
> >
> > Should we be offering something like that?
>
> What exactly do you mean with 'offering'?
>
> Having this functionality is certainly useful for Piano music.
> However, it's quite rare, and an LSR snippet should be sufficient
> (possibly integrated into LilyPond's documentation).
>
>
> Werner
>

We already have
https://lsr.di.unimi.it/LSR/Item?id=326
Although ot tested, David's code looks clearer and cleaner.

Cheers,
  Harm



Re: Multiple clefs in one Staff

2023-10-27 Thread Werner LEMBERG


> Inspired by
> 
> 
> Should we be offering something like that?

What exactly do you mean with 'offering'?

Having this functionality is certainly useful for Piano music.
However, it's quite rare, and an LSR snippet should be sufficient
(possibly integrated into LilyPond's documentation).


Werner



Multiple clefs in one Staff

2023-10-26 Thread David Kastrup

Inspired by


Should we be offering something like that?

\version "2.24.2"
\language "italiano"

\header {
  tagline = ##f
}

\layout {
  \context {
\Staff
\accepts PseudoClefStaff
  }
  \context {
\name PseudoClefStaff
\type Engraver_group
\alias Staff
\accepts Voice
\consists Clef_engraver
\override Clef.font-size = #-3
\override Clef.break-align-symbol = #'cue-clef
  }
}

\midi {
  \context {
\Staff
\accepts PseudoClefStaff
  }
  \context {
\name PseudoClefStaff
\type Performer_group
\alias Staff
\accepts Voice
  }
}

pseudoClef =
#(define-music-function (offset clef-type) ((number?) string?)
  #{ \new PseudoClefStaff = "pseudo" { }
 \change Staff = "pseudo"
 #(if offset #{ \override Staff.Clef.Y-offset = #offset #})
 \clef #clef-type
   #})

% Any ideas for an automated endPseudoClef?

\score {
\new Staff = "lower" {
\key re \minor
\numericTimeSignature
\time 3/4
\clef bass
\relative do' {
  \voices 1,""
<<
{
s2. r4 r8. \clef treble
\tuplet 3/2 16 { sol'32 (la sib }
do8.) do16--
do16-- sib sol la
sol8. 
\omit TupletBracket
\tuplet 3/2 16 { fa32 (sol la }
sib8.) sib16
  } \\
{
  re,,,8.-- re16-- re2--~ 2.~
  \pseudoClef #-3 "bass"
  \voiceTwo
  2.~ \break 2.
  \oneVoice
  \change Staff = "lower" % change back to standard staff
}
>>
}
}
}


-- 
David Kastrup