Re: Setting \compressEmpryMeasures globally

2021-08-07 Thread Brent Annable
Damn, I was sure I tried all of them.

Oh well, thanks for the reply, and sorry for the bother :-S

Brent.

On Sun, 8 Aug 2021 at 15:22, Jean Abou Samra  wrote:

> Le 08/08/2021 à 07:15, Brent Annable a écrit :
> > Hi all,
> >
> > Just a quick question: I'm currently re-using some vocal music files
> > I've set to create instrumental parts. I have all the notes stored as
> > variables in separate files, and am working in a parent file to create
> > the instrumental parts. I want to introduce a \compressEmptyMeasures
> > command somewhere in my parent file without having to mess with the
> > notes files, but I can't seem to find a way to do it. I've read
> > through the documentation, I've tried putting it into \Score, \Staff
> > and \Voice contexts in the \layout block, I've tried \with {
> > \compressEmptyMeasures}, but nothing seems to work.
> >
> > Is there a way to set this globally somehow, or at least without
> > having to paste it dozens of times into the individual voice files?
> >
> > Many thanks,
> >
> > Brent.
>
>
> In \layout { \context { \Score ... } }, it should work fine. What am I
> missing?
>
>
> \version "2.22.1"
>
> \layout {
>\context {
>  \Score
>  \compressEmptyMeasures
>}
> }
>
> { R1*30 }
>
>
> Best,
> Jean
>


Re: Setting \compressEmpryMeasures globally

2021-08-07 Thread Jean Abou Samra

Le 08/08/2021 à 07:15, Brent Annable a écrit :

Hi all,

Just a quick question: I'm currently re-using some vocal music files 
I've set to create instrumental parts. I have all the notes stored as 
variables in separate files, and am working in a parent file to create 
the instrumental parts. I want to introduce a \compressEmptyMeasures 
command somewhere in my parent file without having to mess with the 
notes files, but I can't seem to find a way to do it. I've read 
through the documentation, I've tried putting it into \Score, \Staff 
and \Voice contexts in the \layout block, I've tried \with { 
\compressEmptyMeasures}, but nothing seems to work.


Is there a way to set this globally somehow, or at least without 
having to paste it dozens of times into the individual voice files?


Many thanks,

Brent.



In \layout { \context { \Score ... } }, it should work fine. What am I 
missing?



\version "2.22.1"

\layout {
  \context {
    \Score
    \compressEmptyMeasures
  }
}

{ R1*30 }


Best,
Jean



Re: Beam angle with whole-note tremolos

2021-08-07 Thread Jean Abou Samra




Le 08/08/2021 à 02:25, Knute Snortum a écrit :

Hi everyone.

I've run into a problem that seems to be an old issue: the angle of
the beams between a whole-note tremolo is horizontal, but should be
tilted slightly.

https://gitlab.com/lilypond/lilypond/-/issues/318

My question is how to fix this in the source file.  Is there a way to
manually adjust the tilt of a beam? I suspect there is but I'm having
no luck finding it. Or maybe there's another way to get around the
problem. Any suggestions are welcome.


For example:

\version "2.22.1"

{
  \override Beam.positions = #'(1 . 1.5)
  #(ly:expect-warning (_ "weird stem size, check for narrow beams"))
  \repeat tremolo 32 { g64 a'' }
}

See http://lilypond.org/doc/v2.23/Documentation/internals/beam

Best,
Jean



Setting \compressEmpryMeasures globally

2021-08-07 Thread Brent Annable
Hi all,

Just a quick question: I'm currently re-using some vocal music files I've
set to create instrumental parts. I have all the notes stored as variables
in separate files, and am working in a parent file to create the
instrumental parts. I want to introduce a \compressEmptyMeasures command
somewhere in my parent file without having to mess with the notes files,
but I can't seem to find a way to do it. I've read through the
documentation, I've tried putting it into \Score, \Staff and \Voice
contexts in the \layout block, I've tried \with { \compressEmptyMeasures},
but nothing seems to work.

Is there a way to set this globally somehow, or at least without having to
paste it dozens of times into the individual voice files?

Many thanks,

Brent.


Re: how to write an extended dim and cresc (text, not hairpins) , like a trillSpan?

2021-08-07 Thread Kenneth Wolcott
Yes, thank you for clarifying that for me!

On Sat, Aug 7, 2021 at 2:57 PM Mogens Lemvig Hansen  wrote:
>
> Isn’t that exactly what Lilypond’s \cresc does?  Just don’t redefine it.
>
> http://lilypond.org/doc/v2.22/Documentation/notation/expressive-marks-attached-to-notes#index-_005ccresc
>
>
>
> Regards,
>
> Mogens
>
>
>
>
>
> From: Kenneth Wolcott
> Sent: August 7, 2021 14:15
> To: Lily Pond
> Subject: how to write an extended dim and cresc (text, not hairpins) ,like a 
> trillSpan?
>
>
>
> Hi;
>
>
>
> How to write an extended dim and cresc (text, not hairpins) ,like a trillSpan?
>
>
>
> I have attached screenshots of the original music I am transcribing
>
> from to show what I am trying to engrave.
>
>
>
> I have the following macros defined:
>
>
>
> cresc = _\markup \italic "cresc."
>
> dimin = _\markup \italic "dimin."
>
>
>
> I tried adding a dash to the end of the quoted text in each macro.  I
>
> got an error that there was no terminating of the macro (I don't
>
> remember the text text of the error message).
>
>
>
> Where do I look in the manual for this long extension (span?) of the
>
> expressive mark?
>
>
>
> Thanks,
>
> Ken Wolcott
>
>



