Re: Error with \layout and \context

2024-01-12 Thread Ivan Kuznetsov
It was that simple!

Thanks!

On Fri, Jan 12, 2024 at 7:17 PM Aaron Hill  wrote:
>
> You need to do your mods in separate \context sections.  See above.



Re: Error with \layout and \context

2024-01-12 Thread Aaron Hill via LilyPond user discussion

On 2024-01-12 5:00 pm, Ivan Kuznetsov wrote:


  \layout {

\context {
   \Score
   \override BarLine.transparent = ##t
   \override SpacingSpanner.base-shortest-duration = 
#(ly:make-moment 1  8)

   \override Stem.transparent = ##t
}
\context {
   \Voice
\consists Horizontal_bracket_engraver
}
  }

}


You need to do your mods in separate \context sections.  See above.


-- Aaron Hill



Re: Output PDF to stdout

2024-01-12 Thread Curt McDowell
Have you actually tried this? LilyPond appends ".pdf" to the output 
filename (and ".midi"). If you try to make the fifo ending in ".pdf", 
you find lilypond removes the fifo before writing a new file. For the 
same reasons, the output file cannot be /dev/stdout. Maybe you could 
write something exciting using FUSE or Docker.


On 1/7/2024 5:41 AM, Raphael Mankin wrote:

On 05/01/2024 03:46, David Wright wrote:
Alternatively, use a fifo, e.g. 


fifo=/var/tmp/ly-pdf$$
rm -rf $fifo
mknod  $fifo p
cat source.ly | lintLy | lilypond -o $fifo &
optimizePDF  < $fifo > score.pdf
wait
rm -rf $fifo

A trick I learned when doing Oracle backups. It also would not write 
to stdout.




Error with \layout and \context

2024-01-12 Thread Ivan Kuznetsov
In my short snippet below, even though my
final output is as expected, a C major scale
with some brackets underneath some pairs of note,
I get the error:

> Parsing...
> test_post01.ly:25:8: error: not a context mod
>
>\Voice

Note that I am using "Analysis brackets".

The lilypond parser does not like the use
of my \Voice tag in the \layout block

Is there something I am doing wrong?

Yes, I getting my desired output, but
but the error message does disturb me,
and I would like to understand something
about what is considered best practice
in the \layout blocks.

When I remove:

\Voice
\consists Horizontal_bracket_engraver

the error goes away, but then, I do
not get my desired brackets in the final
output.


Thanks.



\version "2.24.1"
\language "english"

\score {

  \new Staff \with { \remove "Time_signature_engraver" }
  {
\time 4/4
\clef "treble"
 c'1 d'1 e'1\startGroup f'1\stopGroup g'1 a'1 b'1\startGroup c''1\stopGroup
  }


  \layout {

\context {
   \Score
   \override BarLine.transparent = ##t
   \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1  8)
   \override Stem.transparent = ##t

   \Voice
\consists Horizontal_bracket_engraver
}
  }

}



Re: zero-duration s to hold marks

2024-01-12 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Raphael,

Am 12.01.24 um 13:32 schrieb Raphael Mankin:
I agree that 0 as a denominator would seem to indicate an infinite 
duration, and allow the rest of your argument. However <> still seems 
unintuitive.


I agree that <> isn't obvious. But in a complex language like LilyPond, 
there's always something like "idioms". I remember that I learned about 
<> quite late in my acquaintance with LilyPond, and it changed my input 
habits a bit - namely for standalone dynamics: <>\p s4 instead of s4\p. 
I had the project of introducing this idiom into the examples in the 
notation manual, but don't remember right now whether I ever finished this.


Lukas




Re: Transpose from major to minor key

2024-01-12 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Matthew,

Am 12.01.24 um 00:29 schrieb msk...@ansuz.sooke.bc.ca:

You need to remember lilypond thinks in terms of pitch, not note names. Unlike
some (most?) other music software. So "\transpose g e" says "transpose EVERY
note up A TONE".

