Re: Subdivided beaming not correct with compound meter and tuplets

2024-11-06 Thread Leo Correia de Verdier
What is needed is for the secondary beam (the sixteenth beam) to be broken 
between each quintuplet group in the first measure of the left hand. 

> 7 nov. 2024 kl. 06:11 skrev Jason Yip :
> 
> On 2024-11-06 10:57, Richard Gress - rgress(a)nd.edu wrote:
>> Hi everyone,
>> I'm engraving a measure of Sorabji's First Symphony for Organ. In the left 
>> hand part, beams should be subdivided each dotted sixteenth note. However, 
>> the current behavior is that the beams are subdivided every beat (3 eighth 
>> notes in 9/8 time.) Here's my example. I will trim it down, but it will 
>> still be a lot, since I'm not sure what could possibly be interfering. I 
>> have tried many different settings for the variables, and time signatures.
>> ...
>> \version "2.24.4"
>> #(set-default-paper-size "letterlandscape")
>> upperOne = \relative c' {
>>   \clef treble
>> % Time sig for first measure
>>   \time 9/8
>>   \accidentalStyle forget
>>   << {
>> \oneVoice ees8.[( fis a~] \tuplet 5/3 { a[ aes8] } a!8.[ c] \bar "!" \break
>> % Time sig for second measure
>>   \compoundMeter #'((3 8) (3 8) (3 8) (3 16) (3 8) (3 8))
>>   e,[ g] bes8[ a gis] \tuplet 5/3 { g!8.[ fis8] } e8. \voiceOne \tuplet 5/3 
>> { d[ e8 ] } gis4.~gis16.[ a f8.])
>> } \\ {
>>   s1 s8 s2. s16. s s s \voiceTwo \once \override TupletBracket.positions = 
>> #'(-8 . -9.5) \tuplet 5/3 { r16 bes,[( a8 g16] } cis8[ b a] gis4.)
>> } >>
>> }
>> upperTwo = \relative c {
>>   \clef bass
>>   \accidentalStyle forget
>>   << { \oneVoice
>>   \set subdivideBeams = ##t
>> % Here is where the problem occurs. We're in 9/8 time.
>>   \set baseMoment = #(ly:make-moment 3/32)
>>   \set beatStructure = 2,2,2,2 % Whatever I set this to does nothing. 
>> Same behavior if omitted.
>>   \tuplet 5/3 { r16 cis([ d f e }
>>   \tuplet 5/3 { g f g aes bes }
>>   \tuplet 5/3 { b! g c d ees \clef treble }
>>   \tuplet 5/3 { f e! f g8 }
>>   \tuplet 5/3 { a!16 b c d ees }
>>   \tuplet 5/3 { d f e! d cis }
>>   \tuplet 5/3 { c! ees d c b }
>>   \tuplet 5/3 { bes des c bes aes] }
>>   \set baseMoment = #(ly:make-moment 1/8)
>>   \tuplet 3/2 { g[ b a } \tuplet 3/2 { f e d } cis8]
>>   \tuplet 5/3 { \clef bass c16[ b bes a g] }
>>   \set subdivideBeams = ##f
>>   f32[ e d c b bes]
>>   \tuplet 5/3 { a16[ f e' g f,] }
>>   \set subdivideBeams = ##t
>>   \set baseMoment = #(ly:make-moment 3/16)
>>   \tuplet 4/3 { e[ d c' e }
>>   \tuplet 4/3 { c, aes' c fis,]~ } \voiceTwo
>>   \tuplet 4/3 { fis[ c' ees a }
>>   \tuplet 4/3 { g b \clef treble g' b]) }
>> } \\ {
>>  s1 s8 s8. s s4. s8. s s s4. \accidentalStyle default \voiceOne fis,,8.[ 
>> \accidentalStyle forget g']
>> } >>
>> }
>> \score {
>>   \new PianoStaff \with { \omit TimeSignature }
>>   <<
>> \new Staff = "upper1" \upperOne
>> \new Staff = "upper2" \upperTwo
>>   >>
>> }
>> ...
>> How do I get the beams in the first measure to be subdivided twice as often? 
>> The other beams look OK.
> 
> Did you try running the latest development version of Lilypond? I have 
> attached the output of your score under version 2.25.21. You can even comment 
> out setting baseMoment and beatStructure--they do not seem to affect the 
> output. Is this what you are looking for?
> 
> Note that I authored the new beam subdivision algorithm present in the 2.25.8 
> version (but not in the 2.24 version series). It seems that your use case is 
> most likely not possible under the old algorithm. Let me know if you need 
> more help tuning the beam subdivision.
> <20241106_21h05m04s_grim.png>



Re: Subdivided beaming not correct with compound meter and tuplets

2024-11-06 Thread Leo Correia de Verdier
The subdivision works well without the manual beaming (the square brackets), 
but as Carl says it’s probably impossible to subdivide just the secondary beam 
automatically at non-powers-of-a-half:
%
\relative c {
  \time 9/8
  \set subdivideBeams = ##t
  \set baseMoment = #(ly:make-moment 3/32)
  \set beatStructure = 2,2,2,2,2,2
  \tuplet 5/3 8. {c'16[ \repeat unfold 28 c16 c16]
  \repeat unfold 30 c16}
} 
%
I don’t think the rationale holds, though. It happily subdivides the beam at 
dotted quarters, without concern for how that should be represented. Or:
%
#(set-default-paper-size "a3landscape")
{\time 18/16
 \set subdivideBeams = ##t
 c'64[ \repeat unfold 70 c'64 c'64]}
%%
Here is what the passage looks like with the beaming manually forced:
%
  \tuplet 5/3 8. { r16 cis([ d f \set stemRightBeamCount = 1 e 
\set stemLeftBeamCount = 1 g f g aes \set 
stemRightBeamCount = 1 bes 
\set stemLeftBeamCount = 1 b! g c d \set stemRightBeamCount 
= 1 ees \clef treble 
\set stemLeftBeamCount = 1 f e! f \set stemRightBeamCount = 
1 g8 
\set stemLeftBeamCount = 1 a!16 b c d \set 
stemRightBeamCount = 1 ees
\set stemLeftBeamCount = 1 d f e! d \set stemRightBeamCount 
= 1 cis
\set stemLeftBeamCount = 1 c! ees d c \set 
stemRightBeamCount = 1 b
\set stemLeftBeamCount = 1 bes des c bes aes] }
%%



> 6 nov. 2024 kl. 23:42 skrev Carl Sorensen :
> 
> 
> 
> On Wed, Nov 6, 2024 at 2:05 PM Richard Gress  wrote:
> Hi everyone,
> 
> I'm engraving a measure of Sorabji's First Symphony for Organ. In the left 
> hand part, beams should be subdivided each dotted sixteenth note. However, 
> the current behavior is that the beams are subdivided every beat (3 eighth 
> notes in 9/8 time.) Here's my example. I will trim it down, but it will still 
> be a lot, since I'm not sure what could possibly be interfering. I have tried 
> many different settings for the variables, and time signatures.
> 
> 
> How do I get the beams in the first measure to be subdivided twice as often? 
> The other beams look OK.
> 
> I posted this same question to Stack Exchange, and will update with any new 
> info there. This is for my dissertation on Sorabji, which will heavily 
> feature LilyPond engravings.
> 
> 
> I don't think it's possible to automatically subdivide beams on 3/32.  Beams 
> need to subdivide on 1/8, 1/16, 1/32, 1/64, etc. since the number of beams 
> between the subdivided parts represents the length of the subdivided part.
> 
> So you can subdivide a triplet of 16ths from another triplet of sixteenths, 
> since the duration of the triplet of sixteenths is 1/8, so they are connected 
> by a single beam.
> 
> The subdivision of a 5/3 tuplet of 16ths doesn't work that way, because it is 
> 3/32, not 1/9, or 1/16, or 1/32.
> 
> You can set the subdivisions automatically as in:
> 
> https://mail.gnu.org/archive/html/lilypond-user/2023-01/msg00011.html
> 
> And you could write a music function that would include the calls to set the 
> right  and left beamlet counts.
> 
> Sorry I don't have better news here.
> 
> Carl




Re: Percussion with lyrics

2024-09-06 Thread Leo Correia de Verdier
Like this? The staff with the lyrics was being created because in the score 
block, when you created the NullVoice it had nowhere to go, so the staff was 
implicitly created for it. Here it is created inside the DrumStaff in the 
drumsPart variable.

%%%  SNIPPET BEGINS
\version "2.22.1"

\header {
 title = \markup \concat { "Oh, but it " \underline "does" " work!" }
 instrument = "Frog / Cajonga's"
}

\paper {
 left-margin = 20
}

\layout {
 \context {
   \Lyrics
 \consists Bar_engraver
 \consists Separating_line_group_engraver
 \hide BarLine
 }
}

global = {
 \key c \major
 \time 4/4
}

melody = {
 \repeat unfold 6 {
   a1 |
 }
}

verse = \lyricmode {
 \override LyricText.self-alignment-X = #LEFT
 \override LyricText.extra-offset = #'(-1 . 0)
 "Measure one and"
 ""
 "Measure two and"
 "A measure with more notes"
 ""
 "And the final one!"
}

% tomml toml tomfh
drum = \drummode {
 R1 |
 r4 hh4 hh4 r4 |
 R1 |
 R1 |
 r2 r16 toml16 toml toml r4 |
 R1 |
 \bar "|."
}

drumsPart = \new DrumStaff \with {
 \consists "Instrument_name_engraver"
 instrumentName = \markup \center-column { "Frog" "Cajs" }
} << \global \drum \new NullVoice = "aligner" \melody >>

\score {
  <<
   \drumsPart
   \new Lyrics \lyricsto "aligner" \verse
 >>
}
%%%  SNIPPET ENDS

> 6 sep. 2024 kl. 13:02 skrev Christ van Willegen :
> 
> HI Kieren,
> 
> On Fri, Sep 6, 2024 at 12:56 PM Kieren MacMillan 
>  wrote:
> p.s.
> 
> You could get away with your “one giant lyric blob on whole notes” approach 
> with a few tweaks:
> 
> 
> %%%  SNIPPET SNIPPED
> 
> Hope that [also] helps!
> Kieren.
> 
> Well, I'd rather not see the (empty) staff there. It will only take up space! 
> Both your snippets show an empty 'voice' staff (that I'm not particularly 
> interested in :-) )
> 
> Christ van Willegen 




Re: Lyric spacing confusion

2024-08-19 Thread Leo Correia de Verdier
Hi Laurie

\addlyrics (like \lyricsto ) discards the lyric's durations and uses durations 
from the voice the lyrics are attached to. The twelve ones in the beginning are 
creating twelve empty syllables, whose durations are then discarded and 
replaced with the twelve ”syllable-places” in the intro. If you try the 
alternative below you can see how it works:

%%
verse = \lyricmode {
  % Lyrics follow here.
  a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1
  Man it's a hot one.
  Like sev -- en in -- ches from the midday sun
}
%%%

HTH
/Leo

> 20 aug. 2024 kl. 01:30 skrev Laurie Savage :
> 
> Thank you for the clarification. Here is the code and the output:
> 
> Laurie
> 
> 
> On Tue, 20 Aug 2024 at 05:55, Xavier Scheuer  wrote:
> On Mon, 19 Aug 2024 at 02:14, Laurie Savage  wrote:
> >
> > Hi,
> >
> > I'm trying to set up lyrics to start on the upbeat of beat 4 in bar four of 
> > a song (calling the anacrusis bar 0). I succeeded but I'm very puzzled.
> 
> Hello,
> 
> Sorry but it is difficult to try to help you.
> You do not give the complete code for your output and the only part of code 
> you "share" is as a screenshot (instead of text).
> Are you sure you do not use \lyricsto before \verse ?
> 
> Kind regards,
> Xavier
\version "2.25.16"

\header {
  title = "Smooth"
  composer = "Rob Thomas and Itall Shur"
  poet = "Rob Thomas"
  piece = "Medium Latin Rock"
  copyright = "1999"
  tagline = "Edited by LS for Paradiso Connection"
}

global = {
  \key c \major
  \time 4/4
  \partial 2
}

melody = \relative c' {
  \global
  % Music follows here.
 % \partial 2
  r8 d16 (e g8 e) | a1 | r8 gis a b c b4 a16 b| c4 a2.| r4 < d, gis>4 r8 ees d 
c |
  e4 2. | r8 ees' d c d c d c | d8~ 8 2 r8 gis |  |
}

verse = \lyricmode {
  % Lyrics follow here.
  1 1 1 1 1 1 1 1 1 1 1 1
  Man it's a hot one.
  Like sev -- en in -- ches from the midday sun
}

\score {
  <<
%\new ChordNames \chordNames
\new Staff { \melody }
\addlyrics { \verse }
  >>
}



LilyLyricsProb.pdf
Description: Adobe PDF document
> 



Re: Beam.positions affecting space between staves

2024-08-19 Thread Leo Correia de Verdier
I’m at the hospital, far from my library, and anyways not sure about exactly 
how Karim wants them to look or behave. I was just pointing out it’s nothing 
really exotic in contemporary music.

Anyway: An alternative approach, somewhat blunter but simpler

\version "2.25.12"
one =   { 
s2 c'4 c'4
  }
two =   { 
\temporary \override Stem.vertical-skylines = ##f
\temporary \override Beam.vertical-skylines = ##f
\override Beam.positions = #'( 18 . 18 ) c'8 8 8 8
\revert Stem.vertical-skylines
\revert Beam.vertical-skylines
  c'4 c'4
  }
  
\new StaffGroup 
<<
  \new Staff
 \one
  \new Staff
 \two
>>

> 19 aug. 2024 kl. 22:49 skrev Werner LEMBERG :
> 
> 
>> Common beams for both staves, sometimes pulled outside them are used
>> in contemporary music when the resultant rhythm from both staves of
>> a single instrument are significantly easier to grasp than the
>> separate rhythms of the separate staves.  It also hints at both
>> staves having a common voice or musical material.
> 
> Please provide a scan of a real-world example to show what you really
> want to achieve.
> 
> 
>Werner




Re: Beam.positions affecting space between staves

2024-08-19 Thread Leo Correia de Verdier
Common beams for both staves, sometimes pulled outside them are used in contemporary music when the resultant rhythm from both staves of a single instrument are significantly easier to grasp than the separate rhythms of the separate staves. It also hints at both staves having a common voice or musical material. 19 aug. 2024 kl. 21:52 skrev Xavier Scheuer :On Mon, 19 Aug 2024 at 01:51, Karim Haddad  wrote:>> Hi>> I know there is a simple solution for this but cannot find it.>> When applying \override Beam.positions in order to raise the beam of a grouped rythm above the first staff:>> 1) it doesn't overlapp the first staff> 2) an extra space is created (i imagine to avoid collision)>> How can i make it happen.Hello,I would use cross-staff stems in the lower staff and invisible note heads in the upper staff.But this notation is not conventional, what is it supposed to represent/signify?Cordialement,Xavier


Re: RehearsalMarks, slurs and ties overlapping

2024-06-14 Thread Leo Correia de Verdier
Setting 
  \override Score.RehearsalMark.outside-staff-priority = ##f
could perhaps also be an option.

> 13 juni 2024 kl. 16:49 skrev Federico Sarudiansky :
> 
> Hi again, Kieren! 
> 
> Excellent! However I wonder if there is a more general approach. Something 
> «allowing» the slurs not taking the rehearsal marks into consideration when 
> defining its shape parameters. 
> 
> All the best!
> 
> F. 
> 
> El jue, 13 jun 2024 a las 11:28, Kieren MacMillan 
> () escribió:
> Hi Federico,
> 
> > How can I overlap the perfect tie (slur) in A with the mark position in B 
> > and C so to use the .whiteout and .layer properties to put the slur/tie 
> > behind the mark and save some vertical space?
> 
> Maybe something like this…?
> 
> %%%  SNIPPET BEGINS
> \version "2.25.11"
> 
> \relative c''' { 
>   g1~ \mark \default g1 
>   g1~ \tweak extra-offset #'(-0.25 . -1.5) \tweak whiteout #2 \mark \default 
> g1 
>   g1( \tweak extra-offset #'(-0.25 . -1.5) \tweak whiteout #2 \mark \default 
> e1 )  
> }
> %%%  SNIPPET ENDS
> 
> Hope that 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.
> 




Re: how to draw lines independent from the notes

2024-06-03 Thread Leo Correia de Verdier
Expanding on Werner’s example a bit, is this something like what you’re after?

\version "2.25.12"

\markup \with-dimensions #'(0 . 0) #'(0 . 0) {
  \translate #'(20 . -20)
   \center-column { example-text \concat { \arrow-head #X #LEFT ##t \draw-line 
#'(30 . 0) \arrow-head #X #RIGHT ##t }}}

<<
 { f'2 f' f' f' f'1 }
 { d'2 d' d' d' d'1 }
>>

\paper {
 markup-markup-spacing.basic-distance = 0
 markup-markup-spacing.minimum-distance = 0
 markup-markup-spacing.padding = 0

 markup-system-spacing.basic-distance = 0
 markup-system-spacing.minimum-distance = 0
 markup-system-spacing.padding = 0

 top-markup-spacing.basic-distance = 0
 top-markup-spacing.minimum-distance = 0
 top-markup-spacing.padding = 0
}


> 3 juni 2024 kl. 13:43 skrev Paolo Prete :
> 
> Thanks to Torsten and Werner,
> 
> I'm going to use the postscript approach.
> 
> But what about the segment with arrows and centered text?
> 
> I googled a bit, and I also queried ChtaGPT but could not find anything 
> useful...
> 
> 
> On Mon, Jun 3, 2024 at 11:46 AM Torsten Krueger  wrote:
> Paolo Prete wrote on 02.06.2024:
> 
> > How can I draw a vertical (or even diagonal) line independently positioned
> > from the notes in the score, that can span across staves, as shown in the
> > figure?
> 
> For drawing lines independently from notes I do not use Lilypond
> directly but postscript. For this purpose I have added a few lines of
> code right at the beginning in the definition of bookTitleMarkup like
> this (drawing two small horizontal lines in the page margins):
> 
> --8<---cut here---start->8---
> 
>   bookTitleMarkup = \markup {
> \column {
>\postscript #"
> gsave
> initmatrix
> 1 setlinewidth 0 306 moveto 6 0 rlineto stroke
> 1 setlinewidth 377 306 moveto 6 0 rlineto stroke
> grestore"
>\fill-line {
> \fromproperty #'header:instrument
> ...
> 
> --8<---cut here---end--->8---
> 
> Don't know if it helps in your case, but maybe gives you an idea of how
> to proceed.
> 
> Have fun
> Torsten
> 
> 




Re: GraceSpacing on Staff

2024-04-26 Thread Leo Correia de Verdier
s4*3 after the grace notes (within the grace group) in the lower staff. 

> 26 apr. 2024 kl. 17:11 skrev Robert Garrigos :
> 
> I have this music to replicate:
> 
> 
> 
> I managed to get this:
> 
> 
> 
> Still, I need to move the lower grace notes to the left. I can only apply 
> GraceSpacing on the whole Score, which doesn’t help. Can I apply it on just 
> one Staff?
> Also, I need the slur across the Staves but cannot find how to do so.
> 
> Thanks.
> 
> Robert



Re: computer compatible

2024-04-11 Thread Leo Correia de Verdier
MacOS 14 (Sonoma) is not the same as OSX 14 (Mojave, would be 10.14 in a more 
straightforward numbering). I don’t know about compatibility, though. 

> 11 apr. 2024 kl. 16:57 skrev Robert Garrigos :
> 
> I’m using it with macosx 14.4.1 since 14.1
> 
> Robert
> 
>> El 11 abr. 2024, a les 16:28, Lydia Westerberg  va 
>> escriure:
>> 
>> 
>> Is Lilypond compatible with iMac sonoma 14.2?
>> Thanks.
>> Lydia Westerberg
>> 
>> 
>> 
> 
> 



Re: draw box around score

2024-03-22 Thread Leo Correia de Verdier
Sorry, I got a fudged quote-apostrophe in last answer. It should be:

\markup \box \score { c'1 }

> 22 mars 2024 kl. 15:06 skrev Leo Correia de Verdier 
> :
> 
> Hi Joop!
> 
> Do you mean something like
> \markup \box \score { c’1 }
> 
> HTH
> /Leo
> 
>> 22 mars 2024 kl. 14:40 skrev Go77 :
>> 
>> 
>> Hi all,
>> 
>> I tried to find how to draw a box around a piece of music. Looked through 
>> the manual, snippets etc, but didn't find out how to do this yet. See below 
>> what I mean. Any suggestions?
>> 
>> Joop
>> 
>> 
>> 
>> 
>> 




Re: draw box around score

2024-03-22 Thread Leo Correia de Verdier
Hi Joop!

Do you mean something like
\markup \box \score { c’1 }

HTH
/Leo

> 22 mars 2024 kl. 14:40 skrev Go77 :
> 
> 
> Hi all,
> 
> I tried to find how to draw a box around a piece of music. Looked through the 
> manual, snippets etc, but didn't find out how to do this yet. See below what 
> I mean. Any suggestions?
> 
> Joop
> 
> 
> 
> 


Re: Circular staves

2024-03-16 Thread Leo Correia de Verdier
Wow!

That was truly amazing!

/Leo

> 16 mars 2024 kl. 16:46 skrev Valentin Petzel :
> 
> Some time ago Jean posted this lovely proof of concept to the list for 
> circular staves. I’ve revised this to handle stuff like multiple Staves, 
> Spanners and Beams and such stuff. The result looks quite stunning in my 
> opinion. Also the way the code now works each bit essentially only requires 
> the a translation and orientation depending on the source position. In the 
> next step I’ll try to change the interface so that System provides not an 
> angle and a radius, but a procedures that takes any coordinate and returns a 
> target coordinate as well as an orientation. This way this implementation 
> should work as well for arbitary changes of coordinates.
> 
> A problem with this implementation is that we need a sufficiently wide paper 
> for 
> rendering the origin staff. This is usually much wider than what is required 
> to 
> fit the result. I’ve thought about doing the classic web designer trick and 
> use 
> negative page margins, but Lilypond does not think that this is a reasonable 
> thing to do ...
> 
> Cheers,
> Valentin
> 
> Am Sonntag, 23. April 2023, 22:09:22 CET schrieb Jean Abou Samra:
>>> Le dimanche 23 avril 2023 à 12:37 +1000, Andrew Bernard a écrit :
>>> Just checking - you can't make circular staves with notes in lilypond,
>>> can you? I know you can do nice circle of fifths diagrams as per an LSR
>>> example, but circular staves are way out of scope, aren't they?
>>> 
>>> This came up in the Dorico forum and several users assert with no
>>> evidence or examples that lilypond can, so I wanted to check my view.
>> 
>> What exactly makes you think it is not possible, given the control LilyPond
>> gives you on the notation via Scheme?
>> 
>> Attached is an include file showing that you can do basic circular scores in
>> <100 lines of straightforward Scheme code. This is a quickly coded demo, it
>> would need a bit of love to gracefully print beams or ledger lines. (I
>> won't invest that effort if the person is staying on Dorico and not
>> actually using it, though.)
> 
> 
> 



Re: Staff final bars

2024-03-05 Thread Leo Correia de Verdier
This happens when different staves have different sizes, giving the bar lines different thickness. There are some strategies to deal with it in the bottom of this manual page: LilyPond Notation Reference: 4.2.2 Setting the staff sizelilypond.orgHTH/Leo5 mars 2024 kl. 13:06 skrev Johannes Roeßler :

  


  
  
Hi Guys,
is there a way, to get rid of the staff lines exceeding the final
  bar line?
And if this isn't a bug - is there a reason to make it like this?

\version "2.24.0"
  <<
    {a'1\bar "|."}
    {\magnifyStaff #(magstep -3) a'4 4 4 4}
  >>

Best regards
  Joei

  Virenfrei.www.avast.com 
  


Re: Cue clefs

2024-02-23 Thread Leo Correia de Verdier
CueClef and CueEndClef are their own types of GROB, could \omit 
Staff.CueEndClef work?

(sorry for short untried answer, I’m on the phone)

> 24 feb. 2024 kl. 00:27 skrev Gerardo Ballabio :
> 
> Hello, please let me ask two questions on the example below:
> 1. how can I move the cue treble clef after the bar line?
> 2. how can I remove the closing bass clef? I tried \omit Staff.Clef
> but it doesn't work -- I guess because, indeed, that isn't the *staff*
> clef.
> 
> Thank you
> Gerardo
> 
> %%
> \version "2.24.1"
> 
> \new Staff {
>  \clef "bass"
>  R1
>  <<
>\new CueVoice \relative {
>  \cueClef "treble"
>  c''8 d e f
>  \cueClefUnset
>}
>  \\
>R1
>>> 
>  c1
> }
> %%
> 



Re: Double dashed bar lines

2024-02-12 Thread Leo Correia de Verdier
Hi! 

There is no predefined double dashed bar line in lilypond, (You can see a list 
of those at 
https://lilypond.org/doc/v2.25/Documentation/notation/list-of-bar-lines ) so 
you’ll have to define it using \defineBarLine , as described here 
https://lilypond.org/doc/v2.25/Documentation/notation/bar-lines

HTH
/Leo






> 12 feb. 2024 kl. 20:17 skrev Evan Driscoll :
> 
> 
> Disclaimer: I realize I'm on an older version of Lilypond. If that makes 
> things substantially more difficult it's not out of the question I could 
> upgrade, but I'd rather not at this time.
> 
> I'm trying the following:
> \version "2.20.0"
> \relative c'' {
>   c4
>   c
>   \bar "!"
>   c
>   c
> }
> 
> and this works, it gives me a dashed barline between the second and third 
> notes.
> 
> However, I can't figure out how to get a double dashed barline. \bar "!!", 
> "!|", and "|!", as well as `\bar "!" \bar "!"` are my four guesses, but none 
> work -- I get no barline with any of the first three, and just one with the 
> doubled-up `\bar`s.
> 
> Is this possible? What's the right markup for this?
> 
> Evan
> 
> 


Re: "Squished" tie between 2 notes

2024-02-11 Thread Leo Correia de Verdier
Sorry for short answer, I’m on the phone:

Try \tweak Tie.minimum-length #10

And then choose an appropriate number. 

> 11 feb. 2024 kl. 18:31 skrev George :
> 
> 
> At the moment I am having an issue with a tie from the alto part where it is 
> automatically "squished" by Lillypond. I didn't find an answer anywhere else 
> on how to create some space between or make the tie somewhat noticeable. Also 
> using the command \shape on the tie was not the right choice this time (which 
> I successfully used on some colliding ties somewhere else in the piece).
> 
> This is how it looks in the original source:
> 
> and this is how Lilypond engraved it (notice the tie became a very little 
> dot):
> 
> 
> Here is the relevant part of my code (I include one measure before and one 
> after to preserve the layout) :
> _
> \version "2.24.3"
> 
> 
> global = { \time 4/4 \key a \minor }
> 
> 
> soprano = \relative d'' {
>   \voiceOne
> d8 c16 b d c b a b2~ |
> 8 gis a4~ 16 b c8~ 16 a fis! b |
> a gis fis e a8 a~ 16 gis a fis gis8.^\trill a16 
> 
> }
> 
> alto = \relative e' {
>   \voiceTwo
> 
> e4 a2 gis8. b16 |
> e,4~ 8 dis16 e fis8  r16 fis~  8 8|
> e4~ 16 e fis! dis e2 |
> 
> }
> 
> 
> tenor = \relative g {
>   \voiceOne
> r8 gis a c f, d' b d~|
> 8 b c4~ 8 r8  a b |
> c2 b |
> 
> }
> 
> bass = \relative c, {
>   \voiceTwo
>   
> c8 r r f' d16 e f8~ 16 d b d |
> c d e8~ 16 c a c dis,4 r8 dis' |
> e1 |
> }
> 
> \score {
>   \new PianoStaff <<
> 
> \new Staff = "up" <<
>   \global
>   \clef "treble"
>   \new Voice = "soprano" { \soprano }
>   \new Voice = "alto" { \alto }
> >>
> 
> \new Staff = "down" <<
>   \global
>   \clef "bass"
>   \new Voice = "tenor" { \tenor }
>   \new Voice = "bass" { \bass }
> >>
> 
>   >>
>   
>   \layout {
> \context {
>   \Score
>   \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 
> 1/8 )
> }
>   }
> }
> 
> I would really appreciate your help.
> 
> Best,
> George


Re: Alternate bars in different time signatures

2024-02-01 Thread Leo Correia de Verdier
If you want to avoid some of the jiggery pokery you could do something like:

\version "2.25.12"

#(define ((time-alternate-time upa downa upb downb) grob)
   (grob-interpret-markup grob
  (markup #:override '(baseline-skip . 0) #:number
  (#:line (
(#:center-column (upa downa))
(#:center-column (upb downb)))

global = { 
  \override Score.TimeSignature.stencil = 
  #(time-alternate-time "6" "8" "3" "4")
  \time 6/8 s2. 
  \omit Score.TimeSignature
  \repeat unfold 5 { 
\time 3/4 
\set Timing.beamExceptions = #'() %so 3/4 isn't beamed in whole measures
s2.
\time 6/8 s2.
}}

\score {
  \new Staff <<
\global
{ \repeat unfold 66 a'8 }
  >>
}
%

> 1 feb. 2024 kl. 23:52 skrev Raphael Mankin :
> 
> Thank you, that worked a treat. Though I also had to add a "\time 6/8" in 
> order to get automatic bar lines inserted. "\time 3/4" produced wrong beaming 
> in the 6/8 bars, and I can see that I may have to do some jiggery pokery to 
> the beaming in 3/4 bars if, for example, I have 4 or more quavers.
> 
> On 01/02/2024 20:10, Knute Snortum wrote:
>> On Thu, Feb 1, 2024 at 10:50 AM Raphael Mankin > > wrote:
>>I have music with alternate bars in 3/4 and 6/8. The usual way to
>>indicate this is to  put both  time signatures at the start, but  I can
>>find  no way to do this.
>>I have tried "\time 3/4 <> \time 6/8", but I only get the last one.
>>Note, this  is not a compound time of 3/4+6/8, but alternating time
>>signatures.
>> I think this is what you are looking for.  I'm not sure where I found the 
>> code so I can't give credit to its author:
>> %%%
>> #(define ((time-alternate-time upa downa upb downb) grob)
>>(grob-interpret-markup grob
>>  (markup #:override '(baseline-skip . 0) #:number
>>(#:line (
>>(#:center-column (upa downa))
>>(#:center-column (upb downb)))
>> % and use it like this (5/8, 4/8 in this case):
>>   \override Score.TimeSignature.stencil =
>> #(time-alternate-time "5" "8" "4" "8")
>> %%%
>> --
>> Knute Snortum
> 
> -- 
> https://saturday-october-seven.com/




Re: performance marks

2024-01-31 Thread Leo Correia de Verdier
There is also some code in the list archives:
https://lists.gnu.org/archive/html/lilypond-user/2018-05/msg00167.html

> 1 feb. 2024 kl. 00:49 skrev Robin Bannister :
> 
> Stan Sanderson wrote:
>> Certain marks are used to indicate emphasis (phrase breaking) and 
>> across-staff fingering. 
> 
> 
> I don't know about the phrase breaking, but you could try doing the 
> across-staff fingering with my undocumented code, called thumbBracket.
> 
> Look at the Reger 17 and 60 examples in the demo.
> 
> The .ily file provides the \thumbBracket funtion which the demo file 
> abbreviates to \thBr.  You call this with a string parameter which starts 
> with the letter R or L, for right or left.  You can then append a digit to 
> make the stem longer.
> 
> The attached files are updated versions which need 2.24 and should be ok with 
> Guile3.
> 
> 
> Cheers,
> Robin
> 
> 
> 
> 
> 
\version "2.24.0"

% compatibility changes: u15k0830 u23k0114

%% +thumb bracket

#(define (make-thumb-bracket-props location spec-str settings-alist) 
  (define (inchar? index) (> (string-length spec-str) index))
  (define (inchar  index) (string-ref spec-str index))
  (define (char->dir ch) 
   (case (char-upcase ch) ((#\R) 1) ((#\L) -1) (else 0))) 
  (define (char->digit ch)
   (if (char-numeric? ch) (- (char->integer ch) (char->integer #\0)) 0))
  (define (inhit->1 key-str) (if (string-contains spec-str key-str) 1 0))
  (define (get key) (assq-ref settings-alist key))
  (define (warn p1 p2) (ly:input-warning location 
   (G_ " bad thumb-bracket:   ~a ~a~a~a") p1 "\"" p2 "\"")) ; cf 
  (let* ( ;% decode spec 
(vdir(if (inchar? 0) (char->dir   (inchar 0)) 0))
(vbigger  (* 0.5 (if (inchar? 1) (char->digit (inchar 1)) 0)))
(vfurther (* 0.5 (if (inchar? 2) (char->digit (inchar 2)) 0)))
(hcloser  (* 0.5 (if (inchar? 3) (char->digit (inchar 3)) 0)))
(hrear(* 0.5 (if (inchar? 4) (char->digit (inchar 4)) 0)))
(vbigger+ (* 5 (string-count spec-str #\|)))
(posdir   ((if (string-contains spec-str "*") - +) vdir))
(hcloser? (eq? (string-contains spec-str "!") #f))
(vtip=?   (string-contains spec-str "="))
(hdir-req (- (inhit->1 "]") (inhit->1 "[")))
(closed? (char-lower-case? (inchar 0
   (if (zero? vdir) (begin (warn "first char in" spec-str) '())
   (let* ( ;% collect settings
(hdir-init (get 'hdir-init))   (htip (get 'htip)) 
(vtip (get (if vtip=? 'vtip= 'vtip)))  
(vstem (get 'vstem))   (vmin (get 'vmin))   (hvernier (get 'hvernier))
(vO 0) (hO 0) (hpad-base 0.5) ;% givens
(hdir (if (zero? hdir-req) hdir-init hdir-req))
(hflip? (positive? hdir))
(h-interval 
 (if (positive? hdir) (cons hO (+ htip hrear)) (cons (- hrear) htip)))
(vsize (+ vtip (if closed? vtip vstem) vbigger vbigger+))
(vsize+ (if (and closed? (< vsize vmin)) (- vmin vsize) 0))
(vshift (+ vfurther vtip (* 0.5 vsize+)))
(bracket (lambda (grob) (let* ( ;% collect chord range from grob
  (vnote-lo-hi (ly:grob-property grob 'positions))
  (vnote ((if (eq? posdir 1) cdr car) vnote-lo-hi)))
 (grob-interpret-markup grob (markup #:translate (cons 
((if (positive? hdir) - +) hvernier) (- vnote (* vdir vshift)))
   #:combine #:draw-line (cons htip vO) #:combine 
#:translate (cons hO (if closed? (* vdir (+ vsize vsize+)) vO))
 #:draw-line (cons htip vO)
#:translate (cons (if (positive? hdir) htip hO) vO)
 #:draw-line (cons hO (* vdir (+ vsize vsize+)
;% alist of props for misusing Arpeggio as a thumb bracket
`((stencil . ,bracket) 
  (X-extent . ,h-interval) 
  (padding . ,((if hcloser? - +) hpad-base hcloser)) 
  (direction . ,hdir) 
  (thickness . ,(get 'weight)))

thumbBracketEx = #(define-music-function 
  (spec settings) (string? list?)
 (let* (
   (props (make-thumb-bracket-props (*location*) spec settings)))
   (define (get key) (assq-ref props key))
  (if (null? props) #{ #} ;% abort without bracket
   #{
 \once \override Arpeggio.stencil   = #(get 'stencil)
 \once \override Arpeggio.X-extent  = #(get 'X-extent)
 \once \override Arpeggio.padding   = #(get 'padding)
 \once \override Arpeggio.direction = #(get 'direction) 
 \once \override Arpeggio.thickness = #(get 'thickness)
 $(make-music 'EventChord 'elements (list (make-music 'ArpeggioEvent)))
   #})))

thumbBracket = #(define-music-function (spec) (string?)
 (let ((settings thumbBracketSettings)) ;% as Defaults, or user defined
#{ \thumbBracketEx $spec $settings #}))

thumbBracketDefaults = #(quasiquote( 
  (hdir-init . ,LEFT) ;% usual placement wrt note: on RIGHT or LEFT
  (weight. 1.5  ) ;% line thickness
  (htip  . 0.8  ) ;% horizontal length of bracket tip
  (vtip  . 0.75 ) ;% usual vertical overlap beyond notehead centre 
  (vtip= . 0.30 ) ;% alternative vertical ove

Re: Ties across voices; tried two methods

2024-01-24 Thread Leo Correia de Verdier
Also: your tie needs to end in the same voice it started. \new Voice and the 
<<\\>> construct both create other voices. If you remove \new Voice = “melody” 
from your first attempt it will work, as the last note of the tie is then in 
the same voice as the first. 

> 25 jan. 2024 kl. 00:37 skrev Mark Stephen Mrotek :
> 
> 
> Butter,
>  
> Use
> \repeatTie
> See
> https://lilypond.org/doc/v2.22/Documentation/notation/long-repeats#normal-repeats
>  
> Mark
>  
> From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
>  On Behalf Of Butter Cream
> Sent: Wednesday, January 24, 2024 1:29 PM
> To: lilypond-user@gnu.org
> Subject: Ties across voices; tried two methods
>  
> Hi ponders, I have a piece of music with alternative ending. The last measure 
> prior to the alternative is a single voice has a tied note to both endings. 
> I'v e tried two methods but both methods produce similar error: {with no tie} 
> Any help would be appreciated.
>  
> *.ly:100:42: warning: unterminated tie
> 4 8 ~ 4 r8 bes
>  ~ | % m19
>  
> [16][16]
>  
>  
> I've tried both these methods: 
> 4 8 ~ 4 r8 bes~ | % m19   <-Last measure single 
> voice
>   } <- end of repeat Volta 2
>   \alternative {
> % method one using \new Voice 
>  { \new Voice = "melody" {
> << { \voiceOne bes8 g4 g8~ g2 }
>\new Voice { \voiceTwo 2 2 }
> >> \oneVoice
> } | 4 r r2 | % m
>}
> { { \new Voice = "melody" {
> << { \voiceOne bes'8 g4 g8~ g2 }
>\new Voice { \voiceTwo 2 2 }
> >> \oneVoice
> } | % m
>} 4 r r2 | }
>   }
>   }
>  
> \alternative {
> % method two using \\
>   { << { bes8 g4 g8~ g2 } \\ { 2 2 } >> | 4 r r2 | }
>   { << { bes8 g4 g8~ g2 } \\ { 2 2 } >> | 4 r r2 | }
>  }
>  
> produces this. with notes not tied.
> 
>  
> Thank you.


Re: tempo marks floating number

2024-01-22 Thread Leo Correia de Verdier
Sorry, copying error: to avoid confusion, the numbers should be 90.86/4 = 
22.715 

> 22 jan. 2024 kl. 22:22 skrev Leo Correia de Verdier 
> :
> 
> Hi Jacopo!
> 
> I think 
> \set Timing.tempoWholesPerMinute = #(ly:make-moment 24.715) % that is 98.86/4
> should work for the midi output. At least it accepts floats. Combining it 
> with Michael’s solution for the markup should get you the complete \tempo
> 
> I might have heard sometime in the past that tempoWholesPerMinute got 
> internally rounded down the line. Do any of you in the developing team know 
> if this has been fixed?
> 
> Anyway, one other caveat to keep in mind is that it is much more common for 
> musicians to see a fractional tempo mark (printed in the score/part, 
> regardless of whether it is motivated by fixed electronics or film) as a 
> reason to sneer at the composer than for it to carry any useful information 
> for their interpretation.
> 
> HTH
> /Leo
> 
>> 22 jan. 2024 kl. 16:53 skrev Michael Werner :
>> 
>> On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo  
>> wrote:
>> How can I simply write a bpm in floating number in lilypond (e.g.♩ = 90.86 ) 
>> ?
>> It seems that \tempo accept only integers.
>> thanks
>> 
>> You can do pretty much any markup with the \tempo command. Two ways you can 
>> do this are either:
>> \tempo \markup { \note { 4 } #UP " = 90.86" }
>> or
>> \tempo \markup { \rhythm { 4 } " = 90.86" }
>> 
>> The \note function is a bit simpler and creates a note stencil that's a tad 
>> larger than what's produced by the \rhythm function. The \rhythm function, 
>> however, is far more flexible in what it can produce. More info on the \note 
>> function at:
>> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote
>> and for the \rhythm function see:
>> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm
>> 
>> One caveat to keep in mind is that \tempo entries done with \markup do not 
>> affect MIDI playback.
>> -- 
>> Michael
>> 
> 




Re: tempo marks floating number

2024-01-22 Thread Leo Correia de Verdier
Hi Jacopo!

I think 
\set Timing.tempoWholesPerMinute = #(ly:make-moment 24.715) % that is 98.86/4
should work for the midi output. At least it accepts floats. Combining it with 
Michael’s solution for the markup should get you the complete \tempo

I might have heard sometime in the past that tempoWholesPerMinute got 
internally rounded down the line. Do any of you in the developing team know if 
this has been fixed?

Anyway, one other caveat to keep in mind is that it is much more common for 
musicians to see a fractional tempo mark (printed in the score/part, regardless 
of whether it is motivated by fixed electronics or film) as a reason to sneer 
at the composer than for it to carry any useful information for their 
interpretation.

HTH
/Leo

> 22 jan. 2024 kl. 16:53 skrev Michael Werner :
> 
> On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo  
> wrote:
> How can I simply write a bpm in floating number in lilypond (e.g.♩ = 90.86 ) ?
> It seems that \tempo accept only integers.
> thanks
> 
> You can do pretty much any markup with the \tempo command. Two ways you can 
> do this are either:
> \tempo \markup { \note { 4 } #UP " = 90.86" }
> or
> \tempo \markup { \rhythm { 4 } " = 90.86" }
> 
> The \note function is a bit simpler and creates a note stencil that's a tad 
> larger than what's produced by the \rhythm function. The \rhythm function, 
> however, is far more flexible in what it can produce. More info on the \note 
> function at:
> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote
> and for the \rhythm function see:
> https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm
> 
> One caveat to keep in mind is that \tempo entries done with \markup do not 
> affect MIDI playback.
> -- 
> Michael
> 




Re: chord

2024-01-18 Thread Leo Correia de Verdier
<\tweak duration-log 3 e, b, g e’>2

> 18 jan. 2024 kl. 16:33 skrev Alexander Weidner :
> 
> 
> 
> Hello,
> 
> how do I notate a Double stop (German: Doppelgriff), where one note has an 
> other duration (see image).
> 
> Thanks! Alexander



Re: right indent once, horizontal space

2023-12-22 Thread Leo Correia de Verdier
Does this do what you want or do you want the staff to go on after the bar line?Indenting individual systemsdi.unimi.it22 dec. 2023 kl. 15:47 skrev Cordelia :Thank you, yes this works if the measure is the last one.For exemple in your exemple, I’d need the second staff to have a right indent.On 22 Dec 2023, at 15:29, Werner LEMBERG  wrote:is it possible to add after a bar and before a break some horizontalspace only for a particular system ?Try the `ragged-last` paper variable.Example:```\score { { \repeat unfold 60 c'4 } \layout {   ragged-last = ##t }}\score { { \repeat unfold 60 d'4 } \layout {   ragged-last = ##t }}```   Werner

Re: clefs, time signatures, and key signatures

2023-12-05 Thread Leo Correia de Verdier
At least for the clef+time signature I prefer the tighter spacing of the first 
suggestion. Improvement requires things to change. 


> 5 dec. 2023 kl. 07:39 skrev Werner LEMBERG :
> 
> 
>> please have a look at Merge Request 2188 and comment there on how to
>> proceed with the new distances between clefs and time signatures,
>> together with the new distances between clefs and key signatures.
>> 
>>  https://gitlab.com/lilypond/lilypond/-/merge_requests/2188
>> 
>> The question is whether the new distances should be based on the
>> widest standard clef glyph (which is the alto clef, and which is
>> done currently in the MR), or whether they should be based on the
>> most common one, the treble clef.
> 
> For better comparison, I've updated/added the screenshots in the MR so
> that you can do a blink-comparison of the images.
> 
> 
>Werner
> 



Re: using partcombine with different clefs, repeats, text

2023-11-12 Thread Leo Correia de Verdier
I think this sounds like a use case for a long text preface explaining what is 
to be performed in what order and why, just notating everything on a treble 
clef and doing manual octavations in the midi file. Maybe writing a reminding 
1S,2B: or such (not sure I got it completely right from your explanation) in 
front of each stanza of text. I don’t think the baritone will be too confused.


> 12 nov. 2023 kl. 10:31 skrev N. Andrew Walsh :
> 
> 
> Hi List,
> 
> sigh … here we go again. I apologize in advance for my client, a hobbyist 
> composer who thinks entirely in terms of cutting and pasting, moving things 
> around manually, and not in terms of how to notate anything clearly. Here 
> goes:
> 
> He has a song for soprano, baritone, and piano. The song has four verses, 
> alternating between the two voices (the baritone, weirdly, needs to read a 
> treble clef, so I'm using treble_8 for him). However, he wants to repeat the 
> entire song (ie, enclose the four verses in a '\repeat volta {}' expression), 
> *but* he wants the voices to alternate verses, and the second time through to 
> sing the text in English (first time through is in German; he's in his 
> "Schubert phase."). He wants both voices on a single line.
> 
> So I *could* notate the baritone in the wrong octave and just use the same 
> music for both repeats, but that still leaves me the problem of what to do 
> with the text. And I don't see a good way to do this without having a lot of 
> explanatory text for each verse. This also leaves me the problem of how this 
> is supposed to look in the parts. 
> 
> Do any of you have suggestions for how I might format this so there isn't a 
> lot of explanatory text cluttering up the score?
> 
> Thanks for the help,
> 
> N. Andrew Walsh, PhD, Dr. phil.
> Komponist, Musikwissenschaftler | Composer, Musicologist
> er/ihn/ihm/sein | he/him/his
> Berlin



Re: Two small issues

2023-11-02 Thread Leo Correia de Verdier
I’m unsure what of this is relevant today, but maybe you can find help or inspiration in this thread:Re: Extending staff lines through key changelists.gnu.org2 nov. 2023 kl. 12:58 skrev David Kastrup :Peter Mayes  writes:Ideally what I want is the first version, but with the stave extendingjust enough to go through the key signature.Could you live with the following?{
  \key c\minor
  c'1
  \key c\major
  \once\override Score.BreakAlignment.break-align-orders =
  #(grob-transformer 'break-align-orders
(lambda (grob break-align-orders)
 (vector
  (vector-ref break-align-orders 2)
  (vector-ref break-align-orders 1)
  (vector-ref break-align-orders 2
  \bar "||"
}It tells LilyPond to end the line formatted in a way as if it continuedto the next line.  This puts the key cancellation _before_ the bar line.-- David Kastrup

Re: Dynamics placement in partCombine

2023-10-13 Thread Leo Correia de Verdier
Quick answer, and I’m not sure it will help much: 

\dynamicUp affects the context (Voice) in which it’s placed. \partCombine 
combines its arguments into new Voices and \dynamicUp ended up in a different 
voice than the p

> 13 okt. 2023 kl. 12:32 skrev Michael Gerdau :
> 
> Hi list,
> 
> the following code places the 2nd \p under the music but I'd like it above. I 
> know I could explicitly add a placement (like ^\p) but wonder why \dynamicUp 
> doesn't do its job.
> 
> - snip - snip - snip - snip - snip - snip - snip -
> \version "2.25.9"
> 
> musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' 
> } }
> musb = { \dynamicUp s1 c'4\p \repeat unfold 3 { c' } }
> \score {
> \partCombine \musa \musb
> }
> - snip - snip - snip - snip - snip - snip - snip -
> 
> Kind regards,
> Michael
> -- 
> Michael Gerdau   email: m...@qata.de
> GPG-keys available on request or at public keyserver
> 
> 



Re: Function for letter noteheads

2023-10-08 Thread Leo Correia de Verdier
Hi Jean!

It was not intentional, that was the actual problem.  When I compiled it 
without the dynamics it came out in the same order as the input, but that was 
only a lucky coincidence then, right? 

Do you have any suggestions for how to get them ordered?

Thanks!
/Leo



> 8 okt. 2023 kl. 11:27 skrev Jean Abou Samra :
> 
> 
>> 
>> I am trying to put custom notation for a piece for typewriter and 
>> electronics together and have devised a function for merging text and 
>> rhythm. It works fine as long as nothing else is involved, but interferes in 
>> some way with scripts and dynamics. Could any of you figure how and why? 
>> (The text becomes offset when dynamics or scripts are added)
> 
> 
> 
> Compiling your code with 2.25.1, I get
> 
> 
> 
> Uncommenting the dynamics gives me
> 
> 
> 
> Where is the problem? I don't see the letters being offset.
> 
> On the other hand: is it intentional that the letters are printed in an 
> essentially arbitrary order? (The execution order of callbacks like 
> NoteHead.stencil is not defined or guaranteed.)
> 
> 


Re: textSpanner - disable repeat of text on new line

2023-10-07 Thread Leo Correia de Verdier
Hi Bevan!

I think what you are looking for is:

\override TextSpanner.bound-details.left-broken.text = ##f

HTH
/Leo

> 7 okt. 2023 kl. 21:13 skrev Bevan Broun :
> 
> Hi All
> 
> When using a text spanner I get the text repeated after a line break, 
> followed by new dashes. Can I disable getting the repeat of the text and only 
> get dashes on the new line? I have a case where the repeated text is banging 
> up against some other text and it would be clearer with just dashes on the 
> new line.
> 
> Thanks
> 
> \version "2.22.2"
> 
> mybar = { c4 d c d }
> \score {
>   \relative c' {
> \mybar \mybar \mybar
> \override TextSpanner.bound-details.left.text = "poco a poco accelerando" 
> c \startTextSpan d c d
> \mybar
> \mybar \break
> \mybar
> \stopTextSpan 
> \tempo "Tempo I" 
> \mybar \mybar \mybar \mybar 
>   } 
> }
> 
> 




Function for letter noteheads

2023-10-04 Thread Leo Correia de Verdier
Dear List!

I am trying to put custom notation for a piece for typewriter and electronics 
together and have devised a function for merging text and rhythm. It works fine 
as long as nothing else is involved, but interferes in some way with scripts 
and dynamics. Could any of you figure how and why? (The text becomes offset 
when dynamics or scripts are added)

%%%
\version "2.25.1"

typing-text = "Goddag Fru Direktör
Det meddelande du sände den andra har landat."
%When I uncomment these dynamics the text jumps around
rhythm = { 4%\f 
   8 8 16 16 8 16 8%\p 
   16 16 8 16 r16 16 r8 8 r8 4 16 16 16 16 4}

typing-list = #(string->list 
(string-map
 (lambda (char)
   (case char
   ((#\space) #\x2423)
   ((#\nl) #\x21B5)
   (else char)))
 typing-text))

typing-index = 0

\new RhythmicStaff \with {
  \override StaffSymbol.line-count = #0
  \override NoteHead.stem-attachment = #'(0 . 2)
  \override NoteHead.stencil = #(lambda (grob)
  (let
   ((character (list-ref typing-list 
typing-index)))
(set! typing-index (modulo (+ typing-index 
1) (length typing-list)))
(grob-interpret-markup grob
   #{ \markup 
\typewriter \fontsize #-2 #(string character) #}
   )
))
  }
\rhythm


Thanks a lot!
/Leo




Re: Define an alias to a parametrized command

2023-06-27 Thread Leo Correia de Verdier
Hi Volodymyr!

You can write:
%
acc = \acciaccatura \etc
af = \after \etc
%

\set in lilypond  is something completely else.

HTH 
/Leo

> 27 juni 2023 kl. 21:57 skrev Volodymyr Prokopyuk 
> :
> 
> Hello,
> 
> I'd like to define a shorter alias to a parametrized command. My two specific 
> use cases are
>   • Define \acc { c='8 d e } to be translated into \acciaccatura { c='8 d 
> e }
>   • Define \af 4. to be translated into \after 4.\!
> I've tried the \set command, but it seems that the \set command does not 
> handle parameters. I have an intuitive understanding that this type of 
> aliases can be done with Scheme, but I do not know how exactly.
> 
> Thank you,
> Vlad




Re: Leadsheet with cadenza / ad lib.

2023-06-07 Thread Leo Correia de Verdier
What is aligned in Lilypond is not the bars, but the lengths of the 
notes/skips/rests. CadenzaOn allows you to have a bar of arbitrary length, but 
does not negate the alignment of the note values (it’s also valid for all 
staves, as long as you haven’t moved engravers around). Your harmonies still 
need to have the same length as the melody, so:

harmonies = \chordmode {
  \global
  s16*19
  a1:m
  s16*22
  f1:m
  \fine
}

HTH
/Leo

> 8 juni 2023 kl. 00:44 skrev Stephan Schöll :
> 
> Hi all
> 
> I have a song that starts with 1 bar of adlib (without accompaniment), 1
> bar of silence in the melody, but with a chord, then another melody
> adlib bar without accompaniment, and finally (in this example) again a
> bar with chords only (w/o accompaniment). I cannot figure out how to
> align the bars of the two parts (melody and chords, and further ones
> later) properly. I tried to move the Timing_translator from the score to
> the staff context but without success. Any advice is highly appreciated.
> 
> TIA, Stephan
> 
> BTW: the song is "Somethings' Got A Hold On Me" by Etta James - the
> notes in the MVE do not match yet of course ;-)
> 
> \version "2.24.1"
> 
> global = {
>   \key c \major
>   \time 4/4
> }
> 
> melody = \relative c'' {
>   \global
>   \cadenzaOn
>   \repeat unfold 19 { a16 }
>   \cadenzaOff
>   \bar "|"
>   R1\fermata
>   \cadenzaOn
>   \repeat unfold 21 { f16 } f16\fermata
>   \cadenzaOff
>   \bar "|"
>   R1
>   \fine
> }
> 
> harmonies = \chordmode {
>   \global
>   s1
>   a1:m
>   s1
>   f1:m
>   \fine
> }
> 
> melodyPart = \new Staff {
>   \melody
> }
> 
> chordPart = \new ChordNames { \harmonies }
> 
> \score {
>   <<
> \chordPart
> \melodyPart
>   >>
>   \layout {}
> }
> 
> 



Re: Proportional duration and cross-staff notation

2023-05-30 Thread Leo Correia de Verdier
But I have probably understood it wrong, because in that case I cannot see 
what’s wrong with the default spacing...

> 30 maj 2023 kl. 13:34 skrev Leo Correia de Verdier 
> :
> 
> I think what was asked for was for the proportional spacing to be done based 
> on the stems position rather than the noteheads, with the result akin to this 
> horrible hack:
> 
> %
> 
> up = { \change Staff = "up" \stemDown \temporary\override NoteColumn.X-offset 
> = #1 }
> down = { \change Staff = "down" \stemUp \revert NoteColumn.X-offset }
> 
> \score {
>  \new PianoStaff  <<
> 
>\new Staff = "up"  {
>  \time 12/8
>  \clef bass
>  \new Voice { s1. }
>}
> 
>\new Staff = "down" {
>  \override Beam.positions = #'( 6 . 6 )
>  \clef bass
>  \stemUp b8[ c'  \up c' b]
>  \down b8[  \up c' b]
>  \down c'[  \up c']
>  \down b8  \up c' b
>}
> 
>>> 
> 
> \layout {
>  \context {
>\Score
>proportionalNotationDuration = #(ly:make-moment 1/12)
>\override SpacingSpanner.uniform-stretching = ##t
>  }
> }}
> 
> 
>> 30 maj 2023 kl. 12:41 skrev Jean Abou Samra :
>> 
>> Le lundi 29 mai 2023 à 10:45 +0200, Lib Lists a écrit :
>> 
>>> Hello,
>>> 
>>> I am trying to reproduce the notation used in Ligeti's 'Der Zauberlehrling' 
>>> piano etude. See attached a fragment from the original and my attempt in 
>>> Lilypond.
>>> 
>>> Everything works fine, except that I cannot find a way to reproduce the 
>>> proportional notation used by the original copist. It looks to me that the 
>>> proportional spacing was made according to the stems and not the noteheads, 
>>> because of the cross-staff notation (that's only partly true, as the first 
>>> four notes seems to be have a slightly bigger gap between the second and 
>>> third note, but that's a relatively minor detail).
>>> 
>>> Here is my Lilypond file for the second bar of the original example. As you 
>>> can see, I tried to use the tools for proportional notation, but without 
>>> much success. Apologies for the long example, I thought this would be more 
>>> helpful than a smaller one.
>>> 
>>> Any help would be really appreciated.
>>> 
>> With
>> 
>> \layout {
>>  \context {
>>\Score
>>proportionalNotationDuration = #(ly:make-moment 1/12)
>>\override SpacingSpanner.uniform-stretching = ##t
>>  }
>> }
>> 
>> it looks quite OK, doesn't it?
>> 
>> Jean
>> 
> 




Re: Proportional duration and cross-staff notation

2023-05-30 Thread Leo Correia de Verdier
I think what was asked for was for the proportional spacing to be done based on 
the stems position rather than the noteheads, with the result akin to this 
horrible hack:

%

up = { \change Staff = "up" \stemDown \temporary\override NoteColumn.X-offset = 
#1 }
down = { \change Staff = "down" \stemUp \revert NoteColumn.X-offset }

\score {
  \new PianoStaff  <<

\new Staff = "up"  {
  \time 12/8
  \clef bass
  \new Voice { s1. }
}

\new Staff = "down" {
  \override Beam.positions = #'( 6 . 6 )
  \clef bass
  \stemUp b8[ c'  \up c' b]
  \down b8[  \up c' b]
  \down c'[  \up c']
  \down b8  \up c' b
}

  >>

\layout {
  \context {
\Score
proportionalNotationDuration = #(ly:make-moment 1/12)
\override SpacingSpanner.uniform-stretching = ##t
  }
}}


> 30 maj 2023 kl. 12:41 skrev Jean Abou Samra :
> 
> Le lundi 29 mai 2023 à 10:45 +0200, Lib Lists a écrit :
> 
>> Hello,
>> 
>> I am trying to reproduce the notation used in Ligeti's 'Der Zauberlehrling' 
>> piano etude. See attached a fragment from the original and my attempt in 
>> Lilypond.
>> 
>> Everything works fine, except that I cannot find a way to reproduce the 
>> proportional notation used by the original copist. It looks to me that the 
>> proportional spacing was made according to the stems and not the noteheads, 
>> because of the cross-staff notation (that's only partly true, as the first 
>> four notes seems to be have a slightly bigger gap between the second and 
>> third note, but that's a relatively minor detail).
>> 
>> Here is my Lilypond file for the second bar of the original example. As you 
>> can see, I tried to use the tools for proportional notation, but without 
>> much success. Apologies for the long example, I thought this would be more 
>> helpful than a smaller one.
>> 
>> Any help would be really appreciated.
>> 
> With
> 
> \layout {
>   \context {
> \Score
> proportionalNotationDuration = #(ly:make-moment 1/12)
> \override SpacingSpanner.uniform-stretching = ##t
>   }
> }
> 
> it looks quite OK, doesn't it?
> 
> Jean
> 




Re: Separate dynamics from notes

2023-05-02 Thread Leo Correia de Verdier
If not too late, here is an example, based on Jeans code in 
https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00209.html

%%
convertToSkips =
#(define-music-function (music) (ly:music?)
   (music-map
 (lambda (m)
   (if (or (music-is-of-type? m 'rest-event) 
   (music-is-of-type? m 'note-event))
   (make-music 'SkipEvent m)
   m))
 music))

\convertToSkips { r2\p  c'4( d)\ff s4 r4 }

%%

Take care with things that ar still interpreted, like Scripts.

> 26 apr. 2023 kl. 22:55 skrev Leo Correia de Verdier 
> :
> 
> You can do like this if it’s useful to you, removing the engravers that read 
> what you don’t want at a specific place.
> %%
> \version "2.25.1"
> 
> rh = \fixed c' {c4\pp d\p e\f f\ff}
> 
> \score {
>  << 
>\new Voice \with {
>\remove Dynamic_engraver }
>  \rh
>  \new Dynamics %Dynamics context doesn’t have the Note_Heads_Engraver anyway
>  \rh
>>> 
> }
> %%
> 
> Otherwise it is possible to create music functions that replace notes and 
> rests with spacers or remove dynamics, but I can’t do that for you at the 
> moment. While they’re not difficult functions they’re not ”built-in”.
> 
> The second question is also probably not too hard to write a function for, 
> but you’ll probably need to be a little more specific about the use case, 
> perhaps also supply example code.
> 
> Best wishes
> /Leo
>> 26 apr. 2023 kl. 22:23 skrev Gianmaria Lari :
>> 
>> First question
>> Suppose I wrote this score:
>> 
>> \version "2.25.2"
>> rh = \fixed c' {c4\pp d\p e\f f\ff}
>> 
>> \score {
>>  \new Staff \rh
>> }
>> 
>> Is there any "automatic" way to extract the dynamics in the score (maybe 
>> assigning it to a variable)? 
>> At the end I would like to easily transform the previous code in the 
>> following one:
>> 
>> \version "2.25.2"
>> rh = \fixed c' {c4 d e f}
>> dy = {s4\pp s4\p s4\f s4\ff}
>> \score {
>>  <<
>>\new Staff \rh
>>\new Dynamics \dy
>>>> 
>> }
>> 
>> Second question
>> Sometimes I copy a long score without the dynamic and add them separately 
>> later. For this operation I need to establish the dynamic location in the 
>> score counting and adding the notes length. This is tedious and error prone. 
>> Is there any way to make it?
>> 
>> Thanks,
>> Gianmaria
> 




Re: Glissando intervoices

2023-04-28 Thread Leo Correia de Verdier
Hi Mario!

Like Kieren, I thought you were satisfied with the answers you got, since you 
did not send any MWE. Anyway, here is how I would code the passage you sent in 
the first mail:



\version "2.25.1"
<< 
  
  \new Staff = "upper" <<
\key e \minor
\new Voice \relative fis'' { \voiceOne fis2 dis4 e8 fis 
 g2. fis4 } 
\new Voice \relative dis'' { \voiceTwo s2 \hideNotes dis4 \glissando s4 
 \unHideNotes b4 a b a} 
\new Voice \relative fis' { \voiceTwo 
fis2 fis \glissando 
% Here you could use \showStaffSwitch instead 
of \glissando
\change Staff = "lower" \voiceOne
e g4 fis }
  >>
  
  \new Staff = "lower" <<
\new Voice \relative dis' { \voiceOne dis8 e dis cis \voiceTwo b a g fis e1 
}
\new Voice { \voiceTwo b2 }
  >>
  
>>



It’s a bit messy, but with complex voice structures I usually end up there… 
In a real world situation you will, depending on what the music looks like 
either have to create parallel structures and new voices on the fly as they 
appear or keep empty voices ”alive” with spacer rests. 

I think the staff switch line actually looks better than the glissando, but 
they look different, so I’d stick with the glissando.

Developing team: Could something like this (this is not the first time I see 
this kind of notation) be a reason for a mechanism allowing to create 
VoiceFollowers within one staff? Unless it already exists and I’m just unaware 
of it.

HTH
/Leo

> 27 apr. 2023 kl. 23:54 skrev Mario Moles :
> 
> No idea? From no one? Ok! Thank you!
> 
> Il 26/04/23 01:13, Mario Moles ha scritto:
>> I apologize because I explained myself badly. I use the glissando to 
>> indicate the sliding of the same finger of the left hand on the same string 
>> of the guitar. The blue lines I drew with Gwenview. The score posted as an 
>> example is a transcription of a "passemezzo" by VIncenzo Galilei for 
>> Renaissance lute. I transcribed on two staves for greater clarity of what I 
>> think is the polyphony of the piece. I am attaching the two files as an 
>> example. The "gui.ly" file is a general configuration file for my scores. 
>> Thank you!
>> 
>> Il 25/04/23 12:57, Andrew Bernard ha scritto:
>>> My thoughts exactly, for musical reasons. The lower is not a gliss in my 
>>> opinion, but a voice follower. And I agree with Jean regarding the top one 
>>> also. I think that's also an indicator of voice leading. But musicians can 
>>> follow this sort of score without help. I'd leave them out. Ant way, just 
>>> see the NR re voice follower if you want.
>>> 
>>> Andrew
>>> 




Re: Separate dynamics from notes

2023-04-26 Thread Leo Correia de Verdier
You can do like this if it’s useful to you, removing the engravers that read 
what you don’t want at a specific place.
%%
\version "2.25.1"

rh = \fixed c' {c4\pp d\p e\f f\ff}

\score {
  << 
\new Voice \with {
\remove Dynamic_engraver }
  \rh
  \new Dynamics %Dynamics context doesn’t have the Note_Heads_Engraver anyway
  \rh
  >>
}
%%

Otherwise it is possible to create music functions that replace notes and rests 
with spacers or remove dynamics, but I can’t do that for you at the moment. 
While they’re not difficult functions they’re not ”built-in”.

The second question is also probably not too hard to write a function for, but 
you’ll probably need to be a little more specific about the use case, perhaps 
also supply example code.

Best wishes
/Leo
> 26 apr. 2023 kl. 22:23 skrev Gianmaria Lari :
> 
> First question
> Suppose I wrote this score:
> 
> \version "2.25.2"
> rh = \fixed c' {c4\pp d\p e\f f\ff}
> 
> \score {
>   \new Staff \rh
> }
> 
> Is there any "automatic" way to extract the dynamics in the score (maybe 
> assigning it to a variable)? 
> At the end I would like to easily transform the previous code in the 
> following one:
> 
> \version "2.25.2"
> rh = \fixed c' {c4 d e f}
> dy = {s4\pp s4\p s4\f s4\ff}
> \score {
>   <<
> \new Staff \rh
> \new Dynamics \dy
>   >>
> }
> 
> Second question
> Sometimes I copy a long score without the dynamic and add them separately 
> later. For this operation I need to establish the dynamic location in the 
> score counting and adding the notes length. This is tedious and error prone. 
> Is there any way to make it?
> 
> Thanks,
> Gianmaria




Re: how to do this?

2023-03-27 Thread Leo Correia de Verdier
Try\set Score.rehearsalMarkFormatter = #format-mark-box-numbersMore details and explanations can be found hereLilyPond Notation Reference: 1.2.5 Barslilypond.org27 mars 2023 kl. 17:49 skrev Dario Marrini :many thanks guys, and what about this : ?the '11 in that box; I found A,B,C,D as progressive mark signes, but how could I write it as a automatic progressive ?Il giorno lun 27 mar 2023 alle ore 17:30 Jean Abou Samra  ha scritto:Le 27 mars 2023 à 17:23, Dario Marrini  a écrit :Hi lilypond people,I need to write this (multiple bars with number ) but I can't find in documentation this kind of writing;It’s here: https://lilypond.org/doc/v2.24/Documentation/notation/writing-parts#compressing-empty-measuresthen, I need to know, if I write this in a single part score, may I get a full series of empty bars in the complete score ?
If the other parts in the full score have notes during those “compressed” rests, they will just be expanded as needed in the full score while remaining compressed in the individual parts. If for some reason you want to compress the rests in the parts but expand them in the full score *while they could be compressed* (i.e., all instruments have rests at that moment), then have a look at tags: https://lilypond.org/doc/v2.24/Documentation/notation/different-editions-from-one-source#using-tagsBest,Jean


Re: Coda/Segno sign color override not working: LiliyPond 2.24.0

2023-03-24 Thread Leo Correia de Verdier
The problem with that solution is that it changes all Scripts, including all 
articulations. I would suggest the somewhat hacky solution of redefining just 
the commands in case, like 

segno = \tweak color #red \segno
coda = \tweak color #red \coda

But if something more elegant is required (for instance if there could be 
conflicting tweaks) there is a solution in this thread: 
https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html

HTH
/Leo

> 25 mars 2023 kl. 00:35 skrev Michael Werner :
> 
> Hi Laurie,
> 
> On Fri, Mar 24, 2023 at 7:19 PM savage.laurie  wrote:
> I think the issue might be that I am using explicit \coda and \segno commands 
> and your example uses the new \repeat segno form which will be too complex in 
> the specific big band chart I'm editing. It's about 160 bars long with the 
> segno in bar 24 and the "to coda" symbol in bar 48 and three repeated 
> sections, I got lost in the nested braces when I tried the new structure. If 
> I was writing it from scratch rather than re-editing it would be simpler.
> 
> That is indeed the issue, as those marks are a different type. Just needs a 
> different override in a different context. Turns out that using the \coda and 
> \segno commands the symbols created are handled the same as articulations. 
> That means they fall into the somewhat more generic Script type, which is 
> handled in the Voice context. Therefor:
> 
> \layout {
>   \context {
> \Score
> \override CodaMark.color = #red
> \override SegnoMark.color = #red
> \override SectionLabel.color = #red
> \override SectionLabel.font-size = #3
> \override RehearsalMark.font-size = #3
> \override RehearsalMark.color = #red
> \override TextMark.color = #red
>   }
>   \context {
> \Voice
> \override Script.color = #red
>   }
> }
> 
> should get you sorted.
> 
> Michael




Re: cross-staff stems

2023-03-22 Thread Leo Correia de Verdier
Like this?


\version "2.22.2"

ArightOne = \relative c'' {
  f4 (e8) s8
}

ArightTwo = \relative c'' {
  \crossStaff { a4 g16 }
}

AleftOne = \relative c' {
  s4.
}

AleftTwo = \relative c' {
  c4~ c16   
}

\score {
  \new PianoStaff
  <<
\new Staff = "right" << \ArightOne \\ \ArightTwo >>
\new Staff = "left" { \clef bass << \AleftOne \\ \AleftTwo >> }
>>
  \layout {
indent = 0
\context {
\PianoStaff
\consists #Span_stem_engraver
  }
  }
  }
%

I moved the \crossStaff to the right hand two, the voice whose stems are 
actually crossing over into the other staff. Otherwise take care that the stems 
to be connected point in the same direction, they don’t do automatically and 
don’t work unless they do.

HTH
/Leo

> 23 mars 2023 kl. 01:24 skrev Mark Stephen Mrotek :
> 
> Jean,
>  
> Attached is a MWE
> Want stem to connect c and a, also c an g.
> Thank you for your kind attention.
>  
> Mark
>  
> From: Jean Abou Samra [mailto:j...@abou-samra.fr] 
> Sent: Wednesday, March 22, 2023 4:41 PM
> To: Mark Stephen Mrotek ; 'lilypond-user' 
> 
> Subject: Re: cross-staff stems
>  
> Le mercredi 22 mars 2023 à 14:28 -0700, Mark Stephen Mrotek a écrit :
> 
>> Hello!
>>  
>> My piano score has four voices each coded as a variable.
>> At a single place I want a cross stem between the tenor and alto voice.
>> The directions at
>> https://lilypond.org/doc/v2.16/Documentation/notation/common-notation-for-keyboards#cross_002dstaff-stems
>> were followed  yet the stems were not created.
>>  
>> The snippet for the above directions does not use variables yet imbeds the 
>> notation within the \PianoStaff.
>> Does imply that cross-staff stem is available only in that format?
>>  
>> Thank you for your kind attention,
>> 
> First, the documentation page you link to is for LilyPond 2.16, which is an 
> ooold version (more than 10 years old). Google search results can be 
> problematic in that regard; it often works to replace the version number with 
> your version number in the URL, in this case replacing 2.16 with 2.24, the 
> current stable version. That said, this snippet does still work in 2.24 
> unchanged.
> 
> Do you have an example allowing to reproduce your problem? (No, whether you 
> structure your input with variables won't make a difference.)
> 


cross-staff.ly
Description: Binary data
> 



Re: spurious second treble clef sign, what did I do wrong this time?

2023-02-21 Thread Leo Correia de Verdier
Now that I am at the computer and have seen the .ly file I would recommend 
having them in the \global variable. (As you inferred, but just to be clear for 
anyone else reading this thread, it should be \grace s8. in my first mail in 
this thread).

> 21 feb. 2023 kl. 10:03 skrev Leo Correia de Verdier 
> :
> 
> It’s needed in any voice that contains a \clef \time , \mark or anything 
> such. 
> 
>> 21 feb. 2023 kl. 08:58 skrev Kenneth Wolcott :
>> 
>> Thank you, Leo.
>> 
>> I already had "\grace {s16*3} s1" in the second lh voice, apparently
>> needed in the the second rh voice?
>> 
>> Thanks,
>> Ken
>> 
>>> On Mon, Feb 20, 2023 at 11:42 PM Leo Correia de Verdier
>>>  wrote:
>>> 
>>> I haven’t been able to open your  .ly file since   I’m on the telephone, 
>>> but that should be an issue 34. Add s8. right after the clef and time 
>>> signature in the right hand, so that the grace note timing matches between 
>>> the different staves and voices and the extra clefs and time signatures 
>>> will disappear.
>>> 
>>> HTH
>>> /Leo
>>> 
>>>>> 21 feb. 2023 kl. 08:33 skrev Kenneth Wolcott :
>>>> 
>>>> Hi;
>>>> 
>>>> I'm engraving a piece of music arranged for Piano that (later) has
>>>> polyphony in the right hand and left hand.
>>>> 
>>>> This is Lilypond 2.24.1 on MacOS.
>>>> 
>>>> There is a spurious second treble clef (and spurious time signature)
>>>> in the first bar of the right hand (upper) staff.
>>>> 
>>>> What am I doing wrong that causes this?
>>>> 
>>>> I am attaching the example pdf which I am engraving from, my
>>>> Lilypond source and the pdf Lilypond creates.
>>>> 
>>>> Thanks,
>>>> Ken Wolcott
>>>> 
>>>> 
>>>> 




Re: spurious second treble clef sign, what did I do wrong this time?

2023-02-21 Thread Leo Correia de Verdier
It’s needed in any voice that contains a \clef \time , \mark or anything such. 

> 21 feb. 2023 kl. 08:58 skrev Kenneth Wolcott :
> 
> Thank you, Leo.
> 
> I already had "\grace {s16*3} s1" in the second lh voice, apparently
> needed in the the second rh voice?
> 
> Thanks,
> Ken
> 
>> On Mon, Feb 20, 2023 at 11:42 PM Leo Correia de Verdier
>>  wrote:
>> 
>> I haven’t been able to open your  .ly file since   I’m on the telephone, but 
>> that should be an issue 34. Add s8. right after the clef and time signature 
>> in the right hand, so that the grace note timing matches between the 
>> different staves and voices and the extra clefs and time signatures will 
>> disappear.
>> 
>> HTH
>> /Leo
>> 
>>>> 21 feb. 2023 kl. 08:33 skrev Kenneth Wolcott :
>>> 
>>> Hi;
>>> 
>>> I'm engraving a piece of music arranged for Piano that (later) has
>>> polyphony in the right hand and left hand.
>>> 
>>> This is Lilypond 2.24.1 on MacOS.
>>> 
>>> There is a spurious second treble clef (and spurious time signature)
>>> in the first bar of the right hand (upper) staff.
>>> 
>>> What am I doing wrong that causes this?
>>> 
>>> I am attaching the example pdf which I am engraving from, my
>>> Lilypond source and the pdf Lilypond creates.
>>> 
>>> Thanks,
>>> Ken Wolcott
>>> 
>>> 
>>> 



Re: spurious second treble clef sign, what did I do wrong this time?

2023-02-20 Thread Leo Correia de Verdier
I haven’t been able to open your  .ly file since   I’m on the telephone, but 
that should be an issue 34. Add s8. right after the clef and time signature in 
the right hand, so that the grace note timing matches between the different 
staves and voices and the extra clefs and time signatures will disappear. 

HTH
/Leo

> 21 feb. 2023 kl. 08:33 skrev Kenneth Wolcott :
> 
> Hi;
> 
>  I'm engraving a piece of music arranged for Piano that (later) has
> polyphony in the right hand and left hand.
> 
>  This is Lilypond 2.24.1 on MacOS.
> 
>  There is a spurious second treble clef (and spurious time signature)
> in the first bar of the right hand (upper) staff.
> 
>  What am I doing wrong that causes this?
> 
>  I am attaching the example pdf which I am engraving from, my
> Lilypond source and the pdf Lilypond creates.
> 
> Thanks,
> Ken Wolcott
> 
> 
> 



Pedal reminder

2023-02-16 Thread Leo Correia de Verdier
Dear list!

Is there any way to make lilypond automagically place a reminder of a held 
pedal note at the beginning of each system it still sounds, looking somewhat 
like the second supplied example, but without having to do it by hand?


\score { 
  \new StaffGroup <<
  \new Staff \repeat unfold 20 { c''4 b' g' a' }
  \new Staff \new Voice \with { \remove Forbid_line_break_engraver }
 { e'\breve*10 }
>>
\layout {
  \context { \Staff
 \omit BarLine
}}}



\score {
\new StaffGroup <<
  \new Staff \repeat unfold 20 { c''4 b' g' a' }
  \new Staff \new Voice \with { \remove Forbid_line_break_engraver }
 { e'\breve*3
  \parenthesize e'\breve*7/2 \repeatTie
  \parenthesize e'\breve*7/2 \repeatTie}
>>
\layout {
  \context { \Staff
 \omit BarLine
}}}


Thanks a lot! 🌺

/Leo


Re: Visible Barline in ChoirStaff

2023-02-08 Thread Leo Correia de Verdier
Your example doesn’t work because the bars between the staves are in fact not 
BarLine grobs, but SpanBar grobs, and they would live in the ChoirStaff context.
The difference between a ChoirStaff and a StaffGroup is that the Choirstaff 
doesn’t contain the Span_Bar_Engraver, that creates them. You would need to 
include the engraver in the ChoirStaff (essentially making it a StaffGroup), 
\omit the SpanBars you don’t need (all the others) and make just the one you 
need visible, like:


\new ChoirStaff \with { 
  \consists Span_bar_engraver
  \omit SpanBar } 
<<
  \new Staff { 
c''1 b' 
\once \revert ChoirStaff.SpanBar.stencil 
a' }
  \new Staff { 
\clef bass
a1 g f }
>>


> 8 feb. 2023 kl. 16:12 skrev Johannes Roeßler :
> 
> Hi Group,
> 
> how can I add a visible (in the sense of connecting all staffs) barline in a 
> choirstaff?
> 
> I tried  \once \override Staff.BarLine.transparent = ##f \bar "|"
> 
> but o course it doesn't work, for its just in a staff...
> 
> Best regards
> Johannes
> 
> 




Re: Tie not working as expected

2023-01-31 Thread Leo Correia de Verdier
The tie ~ and number 1 in measure 3 are in the wrong order, the tie should 
come after the number. 

What happens is that Lilypond, when it sees a pitch or duration alone 
interprets it as a new note, with the missing pitch or duration carried over 
from the previous note. So g~1 becomes a g with the duration 1 carried over 
from the chord before, then a tie and then a whole note (1) with the pitch g 
carried over from the note before the tie. 
HTH
/Leo

> 31 jan. 2023 kl. 22:07 skrev Steve Carlock :
> 
> New Lilypond user here.  The following code is not working as I expect:
> 
> \version "2.24.0"
> \language "english"
> 
> \score {
>   <<
>   \new Staff {
> \key d \major
> \time 4/4
> \relative c' {
>   1 | 1 | g~1 | g2 2 |
> }
>   }
>   >>
>   \layout { }
> }
> 
> I expect to see 4 measures with ties between measures 1 and 2, and then 3 and 
> 4.  Instead I am seeing 5 measures with an extra whole note in measure 4 tied 
> to measure 3.  (Image attached).
> 
> What am I doing wrong?
> 
> Version info:
> LilyPond 2.24.0 (running Guile 2.2)
> Frescobaldi Version 3.0.0
> Linux Mint 20.3 (in a virtual machine if it matters).
> 
> Thanks!
> 
> 
> 


Re: Question about text formatting: hard line breaks?

2023-01-24 Thread Leo Correia de Verdier
If you can use \wordwrap-string you can use \n for hard breaks. This doesn’t 
seem to work with \wordwrap though...

> 24 jan. 2023 kl. 01:14 skrev Alasdair McAndrew :
> 
> Hello,
> 
> I have a paragraph of descriptive text that I'd like to display in a box.  
> Currently I have:
> 
> \markup \small \box \wordwrap {
> several lines of text here ...
> }
> 
> This works quite well, except that I'd like to modify some of the line 
> breaks.  I could probably do this by either specifying the text as a list of 
> lines (which I'm not sure how to do: that is, a list of lines all surrounded 
> by a single box).
> 
> But in fact it would be easier to simply insert a "hard break" in the text 
> where I want it.  Is this possible?  I know how to add a break to a score, 
> but I can't find if there's an equivalent for text.
> 
> And where would I go looking for this - where can I find a comprehensive list 
> of all text commands accepted by lilypond?
> 
> Many thanks,
> Alasdair
> 
> -- 
> Alasdair McAndrew (he/him)
> mob: 0432 854 858
> 
> https://numbersandshapes.net




Re: irrational meters

2023-01-18 Thread Leo Correia de Verdier
If the warnings bother you you could use a function to suppress them, like:

irrtime = #(define-music-function (frac) (pair?) 
 #{ #(ly:expect-warning "strange time signature found") 
\time #frac #} )

\score { 
  \relative c' {
\irrtime 4/5
\tuplet 5/4 1 {
  c4 d e f |
  g a2 g4 | 
  f2 g |
  e4 f e d |
  c1 | }
}}

Or  something more elegantly coded…

And everyone else: Can we talk about breve? It is nowadays usually one of the 
longest durations. I think we should change its name! 😉 (or possibly keep on 
topic)

Best wishes
/Leo

> 17 jan. 2023 kl. 16:13 skrev Karim Haddad :
> 
> Thank you a lot Leo for your advice.
> I'll hence stick with solution #1 which looks preferable.
> 
> @all
> Now about "irrational meter" (or "irrational" rhythms), well this 
> denomination is from the fifties. I am aware that mathematically this is not 
> correct since it is a fraction.However, "irregular" is somehow more vague and 
> doesn't relate to anything in particular. Thanks to Hans' link that shows 
> that it is a somehow a common terminology in music practice. 
> 
> Best to all of you, and thank you for all your comments.
> 
> Karim
> 
> 
> 
> On Tue, Jan 17, 2023 at 01:30:49PM +0100, Leo Correia de Verdier wrote:
>> Hi Karim!
>> 
>> Your first example seems to work to me (I don’t do irrational meters 
>> everyday, so there might be something I’m missing. I would probably write 
>> the tuplets explicitly rather than use \scaleDurations). 
>> \set Staff.timeSignatureFraction is superfluous, the time signature already 
>> does that.
>> 
>> I’m not sure what you’re aiming at with the second example. One source of 
>> error is that you have quoted ly:make-moment, and it wants its arguments as 
>> elements of a list, not as a fraction, so: 
>> #(ly:make-moment 16 25)
>> , not
>> #'(ly:make-moment 16/25)
>> But it is still not the right amount of notes in the bar.
>> 
>> HTH
>> /Leo
>> 
>>> 17 jan. 2023 kl. 12:16 skrev Karim Haddad :
>>> 
>>> Hi,
>>> 
>>> I am wondering which is the best way to write irrational meters (with tempo 
>>> modulations)
>>> 
>>> 1)
>>> %
>>> \version "2.24.0"
>>> \score {
>>> {
>>> 
>>> \clef "G"
>>> 
>>> \scaleDurations 4/5 {
>>> \time 4/5
>>> \set Staff.timeSignatureFraction = #'(4 . 5)
>>> \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  
>>> \note {4} #1 " = 60 "}} \tiny "1"}}
>>> c'4
>>> c'4
>>> c'4
>>> c'4
>>> |
>>> }
>>> \once \set Staff.whichBar = "|"
>>> }
>>> 
>>> 
>>> \layout {
>>> 
>>> \context {\Score
>>>%measureBarType=#""
>>> }
>>> 
>>> }
>>> }
>>> %
>>> 
>>> or
>>> 
>>> 2)
>>> 
>>> %
>>> \version "2.24.0"
>>> \score {
>>> {
>>> \clef "G"
>>> 
>>> \time 4/5
>>> \set Staff.timeSignatureFraction = #'(4 . 5)
>>> \set Timing.measureLength = #'(ly:make-moment 16/25)
>>> \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  
>>> \note {4} #1 " = 60 "}} \tiny "1"}}
>>> c'4
>>> c'4
>>> c'4
>>> c'4
>>> |
>>> \once \set Staff.whichBar = "|"
>>> }
>>> 
>>> \layout {
>>> 
>>> \context {\Score
>>>measureBarType=#""
>>>   }
>>> 
>>> }
>>> }
>>> %
>>> 
>>> 
>>> Now the first solution outputs:
>>> 
>>> Processing `irr1.ly'
>>> Parsing...
>>> Interpreting music...
>>> irr1.ly:13:1: warning: strange time signature found: 4/5
>>> 
>>> \time 4/5
>>> Preprocessing graphical objects...
>>> 
>>> 
>>> Which looks good to me as a warning
>>> 
>>> However, the second solution gives:
>>> 
>>> Processing `irr2.ly'
>>> Parsing...
>>> Interpreting music...
>>> warning: type check for `measureLength' failed; value `(ly:make-moment 
>>> 16/25)' must be of type `moment'
>>> irr2.ly:12:1: warning: strange time signature found: 4/5
>>> 
>>> \time 4/5
>>> irr2.ly:20:1: warning: barcheck failed at: 1/5
>>> 
>>> |
>>> Preprocessing graphical objects...
>>> 
>>> 
>>> And if we comment measureBarType=#"" we will have a strange bar at the end.
>>> 
>>> 
>>> Best Regards
>>> 
>>> 
>>> -- 
>>> Karim Haddad
>>> 
>>> Music Representations Team, IRCAM
>>> Research and development manager.
>>> 
>>> 
>> 
> 
> -- 
> Karim Haddad
> 
> Music Representations Team, IRCAM
> Research and development manager.
> 




Re: irrational meters

2023-01-17 Thread Leo Correia de Verdier
Hi Karim!

Your first example seems to work to me (I don’t do irrational meters everyday, 
so there might be something I’m missing. I would probably write the tuplets 
explicitly rather than use \scaleDurations). 
\set Staff.timeSignatureFraction is superfluous, the time signature already 
does that.

I’m not sure what you’re aiming at with the second example. One source of error 
is that you have quoted ly:make-moment, and it wants its arguments as elements 
of a list, not as a fraction, so: 
#(ly:make-moment 16 25)
, not
#'(ly:make-moment 16/25)
But it is still not the right amount of notes in the bar.

HTH
/Leo

> 17 jan. 2023 kl. 12:16 skrev Karim Haddad :
> 
> Hi,
> 
> I am wondering which is the best way to write irrational meters (with tempo 
> modulations)
> 
> 1)
> %
> \version "2.24.0"
> \score {
> {
> 
> \clef "G"
> 
> \scaleDurations 4/5 {
> \time 4/5
> \set Staff.timeSignatureFraction = #'(4 . 5)
> \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  \note 
> {4} #1 " = 60 "}} \tiny "1"}}
> c'4
> c'4
> c'4
> c'4
> |
> }
> \once \set Staff.whichBar = "|"
> }
> 
> 
> \layout {
> 
> \context {\Score
> %measureBarType=#""
>  }
> 
> }
> }
> %
> 
> or
> 
> 2)
> 
> %
> \version "2.24.0"
> \score {
> {
> \clef "G"
> 
> \time 4/5
> \set Staff.timeSignatureFraction = #'(4 . 5)
> \set Timing.measureLength = #'(ly:make-moment 16/25)
> \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  \note 
> {4} #1 " = 60 "}} \tiny "1"}}
> c'4
> c'4
> c'4
> c'4
> |
> \once \set Staff.whichBar = "|"
> }
> 
> \layout {
> 
> \context {\Score
> measureBarType=#""
> }
> 
> }
> }
> %
> 
> 
> Now the first solution outputs:
> 
> Processing `irr1.ly'
> Parsing...
> Interpreting music...
> irr1.ly:13:1: warning: strange time signature found: 4/5
> 
> \time 4/5
> Preprocessing graphical objects...
> 
> 
> Which looks good to me as a warning
> 
> However, the second solution gives:
> 
> Processing `irr2.ly'
> Parsing...
> Interpreting music...
> warning: type check for `measureLength' failed; value `(ly:make-moment 
> 16/25)' must be of type `moment'
> irr2.ly:12:1: warning: strange time signature found: 4/5
> 
> \time 4/5
> irr2.ly:20:1: warning: barcheck failed at: 1/5
> 
> |
> Preprocessing graphical objects...
> 
> 
> And if we comment measureBarType=#"" we will have a strange bar at the end.
> 
> 
> Best Regards
> 
> 
> -- 
> Karim Haddad
> 
> Music Representations Team, IRCAM
> Research and development manager.
> 
> 




Re: NOT merging same notes in different voices

2023-01-12 Thread Leo Correia de Verdier
Other than setting the stems to the same direction you can also use 
\once \override NoteColumn.force-hshift = 1
(or -1, depending on what voice you want first).

A clarification: Voices have settings for stem direction and shift. For the 
noteheads not to be merged they need to have the same stem direction and 
different shift settings (or no shift setting at all, but then they throw a 
warning, like in jJean-Julien’s suggestion). The \voiceXxx commands do not 
create or change voice contexts, but only change these settings (and the 
directions of articulations and slurs). These settings can also be changed 
individually with \stemUp \stemDown and \stemNeutral resp. \shiftOn and 
\shiftOff. For instance \voiceOne and \voiceThree sets stems up and \voiceTwo 
and \voiceFour down, \voiceOne and \voiceTwo sets shift off and \voiceThree and 
\voiceFour set shift on.

HTH
/Leo

> 11 jan. 2023 kl. 16:18 skrev Johannes Roeßler :
> 
> Hi Group,
> 
> how can I avoid that the same notes in two voices are merged?
> 
> \version "2.24.0"
> <<{ a'4 }\\{ a' }>>
> 
> Best regards
> Joei
> 




Re: NOT merging same notes in different voices

2023-01-11 Thread Leo Correia de Verdier
If you use \omit instead of \hide there will be no invisible stem for the 
tenuto lines to avoid. 

HTH
/Leo

> 11 jan. 2023 kl. 17:43 skrev Johannes Roeßler :
> 
> 
> Hi Group,
> 
> how can I have a "tenuto" line directly at the note (and not above or below 
> the invisible stem?).
> 
> I have two stemless voices in one staff.
> 
> 
> 
> 8<
> 
> \version "2.24.0"
> 
> <<{\hide Staff.Stem a4--  }\\{\hide Staff.Stem c4-- }>>
> 
> -->8
> 
> 
> 
> Best regards
> Joei
> 
> 


Re: Collision between accidentals and start-of-line brackets

2022-11-22 Thread Leo Correia de Verdier
That is not another bug, that is because I only redefined the regular barline 
(not the double) to print on the beginning of staves. Add:

  \defineBarLine "||" #'("||" "|" "||”)

to the layout block and you’re back. That needs to be done for every kind of 
barline you use. 

Another curious thing is that bar six prints right for me, even without 
barlines in the beginning.

> 22 nov. 2022 kl. 15:17 skrev Luca Fascione :
> 
> Noice, thanks Leo, this is enough of a workaround for my current state, 
> thanks for figuring that out
> 
> Cheers,
> Luca
> 
> On Tue, 22 Nov 2022, 14:04 Leo Correia de Verdier, 
>  wrote:
> Hi Luca!
> 
> This could well be a bug. In the context you have shown you can work around 
> it by printing the barlines at the beginning of staves too, by adding
> \defineBarLine "|" #'("|" "|" "|”)
> to the layout block.
> 
> HTH
> /Leo
> 
>> 22 nov. 2022 kl. 13:30 skrev Luca Fascione :
>> 
>> Ok, so, small source at the bottom
>> 
>> 
>> 
>> See how the stems of the first columns in bars 2, 6, 10 all line up, whereas 
>> on bars 3, 7, 11 they don't...
>> 
>> L
>> 
>> \version "2.22.1"
>> 
>> \layout {
>> \override Score.Clef.break-visibility = #'#(#f #f #f)  % make only the 
>> first clef visible
>> }
>> 
>> m =  \relative c'' {
>> c4 c c c | \break
>> 4 cis cis cis | 
>> 4 cis cis cis | 
>> \repeat unfold 2 { c c c c } \break
>> 4 c c c | 
>> 4 cis cis cis | 
>> \repeat unfold 2 { c c c c } \break 
>> \repeat unfold 4 { c c c c }
>> }
>> 
>> \score {
>> \m
>> }
>> 
>> 
>> On Tue, Nov 22, 2022 at 1:15 PM Luca Fascione  wrote:
>> It seems to have something to do with this:
>> 
>> \override Clef.break-visibility = #'#(#f #f #f)  
>> 
>> I'm working on shortening the source 
>> 
>> L
>> 
>> On Tue, Nov 22, 2022 at 12:25 PM Luca Fascione  wrote:
>> Ha. Ok, I'll whittle it down to something small that repros it then.
>> Thanks Leo!
>> L
>> 
>> On Tue, 22 Nov 2022, 12:00 Leo Correia de Verdier, 
>>  wrote:
>> Hi Luca!
>> 
>> This works quite well when I try to replicate it, so the code producing the 
>> error is probably needed to solve this. Try to make a minimal example. That 
>> said, one could guess that it could have something to do with 
>> break-alignments.
>> 
>> Best
>> /Leo
>> 
>>> 22 nov. 2022 kl. 11:27 skrev Luca Fascione :
>>> 
>>> Hi all,
>>> In a sheet I'm working on I'm observing that the accidentals on the first 
>>> bar of a line aren't handling collisions with the start-of-line bracket and 
>>> bar, while inbetween bars this works just fine (see attached image).
>>> 
>>> Where do I look for hints on how to fix this?
>>> 
>>> Many thanks,
>>> Luca
>>> 
>>> 
>>> -- 
>>> Luca Fascione
>>> 
>> 
>> 
>> 
>> -- 
>> Luca Fascione
>> 
>> 
>> 
>> -- 
>> Luca Fascione
>> 
> 
> 



Re: Collision between accidentals and start-of-line brackets

2022-11-22 Thread Leo Correia de Verdier
Hi Luca!

This could well be a bug. In the context you have shown you can work around it 
by printing the barlines at the beginning of staves too, by adding
\defineBarLine "|" #'("|" "|" "|”)
to the layout block.

HTH
/Leo

> 22 nov. 2022 kl. 13:30 skrev Luca Fascione :
> 
> Ok, so, small source at the bottom
> 
> 
> 
> See how the stems of the first columns in bars 2, 6, 10 all line up, whereas 
> on bars 3, 7, 11 they don't...
> 
> L
> 
> \version "2.22.1"
> 
> \layout {
> \override Score.Clef.break-visibility = #'#(#f #f #f)  % make only the 
> first clef visible
> }
> 
> m =  \relative c'' {
> c4 c c c | \break
> 4 cis cis cis | 
> 4 cis cis cis | 
> \repeat unfold 2 { c c c c } \break
> 4 c c c | 
> 4 cis cis cis | 
> \repeat unfold 2 { c c c c } \break 
> \repeat unfold 4 { c c c c }
> }
> 
> \score {
> \m
> }
> 
> 
> On Tue, Nov 22, 2022 at 1:15 PM Luca Fascione  wrote:
> It seems to have something to do with this:
> 
> \override Clef.break-visibility = #'#(#f #f #f)  
> 
> I'm working on shortening the source 
> 
> L
> 
> On Tue, Nov 22, 2022 at 12:25 PM Luca Fascione  wrote:
> Ha. Ok, I'll whittle it down to something small that repros it then.
> Thanks Leo!
> L
> 
> On Tue, 22 Nov 2022, 12:00 Leo Correia de Verdier, 
>  wrote:
> Hi Luca!
> 
> This works quite well when I try to replicate it, so the code producing the 
> error is probably needed to solve this. Try to make a minimal example. That 
> said, one could guess that it could have something to do with 
> break-alignments.
> 
> Best
> /Leo
> 
>> 22 nov. 2022 kl. 11:27 skrev Luca Fascione :
>> 
>> Hi all,
>> In a sheet I'm working on I'm observing that the accidentals on the first 
>> bar of a line aren't handling collisions with the start-of-line bracket and 
>> bar, while inbetween bars this works just fine (see attached image).
>> 
>> Where do I look for hints on how to fix this?
>> 
>> Many thanks,
>> Luca
>> 
>> 
>> -- 
>> Luca Fascione
>> 
> 
> 
> 
> -- 
> Luca Fascione
> 
> 
> 
> -- 
> Luca Fascione
> 



Re: Collision between accidentals and start-of-line brackets

2022-11-22 Thread Leo Correia de Verdier
Hi Luca!

This works quite well when I try to replicate it, so the code producing the 
error is probably needed to solve this. Try to make a minimal example. That 
said, one could guess that it could have something to do with break-alignments.

Best
/Leo

> 22 nov. 2022 kl. 11:27 skrev Luca Fascione :
> 
> Hi all,
> In a sheet I'm working on I'm observing that the accidentals on the first bar 
> of a line aren't handling collisions with the start-of-line bracket and bar, 
> while inbetween bars this works just fine (see attached image).
> 
> Where do I look for hints on how to fix this?
> 
> Many thanks,
> Luca
> 
> 
> -- 
> Luca Fascione
> 



Re: Custom Music font doesn't scale with staff

2022-11-21 Thread Leo Correia de Verdier
In the expression

#:factor (/ staff-height pt 20)

staff-height retrieves the staff height and divides it by 20. It works for any 
staff height.

> 21 nov. 2022 kl. 22:23 skrev Yentl Tijssens :
> 
> In case you missed it: I was just wondering how I should calculate the 
> required #:factor depending on the staff size?
> 
> Happy Holidays as well,
> Yentl Tijssens
> 
>> On 21 Nov 2022, at 22:19, Abraham Lee  wrote:
>> 
>> On Mon, Nov 21, 2022 at 2:11 PM Yentl Tijssens  
>> wrote:
>> Oh, it’s the creator themselves, what an honour!
>> Your solution worked. I was only wondering how I should calculate the 
>> required #:factor depending on the staff size.
>> 
>> PS: I have to tell you, it’s largely thanks to your font that I get so many 
>> compliments from the jury of my conservatory on the beauty of my scores.
>> 
>> I’m delighted to hear that. Thanks for the kind words. Keep doing awesome 
>> stuff with it!
>> 
>> Happy Holidays,
>> Abraham
> 




Re: Explicitly add extra space before a note

2022-11-09 Thread Leo Correia de Verdier
I think what you are asking for is extra-spacing-width, but it might be easier 
to use repeatTie instead of slur.

##
\version "2.23.11"
\relative c'' {
  b1 
  a \repeatTie
  \tweak extra-spacing-width #'( -5 . 0 ) 
  c \repeatTie
  d, \repeatTie
  \tweak extra-spacing-width #'( -5 . 0 ) 
  a \repeatTie
}
###

HTH
/Leo

> 9 nov. 2022 kl. 13:35 skrev Volodymyr Prokopyuk 
> :
> 
> Hello,
> 
> Problem
> 
> When a slur continues on a new Staff a small horizontal space is added 
> automatically to accommodate the slur like below
> 
> When I add an extra slur with the d2 \tweak control-points #'(...) ( r4) in 
> \volta 2 the extra space is not added and the slur crosses the repeat barline 
> like below
> 
> 
> Question
> 
> Is there a way to explicitly add horizontal space before a note to 
> accommodate the extra slur in \volta 2?
> 
> Thank you very much,
> Vlad



Re: Change clef size

2022-10-30 Thread Leo Correia de Verdier
This should work regardless of font, right?

\version "2.23.11"
{ s1 
  \once \override Staff.Clef.font-size = -2 \clef bass s1 
  \once \override Staff.Clef.font-size = -5 \clef alto s1 
  \once \override Staff.Clef.font-size = 4 \clef treble s1 }

HTH
/Leo


> 30 okt. 2022 kl. 23:06 skrev Paul Hodges :
> 
> To get the best match with other pieces being supplied to the same publisher 
> I am using the Bravura font instead of Emmentaler.  However, the change-clef 
> glyphs in this font are notably smaller than usual, and I've been asked to 
> enlarge them.  I know how to use the full size clef glyphs, but that's not an 
> acceptable solution, and I cannot find any size property attached to clefs 
> which I could tweak.  Am I missing something simple, or do I have to find a 
> way to change the glyph in the font?
> 
> Thanks,
> Paul
> 




Re: Limit the scope of baseMoment and beatStructure to a single Staff within a PianoStaff

2022-10-24 Thread Leo Correia de Verdier
Hi Vlad!

You can specify what context baseMoment and beatStructure should apply to, the 
syntax is like

\set Staff.beatStructure = 1,1

The default is Voice, so the reason your beatStructure is not working is more 
likely that you have some beamExceptions rule in effect (they take priority 
over beatStructure and baseMoment). Try to
\set beamExceptions = #’()
before the music and see if it works. ( beamExceptions can also be set for 
specific contexts)

For next time providing a minimal code is helpful:

\version "2.23.11"
\new PianoStaff
<<
  \new Staff 
  \relative c'' { 
\time 2/4
\set Timing.beamExceptions = #'()
\set baseMoment = #(ly:make-moment 1/4)
\set beatStructure = 1,1
b8 d c b
  }
  \new Staff {
\clef bass
\set baseMoment = #(ly:make-moment 1/2)
\set beatStructure = #'(1)
e8  q q
  }
>>

HTH
/Leo

> 24 okt. 2022 kl. 22:11 skrev Volodymyr Prokopyuk 
> :
> 
> Hello,
> 
> I'd like to ask a question about the scope of the baseMoment and 
> beatStructure configuration to set automatic beam behavior in two-staves 
> PianoStaff.
> 
> Problem
> 
> When baseMoment = 1/4 and beatStructure = 1,1 the output is
> 
> When baseMoment = 1/2 and beatStructure = #'(1) the output is
> 
> Question
> 
> Is it possible to limit the scope of the baseMoment and beatStructure to a 
> single Staff within the PianoStaff to get the below output without using the 
> manual beaming with [...]?
> 
> Thank you,
> Vlad
> 
> 



Re: \chordMode question

2022-10-20 Thread Leo Correia de Verdier
Hi Jaques!

The chords do not have any specified duration, so they fall back to the default 
duration, which is a quarter note. For them to have a whole notes length at 
least the first of them has to have a specified duration, like c1:m . After the 
first chord having a specified duration the subsequent ones will inherit that, 
the same way as notes. 

HTH
/Leo

> 20 okt. 2022 kl. 12:59 skrev Jacques Menu :
> 
> Hello folks,
> 
> Strangely enough, the first three chords in 
> Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES below are quater notes, and 
> not whole notes as I expected.
> 
> Any hint why is welcome!
> 
> JM
> 
> %%%
> 
> \version "2.23.13"
> 
> Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES = \chordmode {
>   \language "nederlands"
>   \key c \major
>   \numericTimeSignature \time 4/4
> 
>   \clef "treble"
>   c:m f:m7 g:maj7 cis4:aug/gis   % <- HERE
> }
> 
> Part_POne_Staff_One_Voice_One = \absolute {
>   \language "nederlands"
>   \key c \major
>   \numericTimeSignature \time 4/4
> 
>   \clef "treble"
>   f'4 e'8 [ c' ] d'4 g' | % 2
>   \barNumberCheck #2
> }
> 
> \book {
>   \score {
> <<
> 
>   \new PianoStaff
>   <<
> \context ChordNames = 
> "Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES"
> \Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES
> 
> \new Staff = "Part_POne_Staff_One"
> <<
>   \context Voice = "Part_POne_Staff_One_Voice_One" <<
> \Part_POne_Staff_One_Voice_One
>   >>
> >>
> 
>   >>
> 
> >>
> 
> \layout {
> }
>   }
> 
> }
> 
> 
> %%%
> 
> 
> 
> 



Re: Text under recitative note

2022-10-19 Thread Leo Correia de Verdier
I think you are looking for the markup commands wordwrap or wordwrap-string, 
something like:

\version "2.23.11"
\fixed c' { \cadenzaOn d4 e a g f g f d d e2 g1 f4 e  }
\addlyrics { When the stone had been seal -- ed by the Jews.
 \markup { 
   \override #'(line-width . 25)
   \wordwrap { 
 While the soldiers were guarding Thy most pure }
 }
 Bo -- dy 
}

You need the override to set the desired width to be taken up, and probably a 
bit of formatting with other markup commands to make it look decent. 

HTH
/Leo

> 19 okt. 2022 kl. 10:51 skrev mjchadwic...@gmail.com:
> 
> I am starting to set Orthodox chant (in English). How do I get a whole phrase 
> of text to split into two (or even three) lines. EG I would like to fit 
> “while the soldiers were guarding Thy most pure” under one semibreve. So that 
> it comes out something like:
>  
> While the soldiers
> were guarding Thy
> most pure
>  
> Rather than taking up half a staff of music.
>  
> Thank you for any help you can give a beginner.
>  
> Martin
>  
> Martin Chadwick
>  
> mjchadwic...@gmail.com




Re: Controlling Slur Marks

2022-08-30 Thread Leo Correia de Verdier
The easiest way would be to use \voiceOne and \voiceTwo instead of \stemUp and 
\stemDown (recommended anyway in most cases). Otherwise _( and ^( works too. 

HTH
/Leo

> 30 aug. 2022 kl. 19:30 skrev Greg Lindstrom :
> 
> 
> I am finishing up engraving my first full score. It's a piece for brass band 
> where we could not find a score anywhere and the one we've ordered has been 
> backordered for 6 months! I took it upon myself to pull all the parts and 
> engrave away. Eventually, I will hook up a midi keyboard to enter stuff like 
> this, but I'm as quick, if not quicker, typing it in and controlling just 
> about everything the first time through.
> 
> Lilypond is an impressive system and I use it over the 2 "big" commercial 
> engraving packages because I think the final product just looks better.
> 
> But, to my question...
> 
> I have a very short Ossia that I would like to add to a chart I'm engraving. 
> I'd rather not break it out onto its own staff (just to save space in the 
> score) so I'm adding it as a CueVoice. The problem is the slur marks on the 
> main line are above and the slurs on the ossia are below (see snippet). Is 
> there a way to control where the slur marks appear, in the same spirit as 
> stems up and down? Is it preferred to break the ossia out in its own staff:?
> 
> Thanks!
> --greg
> 
> 
> 
> And the code to generate it
> 
>   <<{f16(e f g\!) a(f c a)|
>  \stemDown{g16(a bf g)\> c(bf a g\!}|
> }
> {
>   \new CueVoice{
> \stemUp s16 s8^\markup\small{ossia} s16 a'16(g f e)|
> g16(f e d) s4|
>   }
> }
>   >>


Re: Help with Rhythm Notation

2022-08-22 Thread Leo Correia de Verdier
Or possibly
%
\version "2.22.1"
\fixed c' {
  \once \set subdivideBeams = ##t
  \once \set baseMoment = #(ly:make-moment 1/8)
  c32 c c c 
  \tuplet 3/2 {c32 c \set stemRightBeamCount = #2 c }  \set stemLeftBeamCount = 
#2
  c64 c c c
}

> 22 aug. 2022 kl. 09:47 skrev Leo Correia de Verdier 
> :
> 
> I’d guess it’s a written-out accelerando. For exactly how I would do it could 
> depend a bit on circumstances, like tempo and melody, but I think this is 
> fairly readable and how I would do it at lest in reasonably slow tempi…
> 
> %
> \version "2.22.1”
> \fixed c' {
>  \set subdivideBeams = ##t
>  \set baseMoment = #(ly:make-moment 1/16)
>  c32 c c c \tuplet 3/2 {c32 c c} c64 c c c
>  \unset subdivideBeams
>  \unset baseMoment
> }
> %%
> 
> 
> 
>> 22 aug. 2022 kl. 04:28 skrev Greg Lindstrom :
>> 
>> I am working on transcribing a euphonium solo and have come across a rhythm 
>> that I cannot figure out how to notate. As an aside, I am loving lilypond 
>> and am impressed with the level of detail that has gone into it. It makes 
>> engraving scores fun!
>> 
>> Here is the figure; it is a single beat in 5/4 time (so it's duration is 1 
>> quarter beat):
>> 
>> 4-32nd notes
>> a triplet consisting of 3-32 notes
>> 4-64th notes
>> 
>> I'm not even sure of how to divide this up, as the 4-32nd notes would take 
>> twice as long as the 4-64th notes. I'm note sure what the composer is going 
>> for or how the performer will interpret it, but I want to be faithful to the 
>> part (there isn't a full score -- only a piano reduction -- so I'm engraving 
>> the parts to make it). Normally, I would have the 32nd and 64th note beams 
>> with an 8th note beam between each of the 3 groups, but the 3 groups are not 
>> of equal duration.
>> 
>> Any help on this would be greatly appreciated.
>> 
>> --greg
>> 
> 




Re: Help with Rhythm Notation

2022-08-22 Thread Leo Correia de Verdier
I’d guess it’s a written-out accelerando. For exactly how I would do it could 
depend a bit on circumstances, like tempo and melody, but I think this is 
fairly readable and how I would do it at lest in reasonably slow tempi…

%
\version "2.22.1”
\fixed c' {
  \set subdivideBeams = ##t
  \set baseMoment = #(ly:make-moment 1/16)
  c32 c c c \tuplet 3/2 {c32 c c} c64 c c c
  \unset subdivideBeams
  \unset baseMoment
}
%%



> 22 aug. 2022 kl. 04:28 skrev Greg Lindstrom :
> 
> I am working on transcribing a euphonium solo and have come across a rhythm 
> that I cannot figure out how to notate. As an aside, I am loving lilypond and 
> am impressed with the level of detail that has gone into it. It makes 
> engraving scores fun!
> 
> Here is the figure; it is a single beat in 5/4 time (so it's duration is 1 
> quarter beat):
> 
> 4-32nd notes
> a triplet consisting of 3-32 notes
> 4-64th notes
> 
> I'm not even sure of how to divide this up, as the 4-32nd notes would take 
> twice as long as the 4-64th notes. I'm note sure what the composer is going 
> for or how the performer will interpret it, but I want to be faithful to the 
> part (there isn't a full score -- only a piano reduction -- so I'm engraving 
> the parts to make it). Normally, I would have the 32nd and 64th note beams 
> with an 8th note beam between each of the 3 groups, but the 3 groups are not 
> of equal duration.
> 
> Any help on this would be greatly appreciated.
> 
> --greg
> 




Re: Individual stencils in key signature

2022-08-04 Thread Leo Correia de Verdier
Thanks!

Thats a better solution. (But I’m still happy about having asked the wrong 
question so I could learn about how to find the stencil expression)

Best
/Leo

> 3 aug. 2022 kl. 13:40 skrev Jean Abou Samra :
> 
> 
> 
>> Le 2 août 2022 à 23:34, Leo Correia de Verdier 
>>  a écrit :
>> 
>> Thanks a lot!
>> 
>> This is impressive and is helping me a lot to both understand and manage my 
>> issue.
>> 
>> Thing is I wanted narrower accidentals, and instead of doing it the proper 
>> way and redesigning the font I hacked them with a callback with 
>> ly:stencil-scale . Then I realised I wanted the key signatures to match the 
>> accidentals inside the music and have to cover my first hack with a second, 
>> even worse one… 
> 
> 
> Then, how about using the same technique with ly:stencil-scale on the whole 
> KeySignature stencil? If this leads to the accidentals being too close to 
> each other, you can increase the gaps using the padding-pairs property as 
> shown here:
> 
> https://lilypond.org/doc/v2.23/Documentation/notation/displaying-pitches#alternate-accidental-glyphs
> 
> Best,
> Jean
> 
> 
> 
>> 
>> 
>> 
>>> 2 aug. 2022 kl. 10:50 skrev Lukas-Fabian Moser :
>>> 
>>> Hi Leo,
>>> 
>>> Am 02.08.22 um 09:48 schrieb Leo Correia de Verdier:
>>>> Is there any way to access the stencils of individual accidentals in a key 
>>>> signature?
>>> 
>>> The KeySignature stencil gets constructed by combining the individual 
>>> accidental stencils into one stencil, as can be seen here:
>>> 
>>> \version "2.23.7"
>>> 
>>> {
>>>  \override Staff.KeySignature.stencil =
>>>  #(grob-transformer
>>>'stencil
>>>(lambda (grob stencil)
>>>  (pretty-print (ly:stencil-expr stencil))
>>>  stencil))
>>>  \key as \minor
>>>  as'4
>>> }
>>> 
>>> But your question seems sounds like an xy problem 
>>> (https://en.wikipedia.org/wiki/XY_problem): What do you want to achieve 
>>> exactly?
>>> 
>>> Lukas
>>> 
>> 
>> 




Re: Individual stencils in key signature

2022-08-02 Thread Leo Correia de Verdier
Thanks a lot!

This is impressive and is helping me a lot to both understand and manage my 
issue.

Thing is I wanted narrower accidentals, and instead of doing it the proper way 
and redesigning the font I hacked them with a callback with ly:stencil-scale . 
Then I realised I wanted the key signatures to match the accidentals inside the 
music and have to cover my first hack with a second, even worse one… 



> 2 aug. 2022 kl. 10:50 skrev Lukas-Fabian Moser :
> 
> Hi Leo,
> 
> Am 02.08.22 um 09:48 schrieb Leo Correia de Verdier:
>> Is there any way to access the stencils of individual accidentals in a key 
>> signature?
> 
> The KeySignature stencil gets constructed by combining the individual 
> accidental stencils into one stencil, as can be seen here:
> 
> \version "2.23.7"
> 
> {
>   \override Staff.KeySignature.stencil =
>   #(grob-transformer
> 'stencil
> (lambda (grob stencil)
>   (pretty-print (ly:stencil-expr stencil))
>   stencil))
>   \key as \minor
>   as'4
> }
> 
> But your question seems sounds like an xy problem 
> (https://en.wikipedia.org/wiki/XY_problem): What do you want to achieve 
> exactly?
> 
> Lukas
> 




Individual stencils in key signature

2022-08-02 Thread Leo Correia de Verdier
Dear list,

Is there any way to access the stencils of individual accidentals in a key 
signature?

Thanks 
/Leo


Passing arguments to grob-transformer

2022-06-17 Thread Leo Correia de Verdier
Dear list!
I’m quite likely just being somewhat dim, but is there a way to pass additional 
arguments to a function used by grob-transformer (or any callback for that 
matter)?
 Would it be possible to do something equivalent to this following using an 
override to the stencil using grob-transformer?

\version "2.23.7"

#(define elongate (lambda (grob amt)
(let ((stil (ly:grob-property grob 'stencil)))
  (ly:grob-set-property! grob 'stencil (ly:stencil-scale 
stil 1 amt)

{  \override Accidental.before-line-breaking = #(lambda (grob) (elongate grob 
2))
   cis'2 }

Thanks!
/Leo


Re: Cross-staff arpeggios with a grace note

2022-04-14 Thread Leo Correia de Verdier
I think there might be a more beautiful solutions to your whole situation, but 
I’m too tired to figure it out right now, so:

You can change the arpeggio’s Y-extent to prevent it from pushing away the 
other staff. 

%%%
\version "2.22.2"

rightHand = {
 e'2
}

leftHand = \relative {
 \clef bass
 <<
   {
 \slashedGrace {
   e8
   \tweak positions #'(-4.5 . 7)
   \tweak extra-spacing-width #'(-1 . 0)
   \tweak X-offset -1
   \tweak Y-extent #'(-4.5 . 2)
   \arpeggio
 }
 2
   }
   \\
   {
 2
   }
 >>
}

\new PianoStaff <<
 \new Staff \rightHand
 \new Staff \leftHand
>>
%%%

HTH
/Leo

> 14 apr. 2022 kl. 23:06 skrev Knute Snortum :
> 
> I am having trouble with arpeggios and grace notes again.  In this
> situation, I have a cross-staff arpeggio of a chord with a grace note
> (see attachment).  LilyPond's default is to put the arpeggio and grace
> note on top of each other.  Jean taught me the trick of putting the
> arpeggio on the grace note and adjusting the arpeggio's length and
> position from there, like this:
> 
> %%%
> \version "2.22.2"
> 
> rightHand = {
>  e'2
> }
> 
> leftHand = \relative {
>  \clef bass
>  <<
>{
>  \slashedGrace {
>e8
>\tweak positions #'(-4.5 . 5)
>\tweak extra-spacing-width #'(-1 . 0)
>\tweak X-offset -1
>\arpeggio
>  }
>  2
>}
>\\
>{
>  2
>}
>>> 
> }
> 
> \new PianoStaff <<
>  \new Staff \rightHand
>  \new Staff \leftHand
>>> 
> %%%
> 
> This almost produces what I want.  The problem is I can't get the
> arpeggio to cross into the upper staff.  If you make the arpeggio
> higher than a certain amount (that is, \tweak positions #'(-4.5 . 5)
> with a cdr of more than 5 or so) the upper staff shies away from the
> arpeggio.
> 
> Any help getting the arpeggio past the lower part of the upper staff
> will be appreciated.
> 
> --
> Knute Snortum
> 



Re: Generate music with scheme

2022-04-11 Thread Leo Correia de Verdier
An addition:

MarkEvent is not added to the note, but to the staff (it’s often used for 
things like rehearsal marks), if you want the markup added to the actual note 
you can write it like this:

%

\version "2.18.0"
\score { 
  {
$ (make-sequential-music 
   (map (lambda (x)
  (make-music 'NoteEvent
  'pitch
  (ly:make-pitch 0 x)
  'duration
  (ly:make-duration 2)
  'articulations
  (list (make-music 'TextScriptEvent
'text
(markup #:line (#:fontsize -3 
"10"))
(list 1 2 3 4)))
  } 
} 

%%%

2.18 is some years old, by the way.

Best
/Leo

> 11 apr. 2022 kl. 11:50 skrev Henrik Frisk :
> 
> Hi,
> 
> I have not worked with scheme and lilypond for some years. I realize that 
> this is more of a scheme question than Lilypond, but perhaps someone knows 
> how to do this. I can generate four notes with the following:
> 
>   \version "2.18.0"
>   \score { 
> {
>   $ (make-sequential-music 
>(map (lambda (x)
>   (make-music 'NoteEvent
>   'pitch
>   (ly:make-pitch 0 x)
>   'duration
>   (ly:make-duration 2)))
> (list 1 2 3 4)))
> } 
>   } 
> 
> However, if I would like to add a markup to each note to each note I fail. I 
> would have guessed something like this would do it but it generates an 
> (almost) empty staff: 
> 
> \version "2.18.0"
>   \score { 
> {   
>$(make-sequential-music
>(map (lambda (x)
>(make-music 'NoteEvent
>'pitch
>(ly:make-pitch 0 x)
>'duration
>(ly:make-duration 2))
>(make-music 'MarkEvent
>'label
>(markup
> #:line
> (#:override (cons (quote font-size) -3) "10"
> (list 1)))
> } 
>   } 
> 
> /h
> 




Re: Grace note position and time signature changes

2022-03-24 Thread Leo Correia de Verdier
Hi David!

This is our beloved issue 34 again: 
https://sourceforge.net/p/testlilyissues/issues/34/
You need to place grace spacers in relevant sequential variables matching the 
gracenotes to get them to the right place, as in this fixed code.

%%%
\version "2.22.2"
\include "english.ly"

tt = {
  \time 4/4 s1 s1 s1
  \time 2/4 \grace s16*3 s2
  \time 4/4 s1
  \time 2/4\grace s16*3  s2
}

\score {
  <<
\new Staff {
  \relative c' {
<< \tt { R1 R1 a1 ~ a4 r4 R1 R2 } >>
  }
}
\new Staff {
  \relative c' {
<< \tt { R1
 \grace { d16 d d } d1
 R1
 \grace { d16 d d } d2
 R1
 \grace { d16 d d } d2 }
>>
  }
}
  >>
}
%%

HTH
/Leo

> 24 mars 2022 kl. 12:10 skrev David Santamauro :
> 
> Hi,
> 
> The following snippet produces some strange results:
> 
> \version "2.22.2"
> 
> \include "english.ly"
> 
> tt = {
>   \time 4/4 s1 s1 s1
>   \time 2/4 s2
>   \time 4/4 s1
>   \time 2/4 s2
> }
> 
> \score {
>   <<
> \new Staff {
>   \relative c' {
> << \tt { R1 R1 a1 ~ a4 r4 R1 R2 } >>
>   }
> }
> \new Staff {
>   \relative c' {
> << \tt { R1
>   \grace { d16 d d } d1
>   R1
>   \grace { d16 d d } d2
>   R1
>   \grace { d16 d d } d2 }
> >>
>   }
> }
>   >>
> }
> 
> I don’t understand the differing behavior in mm 3-4 and mm 5-6. Is there a 
> way to force the grace notes past (to the right of) the time signature?
> 
> Thanks
> 
> 
> 
> 
> 
> 



Re: 'baroque' time signatures

2022-03-22 Thread Leo Correia de Verdier
I added necessary supporting code like Michael (and a voice filled with 
repeated half notes, so I could hear the tempo) and got it to compile compile 
correctly with tempo changes (at least alternating fast and slow sections) on 
Lilypond 2.19.82 Frescobaldi 3.1.3, so I wouldn't think that is the root of 
your problem.

> 22 mars 2022 kl. 23:21 skrev Mario Bolognani :
> 
> Many thanks Michael for your comments. Unfortunately, due to my reluctance 
> (and perhaps inability) of using Port and Terminal, I am obliged to use 
> \version 2.20.2 with Frescobaldi 3.1.3, which maybe are the cause of my midi 
> problems. 
> 
> Anyway, many thanks again for your help
> 
> Mario
> 
> 
> Mario Bolognani
> mario.bologn...@gmail.com
> 
> 
> 
>> Il giorno 22 mar 2022, alle ore 22:10, Michael Gerdau  ha 
>> scritto:
>> 
>>> Here is my MWE (structure of lilypond coding regarding part of 
>>> “Combattimento di Tancredi e Clorinda” by Claudio Monteverdi):
>> 
>> MWE means I can take the code and compile it. And then it shows the problem.
>> 
>> I tried to amend your code as follows:
>> I surrounded it with:
>> \version "2.23.5"
>> 
>> \include "italiano.ly"
>> 
>> music = {
>> [here comes your code]
>> }
>> 
>> \score {
>> \music
>> \layout {}
>> \midi {}
>> }
>> 
>> That compiles and creates empty music. Now what is the problem?
>> 
>>> When I change \tempo in 3/2 time the speed is more or less the same...
>> 
>> I have no way to test that as your code does not contain *ANY* music 
>> whatsoever. I already said, when I created a piece on my own what you 
>> verbally described worked just nicely.
>> 
>> Please provide a WORKING piece of lilypond code that shows the problem.
>> That means with EXACT steps as to how the problem can be seen. Claiming "I 
>> change the tempo and it has no effect" is not helpful. We need to see 
>> exactly how you change the tempo. Because IMO quite obviously you are doing 
>> something wrong. I just don't know what.
>> 
>> Kind regards,
>> Michael
>> -- 
>> Michael Gerdau   email: m...@qata.de
>> GPG-keys available on request or at public keyserver
> 
> 




Re: Cross-staff glissando with crescendo and dynamics

2022-03-22 Thread Leo Correia de Verdier
Hi David!

The issue, put in a slightly simplified way, is that the Voice context to which 
the dynamics are attached has moved away from the Staff under which the 
dynamics were originally aligned, leaving lilypond ”in doubt” about under what 
staff the \mp should be.

The answer in the linked thread solves this by creating a second Voice for the 
dynamics, that stays in the original Staff.

The other solution mentioned, which I’d prefer (but that may be a matter of 
taste) would be creating a separate Dynamics context.

HTH
/Leo

> 22 mars 2022 kl. 13:55 skrev David Santamauro :
> 
> So I figured it out based on:
>  
> https://lists.gnu.org/archive/html/lilypond-user/2016-07/msg00266.html
>  
> Not an unreasonable solution, but I still don't quite understand the 
> underlying issue.
>  
> Thanks
>  
>  
> From: David Santamauro 
> Date: Tuesday, March 22, 2022 at 8:36 AM
> To: lilypond-user@gnu.org 
> Cc: GMAIL 
> Subject: Cross-staff glissando with crescendo and dynamics
> 
> Hi, I'm not understanding the warnings I'm getting with the following 
> snippet. I've included a possible work-around that is musically identical, 
> but visually unappealing:
>  
> %%
> \version "2.22.2"
>  
> \include "english.ly"
>  
> \score {
>   \new PianoStaff \with { instrumentName = "Harp" } <<
> \new Staff = "s_harp_upper" {
>   \relative c'' {
> \clef "treble"
> s1|
> s4 r4 r2  |
>  
> % work around without warnings
> R1*2
>   }
> }
> \new Staff = "s_harp_lower" {
>   \relative c {
> \clef "bass"
>  
> f,1\p\glissando\<
> \change Staff = "s_harp_upper"
> bf'''4\!\mp
> \change Staff = "s_harp_lower"
> r4 r2
>  
> % work around without warnings
> f,,,1\p\glissando\< \clef "treble" bf'''4\!\mp   r4 r2
>   }
> }
>   >>
> }
> %%
>  
> For the cross-staff I get 4 of these:
>  
> programming error: My pure_y_common is a VerticalAlignment, which might 
> contain several staves.
> continuing, cross fingers
>  
> Can someone explain what those warnings mean and how to code the cross-staff 
> gliss with dynamics and crescendo. correctly?
>  
> Thanks




Re: Time signature guide

2022-03-22 Thread Leo Correia de Verdier
I hadn’t seen David’s reply until after I posted, otherwise I wouldn't have 
basically repeated his answer.
A disadvantage of the << … \\ … >> syntax in this case is that it applies 
\voiceTwo to \melody (it has all its stems turned down, for instance). While 
you can reset that with \oneVoice I prefer just placing them in parallell in 
the same explicitly initiated Staff, as I did.

> 22 mars 2022 kl. 10:27 skrev Rip _Mus :
> 
> Thank you so much,
> you offered two similar and valid solutions!
> 
> Regards
> 
> 
> 
> Il giorno lun 21 mar 2022 alle ore 10:19 Leo Correia de Verdier 
>  ha scritto:
> I’m not sure I understood your question right, but I think the usual way to 
> do it would be to write the ”global” variable as a sequence of tempos, time 
> signatures and other events separated by spacers or skips. 
> 
> Something like:
> 
> %%
> 
> \version "2.23.6"
> 
> global = { \time 4/4 \tempo "Allegro" 4 = 144 
>s1
>\time 3/8 \tempo "Adagio" 8 = 76 
>s4.
>\time 5/8 \tempo "" 8 = 92 
>s8*5
>\time 3/2 \tempo "Vivo" 2 = 152 
>s1.
>\bar "|."
> }
> 
> part = { c'1 | d'4. | e'4~ 4. | a'1. }
> 
> \new Staff << \global \part >>
> 
> \layout { ragged-right = ##f }
> 
> %%
> 
> > 21 mars 2022 kl. 09:51 skrev Rip _Mus :
> > 
> > Good morning,
> > I would need advice.
> > In a score with many time signature changes (where I therefore cannot use a 
> > stable global variable of tempo and time signature), there is a way to set 
> > a "guide" in which to set the various time signature changes, without " 
> > dirty "the instrumental variables?
> > Perhaps there is some suitable context for this? Or other strategies?
> > 
> > Thank you very much
> > 
> > Rip_mus
> 




Re: Time signature guide

2022-03-21 Thread Leo Correia de Verdier
I’m not sure I understood your question right, but I think the usual way to do 
it would be to write the ”global” variable as a sequence of tempos, time 
signatures and other events separated by spacers or skips. 

Something like:

%%

\version "2.23.6"

global = { \time 4/4 \tempo "Allegro" 4 = 144 
   s1
   \time 3/8 \tempo "Adagio" 8 = 76 
   s4.
   \time 5/8 \tempo "" 8 = 92 
   s8*5
   \time 3/2 \tempo "Vivo" 2 = 152 
   s1.
   \bar "|."
}
   
part = { c'1 | d'4. | e'4~ 4. | a'1. }

\new Staff << \global \part >>

\layout { ragged-right = ##f }

%%

> 21 mars 2022 kl. 09:51 skrev Rip _Mus :
> 
> Good morning,
> I would need advice.
> In a score with many time signature changes (where I therefore cannot use a 
> stable global variable of tempo and time signature), there is a way to set a 
> "guide" in which to set the various time signature changes, without " dirty 
> "the instrumental variables?
> Perhaps there is some suitable context for this? Or other strategies?
> 
> Thank you very much
> 
> Rip_mus




Re:

2022-03-20 Thread Leo Correia de Verdier
While it’s hard to know without seeing the contents of the included files I 
would guess you could write \voiceOne before the includes of the voices that 
should point up and \voiceTwo before the ones that should point down. 

> 21 mars 2022 kl. 00:22 skrev Michael Dykes :
> 
> 
> I have used the nwc2ly program to begin converting NWC files that my dear 
> friend Larkin who recently passed away to lilypond files. I have found that 
> the biggest "issue" is that since the scores are 4-part choral music, with 
> the original having soprano and tenor voices with stems upward, and alto and 
> bass voices with stems downward; while the converted lilypond file has both 
> soprano and alto with stems the same direction, and the same for tenor and 
> bass.
> 
> I am not sure how to write a mwe, so I have attached a screen shot from 
> Frescobaldi. I would appreciate any help possible.
> 
> Michael Dykes



Re: Should \partial accept music instead of duration?

2022-03-20 Thread Leo Correia de Verdier
Entirely replacing the actual syntax would not be desirable in my opinion. 
Consider the case when it is used in a “global” part/variable in an orchestral 
score that usually contains rehearsal marks, tempo, key and time signature 
changes and such. As I understand it having \partial to accept only music as 
argument would have to move to each part, which would introduce unnecessary 
typing and disrupt the logic of the structure. Sure it can be worked around, 
but I would see it as a step backwards. Or have I misunderstood?

> 20 mars 2022 kl. 05:36 skrev Aaron Hill :
> 
> Fair point, though the intention here would be that backwards compatibility 
> would only need to exist for a time.  A warning could be issued whenever a 
> user applies the older syntax; this would inform the user of the impending 
> breaking change while still allowing existing code to compile.  When it is 
> convenient, a future release would only support music as the argument.
> 
> 
> -- Aaron Hill



Re: DynamicTextSpanner spacing

2022-03-06 Thread Leo Correia de Verdier
The stencil is what’s actually printed from a grob. 

> 6 mars 2022 kl. 02:27 skrev Erika Pirnes :
> 
> 
> Thank you Aaron, it seems to work! But what does stencil mean exactly?
> 
> Best,
> Erika
> Lähettäjä: Aaron Hill 
> Lähetetty: lauantai 5. maaliskuuta 2022 18.35
> Vastaanottaja: Erika Pirnes 
> Kopio: lilypond-user@gnu.org 
> Aihe: Re: DynamicTextSpanner spacing
>  
> On 2022-03-05 3:49 pm, Erika Pirnes wrote:
> > I would like the dotted line of the crescendo to start a bit later and
> > end a bit earlier. It is too close to "cresc.", in my opinion at
> > least. And sometimes too close to the "f" as well. (A tiny detail, for
> > sure, but it looks annoying.) Any ideas?
> > [...]
> > music = \relative c' {
> >   \repeat unfold 5{c8 \p \cresc d e f g a b4 c8 \f b c2.}
> > }
> 
> You will need to play around with the bound-details for the 
> DynamicTextSpanner:
> 
> 
> \version "2.18.2"
> 
> \relative c' {
>%% The space before the left side of the spanner.
>%% (NOTE: This includes the attached stencil.)
>%% Default is 0.75; we are adding two units of space.
>\override DynamicTextSpanner.bound-details.left.padding = #2.75
> 
>%% Since we want the space between the stencil and
>%% line, we need to shift the stencil over a bit.
>%% Default is (-0.75 . -0.5); we move it left by the
>%% same increment we applied to the padding above.
>\override DynamicTextSpanner.bound-details
>  .left.stencil-offset = #'(-2.75 . -0.5)
> 
>%% The space after the right side of the spanner.
>%% Default is 0.75; we are adding two units of space.
>\override DynamicTextSpanner.bound-details.right.padding = #2.75
> 
>%% (For debugging only...)
>%% Highlight the grob in red for better visibility.
>%% Also make the line solid to show its extents clearly.
>\override DynamicTextSpanner.color = #red
>\override DynamicTextSpanner.dash-fraction = #1
> 
>\repeat unfold 5{ c8 \p \cresc d e f g a b4 c8 \f b c2. }
> }
> 
> 
> 
> -- Aaron Hill


Re: Naming midi files

2022-02-17 Thread Leo Correia de Verdier
You would have to structure your files and variables differently, for instance 
something like (in pseudocode):

— foo.ly
\include "bar.ily"
\include ”baz.ily”

\book {
  \bookpart {
\header {
  title = "Bar One"
}
\score {
  \barMusic
  \layout{}
} 
  }
  \bookpart {
\header {
  title = "BaZ"
}
\score {
  \bazMusic
  \layout{}
}
  }
}

\book {
  \bookOutputName "bar"
  \score {
\barMusic
\midi {}
  }
}

\book {
  \bookOutputName "baz"
  \score {
\bazMusic
\midi {}
  }
}

— bar.ily
barMusic = %music
— baz.ily
bazMusic = %music



> 17 feb. 2022 kl. 11:43 skrev Mark Probert :
> 
> You wrote:
>>> It’s not that simple, since in the example all the scores are in the 
>>> same book.
>> 
>> It is that simple.
>> Put the score in one book and the midis separate books and done.
>> 
> My understanding is a \midi{} block is contained within a \score{} 
> block.
> 
> The structure I have is
> 
> \book foo
> \bookpart bar
>  \score
>   \midi => foo.mid
> \bookpart baz
>  \score
>   \midi => foo-1.mid
> 
> How do I separate the \midi from the \score putting the score into a 
> \book and the \midi into separate books?
> 
> Thanks,
> ..m.




Re: Naming midi files

2022-02-17 Thread Leo Correia de Verdier
It’s not that simple, since in the example all the scores are in the same book.

> 17 feb. 2022 kl. 09:58 skrev Michael Gerdau :
> 
>> If I have a book that is structured something like below, then LP
>> produces two midi files: foo.midi and foo-1.midi.
>> Is there a way I can coerce the names into "bar.midi" and "baz.midi"
>> within LP? Or is this something best down externally?
> [example code snipped]
> 
> RTFM: 
> https://lilypond.org/doc/v2.22/Documentation/notation-big-page#output-file-names
> 
> \bookOutputSuffix
> and
> \bookOutputName
> 
> are your friends.
> 
> HTH,
> Michael
> -- 
> Michael Gerdau   email: m...@qata.de
> GPG-keys available on request or at public keyserver
> 




Re: Slur in different voices

2022-02-17 Thread Leo Correia de Verdier
Hi Mark!

Generally I work around this using hidden notes or notes with hidden stems. In 
your example I think you want a tie rather than a slur (since it’s a held 
note), but they both work in the same way with regard to voices. 

In your example it could look like:

\version "2.22"

lowerA = \new Voice \relative c'
{ \voiceOne
 s2 \once \hideNotes b2~ | b2 f2\rest |
}

lowerB = \new Voice \relative c
{ \voiceTwo
 f2\rest b2 | c,2 s2 |
}

 \new Staff <<
\clef bass
\lowerA
\lowerB
 >>

Best
/Leo

> 17 feb. 2022 kl. 00:24 skrev Mark Probert :
> 
> 
> Hi.
> 
> I have a score that, in the piano, has a slur crossing voices (in the 
> example the slur would end up with the B being held for a 4 count). 
> There is a note in the LP manual saying that slurs must all stay in the 
> same voice, so is there a work-around for this kind of thing?
> 
> Many thanks!
> 
> .. mark.
> 
> < code >-
> \version "2.22"
> 
> global = {
>  \key c \major
>  \time 4/4
> }
> 
> %%% --
> %%% piano
> %%%
> upperA = \new Voice \relative c'
> { \voiceOne
>  s1 | s1
> }
> 
> upperB = \new Voice \relative c'
> { \voiceTwo
>  s1 | s1
> }
> 
> lowerA = \new Voice \relative c'
> { \voiceThree
>  s1 | b2 f2\rest |
> }
> 
> lowerB = \new Voice \relative c
> { \voiceFour
>  f2\rest b2 | c,2 s2 |
> }
> 
> 
> %%% -
> %%% staves
> %%%
> \score {
>  <<
>\new PianoStaff <<
>  \new Staff <<
>   \clef treble
>   \global
>   \upperA
>   \upperB
>>> 
>  \new Staff <<
>   \clef bass
>   \global
>   \lowerA
>   \lowerB
>>> 
>>> 
>>> 
>  \layout{}
> }
> 




Re: Complex three-voice left hand

2022-02-15 Thread Leo Correia de Verdier
You were almost there:
%%%
\relative {
  \time 3/4
  \key f \major
  \clef bass
  \mergeDifferentlyHeadedOn
  <<
{ \voiceThree <\tweak duration-log #2 g df'>2 * 1/2 g4  | }
\\
{ 
  \voiceFour \override Beam.details.collision-padding = 0 
\scaleDurations 2/3 { g8 bf bf g bf bf gf a a } | 
}
\\ 
{ \voiceSix \override NoteColumn.force-hshift = 0.5 ef2 ef4 | }
  >>
}
%
> 15 feb. 2022 kl. 21:09 skrev Knute Snortum :
> 
> Hello again.
> 
> I am having difficulties engraving a complex three-voice lefthand
> measure.  Chopin (bless his heart!) has written some "impossible" note
> lengths.  I have two ways that get close to engraving the measure as
> Chopin wrote it, but not quite.
> 
> Attached is the measure I want to engrave, then my two attempts, then
> the input file that created the two attempts.  Any suggestions would
> be appreciated.
> 
> --
> Knute Snortum
\version "2.22.1"
\language "english"

voiceSix = #(context-spec-music (make-voice-props-set 5) 'Voice)

% df' doesn't connect with g
\relative {
  \time 3/4
  \key f \major
  \clef bass
  <<
{ \voiceThree df'2 * 1/2 g,4  | }
\\
{ 
  \voiceFour \override Beam.details.collision-padding = 0 
\scaleDurations 2/3 { g8 bf bf g bf bf gf a a } | 
}
\\ 
{ \voiceSix \override NoteColumn.force-hshift = 0.5 ef2 ef4 | }
  >>
}

% g is headed as a half note instead of quarter note
\relative {
  \time 3/4
  \key f \major
  \clef bass
  \mergeDifferentlyHeadedOn
  <<
{ \voiceThree 2 * 1/2 g4  | }
\\
{ 
  \voiceFour \override Beam.details.collision-padding = 0 
\scaleDurations 2/3 { g8 bf bf g bf bf gf a a } | 
}
\\ 
{ \voiceSix \override NoteColumn.force-hshift = 0.5 ef2 ef4 | }
  >>
}> 



Re: Accent size and stem length

2022-02-10 Thread Leo Correia de Verdier
If you go for the redefine-solution from the thread the accent is dashLarger

> 10 feb. 2022 kl. 23:59 skrev Leo Correia de Verdier 
> :
> 
> Hi Erika!
> 
> To globally reduce the size of all articulations (I think that could be 
> relevant, since many of them will relate to noteheads in a way similar to 
> accents) you can use this next to the override for notehead fint size.
> 
> \override Script.font-size = #-.5 % or whatever size you want
> 
> If you want to resize just the accents you could try the suggestions 
> mentioned in this thread:
> 
> https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html
> 
> As Paul wrote the stem extending to the middle line of the staff follows 
> convention, but this can be suppressed by 
> 
> \override Stem.no-stem-extend = ##t
> 
> Hope this helped
> /Leo
> 
>> 10 feb. 2022 kl. 19:01 skrev Paul Hodges :
>> 
>> From: Erika Pirnes  
>> 
>> The other thing is to have a more consistent length for stems. In my minimal 
>> example, the stems in the first measure look too short because in both 
>> measures they extend to the middle line. Any ideas?
>> 
>> I don't know about the accent question.  
>> 
>> But as for the stems, the shorter ones in your example are the usual length 
>> (one octave), and the longer ones follow the traditional convention (applied 
>> by LilyPond as well as publishers in general) that stems of notes well 
>> outside the stave are extended to the middle line of the stave.  In music in 
>> parts, stems facing away from the stave may be somewhat shortened; I don't 
>> know whether LilyPond does this as well.
>> 
>> Paul
> 
> 




Re: Accent size and stem length

2022-02-10 Thread Leo Correia de Verdier
Hi Erika!

To globally reduce the size of all articulations (I think that could be 
relevant, since many of them will relate to noteheads in a way similar to 
accents) you can use this next to the override for notehead fint size.

\override Script.font-size = #-.5 % or whatever size you want

If you want to resize just the accents you could try the suggestions mentioned 
in this thread:

https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00484.html

As Paul wrote the stem extending to the middle line of the staff follows 
convention, but this can be suppressed by 

\override Stem.no-stem-extend = ##t

Hope this helped
/Leo

> 10 feb. 2022 kl. 19:01 skrev Paul Hodges :
> 
> From: Erika Pirnes  
> 
>  The other thing is to have a more consistent length for stems. In my minimal 
> example, the stems in the first measure look too short because in both 
> measures they extend to the middle line. Any ideas?
> 
> I don't know about the accent question.  
> 
> But as for the stems, the shorter ones in your example are the usual length 
> (one octave), and the longer ones follow the traditional convention (applied 
> by LilyPond as well as publishers in general) that stems of notes well 
> outside the stave are extended to the middle line of the stave.  In music in 
> parts, stems facing away from the stave may be somewhat shortened; I don't 
> know whether LilyPond does this as well.
> 
> Paul





Re: Engraving chords with the same note twice, but different accidentals

2022-02-03 Thread Leo Correia de Verdier
I differ on that. For me, (and with the perspective of only this measure) both 
the option of respelling the a flat in only that chord (looks like the repeated 
a flat moves) and respelling the a flats in the whole measure (and having to 
read the second between a flat and b flat as a diminished third) are more 
awkward than reading the augmented unison. I slightly prefer the notation with 
both heads on the same stem, but find them both quite readable. 

> 3 feb. 2022 kl. 18:13 skrev David M. Boothe, CAS :
> 
> 
> I also would prefer to see a G#. However between the two examples, I think 
> the first is slightly more readable.
> 
> That said, what are the subsequent A's supposed to be - flat or natural? As 
> written, I would play them as naturals in the first example, but flats in the 
> second example. Were I engraving this, I would put an explicit accidental, 
> whether flat or natural on the fourth A, as well.
> 
> 
> dB
> 
>> On Thu, Feb 3, 2022, 11:51 AM Kieren MacMillan 
>>  wrote:
>> Hi all,
>> 
>> > Speaking as a keyboard player (and lilypond novice) I would recommend 
>> > re-spelling the a flat as a g sharp! Sometimes, theory has to take a 
>> > backseat to readability.
>> 
>> If theoretical correctness (or, say, accuracy to a previous source) isn't a 
>> requirement, then I agree with Charlie: this is a moment in which, as a 
>> keyboard player, I'd much rather see two different notes [by pitch name].
>> 
>> Otherwise, I'd say the split-stem convention is [perhaps 
>> counterintuitively?!] more readable for me. If you want to do this in 
>> Lilypond, I'm pretty sure Harm has solved this particular issue (see e.g., 
>> https://archiv.lilypondforum.de/index.php/topic,1176.msg6932.html#msg6932).
>> 
>> Cheers,
>> Kieren.
> 
> dB


\include inside function

2022-02-01 Thread Leo Correia de Verdier
Dear list!

Is there a way to have an \include inside a function?
In the attached file includeinfunction.ly the commented out line doesn’t work 
(probably for some very logical reason, but still unknown to me). Is there a 
way to work around that and have includes inside functions?

(The function in this case is indeed meaningless, in my real use case the 
function will hopefully construct midi files from the variables in the included 
files combined in different ways)

Thanks a lot!

/Leo


includeinfunction.ly
Description: Binary data


includetest.ily
Description: Binary data


Re: Object names for styling

2022-01-31 Thread Leo Correia de Verdier


> 31 jan. 2022 kl. 15:56 skrev Paulo Matos :
> 
> Ah - grobs is the technical term I needed.
> Where's the best place to find the available grobs that I can style?

https://lilypond.org/doc/v2.21/Documentation/internals/all-layout-objects

Here they are. It can sometimes be hard to figure witch one you’re looking for 
at what properties they are using. Look at the interfaces too!

Re: Transposing pitches in the lilypond file itself?

2022-01-12 Thread Leo Correia de Verdier
Depending on how you’ll use it \displayLilyMusic may also be useful. 

(Från telefonen)

> 12 jan. 2022 kl. 09:35 skrev Mark Knoop :
> 
> You might be interested in python-ly 
> (https://python-ly.readthedocs.io/en/latest/) which is actually written by 
> the Frescobaldi developers and used within it.
> 
> This provides a command-line tool that can do transposition (and more) and 
> shouldn't be too hard to use from within Emacs.
> 
> At 05:06 on 12 Jan 2022, Alasdair McAndrew wrote:
>> Thanks, Guy.
>> 
>> I use the Linux Emacs editor (which has a lilypond mode), and there might be 
>> something there, but I was just after a little advice - I have used 
>> Frescobaldi, but for me Emacs is faster and more efficient.
>> 
>> cheers,
>> Alasdair
>> 
>>> On Wednesday 12 January 2022 16:03:58 (+11:00), Guy Stalnaker wrote:
>>> 
>>> Alasdair,
>>> 
>>> Though it may not match your use, Frescobaldi, the LilyPond Editor, can do 
>>> this using one of its built-in features. In essence you specify the 
>>> interval to transpose when selecting the feature, e.g., "c d" would 
>>> transpose up a major 2nd.
>>> 
>>> Many on this list use other editors, but personally I cannot imagine 
>>> writing Lilypond without Frescobaldi given its features. For your purpose, 
>>> it might be worth an install simply to use the transpose feature?
>>> 
>>> If there are other ways of doing this in other editors, I'm sure list 
>>> subscribers will chime in.
>>> 
>>> Regards
>>> 
>>> --
>>> 
>>> “Happiness is the meaning and the purpose of life, the whole aim and end of 
>>> human existence.”
>>> 
>>> ― Aristotle
>>> 
>>> On Tue, Jan 11, 2022 at 10:27 PM Alasdair McAndrew  wrote:
 
 I'm not quite sure how to search online for this, hence my asking here. 
 I'm doing a little bit of arranging of some baroque pieces for specific 
 instruments, which usually requires some transposition. I can transpose 
 within the lilypond file so that the output score has the correct 
 (transposed) notes, but what I really want is to have the transposed notes 
 in the lilypond file itself. This means I can print out the score without 
 needing to transpose anything. So basically I want to change an input 
 from, say \transpose c,f {c d e f}
 
 to simply
 
 {f g a bf}
 
 In other words, I want the transposition in the file itself, not just in 
 the typeset output. Is there a way of doing this - maybe with an external 
 command (I'm using Linux)?
 
 Thank you very much,
 Alasdair
> --
> Mark Knoop
> 



Re: Beam slopes

2022-01-09 Thread Leo Correia de Verdier
Hi Yurij

If the question was rather about forcing the beam to be kneed you could do it 
like this:
(The auto-knee-gap should be less than the interval between the notes)

\version "2.22.0"
 
\new Score \new PianoStaff <<
\new Staff = "up" {
\once \override Beam.damping = #+inf.0
\once \override Beam.auto-knee-gap = #0
8
\change Staff = "down"
g8 fis g
\change Staff = "up"
\once \override Beam.damping = #+inf.0
8
\change Staff = "down"
e8 dis e
\change Staff = "up"
}
\new Staff = "down" {
\clef bass
% keep staff alive
s1
}
>>


> 9 jan. 2022 kl. 21:58 skrev Aaron Hill :
> 
> On 2022-01-09 12:30 pm, Виноградов Юрий wrote:
>> Hello. How to make a connecting beam at an angle of 90 degrees in this
>> code
> 
> Please review this thread [1] from last year, as I think you are looking for 
> the same behavior.
> 
> [1]: https://lists.gnu.org/archive/html/lilypond-user/2021-05/msg00078.html
> 
> 
> -- Aaron Hill
> 




Re: Start new piece without line break (with title)

2022-01-07 Thread Leo Correia de Verdier
Adding 

\once \override Staff.KeySignature. break-visibility = ##(#f #f #f)
\once \override Staff.Clef.break-visibility = ##(#f #f #f)
\once \omit Score.BarNumber

Together with \stopStaff helps avoids some of the strangeness if the new 
piece’s start happens to coincide with a line break. The spacing still looks a 
bit off though.


> 6 jan. 2022 kl. 23:14 skrev Valentin Petzel :
> 
> Hi Ruzsa,
> 
> Maybe this would be a slight improvement.
> Cheers,
> Valentin
> 
> Am Donnerstag, 6. Jänner 2022, 17:10:09 CET schrieb Ruzsa Krisztián:
>> Hi everyone,
>> 
>> I'd like to copy the layout of a small tune book. New pieces don't always
>> start in a new line, it usually occurs that the next song starts somewhere
>> in the middle of the line. Titles are placed before each piece (not above
>> the staff)
>> 
>> I found two helpful topics in the archive but couldn't find a solution for
>> properly adding a title for the new piece:
>> https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01027.html
>> https://www.mail-archive.com/lilypond-user@gnu.org/msg118603.html
>> 
>> I'm trying to change some notes (see attachment) to add a new title, but I'm
>> wondering if there's a nicer solution that can help me place the new title
>> more precisely (to match the first title that was added as an
>> "instrumentName").
>> 
>> Thank you in advance for any help.
>> 
>> Krisztián
\version "2.22.1" 

sample = {
	\key g \major
	c'1 \bar "|."

	\stopStaff
	\newSpacingSection
\partial 32
\once \override Rest.stencil = #ly:text-interface::print
	\once \override Rest.Y-extent = #grob::always-Y-extent-from-stencil
	\once \override Rest.Y-offset = #ly:self-alignment-interface::y-aligned-on-self
	\once \override Rest.X-extent = #'()
	\once \override Rest.self-alignment-Y = #CENTER
	\once \override Rest.minimum-distance = #0
	\once \override Rest.extra-spacing-width = #'(-7 . 2)
	\once \override Rest.text =
	\markup \center-column { "2." "Title" }
	r32 \noBreak
	\newSpacingSection

	\override Score.BreakAlignment.break-align-orders =
  	#(make-vector 3 '(left-edge
staff-bar
clef
	key-signature
time-signature
	))
	\bar ""
	\startStaff 
	\override Staff.Clef.full-size-change = ##t
	\set Staff.forceClef = ##t
	\clef treble
	\time 3/4
	\set Staff.printKeyCancellation = ##f
	\key f \major
	c'2.
	\bar "|."
}


\score { 
	\new Staff \with {
		instrumentName = \markup {
			\center-column {
"1."
"Title"
			}
		}
	}
	\sample
	\layout {}	
} 
> 



Re: slur crossing bar and time signature change

2021-12-24 Thread Leo Correia de Verdier
Hi J!

~ is not a slur, it's a tie, so that could be the reason it is not working.
https://lilypond.org/doc/v2.22/Documentation/learning/ties-and-slurs

If not, could you pleas post a minimal example for us to see what could be the 
issue?

Slurs across barlines and time signatures are not normally a problem, so I 
suppose there is something strange in the code.

Best!
/Leo


> 24 dec. 2021 kl. 19:14 skrev jh :
> 
> using 2.22 when I try to have a slur ~ across a barline and a time signature 
> change using fresco nothing happens.
> please direct me to a place in the manual that explains how to have this work.
> thanks
> j
> 
> -- 
> Thank you Sound & Silence
> 
> Beginning May 1, 2021 a new address; 1814 Lake Washington Blvd. So.,
> Seattle, Wa. 98144
> 
> _206-328-7694 or messages at 206-308-8189_
> 
> www.soundand.com
> 
> and an online short (45 minute) concert of new material on Wayward in Limbo
> 
> 
> https://www.waywardmusic.org/?p=6082
> 




Re: Combining notes and articualtions

2021-12-22 Thread Leo Correia de Verdier
Hi Valentin!

Thanks very much for your help!

How would I go about to make the function climb the music tree? (There are 
nested sequential music expressions, needed for another function to work)

Could I use for-some-music in some way?


> 21 dec. 2021 kl. 00:15 skrev Valentin Petzel :
> 
> Hello Leo,
> 
> Maybe something like this? Here we create a time table of articulations, and 
> then apply these articulations on music. This method does only handle flat 
> music for now. If there are nested constructs of consecutive music we’d need 
> to modify the function to basically walk the full music tree.
> 
> Cheers,
> Valentin#(define (moment->number mom)
   (let ((frac (moment->fraction mom)))
 (/ (car frac) (cdr frac

#(define (make-time-table music)
   (define (make-pairs list-of-music current-time)
 (if (null? list-of-music)
 '()
 (let* ((next (car list-of-music))
(mom (ly:music-length next))
(duration (moment->number mom))
(articulations (ly:music-property next 'articulations)))
   (cons (cons current-time articulations)
 (make-pairs (cdr list-of-music) (+ current-time duration))
   (make-pairs
(ly:music-property music 'elements)
0))

applyTable =
#(define-music-function (timetable music) (list? ly:music?)
   (define (apply-table list-of-music current-time current-timetable)
 (if (and (not (null? list-of-music)) (not (null? current-timetable)))
 (let* ((next-table-pair (car current-timetable))
(table-time (car next-table-pair))
(table-articulations (cdr next-table-pair))
(current-music (car list-of-music))
(current-articulations (ly:music-property current-music 'articulations))
(current-elements (ly:music-property current-music 'elements))
(current-mom (ly:music-length current-music))
(current-mom-num (moment->number current-mom))
(next-time (+ current-time current-mom-num))
(next-table current-timetable))
   (while (and (not (null? next-table)) (< (caar next-table) next-time))
  (set! next-table (cdr next-table)))
   (if (and (= current-time table-time)
(music-is-of-type? current-music 'note-event))
   (ly:music-set-property! current-music
   'articulations
   (append current-articulations table-articulations)))
   (if (and (= current-time table-time)
(music-is-of-type? current-music 'event-chord))
   (ly:music-set-property! current-music
   'elements
   (append current-elements table-articulations)))
   (apply-table (cdr list-of-music) next-time next-table
   (apply-table
(ly:music-property music 'elements)
0
timetable)
   music)

articulations = { s16_> s16_> s16 s16_. s16_- s8_> s16_! s8__ s8__ s16_.  s8_- s16_. }
#(define myTable (make-time-table articulations))
%#(display myTable)

<<
 \new RhythmicStaff \with { \override Script.Y-offset = #-1.7 } 
<< { s16_> s16_> s16 s16_. s16_- s8_> s16_! s8__ s8__ s16_.  s8_- s16_. }
  { f'16 16 16 16 16 8 16 8 8 16 8 16 } >>

% but also apply the first sequential expressions, with the articulations, to for instance

\new RhythmicStaff { c'8. 16 8. 16 8 r8 8. 16 }

% so that the result would be 

\new RhythmicStaff \with { instrumentName = "this method" }
\applyTable #myTable { c'8. 16 8. 16 8 r8 8. 16 }

\new RhythmicStaff { c'8._> 16-. 8._- 16_! 8__  r8 8.-. 16-. }

% or to 

\new RhythmicStaff {c'16 16 16 16 r8. 16 r8 16 16 r16 8. }

\new RhythmicStaff \with { instrumentName = "this method" }
\applyTable #myTable {c'16 16 16 16 r8. 16 r8 16 16 r16 8. }

% getting

\new RhythmicStaff {c'16_> 16_> 16 16_. r8. 16_! r8 16__ 16 r16 8._- }
>>> 



Re: Combining notes and articualtions

2021-12-21 Thread Leo Correia de Verdier
Sorry, It was my mistake, I was confusing what of my own code I was trying it 
on.

> 21 dec. 2021 kl. 09:03 skrev Jean Abou Samra :
> 
> Le 21/12/2021 à 00:12, Leo Correia de Verdier a écrit :
>> Thanks a lot!
>> 
>> It’s a perfect solution for the typesetting, but I wonder if it would be 
>> possible to process them earlier, so I could have them work with the 
>> articulate script or at least consistently affect midi playback.
> 
> 
> It may well be because am not fully clear-headed
> (due to a vaccination booster shoot), but I don't
> notice immediate problems with MIDI. Could you
> show an example?
> 
> Thanks,
> Jean




Re: Combining notes and articualtions

2021-12-20 Thread Leo Correia de Verdier
Thanks a lot!

It’s a perfect solution for the typesetting, but I wonder if it would be 
possible to process them earlier, so I could have them work with the articulate 
script or at least consistently affect midi playback.

Best wishes 
/Leo


> 20 dec. 2021 kl. 23:36 skrev Jean Abou Samra :
> 
> Le 20/12/2021 à 22:28, Leo Correia de Verdier a écrit :
>> Dear list!
>> 
>> Could you help me with a clever way to copy/clone the articulations from 
>> simultaneous notes in one sequential expression to another?
>> So that I could for instance enter the total articulations of a phrase as
>> 
>> \version "2.23.3"
>> 
>> <<
>>  \new RhythmicStaff \with { \override Script.Y-offset = #-1.7 }
>> << { s16_> s16_> s16 s16_. s16_- s8_> s16_! s8__ s8__ s16_.  s8_- s16_. }
>>   { f'16 16 16 16 16 8 16 8 8 16 8 16 } >>
>> 
>> % but also apply the first sequential expressions, with the articulations, 
>> to for instance
>> 
>> \new RhythmicStaff { c'8. 16 8. 16 8 r8 8. 16 }
>> 
>> % so that the result would be
>> 
>> \new RhythmicStaff { c'8._> 16-. 8._- 16_! 8__  r8 8.-. 16-. }
>> 
>> % or to
>> 
>> \new RhythmicStaff {c'16 16 16 16 r8. 16 r8 16 16 r16 8. }
>> 
>> % getting
>> 
>> \new RhythmicStaff {c'16_> 16_> 16 16_. r8. 16_! r8 16__ 16 r16 8._- }
>> Thanks a lot!
>> /Leo
> 
> 
> I'd do this:
> 
> \version "2.22.1"
> 
> \layout {
>   \override Voice.Script.before-line-breaking =
> #(lambda (grob)
>(let ((parent (ly:grob-parent grob X)))
>  (if (or (not (grob::has-interface parent 'note-column-interface))
>  (not (null? (ly:grob-object parent 'rest
>(ly:grob-suicide! grob
> }
> 
> articulations = { s16_> s16_> s16 s16_. s16_- s8_> s16_! s8__ s8__ s16_.  
> s8_- s16_. }
> 
> \new RhythmicStaff \with { \override Script.Y-offset = #-1.7 }
> \new Voice << \articulations { f'16 16 16 16 16 8 16 8 8 16 8 16 } >>
> 
> \new RhythmicStaff \new Voice << \articulations { c'8. 16 8. 16 8 r8 8. 16 } 
> >>
> 
> \new RhythmicStaff \new Voice << \articulations { c'16 16 16 16 r8. 16 r8 16 
> 16 r16 8. } >>
> 
> 
> Best,
> Jean
> 




Combining notes and articualtions

2021-12-20 Thread Leo Correia de Verdier
Dear list!

Could you help me with a clever way to copy/clone the articulations from 
simultaneous notes in one sequential expression to another?
So that I could for instance enter the total articulations of a phrase as

\version "2.23.3"

<<
 \new RhythmicStaff \with { \override Script.Y-offset = #-1.7 } 
<< { s16_> s16_> s16 s16_. s16_- s8_> s16_! s8__ s8__ s16_.  s8_- s16_. }
  { f'16 16 16 16 16 8 16 8 8 16 8 16 } >>

% but also apply the first sequential expressions, with the articulations, to 
for instance

\new RhythmicStaff { c'8. 16 8. 16 8 r8 8. 16 }

% so that the result would be 

\new RhythmicStaff { c'8._> 16-. 8._- 16_! 8__  r8 8.-. 16-. }

% or to 

\new RhythmicStaff {c'16 16 16 16 r8. 16 r8 16 16 r16 8. }

% getting

\new RhythmicStaff {c'16_> 16_> 16 16_. r8. 16_! r8 16__ 16 r16 8._- }
>> 

Thanks a lot!
/Leo


Re: Hide and replace a note with text

2021-12-08 Thread Leo Correia de Verdier
Add 
\once \omit Accidental
to the overrides before the questionmark-note

> 8 dec. 2021 kl. 21:09 skrev Rajesh Baskar :
> 
> 
> Thanks Lukas, it works, but for the accidentals. If you see the example code 
> below, is there a way to hide the sharp/flat signs also?
> 
> \version "2.22.0"
> 
> \language english
> 
> questionMark = \markup \general-align #Y #CENTER {
>   \fontsize #7 \with-color "#6A00F4" "?"
> }
> 
> \new Staff \with {
>   \omit TimeSignature
> }
> {
>   \cadenzaOn
>   \key c \major
>   \clef bass
>   f1 g 
>   a
>% comment to center the question mark
>   % on the actual notehead position:
>   \once \override NoteHead.Y-offset = 0
>   \once \override NoteHead.stencil =
>   #(lambda (grob) (grob-interpret-markup grob questionMark))
>   bf 
>   c'
>   \bar "||"
> } 
> 
> On 12/8/2021 11:30 AM, Lukas-Fabian Moser wrote:
>> PS. I made some other changes to your code, maybe some of them turn out to 
>> be helpful. 
>> 
>>> Am 08.12.21 um 20:29 schrieb Lukas-Fabian Moser: 
>>> Hi Dav, 
>>> 
 Am 08.12.21 um 19:50 schrieb Rajesh Baskar: 
 Can you hide and replace a note with a question mark? I kind of achieved 
 this with the below example. But the question mark is not in place of the 
 note, it appears below the staff. I can use \override 
 TextScript.extra-offset = #'(0 . 4.275) to achieve this but I don't want 
 to hard code the offset as the note to hide can appear anywhere on the 
 staff. 
>>> 
>>> You can exchange the note head by a markup: 
>>> 
>>> \version "2.22.0" 
>>> 
>>> \language english 
>>> 
>>> questionMark = \markup \general-align #Y #CENTER { 
>>>   \fontsize #7 \with-color "#6A00F4" "?" 
>>> } 
>>> 
>>> \new Staff \with { 
>>>   \omit TimeSignature 
>>> } 
>>> { 
>>>   \cadenzaOn 
>>>   \key c \major 
>>>   \clef bass 
>>>   f1 g 
>>>   % comment to center the question mark 
>>>   % on the actual notehead position: 
>>>   \once \override NoteHead.Y-offset = 0 
>>>   \once \override NoteHead.stencil = 
>>>   #(lambda (grob) (grob-interpret-markup grob questionMark)) 
>>>   a 
>>>   bf c' 
>>>   \bar "||" 
>>> } 
>>> 
>>> If you want to do this more often, you might define a shorthand (that then 
>>> should also contain a "\once \omit Stem" etc.) 
>>> 
>>> Lukas 


Re: Dotted \markup \note - tweaking the dot position

2021-12-03 Thread Leo Correia de Verdier
Hi Adam!

I don’t think you can use \note or \note-by-number any longer when you need 
finer control over the output. This snippet can serve as starting point for 
more advanced notes and music expressions in markup.
https://lsr.di.unimi.it/LSR/Item?id=1029

HTH
/Leo



> 3 dec. 2021 kl. 13:06 skrev Adam M. Griggs :
> 
> I hope you won't mind me bumping this question. It seems to have slipped 
> under radar.
> 
> Thank you!
> 
> On Mon, 22 Nov 2021, 11:37 Adam M. Griggs,  wrote:
> Hello again,
> 
> I'm working with version 2.23.4.
> 
> Looking at the documentation for \note and \note-by-number
> (https://lilypond.org/doc/v2.23/Documentation/notation/music), it
> lists style, flag-style and font-size as overridable if I'm reading it
> correctly.
> 
> In a dotted \markup \note, a dotted minim for example, is it possible
> for me to vertically shift the dot?




Re: How to change the alignment of the dashed line in \cresc

2021-11-30 Thread Leo Correia de Verdier
I would have expected

\override DynamicTextSpanner.bound-details.left.stencil-align-dir-y = #DOWN

to work, since I think that is the property to be changed, but it seems it 
needs a lower value, like

\override DynamicTextSpanner.bound-details.left.stencil-align-dir-y = #-2

To align properly.


> 30 nov. 2021 kl. 12:35 skrev Lib Lists :
> 
> Hello,
> I'm trying to change the vertical alignment of the dashed line so that
> it is at the same level with the bottom of the text 'cresc.', instead
> of being at the centre.
> 
> I checked the documentation for the DynamicTextSpanner but couldn't
> find the right property to change.
> 
> \version "2.22.1"
> {
>  c'1\cresc
>  d'
>  e'\ff
> }
> 
> Thank you for any hint!
> Cheers,
> Lib
> 




Re: Vertical space of a fragment of score inside a list

2021-11-25 Thread Leo Correia de Verdier
I think what you’re after, since you already have the vSpace in the markup is

 score-markup-spacing = #'((basic-distance . 0)
   (minimum-distance . 0)
   (stretchability . 0)
   (padding . 0))

in the paper block. Was that what you wanted?

You could also include the vSpace in the space between the score and markup, 
like 

#`((basic-distance . ,vSpace) …

Instead of putting it in the markup. There is also markup-system-spacing and 
markup-markup-spacing to play around with.

HTH
/Leo

> 25 nov. 2021 kl. 18:48 skrev Paolo Prete :
> 
> Hi all,
> 
> please consider the following snippet:
> 
> %%
> #(define vSpace 1.7)
> 
> \paper { ragged-last = ##f  }
> 
> \markup { "Text 1" }
> 
> \markup { \vspace #vSpace "Text 2" }
> 
> \score {
>   { c' d' e' f' }
>   \layout { indent = #0 ragged-last = ##t }
> }
> 
> \markup { \vspace #vSpace "Text 3" }
> 
> \markup { \vspace #vSpace "Text 4" }
> 
> \markup { \vspace #vSpace "Text 5" }
> %%
> 
> I need that the space between "text 3" and the score below "text 2" is 
> exactly #vSpace.  How can I do that?
> 
> Thanks!
> P
> 




Re: beamed stem lengths in pitch squash engraver

2021-11-24 Thread Leo Correia de Verdier
I see two possibilities, either a general 

\override Stem.no-stem-extend = ##t

Or setting a specific position for the beams in each variable, something like:

\override Beam.positions = #'(-4 . -4)

(Suggested values are 9, 4, -4, -9)

> 24 nov. 2021 kl. 04:50 skrev jerome talkington :
> 
> Hello, 
> Wondered what I need to do to get some of these beamed stem lengths to 
> conform like the rest of them. 
> I'd like to be able to shorten beamed stems that extend inward towards the 
> staff as well.
> Thanks!
> LT
> 
> \version "2.22.1"
> rhyHighDown = {
>   \override Stem.details.beamed-lengths = #'(2)
>   \set squashedPosition = #+13
>   \override Stem.direction = #DOWN
>   \override Stem.length = #3.5
>   \override NoteHead.style = #'slash
>   \override Accidental.stencil = ##f
>   \override NoteHead #'no-ledgers = ##t
>   \override Rest.Y-offset = #+6
> }
> 
> rhyHighUp = {
>   \override Stem.details.beamed-lengths = #'(2)
>   \set squashedPosition = #+13
>   \override Stem.direction = #UP
>   \override Stem.length = #3.5
>   \override NoteHead.style = #'slash
>   \override Accidental.stencil = ##f
>   \override NoteHead #'no-ledgers = ##t
>   \override Rest.Y-offset = #+6
> }
> 
> rhylowDown = {
>   \override Stem.details.beamed-lengths = #'(2)
>   \set squashedPosition = #-13
>   \override Stem.direction = #DOWN
>   \override Stem.length = #3.5
>   \override NoteHead.style = #'slash
>   \override Accidental.stencil = ##f
>   \override NoteHead #'no-ledgers = ##t
>   \override Rest.Y-offset = #-6
> }
> 
> rhylowUp = {
>   \override Stem.details.beamed-lengths = #'(2)
>   \set squashedPosition = #-13
>   \override Stem.direction = #UP
>   \override Stem.length = #3.5
>   \override NoteHead.style = #'slash
>   \override Accidental.stencil = ##f
>   \override NoteHead #'no-ledgers = ##t
>   \override Rest.Y-offset = #-6
> }
> \new Voice \with { 
>  \consists "Pitch_squash_engraver"
>  }
> {
>   \rhyHighUp c4 d ees8 fis g a
>   \rhyHighDown c4 d ees8 fis g a
>   \rhylowUp c4 d ees8 fis g a
>   \rhylowDown c4 d ees8 fis g a
> }
> 


beamed-length.pdf
Description: Adobe PDF document
> 



  1   2   >