Beam angle with whole-note tremolos

2021-08-07 Thread Knute Snortum
Hi everyone.

I've run into a problem that seems to be an old issue: the angle of
the beams between a whole-note tremolo is horizontal, but should be
tilted slightly.

https://gitlab.com/lilypond/lilypond/-/issues/318

My question is how to fix this in the source file.  Is there a way to
manually adjust the tilt of a beam? I suspect there is but I'm having
no luck finding it. Or maybe there's another way to get around the
problem. Any suggestions are welcome.

--
Knute Snortum



Re: Placement of dynamic hairpins under chords with seconds

2021-08-07 Thread Knute Snortum
On Sat, Aug 7, 2021 at 10:50 AM Timothy Lanfear  wrote:
>
> On 07/08/2021 14:33, Knute Snortum wrote:
> > On Sat, Aug 7, 2021 at 12:12 AM Brian Barker  
> > wrote:
> >> At 11:59 06/08/2021 -0700, Knute Snortum wrote:
> >>> I have a minor quibble. If you have a dynamic hairpin under a chord
> >>> with a second interval, the hairpin extends a little to the left (to
> >>> cover the whole chord?)  I think it should only extend to the stem.
> >>> I'm not an expert in engraving but the sheet music I've seen seems
> >>> to back this up. What do you guys think?
> >> Does Elaine Gould count as a "guy"? She says "A hairpin should start
> >> at the first relevant notehead (not accidental) and end with the
> >> following notehead or at the first rest thereafter. Good practice is
> >> to start the hairpin on the left-hand edge of the note and to finish
> >> it on the right-hand edge of a note" (Behind Bars, p. 104). She
> >> doesn't include examples of what she calls "adjacent-note chords",
> >> but her examples of notes with stems up show the hairpins starting at
> >> the left of the first notehead, not the stem. If you put \stemUp into
> >> your second example, you will see that Lilypond follows this principle.
> >>
> >> Brian Barker
> > Thanks for your insight into this.  I guess LilyPond is "doing the
> > standard thing," as usual. Hairpins to the left it is!
>
> Version 2.23 has a new feature to configure the start and end alignment
> of hairpins.
> http://lilypond.org/doc/v2.23/Documentation/notation/expressive-marks-attached-to-notes#dynamics
> in the Selected Snippets section.
>
>
> --
> Timothy Lanfear, Bristol, UK.
>

Thanks!

--
Knute Snortum



Re: how to write an extended dim and cresc (text, not hairpins) , like a trillSpan?

2021-08-07 Thread Thomas Morley
Am Sa., 7. Aug. 2021 um 23:20 Uhr schrieb Aaron Hill :
>
> On 2021-08-07 2:14 pm, Kenneth Wolcott wrote:
> > How to write an extended dim and cresc (text, not hairpins) ,like a
> > trillSpan?
> > [ . . . ]
> > Where do I look in the manual for this long extension (span?) of the
> > expressive mark?
>
> Text spanners [1] should be what you need.
>
> [1]:
> http://lilypond.org/doc/v2.22/Documentation/notation/writing-text#text-spanners
>
>
> -- Aaron Hill
>
I'd go directly for \cresc and friends. See:
http://lilypond.org/doc/v2.22/Documentation/notation/expressive-marks-attached-to-notes#dynamics

Cheers,
  Harm



Re: how to write an extended dim and cresc (text, not hairpins) , like a trillSpan?

2021-08-07 Thread Kenneth Wolcott
Thank you, Aaron!

On Sat, Aug 7, 2021 at 2:20 PM Aaron Hill  wrote:
>
> On 2021-08-07 2:14 pm, Kenneth Wolcott wrote:
> > How to write an extended dim and cresc (text, not hairpins) ,like a
> > trillSpan?
> > [ . . . ]
> > Where do I look in the manual for this long extension (span?) of the
> > expressive mark?
>
> Text spanners [1] should be what you need.
>
> [1]:
> http://lilypond.org/doc/v2.22/Documentation/notation/writing-text#text-spanners
>
>
> -- Aaron Hill



Re: how to write an extended dim and cresc (text, not hairpins) , like a trillSpan?

2021-08-07 Thread Aaron Hill

On 2021-08-07 2:14 pm, Kenneth Wolcott wrote:
How to write an extended dim and cresc (text, not hairpins) ,like a 
trillSpan?

[ . . . ]
Where do I look in the manual for this long extension (span?) of the
expressive mark?


Text spanners [1] should be what you need.

[1]: 
http://lilypond.org/doc/v2.22/Documentation/notation/writing-text#text-spanners



-- Aaron Hill



Re: how to write an extended dim and cresc (text, not hairpins) , like a trillSpan?

2021-08-07 Thread Kenneth Wolcott
BTW, I'm on Lilypond 2.22 (it looks like I see something different in
2.23 regarding dim and cresc being Lilypond commands now?)