I'm not sure it's quite right to say that Lilypond thinks in terms of
pitch, not note names, because it selects the spelling of transposed notes
based on the note names.  For instance, \transpose c cis fis gives fisis ,
not g , whereas \transpose b, c fis gives g.  The one-semitone
transposition of the same note is different depending on the note names
used to specify it.


It depends on what one takes the term "pitch" to mean.

Your remark sounds as if you take "pitch" to be physical frequency, 
which obviously is a valid stance. But, LilyPond's "pitch" data type 
carries much more information, namely octave, "note name" and alteration.


Wol's remarks (I think) alluded to the difference between LilyPond and, 
e.g., MuseScore, in that in LilyPond the meaning of naked note names 
does not change when selecting a new key signature: In MuseScore, if I 
switch to e-flat major and hit "e", I get the pitch e-flat; in LilyPond, 
"e" still creates e-natural.


Lukas


Re: Cut time/half-time/alle breve & 8/4 time

2024-01-12 Thread Lukas-Fabian Moser via LilyPond user discussion

Hi Stanton,

I’m setting various short organ pieces from an old Peters edition, 
mostly to prevent my aging brain from forgetting…


One piece is in 8/4 time -the first measure has a whole note and 2 
half notes. However, the time signature as printed is the cut time 
symbol. How can I reproduce this? I’m using Lilypond 2.25.11.
The solutions given so far seem to be more complicated than necessary, I 
think.


\relative c' {
  \time 4/2
  \set Timing.timeSignatureFraction = 2/2
  c4 d e f g a b c d
}

Lukas




Re: zero-duration s to hold marks

2024-01-12 Thread Mats Bengtsson


  
  


On 2024-01-12 15:58, Knute Snortum
  wrote:


  At
least section 1.2.2 of the reference manual ought to be updated
to 
include <> in the discussion of invisible rests.
  
  
  
  Can you share how you would want that section changed?  Or I
could take a stab at it, but it may not be what you want.  Also,
<> can be used for a lot of different things that aren't
rests, so maybe that section of the Notation manual is not the
best place for it.
   

Agreed! In fact it's not a rest but the empty chord construct
  should rather be seen as a placeholder without any duration, to
  which you can attach things that normally are attached to notes.
  The question is where to best describe it in the manuals. If you
  search the full manuals for <>, the construct is used in
  several examples without any explanation, but there are also a few
  places where "empty chord" is described in conjunction with
  special cases of how to use it (see the entries for "chord, empty"
  in the Lilypond Index). In A.15 there's even a reference to the
  learning manual,
http://lilypond.org/doc/v2.25/Documentation/learning-big-page#structure-of-a-note-entry,
  which unfortunately doesn't seem to explain it either, even though
  the construct is used in several examples also in the learning
  manual. 

Perhaps one suitable place could be Sect. 1.3.1 of the NR "1.3.1
  Expressive marks attached to notes", but it could also be worth
  mentioning in 1.7 "Editorial annotations", for example.
  Technically, Sect. 1.5.1 "Chorded Notes" is the natural place to
  describe it, but that's probably not the most obvious place to
  look when you don't know about the construct. 

   /Mats



  




Re: zero-duration s to hold marks

2024-01-12 Thread Knute Snortum
On Fri, Jan 12, 2024 at 6:21 AM Raphael Mankin  wrote:

>
>
> On 10/01/2024 10:35, msk...@ansuz.sooke.bc.ca wrote:
> > On Wed, 10 Jan 2024, Raphael Mankin wrote:
> >
> >> That strikes me as being a programmer's response, and I speak as a
> programmer
> >> for over 50 years. Using <> works, but it is unintuitive. If s0 is more
> >> intuitive then that should be considered for future inclusion.
> >
> > It's intuitive to me that s0 means a spacer rest of infinite duration,
> > because it's one whole note divided by zero.  And it opens the door
> > to using 0 as a duration denominator for other things than "s", as in
> "c0"
> > and "0", let alone constructions like "s0." which would seem to be
> > a spacer of one and one half times infinite duration.  I don't think it's
> > a good idea to open those doors.  There doesn't seem to be any way to
> > allow zero as the duration denominator except as a unique exception; it
> > cannot be done in a way that's consistent with other syntax.
> >
> I agree that 0 as a denominator would seem to indicate an infinite
> duration, and allow the rest of your argument. However <> still seems
> unintuitive.
>

