Re: afterGrace, glissando, and hidenotes

2024-04-12 Thread Valentin Petzel
Am Donnerstag, 11. April 2024, 19:11:45 CEST schrieb Walt North:
> Hello, I would appreciate some help with this music function.
> 
> The end goal is have a define function produce a glissando after a note
> going either up or down to
> 
> undetermined second note.  For example a guitar slide down off the note.
> 
> I can get the behavior I want with a line of code directly in the score
> but not by using a function.
> 

Hello Walt,

The reason is that \glissando does not in fact behave the way you think is 
does. \glissando is a special kind of event we call afterevent — which is 
basically a function \glissando note which is applied in postfix notation note-
\glissando. This means that such an event needs to be handled specially by the 
parser. As not every code is exactly correct in this sense the parse will try 
to find such post events that are not attached to anything, and try to find a 
previous note it can be attached to.

This means that other than c-\glissando you can also do {c}\glissando or 
whatever.

But if you have a function like \afterGrace and then do #startNote \glissando 
... the parser will see this as two different entities and therefore call 
\afterGrace with the arguments #startNote and \glissando — thus the grace part 
will not actually be inserted as grace, but as regular notes, which causes the 
bar check failure, and the glissando will be started without any notehead.

To fix this you could simply do

\afterGrace 1 { #startNote \glissando } ...

Cheers,
Valentin

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


Re: score with dynamic beats

2024-04-12 Thread Jean Abou Samra

> I note that in one solution one uses \remove and in the other \omit to 
> achieve the same thing.
> 
> Is there any prospect of  moving to a situation where only one operator 
> is used to achieve a result, possibly by having a preferred and 
> deprecated options first? This is a general point, not just  restricted 
> to this one case.


No, because they do completely different things in general, even though in
this case they happen to be more or less equivalent.

For example, try

\version "2.24.2"

\layout {
  \context {
\Voice
%\remove Note_heads_engraver
% vs.
\omit NoteHead
  }
}

{ c'8 8 8 8 }


Best,
Jean




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


Re: score with dynamic beats

2024-04-12 Thread Kieren MacMillan
Hi Raphael,

> I note that in one solution one uses \remove and in the other \omit to 
> achieve the same thing.
> 
> Is there any prospect of  moving to a situation where only one operator is 
> used to achieve a result, possibly by having a preferred and deprecated 
> options first? This is a general point, not just  restricted to this one case.

I wouldn’t think so…

They are two different — both quite useful — commands, used in different 
contexts/situations:

1. \remove is a general function for eliminating an engraver from a whole 
context (in this example, the Time_signature_engraver from the Staff context).

2. \omit is both a handy short form [when used in the identical location as the 
\remove] as well as a one-off function/action (e.g., \once \omit 
Staff.TimeSignature, used “inline” in a music expression).

Cheers,
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: score with dynamic beats

2024-04-12 Thread Raphael Mankin
I note that in one solution one uses \remove and in the other \omit to 
achieve the same thing.


Is there any prospect of  moving to a situation where only one operator 
is used to achieve a result, possibly by having a preferred and 
deprecated options first? This is a general point, not just  restricted 
to this one case.


On 12/04/2024 14:07, Kieren MacMillan wrote:

Hi Gian Paolo,


how to write a score without time signature and bars placed on request?


Just remove the Time_signature_engraver:

\version "2.25.11"

\language "english"

\layout {
   indent = 0
   ragged-right = ##f
   \context {
 \Staff
 \remove Time_signature_engraver
   }
}

{
   \key d \major
   \time 5/2
   d'2 d' cs' d'1
   \time 7/2
   b2 d' d' d' cs' d'1
   \time 9/2
   b2 d' d' d' d' e'1 ~ 1
}


I read the manual but didn't find a solution.


https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects#removing-the-stencil

That should have led you to the equivalent solution:

\version "2.25.11"

\language "english"

\layout {
   indent = 0
   ragged-right = ##f
}

{
   \omit Staff.TimeSignature
   \key d \major
   \time 5/2
   d'2 d' cs' d'1
   \time 7/2
   b2 d' d' d' cs' d'1
   \time 9/2
   b2 d' d' d' d' e'1 ~ 1
}

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.





--
https://saturday-october-seven.com/



Re: PianoPedalBracket.to-barline doesn't always work as expected

2024-04-12 Thread Kieren MacMillan
Hi Mats,

> Exactly the same feature might also be useful for hairpins and other spanner 
> types

Indeed!
I’ll be sure to make the issue I submit a general spanner issue…

Best,
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: PianoPedalBracket.to-barline doesn't always work as expected

2024-04-12 Thread Mats Bengtsson

On 2024-04-12 12:05, Werner LEMBERG wrote:

Might I suggest that “to-barline” is potentially
misleading/confusing…?

On the other hand:

 end-at-barline, for a pedal coded for release on a note **just
 after** a barline, might be more clearly descriptive of the
 current behaviour; and

 extend-to-barline, for a pedal coded for release on a note
 **just before** a barline, might be more suggestive of the
 behaviour Maurits was expecting.

Is there any technical reason both of these different-but-related
properties can’t/shouldn’t be made available?

I suggest you file an issue.


Exactly the same feature might also be useful for hairpins and other 
spanner types, for example when you want to typeset a diminuendo on the 
last note of a piece, where the diminuendo ends at the final bar line. 
Admittedly, the same result can be obtained by attaching the \! to an 
empty chord after the final bar line, but it's still a bit weird syntax:


\version "2.24.3"

\fixed c' {
  long piece, ending with
c1 \> | <> \!
\fine
}

Of course, in this specific example, I guess that the following is the 
cleanest solution:


\fixed c' {
  long piece, ending with
\endSpanners c1 \> |
\fine
}