On Sat, Aug 7, 2021 at 2:14 PM Kenneth Wolcott  wrote:
>
> Hi;
>
> How to write an extended dim and cresc (text, not hairpins) ,like a trillSpan?
>
> I have attached screenshots of the original music I am transcribing
> from to show what I am trying to engrave.
>
> I have the following macros defined:
>
> cresc = _\markup \italic "cresc."
> dimin = _\markup \italic "dimin."
>
> I tried adding a dash to the end of the quoted text in each macro.  I
> got an error that there was no terminating of the macro (I don't
> remember the text text of the error message).
>
> Where do I look in the manual for this long extension (span?) of the
> expressive mark?
>
> Thanks,
> Ken Wolcott



Re: Problem with blackpetrucci

2021-08-07 Thread Kees van den Doel
One more thing, if I add a \midi {} block I get warnings :

mintty screen dump

testblack.ly:11:5: warning: cannot create context: BlackMensuralStaff
= cantus
   \new BlackMensuralStaff = "cantus"<<
testblack.ly:13:7: warning: cannot create
context: BlackMensuralVoice = cantus
 \new
BlackMensuralVoice = "cantus" {
blackmensural.ly:369:37: In procedure list-ref in expression (list-ref
notes imiddle):
  blackmensural.ly:369:37: Argument 2 out of range: 0


On Sat, Aug 7, 2021 at 9:41 AM Kees van den Doel  wrote:

> Great, you are updating it!
> Yes ligatures and accidentals didn't work. I mixed in normal LP ones but
> it looks very ugly.
>
> I had some questions I sent to your email on your webpage but it bounced:
>
> Is there a way to control the size of the notes and other things? I want
> to perform directly from the original notation but I can't seem to scale
> the size up. Also I managed to use your mix in special caudata notes into
> modern scores but their size doesn't match and doesn't scale.
>
> Another question I have is how to mix normal staffs with BlackMensural
> staffs in one StaffGroup. I want to have a blackmensural staff above the
> modern transcription staff but when I add a BlackMensural staff at the top
> it always appears below all the other normal Staffs.
>
> Cheers,
> Kees
>
>
>
> 
>  Virus-free.
> www.avg.com
> 
> <#m_3636495005714445093_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
>
> On Sat, Aug 7, 2021 at 4:53 AM Lukas-Fabian Moser  wrote:
>
>> Hi Kees,
>> Am 06.08.21 um 19:07 schrieb Kees van den Doel:
>>
>>
>>
>> On Thu, Aug 5, 2021 at 8:39 PM Kees van den Doel 
>> wrote:
>>
>>> But there's also blackmensural.ly by Lukas Pietsch; it's quite old (and
 to be honest I don't know it at all and can't say how it deals with your
 problem), but maybe it's of use to you:
 http://www.lukas-pietsch.de/Music/

>>>
>>> I got everything to work fine, except the special note shapes.
>>> Interestingly the blackmensural. pdf is
>>> illustrated with the begin of the same piece I'm typesetting and has those
>>> note shapes perfectly.
>>>
>>> Unfortunately it doesn't work with 2.22 and convert-ly gives a long list
>>> of errors to fix manually which is beyond my capability.
>>>
>>
>> Actually, despite getting many warnings like below, blackmensural.ly
>> seems to work fine. It's actually quite wonderful and complete and has
>> everything one needs to typeset music from before ~1450.
>>
>> Actually, I _think_ the ligature code cannot have worked with 2.22; did
>> you try it? (It relied on ancient LilyPond's habit of wrapping everything
>> in EventChords.)
>>
>> I had time now to look through blackmensural.ly and update it a bit to
>> accomodate for part of what's changed in LilyPond in the last ten years.
>> Now it compiles without complaints on my 2.22.0, see attached.
>>
>> And oh gosh golly, has LilyPond's scheme integration simplified over that
>> time! (I think thanks to David K.) Behold: Instead of
>>
>>  (make-music
>>'ContextSpeccedMusic
>>'context-type 'Staff
>>'element
>>  (make-music
>>'SequentialMusic
>>'elements (list
>>  (make-music
>>'OverrideProperty
>>'symbol 'Clef
>>'grob-property-path (list 'stencil)
>>'grob-value mystencil)
>>  (make-music; dummy setting
>>'PropertySet
>>'symbol 'clefGlyph
>>'value "clefs.C")
>>  (make-music
>>'PropertySet
>>'symbol 'middleCClefPosition
>>'value midCpos)
>>  (make-music
>>'PropertySet
>>'symbol 'clefPosition
>>'value linepos)
>>  (make-music
>>'ApplyContext
>>'procedure ly:set-middle-C!)
>>   )))
>>
>> we may now write
>>
>> #{
>>   \context Staff {
>> \override Staff.Clef.stencil = #mystencil
>> \set Staff.clefGlyph = "clefs.C"
>> \set Staff.middleCClefPosition = #midCpos
>> \set Staff.clefPosition = #linepos
>> \applyContext #ly:set-middle-C!
>>   }
>> #}
>>
>> (maybe this would have partly worked in 2.12, but if I understand in
>> correctly, there used to be issues regarding _when_ integrated Lilypond
>> code is being interpreted).
>>
>> I can't guarantee that there won't arise subtle problems (spacing
>> differences, features I didn't test yet etc., especially since I also had
>> to "update" some things that I didn't fully understand), but at least it
>> should be a 

Re: Note columns too close

2021-08-07 Thread Knute Snortum
Thank you both, those suggestions work well.

--
Knute Snortum



Re: Differentiate between including and direct compiling a file

2021-08-07 Thread Aaron Hill

On 2021-08-07 11:52 am, R. Padraic Springuel wrote:

Is there a way for Lilypond to differentiate between a file which is
being compiled directly and it being included in the compilation of
another file?  Something equivalent to `if __name__ == “__main__”`
from python?  I’d like to add simple examples to my various tools that
I can use to test it (both during original development and after an
update which breaks something) and remind me of what the tool does
when I haven’t used it in a while. Ideally, I’d hide these examples
inside a construction like this so that the example output is only
produced when the tool file is compiled directly.


Perhaps something like this:


\version "2.22.0"

ifCompiledDirectly =
#(define-scheme-function (scm) (scheme?)
  (let ((file (car (ly:input-file-line-char-column (*location*)
   (if (member file (command-line)) scm)))

\ifCompiledDirectly \markup "Compiled directly..."
\ifCompiledDirectly \score { { b'4 4 2 } }


The logic is simple: check to see if the command-line arguments contain 
the name of the file being processed.



-- Aaron Hill



Differentiate between including and direct compiling a file

2021-08-07 Thread R. Padraic Springuel
Is there a way for Lilypond to differentiate between a file which is being 
compiled directly and it being included in the compilation of another file?  
Something equivalent to `if __name__ == “__main__”` from python?  I’d like to 
add simple examples to my various tools that I can use to test it (both during 
original development and after an update which breaks something) and remind me 
of what the tool does when I haven’t used it in a while. Ideally, I’d hide 
these examples inside a construction like this so that the example output is 
only produced when the tool file is compiled directly. 

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

PAX ☧ ΧΡΙΣΤΟΣ


Re: Note columns too close

2021-08-07 Thread ole


> Am 07.08.2021 um 18:47 schrieb Knute Snortum :
> 
> I'm engraving a musical figure with 16 notes in one voice and an eight
> note with an accidental in the other. MWE:
> 
> %%%
> \version "2.23.3"
> \language "english"
> 
> \relative c'' {
>  << { ff16 ( bf ) } \\ { df,8 } >> 8
> }
> %%%
> 
> The  chord seems way too close to the bf (see attachment). Is
> there a work-around?  Is there a better way to write this?
> 
> --
> Knute Snortum
> 

Don't know if this helps but I use proportional notation a lot..
You have to play with the value thought

best

ole

%%
\version "2.22.1"

\language "english"

\relative c'' {
 << { ff16 ( bf ) } \\ { df,8 } >> 8
}

 
\layout {
\context { \Score

 proportionalNotationDuration = #(ly:make-moment 1/20)
}}
%%




Re: Placement of dynamic hairpins under chords with seconds

2021-08-07 Thread Timothy Lanfear

On 07/08/2021 14:33, Knute Snortum wrote:

On Sat, Aug 7, 2021 at 12:12 AM Brian Barker  wrote:

At 11:59 06/08/2021 -0700, Knute Snortum wrote:

I have a minor quibble. If you have a dynamic hairpin under a chord
with a second interval, the hairpin extends a little to the left (to
cover the whole chord?)  I think it should only extend to the stem.
I'm not an expert in engraving but the sheet music I've seen seems
to back this up. What do you guys think?

Does Elaine Gould count as a "guy"? She says "A hairpin should start
at the first relevant notehead (not accidental) and end with the
following notehead or at the first rest thereafter. Good practice is
to start the hairpin on the left-hand edge of the note and to finish
it on the right-hand edge of a note" (Behind Bars, p. 104). She
doesn't include examples of what she calls "adjacent-note chords",
but her examples of notes with stems up show the hairpins starting at
the left of the first notehead, not the stem. If you put \stemUp into
your second example, you will see that Lilypond follows this principle.

Brian Barker

Thanks for your insight into this.  I guess LilyPond is "doing the
standard thing," as usual. Hairpins to the left it is!


Version 2.23 has a new feature to configure the start and end alignment 
of hairpins. 
http://lilypond.org/doc/v2.23/Documentation/notation/expressive-marks-attached-to-notes#dynamics 
in the Selected Snippets section.



--
Timothy Lanfear, Bristol, UK.




success with lilypond-book

2021-08-07 Thread Archer Endrich

To David, Knute and Carl,

I am happy to report success with running lilypond-book on Windows 10.  
For users' info, these are the steps I took, as guided by David, Knute 
and Carl.  It is hard to tell at this point whether it would have worked 
if one or the other of these steps had been omitted.


a) downloaded and installed Python version 3.9 (although 3.6 seemed to 
be on the system already)
b) downloaded and installed MiKTeX  (i.e., pdflatex now on my Windows 10 
computer)
c) rearranged the LilyPond files to be inside a folder named LilyPond;  
thus the file arrangement became: C:\Lilypond2221\LilyPond\user\bin;  
then edited the system path accordingly.  My full system path now looks 
like this:


C:\P3L\lpbk>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Lilypond2221\LilyPond\usr\bin;C:\cdpr71ae\_cdp\_cdprogs;C:\Users\Archer\AppData\Local\Microsoft\WindowsApps;C:\MiKTeX\miktex\bin\x64\

d) associated Python with lilypond-book.py - The link Knute sent about 
this was very helpful: 
https://www.digitaltrends.com/computing/how-to-change-file-associations/



I first ran lilypond-book manually direct from the command line like this:
>python C:\Lilypond2221\LilyPond\user\bin\lilypond-book.py --output=out 
-- pdf ALMdurasnumber.lytex

[msg:  compiling ALMdurasnumber.lytex ... writing ALMdurasnumber.tex]
>cd out
>pdflatex ALMdurasnumber.tex
[msg:  output written on ALMdurasnumber.pdf]

I then tried running from a batch file in various ways:
Trial 1:
C:\Lilypond2221\LilyPond\user\bin\lilypond-book.py --output=out -- pdf 
ALMdurasnumber.lytex

cd out
pdflatex ALMdurasnumber.tex
cd ..\
This was successful.

Trial 2: the same, but without the .py extension on lilypond-book
This was successful.

Trial 3: the same, but without the explicit path to lilypond-book
This was also successful.

So I'm up and running with lilypond-book (with my batchfile as I had 
been writing it on Windows 7) thanks to all the various help/clues that 
were contributed.  The final batch file is:


C:\lilypond-book --output=out --pdf ALMdurasnumber.lytex
cd out
pdflatex ALMdurasnumber.tex
cd ..\


I hope this information helps others who might find themselves in a 
situation similar to mine.


Huge thanks!
Archer




Re: barline

2021-08-07 Thread Kees van den Doel
Thanks!

On Sat, Aug 7, 2021 at 1:53 AM Lukas-Fabian Moser  wrote:

> Hi Kees,
>
> Am 07.08.21 um 08:12 schrieb Kees van den Doel:
> > How can I get all barlines to look like ticks?   As in \bar "'".
> > I got from manual
> >
> > \set Staff.whichBar = "'"
> >
> > but that puts a bar between every note.
> >
> > \override BarLine.glyph = #"'"
>
> That's the final information in
> https://lilypond.org/doc/v2.22/Documentation/notation/bars.html#bar-lines
> :
>
> \version "2.22.0"
>
> \layout {
>\set Timing.defaultBarType = "'"
> }
>
> {
>\repeat unfold 100 c'4
> }
>
> Lukas
>
>


Re: Problem with blackpetrucci

2021-08-07 Thread Kees van den Doel
Great, you are updating it!
Yes ligatures and accidentals didn't work. I mixed in normal LP ones but it
looks very ugly.

I had some questions I sent to your email on your webpage but it bounced:

Is there a way to control the size of the notes and other things? I want to
perform directly from the original notation but I can't seem to scale the
size up. Also I managed to use your mix in special caudata notes into
modern scores but their size doesn't match and doesn't scale.

Another question I have is how to mix normal staffs with BlackMensural
staffs in one StaffGroup. I want to have a blackmensural staff above the
modern transcription staff but when I add a BlackMensural staff at the top
it always appears below all the other normal Staffs.

Cheers,
Kees



Virus-free.
www.avg.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


On Sat, Aug 7, 2021 at 4:53 AM Lukas-Fabian Moser  wrote:

> Hi Kees,
> Am 06.08.21 um 19:07 schrieb Kees van den Doel:
>
>
>
> On Thu, Aug 5, 2021 at 8:39 PM Kees van den Doel  wrote:
>
>> But there's also blackmensural.ly by Lukas Pietsch; it's quite old (and
>>> to be honest I don't know it at all and can't say how it deals with your
>>> problem), but maybe it's of use to you:
>>> http://www.lukas-pietsch.de/Music/
>>>
>>
>> I got everything to work fine, except the special note shapes.
>> Interestingly the blackmensural. pdf is
>> illustrated with the begin of the same piece I'm typesetting and has those
>> note shapes perfectly.
>>
>> Unfortunately it doesn't work with 2.22 and convert-ly gives a long list
>> of errors to fix manually which is beyond my capability.
>>
>
> Actually, despite getting many warnings like below, blackmensural.ly
> seems to work fine. It's actually quite wonderful and complete and has
> everything one needs to typeset music from before ~1450.
>
> Actually, I _think_ the ligature code cannot have worked with 2.22; did
> you try it? (It relied on ancient LilyPond's habit of wrapping everything
> in EventChords.)
>
> I had time now to look through blackmensural.ly and update it a bit to
> accomodate for part of what's changed in LilyPond in the last ten years.
> Now it compiles without complaints on my 2.22.0, see attached.
>
> And oh gosh golly, has LilyPond's scheme integration simplified over that
> time! (I think thanks to David K.) Behold: Instead of
>
>  (make-music
>'ContextSpeccedMusic
>'context-type 'Staff
>'element
>  (make-music
>'SequentialMusic
>'elements (list
>  (make-music
>'OverrideProperty
>'symbol 'Clef
>'grob-property-path (list 'stencil)
>'grob-value mystencil)
>  (make-music; dummy setting
>'PropertySet
>'symbol 'clefGlyph
>'value "clefs.C")
>  (make-music
>'PropertySet
>'symbol 'middleCClefPosition
>'value midCpos)
>  (make-music
>'PropertySet
>'symbol 'clefPosition
>'value linepos)
>  (make-music
>'ApplyContext
>'procedure ly:set-middle-C!)
>   )))
>
> we may now write
>
> #{
>   \context Staff {
> \override Staff.Clef.stencil = #mystencil
> \set Staff.clefGlyph = "clefs.C"
> \set Staff.middleCClefPosition = #midCpos
> \set Staff.clefPosition = #linepos
> \applyContext #ly:set-middle-C!
>   }
> #}
>
> (maybe this would have partly worked in 2.12, but if I understand in
> correctly, there used to be issues regarding _when_ integrated Lilypond
> code is being interpreted).
>
> I can't guarantee that there won't arise subtle problems (spacing
> differences, features I didn't test yet etc., especially since I also had
> to "update" some things that I didn't fully understand), but at least it
> should be a good starting point for further work.
>
> Lukas
>


Re: Note columns too close

2021-08-07 Thread Jean Abou Samra

Le 07/08/2021 à 17:47, Knute Snortum a écrit :

I'm engraving a musical figure with 16 notes in one voice and an eight
note with an accidental in the other. MWE:

%%%
\version "2.23.3"
\language "english"

\relative c'' {
   << { ff16 ( bf ) } \\ { df,8 } >> 8
}
%%%

The  chord seems way too close to the bf (see attachment). Is
there a work-around?  Is there a better way to write this?

--
Knute Snortum



Perhaps

\version "2.22.1"
\language "english"

\relative c'' {
  << { ff16 ( bf ) } \\ { df,8 } >>
  \tweak Accidental.extra-spacing-height #'(-inf.0 . +inf.0) 8
}

An explanation is found at
https://lilypond.org/doc/v2.23/Documentation/internals/user-backend-properties

Best,
Jean




Note columns too close

2021-08-07 Thread Knute Snortum
I'm engraving a musical figure with 16 notes in one voice and an eight
note with an accidental in the other. MWE:

%%%
\version "2.23.3"
\language "english"

\relative c'' {
  << { ff16 ( bf ) } \\ { df,8 } >> 8
}
%%%

The  chord seems way too close to the bf (see attachment). Is
there a work-around?  Is there a better way to write this?

--
Knute Snortum


Re: Printing two staves in the same place (overlaying)

2021-08-07 Thread Aaron Hill

On 2021-08-07 2:38 am, Daniel Benjamin Miller wrote:

Thanks, Silvain, but let me clarify. I want two staffs to actually be
placed in the same exact spot. So, for instance, the five lines of
each staff should be engraved in the same spot --- but everything
within the staff should be "unaware" of this fact.


You have a few options, depending on the degree of alignment you do want 
between the staves.



\version "2.22.0"

staffI = \new Staff \fixed c' { g4 a b a8 g | fis4 e f2 }
staffII = \new Staff \fixed c'' { c2 d4 b, | c4 d bes,2 }

zeroSpacing = \with {
  \override VerticalAxisGroup.staff-staff-spacing =
  #'((basic-distance . 0) (minimum-distance . 0)
 (padding . -inf.0) (stretchability . 0))
}

\new StaffGroup \with \zeroSpacing << \staffI \staffII >>

\markup \overlay {
  \with-color #red \score { \staffI }
  \with-color #blue \score { \staffII }
}


The first approach above eliminates spacing by using an extremely 
negative padding to permit overlapping staves within a system.  The 
second approach uses \markup to overlap the stencils from two scores.


With the first option, there is still general time alignment between the 
systems, which if you do want measures to line up, that would be the way 
to go.  With the second, each staff is completely isolated from one 
another.  In the example above, I added color to each staff so you can 
better see the effect.



-- Aaron Hill

Re: Placement of dynamic hairpins under chords with seconds

2021-08-07 Thread Knute Snortum
On Sat, Aug 7, 2021 at 12:12 AM Brian Barker  wrote:
>
> At 11:59 06/08/2021 -0700, Knute Snortum wrote:
> >I have a minor quibble. If you have a dynamic hairpin under a chord
> >with a second interval, the hairpin extends a little to the left (to
> >cover the whole chord?)  I think it should only extend to the stem.
> >I'm not an expert in engraving but the sheet music I've seen seems
> >to back this up. What do you guys think?
>
> Does Elaine Gould count as a "guy"? She says "A hairpin should start
> at the first relevant notehead (not accidental) and end with the
> following notehead or at the first rest thereafter. Good practice is
> to start the hairpin on the left-hand edge of the note and to finish
> it on the right-hand edge of a note" (Behind Bars, p. 104). She
> doesn't include examples of what she calls "adjacent-note chords",
> but her examples of notes with stems up show the hairpins starting at
> the left of the first notehead, not the stem. If you put \stemUp into
> your second example, you will see that Lilypond follows this principle.
>
> Brian Barker

Thanks for your insight into this.  I guess LilyPond is "doing the
standard thing," as usual. Hairpins to the left it is!



Re: Problem with blackpetrucci

2021-08-07 Thread Lukas-Fabian Moser



I can't guarantee that there won't arise subtle problems (spacing 
differences, features I didn't test yet etc., especially since I also 
had to "update" some things that I didn't fully understand), but at 
least it should be a good starting point for further work. 


I should add that

1) there's plenty of room left for streamlining the blackmensural.ly 
code using features of current LilyPond,


2) given the most recent developments regarding use of Cairo, I would 
expect that in the long run, the heavy use of embedded PostScript in 
blackmensural.ly will become a problem (should LilyPond ever switch to 
Cairo for the default, or even only, backend).


Lukas




translation-type? vs. backend-type?

2021-08-07 Thread Lukas-Fabian Moser

Hi,

this is probably a very stupid question.

During my work on updating blackmensural.ly I had to deal with custom 
grob and context properties. The original source for 2.12 did the following:


%% === %  declaring some 
custom properties %% === %% 
custom NoteHead property, for \override-able notehead style definitions 
#(set-object-property! 'mensural_glyphs 'backend-type? list?) 
#(set-object-property! 'mensural_glyphs 'backend-doc "current set of 
mensural display settings") %% custom Voice context property, needed for 
ligature assembly #(set-object-property! 'mensural_ligature_queue 
'backend-type? list?) #(set-object-property! 'mensural_ligature_queue 
'backend-doc "current set of note grobs to be assembled into a 
ligature") #(set-object-property! 'mensural_accidentals_queue 
'backend-type? list?) #(set-object-property! 'mensural_accidentals_queue 
'backend-doc "current set of accidentals to be collected for a 
ligature") %% custom entry in an event's 'tweak property 
#(set-object-property! 'mensural_tags 'backend-type? list?) 
#(set-object-property! 'mensural_tags 'backend-doc "various tags set in 
a notehead tweak to control mensural note display")


The actual code then accessed

a) mensural_glyphs with what amounts to \override 
NoteHead.mensural_glyphs = ... b) mensural_ligature_queue with 
(ly:context-property some-context 'mensural_ligature_queue) and (what 
amounts to) \set mensural_ligature_queue = ... c) mensural_tags with 
(ly:grob-property some-note 'mensural_tags) (and in a tweak).


Part b) failed with current LilyPond: "can't find property type-check 
for `instrument' (translation-type?)" (I'm not sure if a) and c) work or 
just were not being in an active code path).


Now, looking at scm/define-context-properties.scm and 
scm/define-grob-properties.scm that there seems to be a distinction:


- Context properties (\set'table) are defined via (set-object-property! 
symbol 'translation-type? type?) - Grob properties (\override'able) are 
defined via (set-object-property! symbol 'backend-type? type?)


Is this correct? And if so, when did this change between 2.12 and 2.22, 
seeing as the above code seems to have worked in 2011? It works fine in 
2.22 if I define mensural_ligature_queue using 'translation-type?


Lukas



Re: Problem with blackpetrucci

2021-08-07 Thread Lukas-Fabian Moser

Hi Kees,

Am 06.08.21 um 19:07 schrieb Kees van den Doel:



On Thu, Aug 5, 2021 at 8:39 PM Kees van den Doel > wrote:


But there's also blackmensural.ly  by
Lukas Pietsch; it's quite old (and to be honest I don't know
it at all and can't say how it deals with your problem), but
maybe it's of use to you: http://www.lukas-pietsch.de/Music/



I got everything to work fine, except the special note shapes.
Interestingly the blackmensural. pdf is
illustrated with the begin of the same piece I'm typesetting and
has those note shapes perfectly.

Unfortunately it doesn't work with 2.22 and convert-ly gives a
long list of errors to fix manually which is beyond my capability.


Actually, despite getting many warnings like below, blackmensural.ly 
 seems to work fine. It's actually quite 
wonderful and complete and has everything one needs to typeset music 
from before ~1450.


Actually, I _think_ the ligature code cannot have worked with 2.22; did 
you try it? (It relied on ancient LilyPond's habit of wrapping 
everything in EventChords.)


I had time now to look through blackmensural.ly and update it a bit to 
accomodate for part of what's changed in LilyPond in the last ten years. 
Now it compiles without complaints on my 2.22.0, see attached.


And oh gosh golly, has LilyPond's scheme integration simplified over 
that time! (I think thanks to David K.) Behold: Instead of


 (make-music
   'ContextSpeccedMusic
   'context-type 'Staff
   'element
 (make-music
   'SequentialMusic
   'elements (list
 (make-music
   'OverrideProperty
   'symbol 'Clef
   'grob-property-path (list 'stencil)
   'grob-value mystencil)
 (make-music    ; dummy setting
   'PropertySet
   'symbol 'clefGlyph
   'value "clefs.C")
 (make-music
   'PropertySet
   'symbol 'middleCClefPosition
   'value midCpos)
 (make-music
   'PropertySet
   'symbol 'clefPosition
   'value linepos)
 (make-music
   'ApplyContext
   'procedure ly:set-middle-C!)
  )))

we may now write

    #{
  \context Staff {
    \override Staff.Clef.stencil = #mystencil
    \set Staff.clefGlyph = "clefs.C"
    \set Staff.middleCClefPosition = #midCpos
    \set Staff.clefPosition = #linepos
    \applyContext #ly:set-middle-C!
  }
    #}

(maybe this would have partly worked in 2.12, but if I understand in 
correctly, there used to be issues regarding _when_ integrated Lilypond 
code is being interpreted).


I can't guarantee that there won't arise subtle problems (spacing 
differences, features I didn't test yet etc., especially since I also 
had to "update" some things that I didn't fully understand), but at 
least it should be a good starting point for further work.


Lukas

\version "2.22.0"

%% 
%  blackmensural.ly – Black Mensural Notation for Lilypond
%  Version 0.1, January 2011
%  (C) Lukas Pietsch
%  Version 0.2 (updated for LilyPond 2.22), August 2021
%  (C) Lukas-Fabian Moser
%  Released under the GNU General Public License
%% 

%% ===
%  Context type definitions
%% ===

%% some settings on score level
mensuralTightSetting = {
  \override Score.SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/2)
  \override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/2)
  \override Score.SpacingSpanner.shortest-duration-space = #1.5
  \override Score.SpacingSpanner.spacing-increment = #0.05
  \override NoteSpacing.stem-spacing-correction = #0.0
  \override Score.BarLine.stencil = #empty-stencil
  \override Score.BarNumber.stencil = #empty-stencil
}

\layout {
ragged-right = ##t
\context {
  \Voice
  \name BlackMensuralVoice  %% adapted from MensuralVoice definition
  \alias Voice
  \remove Beam_engraver
  \remove Stem_engraver
  \override Stem.transparent = ##t
  \override Flag.transparent = ##t
  \override Beam.transparent = ##t
  \override Accidental.stencil = #empty-stencil
  \override Accidental.font-size = #-2
  \override Accidental.X-offset = #-2
}
\context {
  \Staff
  \name BlackMensuralStaff  %% adapted from MensuralStaff definition
  \alias Staff
  \denies Voice
  \defaultchild BlackMensuralVoice
  \accepts BlackMensuralVoice
  \description "Same as @code{Staff} context, except that it is
accommodated for typesetting a piece in mensural 

Re: barline

2021-08-07 Thread Lukas-Fabian Moser

Hi Kees,

Am 07.08.21 um 08:12 schrieb Kees van den Doel:

How can I get all barlines to look like ticks?   As in \bar "'".
I got from manual

\set Staff.whichBar = "'"

but that puts a bar between every note.

\override BarLine.glyph = #"'"


That's the final information in 
https://lilypond.org/doc/v2.22/Documentation/notation/bars.html#bar-lines :


\version "2.22.0"

\layout {
  \set Timing.defaultBarType = "'"
}

{
  \repeat unfold 100 c'4
}

Lukas




Re: Printing two staves in the same place (overlaying)

2021-08-07 Thread Silvain Dupertuis

I am not sure to understand.
If your question is about having two piano staffs spaced as a continuum,
I had found a way to do it which stopped functioning on the recent versions...
and got an answer from this forum for a way (even 2 ways) to do it.

An image will be easier... is this what you want?


Le 07.08.21 à 09:48, Daniel Benjamin Miller a écrit :
This is going to sound unusual, but is there any way in which one can truly overlay 
staffs? I mean engraving a staff directly on top of another, not taking any collisions 
into account, etc. (I know how to combine voices; that's not what I'm asking about.) Is 
there any way to do this via a hack (of spacing or the like)? Ideally, the second staff 
is manually set to align the exact same way as the first, so they really do always 
coincide.


All the best,
Daniel




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


Printing two staves in the same place (overlaying)

2021-08-07 Thread Daniel Benjamin Miller
This is going to sound unusual, but is there any way in which one can 
truly overlay staffs? I mean engraving a staff directly on top of 
another, not taking any collisions into account, etc. (I know how to 
combine voices; that's not what I'm asking about.) Is there any way to 
do this via a hack (of spacing or the like)? Ideally, the second staff 
is manually set to align the exact same way as the first, so they really 
do always coincide.


All the best,
Daniel




Re: Placement of dynamic hairpins under chords with seconds

2021-08-07 Thread Brian Barker

At 11:59 06/08/2021 -0700, Knute Snortum wrote:
I have a minor quibble. If you have a dynamic hairpin under a chord 
with a second interval, the hairpin extends a little to the left (to 
cover the whole chord?)  I think it should only extend to the stem. 
I'm not an expert in engraving but the sheet music I've seen seems 
to back this up. What do you guys think?


Does Elaine Gould count as a "guy"? She says "A hairpin should start 
at the first relevant notehead (not accidental) and end with the 
following notehead or at the first rest thereafter. Good practice is 
to start the hairpin on the left-hand edge of the note and to finish 
it on the right-hand edge of a note" (Behind Bars, p. 104). She 
doesn't include examples of what she calls "adjacent-note chords", 
but her examples of notes with stems up show the hairpins starting at 
the left of the first notehead, not the stem. If you put \stemUp into 
your second example, you will see that Lilypond follows this principle.


Brian Barker  





barline

2021-08-07 Thread Kees van den Doel
How can I get all barlines to look like ticks?   As in \bar "'".
I got from manual

\set Staff.whichBar = "'"

but that puts a bar between every note.

\override BarLine.glyph = #"'"

does nothing.

Thanks,
Kees