Well, to my eye, it looks like an empty chord, which makes some sense.


>
> At least section 1.2.2 of the reference manual ought to be updated to
> include <> in the discussion of invisible rests.
>

Can you share how you would want that section changed?  Or I could take a
stab at it, but it may not be what you want.  Also, <> can be used for a
lot of different things that aren't rests, so maybe that section of the
Notation manual is not the best place for it.


Re: Help need with the "implicitBassFigures" command

2024-01-12 Thread Eef Weenink
> So my choosing the number as “0” (or any other). I can use that
> number instead of the original to have it surpressed.
> Good to know. For pratical reasons (not getting lost in my scores ☺ )
> I will set this everytime to “5” or what number needed (in figured
> bass, I know about the 5 not being needed to mention, because if
> nothing written it is always 5.

If you think about it, that's not true! There are many notes which
remain unfigured where it is left to the performer to judge that a
change of harmony is not required. Indeed, usually the majority of
notes.
And conversely, you do see the 5 even when it is not the resolution of
a suspension.

>  Maybe also some other numbers to surpress? )

Well, just to keep track of what the figure being suppressed is, you
could use 55 in your implicitBassFigures list - it would mean you only
have to declare the list once. Then you would write the figure 55 for
those 5's which are being suppressed.

I have to say that if I came across your example in performance I would
imagine it was the 6 on the note earlier that was being extended. But
then, as the figures are appearing below the staff, the figures are
perhaps intended for academic use only?
---
I like the idea with the number 55. Easy to remember, what it stands for.

The example was copy-pasted together to get as much variations in a short line.
Nothing to analyze.

I understand that the suppressing of numbers, or just not writing down a 
number, depends on time, place and composer in history. Every time, place and 
person had his/her conventions. I am in the process of learning this.
And for me, my convention now is:
- As as start I presume any note on the bassline is the tonica of a harmony.
- Looking at the melody above, it could be that some notes are passing notes, 
or other notes not part of the harmony-structure.
- Unless there is a number I will presume the chord would have the number 5. If 
something else is needed, they would have written it down.
- Sometimes the 5 is written down, then I have to take care that at least there 
is a fifth in the chord.
- Extension lines are a way to say” Next note has the same harmonic number”

As soon things come on my path, what do not fit this shortlist, I have to add 
more rules. ☺

And now back to Wolf, General Bass.
Thank you for your help. Regards, Eef


Re: zero-duration s to hold marks

2024-01-12 Thread David Kastrup
Raphael Mankin  writes:

> On 10/01/2024 10:35, msk...@ansuz.sooke.bc.ca wrote:
>> On Wed, 10 Jan 2024, Raphael Mankin wrote:
>> 
>>> That strikes me as being a programmer's response, and I speak as a 
>>> programmer
>>> for over 50 years. Using <> works, but it is unintuitive. If s0 is more
>>> intuitive then that should be considered for future inclusion.
>> It's intuitive to me that s0 means a spacer rest of infinite
>> duration,
>> because it's one whole note divided by zero.  And it opens the door
>> to using 0 as a duration denominator for other things than "s", as in "c0"
>> and "0", let alone constructions like "s0." which would seem to be
>> a spacer of one and one half times infinite duration.  I don't think it's
>> a good idea to open those doors.  There doesn't seem to be any way to
>> allow zero as the duration denominator except as a unique exception; it
>> cannot be done in a way that's consistent with other syntax.
>> 
> I agree that 0 as a denominator would seem to indicate an infinite
> duration, and allow the rest of your argument. However <> still seems
> unintuitive.