The same idea of attaching something to an empty chord just after the 
bar line is also applicable for the pedal bracket scenario discussed 
earlier in this thread:


\score {
   \new Staff {
 \clef bass
 \time 6/8
 \relative c' {
   c8 b a g e c |
   \set Staff.pedalSustainStyle = #'mixed
   \override Staff.PianoPedalBracket.to-barline = ##t
   \repeat tremolo 12 { b,32\sustainOn b' } |
   \repeat tremolo 12 { b,32 b' } | <>\sustainOff
   c8 e f g a
 }
   }
}

However, I couldn't find a way to extend the use of \endSpanner to 
provide the equivalent result. I would have expected to the following to 
work, but it doesn't:


\score {
   \new Staff {
 \clef bass
 \time 6/8
 \relative c' {
   c8 b a g e c |
   \set Staff.pedalSustainStyle = #'mixed
   \override Staff.PianoPedalBracket.to-barline = ##t
    \endSpanners{
          \repeat tremolo 12 { b,32\sustainOn b' } |
  \repeat tremolo 12 { b,32  b' } } |
   c8 d e f g a
 }
   }
}

    /Mats




Re: score with dynamic beats

2024-04-12 Thread Kieren MacMillan
Hi Gian Paolo,

> how to write a score without time signature and bars placed on request?

Just remove the Time_signature_engraver:

\version "2.25.11"

\language "english"

\layout {
  indent = 0
  ragged-right = ##f
  \context {
\Staff
\remove Time_signature_engraver
  }
}

{
  \key d \major
  \time 5/2
  d'2 d' cs' d'1
  \time 7/2
  b2 d' d' d' cs' d'1
  \time 9/2
  b2 d' d' d' d' e'1 ~ 1
}

> I read the manual but didn't find a solution.

https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects#removing-the-stencil

That should have led you to the equivalent solution:

\version "2.25.11"

\language "english"

\layout {
  indent = 0
  ragged-right = ##f
}

{
  \omit Staff.TimeSignature
  \key d \major
  \time 5/2
  d'2 d' cs' d'1
  \time 7/2
  b2 d' d' d' cs' d'1
  \time 9/2
  b2 d' d' d' d' e'1 ~ 1
}

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.




score with dynamic beats

2024-04-12 Thread Gian Paolo Renello
Hi,how to write a score without time signature and bars placed on request? I read the manual but didn't find a solution.,Here is an example. Tank youGian Paolo 

Re: afterGrace, glissando, and hidenotes

2024-04-12 Thread Michael Werner
Hi Walt,

On 4/11/24 13:11, Walt North wrote:
> Hello, I would appreciate some help with this music function.
>
> The end goal is have a define function produce a glissando after a
> note going either up or down to undetermined second note.  For
> example a guitar slide down off the note.

If I'm understanding correctly what you're after there's an existing
function for this. Have a look at:
https://lilypond.org/doc/v2.24/Documentation/notation/expressive-marks-as-curves#index-fall-1
As an example:

\version "2.24.2"

musicOne = \relative c'' {
r4 c4\bendAfter #+1 r2
r4 c4\bendAfter #-1 r2
r4 c4\bendAfter #+2 r2
r4 c4\bendAfter #-2 r2
}

musicTwo = \relative c'' {
\override Score.SpacingSpanner.shortest-duration-space = #4.0
r4 c4\bendAfter #+1 r2
r4 c4\bendAfter #-1 r2
r4 c4\bendAfter #+2 r2
r4 c4\bendAfter #-2 r2
}

\score {
\musicOne
}

\score {
\musicTwo
}

This gives:

[image: image.png]

--
Michael


Re: PianoPedalBracket.to-barline doesn't always work as expected

2024-04-12 Thread Werner LEMBERG

> Might I suggest that “to-barline” is potentially
> misleading/confusing…?
> 
> On the other hand:
>
> end-at-barline, for a pedal coded for release on a note **just
> after** a barline, might be more clearly descriptive of the
> current behaviour; and
>
> extend-to-barline, for a pedal coded for release on a note
> **just before** a barline, might be more suggestive of the
> behaviour Maurits was expecting.
> 
> Is there any technical reason both of these different-but-related
> properties can’t/shouldn’t be made available?

I suggest you file an issue.


Werner


Re: Overriding default text of \f, \p, etc.

2024-04-12 Thread Aaron Hill

On 2024-04-12 1:54 am, David Kastrup wrote:

YTG 1234  writes:


Hello List,

I want to override the default text markup used with commands such as
\f, \p, \mf, etc.

However, trying to define f = #(make-dynamic-script ...) doesn't work
because Lilypond interprets f as a note-name.


You could switch to Italian note names temporarily… Just kidding: the
sane solution of using quote marks has been already covered in two
replies.




\version "2.25.13"

\language italiano
f = -\tweak color #red \f
\language english

{ b'4 4 2\f }


That's hilarious.  David, have you been hoarding other tricks?  /s


-- Aaron Hill



Re: Overriding default text of \f, \p, etc.

2024-04-12 Thread David Kastrup
YTG 1234  writes:

> Hello List,
>
> I want to override the default text markup used with commands such as
> \f, \p, \mf, etc.
>
> However, trying to define f = #(make-dynamic-script ...) doesn't work
> because Lilypond interprets f as a note-name.

You could switch to Italian note names temporarily… Just kidding: the
sane solution of using quote marks has been already covered in two
replies.

-- 
David Kastrup



Re: Overriding default text of \f, \p, etc.

2024-04-12 Thread YTG 1234

On 12/04/2024 11:51, Aaron Hill wrote:

On 2024-04-12 12:21 am, YTG 1234 wrote:

Hello List,

I want to override the default text markup used with commands such as 
\f, \p, \mf, etc.


However, trying to define f = #(make-dynamic-script ...) doesn't work 
because Lilypond interprets f as a note-name.


Additionally, how would I be able to change the text while 
maintaining the MIDI effect? I tried using \tweak DynamicText.text 
but it doesn't seem to override the text...



Since f is a pitch, you need to put it in quotes.  Consider:


\version "2.25.13"

"f" =
  -\tweak color #red
  -\tweak text \markup \circle f
  \f

{ b'4 4 2\f }



-- Aaron Hill


Thank you, that was exactly what I was looking for.

I had already found the quote method in the Lilypond source code, but I 
wasn't sure what \tweak I should use.


Thanks!


Re: Overriding default text of \f, \p, etc.

2024-04-12 Thread Aaron Hill

On 2024-04-12 12:21 am, YTG 1234 wrote:

Hello List,

I want to override the default text markup used with commands such as 
\f, \p, \mf, etc.


However, trying to define f = #(make-dynamic-script ...) doesn't work 
because Lilypond interprets f as a note-name.


Additionally, how would I be able to change the text while maintaining 
the MIDI effect? I tried using \tweak DynamicText.text but it doesn't 
seem to override the text...



Since f is a pitch, you need to put it in quotes.  Consider:


\version "2.25.13"

"f" =
  -\tweak color #red
  -\tweak text \markup \circle f
  \f

{ b'4 4 2\f }



-- Aaron Hill



Re: Overriding default text of \f, \p, etc.

2024-04-12 Thread Werner LEMBERG


> However, trying to define f = #(make-dynamic-script ...) doesn't work
> because Lilypond interprets f as a note-name.

Try

```
"f" = #(make-dynamic-script ...)
```


Werner



Re: Overriding default text of \f, \p, etc.

2024-04-12 Thread Kieren MacMillan
Hi all,

>> I want to override the default text markup used with commands such as \f, 
>> \p, \mf, etc.
>> However, trying to define f = #(make-dynamic-script ...) doesn't work 
>> because Lilypond interprets f as a note-name.
>> Additionally, how would I be able to change the text while maintaining the 
>> MIDI effect? I tried using \tweak DynamicText.text but it doesn't seem to 
>> override the text...
> This is my file that defines assorted dynamic markups (it's an old lilypond 
> version so I'm sure it can be improved ...

Optimally, dynamics are defined as dynamics not markup:

\version "2.25.11"

%  just dynamics
fzp = #(make-dynamic-script "fzp")
ffzp = #(make-dynamic-script "ffzp")
sfzp = #(make-dynamic-script "sfzp")
sffz = #(make-dynamic-script "sffz")
sfffz = #(make-dynamic-script "sfffz")

% dynamic–dynamic
pdashff = #(make-dynamic-script "p–ff")
mfdashff = #(make-dynamic-script "mf–ff")
fdashp = #(make-dynamic-script "f–p")

%  text+dynamic
piuf = -\tweak self-alignment-X #0.85 #(make-dynamic-script (markup #:concat ( 
#:normal-text #:italic #:fontsize 0.8 "più" #:hspace 0.3 "f" )))
moltoff = -\tweak self-alignment-X #0.8 #(make-dynamic-script (markup #:concat 
( #:normal-text #:italic #:fontsize 0.8 "molto" #:hspace 0.3 "ff" )))

%  examples
\layout { ragged-right = ##f indent = 0 }
{
  c1\fzp
  c1\sfffz
  c1\pdashff
  c1\moltoff
  c1\piuf
}

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: Overriding default text of \f, \p, etc.

2024-04-12 Thread Wols Lists

On 12/04/2024 08:21, YTG 1234 wrote:

Hello List,

I want to override the default text markup used with commands such as 
\f, \p, \mf, etc.


However, trying to define f = #(make-dynamic-script ...) doesn't work 
because Lilypond interprets f as a note-name.


Additionally, how would I be able to change the text while maintaining 
the MIDI effect? I tried using \tweak DynamicText.text but it doesn't 
seem to override the text...


This is my file that defines assorted dynamic markups (it's an old 
lilypond version so I'm sure it can be improved ...


% This contains assorted dynamics functions ...

% dynamic setting - "p - ff"
pthenff = _\markup{ \dynamic p \italic "-" \dynamic ff }

% dynamic setting - "f - p"
fthenp = _\markup{ \dynamic f \italic "-" \dynamic p }

mfthenff = _\markup{ \dynamic mf \italic "-" \dynamic ff }

% this is the correct way to do it ...
sfzp = #(make-dynamic-script "sfzp")
piu-f = #(make-dynamic-script #{ \markup { \normal-text \italic piu f } #})

fzp = _\markup{ \dynamic fzp }
% forzando - piano
ffzp = _\markup{
\dynamic ffzp
}

% sforzandi
sffz = _\markup{ \dynamic sffz }
sfffz = _\markup{ \dynamic sfffz }



moltoff = _\markup{
  \bold \italic molto \dynamic ff
}

piuf = _\markup{
  \bold \italic piu \dynamic f
}


Cheers,
Wol



Overriding default text of \f, \p, etc.

2024-04-12 Thread YTG 1234

Hello List,

I want to override the default text markup used with commands such as 
\f, \p, \mf, etc.


However, trying to define f = #(make-dynamic-script ...) doesn't work 
because Lilypond interprets f as a note-name.


Additionally, how would I be able to change the text while maintaining 
the MIDI effect? I tried using \tweak DynamicText.text but it doesn't 
seem to override the text...