Well, there's been discussion about using z but then what would z with a
duration mean, and z is not just unintuitive in that you would not think
of writing it without knowing it but also unintuitive because you have
no way to know what it is when reading it.

<> at least is comprised of known elemeents.

-- 
David Kastrup



Re: zero-duration s to hold marks

2024-01-12 Thread Raphael Mankin




On 10/01/2024 10:35, msk...@ansuz.sooke.bc.ca wrote:

On Wed, 10 Jan 2024, Raphael Mankin wrote:


That strikes me as being a programmer's response, and I speak as a programmer
for over 50 years. Using <> works, but it is unintuitive. If s0 is more
intuitive then that should be considered for future inclusion.


It's intuitive to me that s0 means a spacer rest of infinite duration,
because it's one whole note divided by zero.  And it opens the door
to using 0 as a duration denominator for other things than "s", as in "c0"
and "0", let alone constructions like "s0." which would seem to be
a spacer of one and one half times infinite duration.  I don't think it's
a good idea to open those doors.  There doesn't seem to be any way to
allow zero as the duration denominator except as a unique exception; it
cannot be done in a way that's consistent with other syntax.

I agree that 0 as a denominator would seem to indicate an infinite 
duration, and allow the rest of your argument. However <> still seems 
unintuitive.


At least section 1.2.2 of the reference manual ought to be updated to 
include <> in the discussion of invisible rests.



--
Political correctness: a kind of McCarthyite movement in reverse which,
in the name of tolerance proscribes all reference to gender, ethnicity,
color of skin, sexual preference, social provenance and even age. It has
no leaders, as far as I am aware, only terrified disciples. - John le Carre



Re: Help need with the "implicitBassFigures" command

2024-01-12 Thread Richard Shann
On Thu, 2024-01-11 at 12:40 +, Eef Weenink wrote:
> Thank you Richard
> 
> You say: “ 
> You don't have to use 5 as the implicit figure:”
> 
> Try:
> -
> 
>     \new FiguredBass \with { implicitBassFigures = #'(0) }   
> \figuremode {
>   \set figuredBassAlterationDirection = #RIGHT
>   \set figuredBassPlusDirection = #RIGHT
>   \override BassFigureAlignment.stacking-dir = #DOWN
>   <6 5->8 <0 4->8
> --
> 
> So my choosing the number as “0” (or any other). I can use that
> number instead of the original to have it surpressed.
> Good to know. For pratical reasons (not getting lost in my scores ☺ )
> I will set this everytime to “5” or what number needed (in figured
> bass, I know about the 5 not being needed to mention, because if
> nothing written it is always 5.

If you think about it, that's not true! There are many notes which
remain unfigured where it is left to the performer to judge that a
change of harmony is not required. Indeed, usually the majority of
notes.
And conversely, you do see the 5 even when it is not the resolution of
a suspension.

>  Maybe also some other numbers to surpress? )

Well, just to keep track of what the figure being suppressed is, you
could use 55 in your implicitBassFigures list - it would mean you only
have to declare the list once. Then you would write the figure 55 for
those 5's which are being suppressed.

I have to say that if I came across your example in performance I would
imagine it was the 6 on the note earlier that was being extended. But
then, as the figures are appearing below the staff, the figures are
perhaps intended for academic use only?

Richard Shann



> Anyway most clear is to implicitBassFigures=”5” and write 5
> 
> To ease my life: 
> declare in the beginning: 
> -
> extendOn = \bassFigureExtendersOn
> extendOnImpFive = { \bassFigureExtendersOn 
> \set implicitBassFigures = #'(5)}
> extendOff = {\bassFigureExtendersOff 
> \set implicitBassFigures = #'()}
> ---
> use as needed
> 
> 
> Regards, Eef