Re: How to manually set MIDI channel # for a staff?

2024-04-29 Thread David Kastrup
Jean Abou Samra  writes:

> Le lundi 29 avril 2024 à 06:31 -0500, Jason Yip a écrit :
>> Hi,
>> 
>> Does anyone know how to manually set the midi channel # for a staff to 
>> something other than the default of channel 0/1? Without having to 
>> create dummy staffs with just `s256` as the voice content preceding the 
>> desired staff? The staff in question usually only has one voice, so I 
>> modified the midi context as shown below simply made a bunch of dummy 
>> voices with only `s256` as the content so that they don't at least 
>> affect the graphical output:
>> 
>> ```
>>   \midi {
>>    \context {
>>  \Staff
>>  \remove "Staff_performer"
>>    }
>>    \context {
>>  \Voice
>>  \consists "Staff_performer"
>>    }
>>  }
>> ```
>
>
> You can do \set Score.midiChannelMapping = #'voice as an alternative to that.

We really need a plain simple way to set a fixed channel.  There is
enough hardware around using dedicated channels.

-- 
David Kastrup



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: English Note names alternatives

2024-04-06 Thread David Kastrup
"Fr. Samuel Springuel"  writes:

> I just discovered that in English, there’s a shorter way to name notes
> that would normally be specified with “-sharp” or “-flat”: “s” and
> “f”.  E.g. “f-sharp” can be written as “fs” and “b-flat” can be
> written as “bf”.
>
> However, I noticed that this is not documented in the Music Glossary:
> https://lilypond.org/doc/v2.24/Documentation/music-glossary/pitch-names. Only
> the “-sharp” and “-flat” name are mentioned there.  Is there a reason
> this behavior is not documented?  It is certainly much easier to type
> the shorter name than the longer one but I don’t want to rely on
> something that might break unexpectedly.

The glossary does not document LilyPond but common language.  It wrote
about "c-sharp" long before the English input language allowed the
spelling "c-sharp" (I think the original long name might have been
csharp).

-- 
David Kastrup



Re: Question regarding ChordNames

2024-03-13 Thread David Kastrup
John Helly  writes:

> Aloha.
>
> Here's an MWE to exhibit the issue.
>
> I have a flat note (bes) that I want to transpose down 4 half-tones to
> F#.  However, when the transpose is applied, the result is Gb.  I
> understand that a flat note was the initial value so maybe LP is
> preserving that specification?

In LilyPond there is no such thing as "transpose down 4 half-tones".
You transpose from one key to another, not by a distance.

> Nonetheless, short of re-writing the whole piece in A rather than C#,
> is there a way to specify the enharmonic representation for an F#
> rather than Gb, for example?
>
> bflat = \chordmode { bes1 }
> <<
> \transpose cis' a {
>  \new ChordNames { \bflat  }
> }
>>>

\transpose cis' a will remove 4 sharps, take -4 steps on the circle of
fifths.  If you'd rather add 8 steps on the circle of fifths (the
difference implying that the circle isn't actually a closed circle), you
need to write something like \transpose des' a instead.

-- 
David Kastrup



Re: Multiple connected slurs

2024-03-03 Thread David Kastrup
Gerardo Ballabio  writes:

> Hello,
> please what is the correct way to draw multiple slurs connected to
> each other? Look at example below to see what I mean (result
> attached).
>
> The following code does what I want but it gives multiple warnings like these:
>
> Parsing...
> slur.ly:4:3: warning: Unattached SlurEvent
> Interpreting music...
> slur.ly:4:13: warning: cannot end slur
>
> I tried using ties instead of slurs, that doesn't give warnings, but
> it doesn't look quite the same.
>
> Thanks
> Gerardo
>
> % slur.ly
> %%
> \version "2.24.1"
>
> \new Staff \relative {
>   ( c''1:32 ) | ( c1:32 ) | ( c1:32 ) | ( c4 ) r4 r2 |
> }
> %%

You need to use the correct syntax for slurs in the first place.  Both (
and ) come right after the note they connect to, and the reason for that
is exactly because it makes it easy to make properly connected adjacent
slurs.

You should not ignore syntax warnings LilyPond gives you: they indicate
a problem with your source file.

-- 
David Kastrup



Re: Adding to a tagGroup on the fly

2024-03-02 Thread David Kastrup
Simon Albrecht  writes:

> On 01.03.24 14:29, David Kastrup wrote:
>> Simon Albrecht  writes:
>>
>>> The downside of that is that I cannot add more tags to those groups on
>>> the fly, and always have to add them directly to the library file.)
>> Suggestions for a user interface to do that?
>>
>
> Interesting. Would of course require naming tag groups, right?

Just naming an existing member should be enough since taggroups are
exclusive.

-- 
David Kastrup



Re: extracting a single “vocal line” (including lyrics) from multiple variables

2024-03-01 Thread David Kastrup
Simon Albrecht  writes:

> The downside of that is that I cannot add more tags to those groups on
> the fly, and always have to add them directly to the library file.)

Suggestions for a user interface to do that?

-- 
David Kastrup



Re: extracting a single “vocal line” (including lyrics) from multiple variables

2024-02-29 Thread David Kastrup
Simon Albrecht  writes:

> This could be preferable if you can delineate the sections
> well. Trying out \partcombine quickly made me avoid it until
> absolutely necessary, but maybe it becomes manageable with clever and
> experienced use of \partCombineApart and friends. In choral pieces, I
> often use a single variable that contains all the lyrics, tagged
> depending on who does and doesn’t use which part and then filtered in
> the score setup. I believe that it makes a key difference to use both
> \keepWithTag _and_ \removeWithTag like this:
>
> 
> text = \lyricmode {
>   \tag A { on -- ly al -- to }
>   \tag nA { ev’ -- ry -- one ex -- cept al -- to }
> }
>
> \score {
> <<
> %{ simultaneous music expression with everything for soprano part %}
> \keepWithTag A \removeWithTag nA <<
>   \variableThatContainsAltoNotes
>   \addlyrics \text
>>>

I'd rather use

\tagGroup alto,non-alto

\lyricmode {
  \tag alto { on -- ly al -- to }
  \tag non-alto { ev’ -- ry -- one ex -- cept al -- to }
}

\keepWithTag alto ...
\keepWithTag non-alto ...

But one would need to look at the rest to see whether this kind of tag
group would end up problematic.

-- 
David Kastrup



Re: define-music-function with afterGrace and {}

2024-02-23 Thread David Kastrup
jca...@web.de writes:

> Good day,
>
> following snippet I need very frequently (with different notes instead
> of c4 and e4):
>
>\afterGrace c4 \glissando {\once \hide Stem \parenthesize e4}
>
>
> That's why I wanted to create a music function to shorten the
> expression. My previous attempt:
>
>graceGliss =
>#(define-music-function
>   (starttone endtone)
>   (ly:music? ly:music?)
>   #{
>     \afterGrace #starttone \glissando {\once \hide Stem
>\parenthesize #endtone}
>   #})
>
>
> doesn't work, Return Code 1.
>
> In order to test the general functioning of define-music-function, I tried:
>
>graceGliss =
>#(define-music-function
>   (starttone endtone)
>   (ly:music? ly:music?)
>   #{
>     \afterGrace #starttone #endtone
>   #})
>
>
> which works, what leads me to believe that the error must have something
> to do with the curly brackets {} …
>
>
> For some help I'd be very grateful!

Kind of stupid, but Scheme syntax is very simplistic (almost anything
except for parentheses needs to be space-separated) and your problem
here is that # goes into Scheme.

So you call upon one Scheme variable endtone} which does not exist.  Put
a space before the closing brace.

-- 
David Kastrup



Re: 5th anniversary conference? :)

2024-02-13 Thread David Kastrup
Kieren MacMillan  writes:

> Hello, Pond!
>
> I was just waxing nostalgic about that fabulous Salzburg conference in
> 2020, and noted that in Jan 2025 — just under a year from now! — it
> will have been five years since we got together, talked
> music/notation, and raised [more than] a few pints together.
>
> Any chance for a repeat? :)
>
> Just throwing it out into the Universe.

I'm just throwing out that my subletter has bought a house elsewhere and
moves out end of April.  The owner has let me know that I can stay here
till the end of June (he gets some rent and someone who feeds the horses
on most days).

I'm still looking for a new place, and it's not quite clear how long
I'll need.

That would not be a university setting.  It would also not be the first
time, though there is little personal overlap.

<https://web.archive.org/web/20130304040840/http://news.lilynet.net/?The-LilyPond-Report-28#impressions_from_the_waltrop_meeting>

There would be enough room to throw down sleeping bags.

Near Dortmund, within about 1.5hr of train distance from Düsseldorf and
Cologne.

It reeks like a foolish idea, for sure.  If your question hadn't had
this impeccable timing, I'd not have mentioned it.

Talk about waxing nostalgic!

-- 
David Kastrup



Re: Rest space in between fugue's voices

2024-02-10 Thread David Kastrup
Kieren MacMillan  writes:

> Hi George,
>
> [n.b. I’ve cc'ed the list, as per standard practice in the Lilypond 
> community.]
>
>> Thank you very much! It worked perfectly just by inserting "\tweak
>> X-offset #1" before the 16th rest in my original code
>
> Oh, great! I didn’t think to try only that tweak.
>
>> I didn't quite understand the reasons for changing \voiceFour and \voiceOne 
>> in the tenor part
>
> Lilypond’s \voiceX commands automatically set a lot of parameters
> (default stem/tie/slur direction, etc.) according to where the voice
> “sits” on the staff; the odd-numbered voices (\voiceOne, \voiceThree,
> etc.) act as if they are “on top” (so stems/ties/slurs go up), while
> even-numbered voices (\voiceTwo, \voiceFour, etc.) act as if they are
> “underneath” (stems/ties/slurs down, etc.).
>
> When the tenor voice is in the lower staff, it is on top, so \voiceOne
> makes the most sense (because there are only two voices); when it
> moves to the upper staff, it is (at least in your example) on the
> bottom, so \voiceFour makes the most sense (because \voiceTwo is
> already taken by the alto).

\voiceTwo is for the outermost low voice, so the alto may be better off
\voiceFour ?

-- 
David Kastrup



Re: Nested Keep_alive_together_engraver

2024-02-10 Thread David Kastrup
Julian Santander  writes:

> For the record, I believe I finally solved all my problems (with this
> particular score).
>
> About the problem I asked in my previous e-mail.
>
> The way Keep_alive_together_engraver works with the "remove-layer" property
> is confusing as it is used for two contradictory purposes removing layers
> and keeping layers and, in my case, I wanted to remove some layers but keep
> others.

For the record: remove-layer was designed as a low-level mechanism, not
a user interface.  As such, the focus was on making it versatile, not
simple to use.

But nobody has bothered defining particular use cases and giving them a
simple user interface.

-- 
David Kastrup



Re: Is this a sensible interface for temporary multiple clefs?

2024-02-05 Thread David Kastrup
Valentin Petzel  writes:

> Hello David,
>
> if I understand this correctly the intent here is to have different staff 
> behaviour in one staff. I believe that there might be a more general concept 
> here. Instead of creating a new context and mechanic to set additional clefs, 
> maybe it would make sense to have a more general concept of say sub staves, 
> which would allow us to do the same thing for a more general set of staff 
> features? So instead of
>
> \extraClef #-3 "bass" ...
>
> one could have
>
> \new SubStaff {
>   \override SubStaff.Clef.Y-offset = #-3
>   \clef "bass"
>   ...
> }
>
> This should then allow for similar things such as multiple individual 
> handlings of Accidentals, multiple bar lines, key signatures, lines and 
> brackets, ...

Have you ever seen any of those?

At the same point of time, a lot more needs to be done for an extra clef
than setting the Y-offset .  In terms of implementation, it would be
possible to split much of the work into a neutral "SubStaff" and context
mod, like doing

\new SubStaff \with \ExtraClef #-3 "violin"

but this still does not deal with reseating the current Voice to the
SubStaff and back afterwards, necessary for keeping beams and slurs
operative.  So there would need to be separate commands for that.

So instead of a targeted end-user feature limited to clefs, we are
talking about some fuzzy generic framework requiring an expert to cater
for the particular common use case.

There is something to be said for a more generic name/feature such as
SubStaff in terms of the context hierarchy, moving the necessary fixed
mods into a context mod.

-- 
David Kastrup



Is this a sensible interface for temporary multiple clefs?

2024-02-05 Thread David Kastrup
\version "2.25.10"

\header {
  tagline = ##f
}

\layout {
  \context {
\Staff
\accepts ExtraClefStaff
  }
  \context {
\name ExtraClefStaff
\type Engraver_group
\alias Staff
\accepts Voice
\consists Clef_engraver
\override Clef.font-size = #-4
%% The break-align-symbol stacks the extra clef to the right of
%% the normal clef
\override Clef.break-align-symbol = #'cue-clef
%% This break-visibility repeats the extra clef every bar.  Should
%% this be the actual default?  Or should the default just be
%% the normal #begin-of-line-visible ?
\override Clef.break-visibility = #end-of-line-invisible
%% different size for first clef in line is uncalled for
firstClef = ##f
  }
}

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

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

all-clef-properties =
#(map (lambda (x) (ly:music-property x 'symbol))
  (extract-named-music (make-clef-set "treble_(8)") 'PropertySet))

extraClefEnd =
#(context-spec-music
  (make-apply-context
   (lambda (ctx)
 ;; Should be a given in context-spec-music
 (if (eq? (ly:context-name ctx) 'ExtraClefStaff)
	 (begin
	   ;; revert clef-specific settings in case some clef is still
	   ;; issued before the context dies: in that case it should
	   ;; correspond to the supervening Staff clef.
	   (for-each (lambda (p) (ly:context-unset-property ctx p))
		 all-clef-properties)
  	   ;; All children of the ExtraClefStaff are reseated to its
	   ;; parent context, removing it from the hierarchy
	   (let ((switch (ly:make-stream-event
			  (ly:make-event-class 'ChangeParent)
			  `((context . ,(ly:context-parent ctx))
	 (for-each
	  (lambda (x)
		(ly:broadcast (ly:context-event-source x) switch))
	  (ly:context-children ctx
	 (ly:programming-error "Not in ExtraClefStaff"
  'ExtraClefStaff)


\score {
\new Staff = "lower" {
\key d \minor
\numericTimeSignature
\time 3/4
\clef bass
\relative c' {
  \voices 1,""
<<
{
s2. r4 r8. \clef treble
\tuplet 3/2 16 { g'32 (a bes }
c8.) c16--
c16-- bes g a
g8. 
\omit TupletBracket
\tuplet 3/2 16 { f32 (g a }
bes8.) bes16
  } \\
{
  d,,,8.-- d16-- d2--~ 2.~
  \extraClef #-3 "bass"
  \voiceTwo
  2.~ \break 2.~2.
  \oneVoice
		  \extraClefEnd
		  c''2.
}
>>
}
}
}

If made built-in, it would affect several files and introduce a new
default context type.

I don't think it covers multiple simultanous main clefs (like sometimes
seen in compact mensural notation).  I am not sure that there'd be a
sensible common interface including this use case.

-- 
David Kastrup


Re: Compute \tempo from variables

2024-02-01 Thread David Kastrup
David Hobach  writes:

> Hi all,
>
> I'd like to compute the \tempo directive from variables, but couldn't
> yet figure out how to do it.
>
> For example, let's say I have two variables such as
> myTempoBase = 4
> myTempo = 80
>
> Then I'd like to do something such as
> global = {
>   \key c \major
>   \time 4/4
>   \tempo \myTempoBase = \myTempo
> }
>
> I'd expect it to resolve to \tempo 4 = 80. The above code however fails on 
> 2.24.1.
>
> Any ideas?

in \tempo 4 = 80 , the 4 is not a number but a duration.  This works
when writing

myTempoBase = ##{ 4 #}
myTempo = 80

global = {
\key c \major
\time 4/4
\tempo \myTempoBase = \myTempo
}

because ##{ 4 #} resolves to a duration rather than a number.

-- 
David Kastrup



Re: Numérotation des versets

2024-01-27 Thread David Kastrup
Silvain Dupertuis  writes:

> Thanks for the suggestion.
>
> This does provide a nice automatic numbering ...
> but does not repeat the verse number on subsequent lines.
>
> But I did recycle your suggestion using a modified function with one paramater
>
> #(define nextcountstanza
>    (let  ((counter 0))
>  (lambda (x)
>    (set! counter (+ x counter))
>    (string-append ( number->string counter)"."
>
> so that I can copy-paste these expressions instead of manually putting the 
> right number

Will only work for a single voice in a single piece as it uses a global
counter.

-- 
David Kastrup



Re: Incipit with default noteheads possible?

2024-01-24 Thread David Kastrup
Hajo Baess  writes:

> This works for the note heads, but if there happen to be accidentals
> around (in my project this is the case), they remain mensural style. Is
> there another override for this, too?
>
> Am Mittwoch, dem 24.01.2024 um 16:14 +0200 schrieb YTG 1234:
>> > I have tried an override ( \override
>> > Staff.NoteHead.style = #'default )
>> 
>> Note heads are drawn in Voice, so you can just omit the context name.
>> \override NoteHead.style = #'default
>> 
>> The more fundamental issue here, though, is that \incipit is
>> hardcoded 
>> to create a MensuralStaff context. Does anyone know how to replicate
>> its 
>> effect with a normal Staff, short of just substituting in its source
>> code?

How about this?

\version "2.24.2"

incipit =
#(define-music-function (incipit-music) (ly:music?)
  (_i "Output @var{incipit-music} as an incipit.

@var{incipit-music} is typeset within a @code{MensuralStaff} context; the result
is positioned before the main staff (as part of an @code{InstrumentName} grob)
to indicate the music's original notation.")
  #{
\once \override Staff.InstrumentName.stencil =
#(lambda (grob)
   (let* ((instrument-name (ly:grob-property grob 'long-text))
  (align-x (ly:grob-property grob 'self-alignment-X 0))
  (align-y (ly:grob-property grob 'self-alignment-Y 0)))

 (unless (and (music-is-of-type? incipit-music 'context-specification)
  (assq (ly:music-property incipit-music 'context-type)
(ly:output-find-context-def (ly:grob-layout grob) 'Staff)))
   ;; not a staff-like context
   (set! incipit-music (context-spec-music incipit-music 'MensuralStaff)))
 (set! (ly:music-property incipit-music 'create-new) #t)
 (set! (ly:music-property incipit-music 'property-operations)
   (append (ly:music-property incipit-music 'property-operations)
   `((push InstrumentName ,align-x self-alignment-X)
 (push InstrumentName ,align-y self-alignment-Y)
 (assign instrumentName ,instrument-name
 (set! (ly:grob-property grob 'long-text)
   #{ \markup \score { #incipit-music   
   \layout {
$(ly:grob-layout grob)
 indent-incipit-default = 15\mm
 line-width = #(primitive-eval
'(or (false-if-exception indent)
 indent-incipit-default))
 indent = #(primitive-eval
'(or (false-if-exception (- line-width incipit-width))
 (* 0.5 line-width)))
 ragged-right = ##f
 ragged-last = ##f
 system-count = 1
 }
   }
  #})
 (set! (ly:grob-property grob 'self-alignment-Y) #f)
 ;; Do 'self-alignment-X RIGHT only for the first InstrumentName, which
 ;; actually is the incipit. Otherwise self-alignment-X for the
 ;; shortInstrumentName is not longer settable.
 (let ((parts (ly:spanner-broken-into (ly:grob-original grob
   (if (and (pair? parts) (equal? grob (car parts)))
   (ly:grob-set-property! grob 'self-alignment-X RIGHT)))
 (system-start-text::print grob)))
#}
  )

\language "deutsch"

Incipit = \relative c'' {
	\clef treble \time 4/4
	\omit Staff.TimeSignature
	\hide Stem
	%\mark "A D FIS CIS"
	< a, d fis cis' >

}

noten =  \relative c'' {
	\clef treble \key f \major \time 4/4
	c4 d e f \bar "|."
}

\score {

	\new Staff
	<<
		\incipit \new Staff \Incipit
		\set Staff.instrumentName = "Violino discordato"
		\noten
	>>


	\layout {
		indent = 4\cm
		incipit-width = 1\cm
	}
}


-- 
David Kastrup


Re: Incipit with default noteheads possible?

2024-01-24 Thread David Kastrup
YTG 1234  writes:

>> I have tried an override ( \override
>> Staff.NoteHead.style = #'default )
>
> Note heads are drawn in Voice, so you can just omit the context
> name. \override NoteHead.style = #'default
>
> The more fundamental issue here, though, is that \incipit is hardcoded
> to create a MensuralStaff context. Does anyone know how to replicate
> its effect with a normal Staff, short of just substituting in its
> source code?

I think there might be a point in modifying incipit such that if it is
called as

\incipit \new staff-like-context ...

that it will not do a \new MensuralStaff but just take what is given,
add its specific context creation mods to any that might already be
there, and work with that.

-- 
David Kastrup



Re: { } not sounding right.

2024-01-19 Thread David Kastrup
Werner LEMBERG  writes:

>> I have a branch (from a few years ago) where I changed LilyPond's MIDI
>> microtonality from using Pitch Bends (which is a bad idea when using
>> chords) to using MIDI 1.0 tuning information. This works fine IIRC as
>> long as you don't construct chords containing really close notes
>> (e.g. c and c+5 cents).
>
> Sounds great.  Given that MIDI 2.0 is still rather new it probably
> makes sense to go this route.

Well, to put LilyPond into a bit more of a perspective, we are at GM1
level.  Supporting GM2 would mean fast-forwarding all the way into the
distant year 1999 (for GM2 v1.2a, even to 2007).

I actually use MIDI devices regularly that don't do GM2.

MIDI 2.0, in contrast, is from 2020.  It would be overoptimistic to
expect the average established musician to work with devices developed
as recent as that.  And it's not unreasonable to assume that many of
those interested in using the kind of workflow LilyPond offers would
pass as "old-school" and have a leaning towards old-school devices,
regardless of what biological age their ID might pronounce.

So in my book, offering support for GM2 _and_ other instrument/patch
schemes beyond GM1 would be more of a priority over going MIDI 2.0.

-- 
David Kastrup



Re: Drum notation and style

2024-01-19 Thread David Kastrup
Adrian  writes:

> Thanks for the reply, and apologies for not replying to all. However,
>
> \override Lyrics.LyricsText.font-name = "Font Name"
>
> returns the following warning:
>
> warning: not a grob name, `LyricsText'
>
> and doesn't alter the font.

It's actually LyricText .

-- 
David Kastrup



Re: chord

2024-01-18 Thread David Kastrup
Leo Correia de Verdier  writes:

> <\tweak duration-log 3 e, b, g e’>2

How about

apparent =
#(define-music-function (note) (ly:music?)
  (let ((duration (ly:music-property note 'duration)))
(tweak '(Dots dot-count) (ly:duration-dot-count duration)
(tweak '(duration-log) (ly:duration-log duration) note

{ <\apparent e,4 b, f e'>2 }

Of course it doesn't work to change the dotcount when the chord as such
has no dots scheduled.  I am also not convinced that this interface is
the best approach.

-- 
David Kastrup



Re: Error/warning when creating a piano reduction with lilypond 2.25.7 and frescobaldi 3.3.0

2024-01-15 Thread David Kastrup
Knute Snortum  writes:

> On Mon, Jan 15, 2024 at 5:28 AM David Kastrup  wrote:
>
>> Bernhard Kleine  writes:
>>
>> > Dear David,
>> >
>> > the file was created this morning from frescobaldi with the
>> > Partitur-Assistent and the pre-set version of Lilypond was 2.25.7.
>> > Nothing was done be myself apart from wrinting notes and lyrics.
>>
>> If the "Partitur-Assistent" creates those overrides, it needs to get fixed.
>>
>
> It has been:
>
> https://github.com/frescobaldi/frescobaldi/commit/fb79df399056ddd8ce2fa2b48ac36fc37bdc0588

Well, it's a start.  See my note about

git grep "override[^=]*#'[a-z]"

I get

TODO:  * drag an object to e.g. create an \override #'extra-offset command
frescobaldi_app/fonts/templates/musicfont-glyphs.ly:\override 
DynamicLineSpanner #'staff-padding = #2.0
frescobaldi_app/fonts/templates/musicfont-glyphs.ly:  \override 
BreathingSign #'text = \markup { \musicglyph #"scripts.rvarcomma" }
frescobaldi_app/fonts/templates/musicfont-glyphs.ly:  \override 
TrillSpanner #'direction = #DOWN
frescobaldi_app/fonts/templates/musicfont-glyphs.ly:  \override 
BreathingSign #'text = \markup { \musicglyph #"scripts.caesura.curved" }
frescobaldi_app/fonts/templates/musicfont-glyphs.ly:  \override 
BreathingSign #'text = \markup { \musicglyph #"scripts.caesura.straight" }
frescobaldi_app/fonts/templates/musicfont-glyphs.ly:  \override 
BreathingSign #'text = \markup { \musicglyph #"scripts.tickmark" }
frescobaldi_app/fonts/templates/musicfont-realbook.ly:\override Score.Clef 
#'break-visibility = #'#(#f #f #f)
frescobaldi_app/fonts/templates/musicfont-realbook.ly:\override 
Score.KeySignature #'break-visibility = #'#(#f #f #f)
frescobaldi_app/fonts/templates/musicfont-realbook.ly:\override 
Score.SystemStartBar #'collapse-height = #1
frescobaldi_app/scorewiz/scoreproperties.py:
ly.dom.Line(r"\override Staff.TimeSignature #'style = #'()", node)
frescobaldi_app/symbols/arpeggio_defaults.ily:\override StaffSymbol 
#'transparent = ##t
frescobaldi_app/symbols/arpeggio_defaults.ily:\override StaffSymbol #'width 
= #4
frescobaldi_app/symbols/arpeggio_defaults.ily:\override NoteHead 
#'no-ledgers = ##t
frescobaldi_app/symbols/arpeggio_defaults.ily:\override NoteHead #'stencil 
= #empty-stencil
frescobaldi_app/symbols/arpeggio_defaults.ily:\override Stem #'stencil 
=#empty-stencil
frescobaldi_app/symbols/bar_defaults.ily:\override StaffSymbol #'width = #'4
frescobaldi_app/symbols/bar_defaults.ily:\override StaffSymbol #'thickness 
= #1.2
frescobaldi_app/symbols/bar_kievan.ly:\override StaffSymbol #'width = #1.44
frescobaldi_app/symbols/bar_repeat_angled_double.ly:\override StaffSymbol 
#'width = #5.5
frescobaldi_app/symbols/bar_repeat_angled_end.ly:\override StaffSymbol 
#'width = #5.5
frescobaldi_app/symbols/bar_repeat_angled_start.ly:\override StaffSymbol 
#'width = #5.5
frescobaldi_app/symbols/bar_segno.ly:\override StaffSymbol #'width = #7
frescobaldi_app/symbols/bar_tick.ly:\override StaffSymbol #'staff-space = 
#(/ 7 8)
frescobaldi_app/symbols/clef_defaults.ily:\override StaffSymbol #'width = #4
frescobaldi_app/symbols/clef_tab.ly:\override StaffSymbol #'width = #4
frescobaldi_app/symbols/clef_tab.ly:\override StaffSymbol #'staff-space = #1
frescobaldi_app/symbols/clef_tab.ly:\override Clef #'font-size = #-3.5
frescobaldi_app/symbols/glissando_defaults.ily:\override StaffSymbol 
#'transparent = ##t
frescobaldi_app/symbols/glissando_defaults.ily:\override StaffSymbol 
#'width = #4
frescobaldi_app/symbols/glissando_defaults.ily:\override NoteHead #'stencil 
= #empty-stencil
frescobaldi_app/symbols/glissando_defaults.ily:\override Stem #'stencil = 
#empty-stencil
frescobaldi_app/symbols/glissando_defaults.ily:\override Stem #'length = #0
frescobaldi_app/symbols/glissando_defaults.ily:\override Glissando 
#'bound-details = #
frescobaldi_app/symbols/glissando_defaults.ily:  \override Glissando 
#'style = $style
frescobaldi_app/symbols/glissando_dotted.ly:\override Glissando #'thickness 
= #1.5
frescobaldi_app/symbols/spanner_beam16.ly:  \override NoteHead 
#'extra-spacing-width = #'(0 . 1.3)
frescobaldi_app/symbols/spanner_defaults.ily:\override StaffSymbol #'width 
= #4.4
frescobaldi_app/symbols/spanner_defaults.ily:\override StaffSymbol 
#'transparent = ##t
frescobaldi_app/symbols/spanner_melisma.ly:  \override Stem #'length = #3
frescobaldi_app/symbols/spanner_melisma.ly:  \override VerticalAxisGroup 
#'nonstaff-relatedstaff-spacing =
frescobaldi_app/symbols/spanner_phrasingslur.ly:\override Stem #'length = #0
frescobaldi_app/symbols/spanner_phrasingslur.ly:\override Stem #'direction 
= #DOWN
frescobaldi_app/symbols/spanner_phrasin

Re: Error/warning when creating a piano reduction with lilypond 2.25.7 and frescobaldi 3.3.0

2024-01-15 Thread David Kastrup
Bernhard Kleine  writes:

> Am 15.01.2024 um 14:28 schrieb David Kastrup:
>> Bernhard Kleine  writes:
>>
>>> Dear David,
>>>
>>> the file was created this morning from frescobaldi with the
>>> Partitur-Assistent and the pre-set version of Lilypond was 2.25.7.
>>> Nothing was done be myself apart from wrinting notes and lyrics.
>> If the "Partitur-Assistent" creates those overrides, it needs to get fixed.
>
> It does create them. Any idea how to get is fixed in this particular case?

Calling

git grep "override[^=]*#'[a-z]"

in the current Frescobaldi source tree delivers _way_ too many hits.  I
don't consider it sane that the current Frescobaldi will pump out
pre-2.18 syntax in droves in its templates.

And I suspect that it also splits overrides into multiple lines, making
it harder to recognize them.

-- 
David Kastrup



Re: Error/warning when creating a piano reduction with lilypond 2.25.7 and frescobaldi 3.3.0

2024-01-15 Thread David Kastrup
Bernhard Kleine  writes:

> Dear David,
>
> the file was created this morning from frescobaldi with the
> Partitur-Assistent and the pre-set version of Lilypond was 2.25.7.
> Nothing was done be myself apart from wrinting notes and lyrics.

If the "Partitur-Assistent" creates those overrides, it needs to get fixed.

-- 
David Kastrup



Re: Error/warning when creating a piano reduction with lilypond 2.25.7 and frescobaldi 3.3.0

2024-01-15 Thread David Kastrup
Bernhard Kleine  writes:

> The following MWE gave a warning
>
> C:/Users/bk/AppData/Local/Temp/frescobaldi-n7fp9iem/tmp_isr57mt/document.ly:52:25:
> Warnung: deprecated: missing `.' in property path StaffSymbol.staff-space
>
> I think maybe the frescobaldi is not aware of changes to this lilypond
> version. What do I have change to make the score compile without this
> warning?
>
> Kind regards
>
> Bernhard
>
> \version "2.25.7"

Do _NOT_ update the version header by hand.  That is the job of
convert-ly when it also updates the syntax of your file to a newer
version.

-- 
David Kastrup



Re: zero-duration s to hold marks

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

> As a more general response to this thread, I feel that the reference
> manual needs to have more cross references. I frequently get a bit
> lost trying to find a suitable construct, or discovering what a
> construct means.
>
> This thread has already shown that 1.2.2, 1.3.* and 1.5.* need to
> cross-reference each other.

Fortunately, this is Free Software.  If you feel there is a deficiency
in code or manual, you can contribute a patch to address it, and it is
likely to get accepted since volunteers contributing changes is actually
the only way in which LilyPond is getting improved.

-- 
David Kastrup



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-10 Thread David Kastrup
Jean Abou Samra  writes:

> Raphael:
>> 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.
>
> s1*0 works and is more or less equivalent to <> .

The counterexample is

\new Voice { c'4\< g' c'2 s1*0\! }
\addlyrics { What is this? }

This works when using <> instead.

-- 
David Kastrup



Re: Help with correct pitch after function call within \relative

2024-01-08 Thread David Kastrup
Artur Dobija  writes:

> Dear Experts,
>
> I am working on writing my own function which combines several notes into
> one custom symbol (ligature).
> (For the context, I now about Mensural_ligature_engraver, but I want to
> create something that will allow for more flexibility, as I try to engrave
> symbols as close to one of different manuscripts from different eras and by
> different hands)
>
> My code is like:
> \relative { a \customLigatura { b c d } f }
>
> In my approach, I want to remove all the notes except the first, which will
> receive the ligature stencil.

I can't figure out your function details, but assuming you have
sequential music mus that should (in \relative) follow relative rules
but only have the first note affect the sequence, you would wrap it in

(make-relative (mus) (make-music 'EventChord mus)
  ...)

This works by casting the expression to an EventChord before running it
through the \relative wringer (in case this occurs in \relative) but
making the permanent effect on \relative come from the first element.

The ... itself is never seen by \relative, only the EventChord is.  The
result can, of course, end up something that isn't a valid chord but it
is only used for passing through \relative and then thrown away.


-- 
David Kastrup



Re: Help with correct pitch after function call within \relative

2024-01-08 Thread David Kastrup
Artur Dobija  writes:

> Dear Lilypond-user,
> I sent this mail to the wrong mail, I should have send it to
> lilypond-user-requ...@gnu.org ! Sorry!

No, you sent it to the right address.  lilypond-user-request is the
address for sending list server commands.  Send it an Email with "help"
in the body and it will tell you what it can do for you.

-- 
David Kastrup



Re: Help using a Scheme variable in a function

2024-01-06 Thread David Kastrup
David Kastrup  writes:

> David Kastrup  writes:
>
>> Matthew Fong  writes:
>>
>>> I tried the following inside the function, and all generate errors. I would
>>> like to use the value of rubricsWidthSU in this override.
>>>
>>> \override #'(line-width . \rubricsWidthSU)
>>> \override #'(line-width . #rubricsWidthSU)
>>> \override #'(line-width . ,rubricsWidthSU)
>>
>> The third one is perfect once you fix the difference between ' ("quote")
>> and ` ("backquote").  , ("comma") is only heeded within a backquote.
>
> Oops, sorry.  The nomenclature is , ("unquote") rather than , ("comma").

Sigh.  And while I am at it: ` ("quasiquote") rather than ` ("unquote").

-- 
David Kastrup



Re: Help using a Scheme variable in a function

2024-01-06 Thread David Kastrup
David Kastrup  writes:

> Matthew Fong  writes:
>
>> I tried the following inside the function, and all generate errors. I would
>> like to use the value of rubricsWidthSU in this override.
>>
>> \override #'(line-width . \rubricsWidthSU)
>> \override #'(line-width . #rubricsWidthSU)
>> \override #'(line-width . ,rubricsWidthSU)
>
> The third one is perfect once you fix the difference between ' ("quote")
> and ` ("backquote").  , ("comma") is only heeded within a backquote.

Oops, sorry.  The nomenclature is , ("unquote") rather than , ("comma").

-- 
David Kastrup



Re: Help using a Scheme variable in a function

2024-01-06 Thread David Kastrup
Matthew Fong  writes:

> I tried the following inside the function, and all generate errors. I would
> like to use the value of rubricsWidthSU in this override.
>
> \override #'(line-width . \rubricsWidthSU)
> \override #'(line-width . #rubricsWidthSU)
> \override #'(line-width . ,rubricsWidthSU)

The third one is perfect once you fix the difference between ' (quote)
and ` (backquote).  , (comma) is only heeded within a backquote.

-- 
David Kastrup



Re: build a specific stable lillypond version with git

2024-01-04 Thread David Kastrup
CX  writes:

> Is it possible to build a specific stable lillypond version with sources
> retrieved by git clone instead of a source tarball download?
> If it is possible how can you do this (because I can not find the
> documentation to do it)?

The README in the repository references
<http://lilypond.org/doc/v2.25/Documentation/contributor/compiling>

Have you checked it?

In particular, setting it up from a clone appears to be described in
<http://lilypond.org/doc/v2.25/Documentation/contributor/configuring-make>

-- 
David Kastrup



Re: Voices, shifting and stem direction

2023-12-16 Thread David Kastrup
Jakob Pedersen  writes:

> Greetings!
>
> I've always struggled with multiple voice and getting things to align
> correctly. I assume there's some basic truth I'm missing.

\voiceOne is the topmost voice.  \voiceTwo is the bottommost voice.
\voiceThree is the voice below \voiceOne.  \voiceFour is the voice above
\voiceTwo.

The voices from the top (stem up) are counted 1, 3, 5, ...  The voices
from the bottom (stem down) are counted 2, 4, 6, ...

For anything exceeding two voices, this is not exactly intuitive.

-- 
David Kastrup



Re: Hide a note inside a drumscore

2023-12-13 Thread David Kastrup
Sebastien Richard  writes:

> Hello,
>
> How can I hide a note inside a drum score ? I tried following the doc here 
> https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects 
> but I did not managed to make it work
>
> Here is an example where I want to hide the snare :
>
> \version "2.24.2"
> up = \drummode {
>   \slurDown \grace {sn16 sn(} 4
> }
> \score {
>   \new DrumStaff
>   << \new DrumVoice { \voiceOne \up } >>
>   \layout {}
> }

You are thinking too complicated.

\version "2.24.2"
up = \drummode {
  \slurDown \grace {sn16 sn(} 4
}
\score {
  \new DrumStaff
  << \new DrumVoice { \voiceOne \up } >>
  \layout {}
}

But I consider it very likely that you actually don't want a slur but a
tie:

\version "2.24.2"
up = \drummode {
  \grace {sn16 sn_~} 4
}
\score {
  \new DrumStaff
  << \new DrumVoice { \voiceOne \up } >>
  \layout {}
}

-- 
David Kastrup



Re: lilypond "preprocessor"?

2023-12-12 Thread David Kastrup
Aaron Hill  writes:

> On 2023-12-12 1:04 pm, David Kastrup wrote:
>> Aaron Hill  writes:
>>> 
>>> #(define (add-midi-to-score score)
>>>   (define (has-midi? score)
>>> (any (lambda (x) (ly:output-def-lookup x 'is-midi))
>> Wouldn't that need to be (ly:output-def-lookup x 'is-midi #f) ?
>
> The default is to return '() which I thought was falsey.

In LISP it would be.  In Scheme, it isn't.  `any' is a Scheme function.

-- 
David Kastrup



Re: lilypond "preprocessor"?

2023-12-12 Thread David Kastrup
Aaron Hill  writes:

> On 2023-12-12 12:06 pm, Stefano Antonelli wrote:
>> On Tue, 2023-12-12 at 02:31 -0800, Aaron Hill wrote:
>>> Would this not work?
>>> 
>>> #(define (add-midi-to-score score)
>>>#{ \score { $score \midi {} } #})
>>> toplevel-score-handler =
>>> #(lambda (score)
>>>(collect-scores-for-book (add-midi-to-score score)))
>>> 
>> Indeed it does!
>> Without a \midi block one midi file is produced.
>> However, if there is already a \midi block, two midi files are
>> produced.  I'm not sure if that's going to be a problem aside from the
>> extra processing time.
>
> Any better?
>
> 
> #(define (add-midi-to-score score)
>   (define (has-midi? score)
> (any (lambda (x) (ly:output-def-lookup x 'is-midi))

Wouldn't that need to be (ly:output-def-lookup x 'is-midi #f) ?

>  (ly:score-output-defs score)))
>   (if (has-midi? score) score
> #{ \score { $score \midi {} } #}))

-- 
David Kastrup



Re: right enharmonic spelling

2023-12-09 Thread David Kastrup
Stefan Thomas  writes:

> Dear community,
> I'm using a lot frescobaldi with MIDI input. I would like to know is how
> could I achieve automatically the right enharmonic spelling. e.g. when I
> want to get bis instead of c'?

If I remember correctly, the MIDI entry box allowed you to set the key
it was working with.  Just bump the number of sharps until you like the
enharmonic spelling.

-- 
David Kastrup



Re: accessing current file name in markup function

2023-12-06 Thread David Kastrup
Valentin Petzel  writes:

> Am Mittwoch, 6. Dezember 2023, 23:10:11 CET schrieb Jean Abou Samra:
>> \version "2.24.2"
>> 
>> #(define-markup-command (foo layout props loc-provider) (ly:music?)
>>(display (ly:input-file-line-char-column (ly:music-property loc-provider
>> 'origin))) empty-stencil)
>> 
>> \markup \foo {{}}
>
> Maybe a bit less esoteric:
>
> \version "2.24.2"
>
> locationOf =
> #(define-scheme-function (which) (ly:music?)
>(apply format #f "~a:~a:~a:~a" (ly:input-file-line-char-column 
> (ly:music-property which 
> 'origin
>
>
> \markup { \locationOf {} }

Or even less esoteric:

\version "2.24.2"

locationOf =
#(define-scheme-function () ()
   (apply format #f "~a:~a:~a:~a" (ly:input-file-line-char-column (*location*


\markup { \locationOf }


-- 
David Kastrup


Booth on Chemnitzer Linuxtage 2024

2023-12-05 Thread David Kastrup


Hi,

if you think you'd like to help providing a booth on the Chemnitzer
Linuxtage 2024 (happening on the weekend March 16/17), please checkout
the CfP at
<https://chemnitzer.linux-tage.de/2024/en/programm/anmeldung/live>.

Note that companies but not community projects are charged for booths.
We'd need 2–4 persons manning the booth and prepare suitable
presentation material, and help people with questions and showcase
working on music and performance material.

If we have suitable people and can figure out a suitable goal, we could
think about offering a workshop.  I am not sure we'd get a talk slot
since I just held a LilyPond talk this year.  I'd probably try to land a
Shotcut video editor talk (I've not yet talked about key frames in
Shotcut which allow to the "smooth scrolling" stuff in videos like
<https://youtu.be/spAP7ODPCyg>).  Particularly if I get that talk in, it
would be good to have at least two more people for the booth.

There is a yearly bus organized from the Ruhr area if that helps.  The
conference is the largest in Germany with a similar theme (typically
about 2500 to 3000 visitors).

Interest?  The conference is a friendly meeting place, and presenters
get a nice social event on Saturday with catering.

-- 
David Kastrup



Re: Slur within a slur?

2023-12-03 Thread David Kastrup
Knute Snortum  writes:

> On Sat, Dec 2, 2023 at 6:44 AM Peter Mayes  wrote:
>
>> Here is a fragment of something I am engraving.
>>
>>   e( dis e ais, b g |
>>   e8) r \afterGrace d'!(\trill { cis32 d }  |
>>   c'!16) b^. a^. g^. fis^. e^. |
>>
>> The D following the \afterGrace is slurred up to the C at the beginning of
>> the following bar.
>>
>> I would also like the "{ cis32 d }" grace notes to be slurred, but if I
>> put "{ cis32( d) }", I get a "Warning: already have slur".
>>
>> Is there a way to get a "slur within a slur"?
>>
> When we ask for a MWE, the "w" stands for "working".  That is, you should
> be able to copy and paste the LilyPond source and get it to engrave.  You
> can't do that with your code, thus David Kastrup's reply.

It was probably easy to overlook, but my reply did contain the requested
functionality.  The output was not exactly pretty in most other regards.
I was both answering the question as well as making a point about the
example code.

Sometimes I don't answer questions at all because I am not in the mood
to write a complete example myself for the sake of someone else.  In
this case, I decided to just go with what was given and in that manner
show that a better prepared question would have made for a better
recognizable answer.

The actual recipient of the answer did get the solution.  It just
appears that I confused other readers.

Sorry for that.

-- 
David Kastrup



Re: Slur within a slur?

2023-12-02 Thread David Kastrup
Peter Mayes  writes:

> Here is a fragment of something I am engraving.
>
>   e( dis e ais, b g |
>   e8) r \afterGrace d'!(\trill { cis32 d }  |
>   c'!16) b^. a^. g^. fis^. e^. | 
>
> *
>
> The D following the \afterGrace is slurred up to the C at the beginning of the
> following bar.
>
> I would also like the "{ cis32 d }" grace notes to be slurred, but if I put 
> "{ cis32( d) }", I
> get a "Warning: already have slur".
>
> Is there a way to get a "slur within a slur"?
>
> Thanks in advance

Writing

{
  e( dis e ais, b g |
  e8) r \afterGrace d'!(\trill { cis32\=1( d\=1) }  |
  c'!16) b^. a^. g^. fis^. e^. | 
}

gives me


and a bar check warning.

-- 
David Kastrup


Re: suggestion for slur?

2023-11-24 Thread David Kastrup
Mario Bolognani  writes:

>\override TrillSpanner.bound-details.left.text = #'()
>   \startTrillSpan
>  works for 2.24 
>
> This is an acceptable result :

What piece of standalone code got you get this output?  Without
providing any code to experiment with, you easily require 10-fold the
amount of work for anybody willing to help you.  That decreases your
chances of finding volunteers to make useful suggestions.

-- 
David Kastrup



Re: Emacs Mode Problem with includes

2023-11-14 Thread David Kastrup
Laurie Savage  writes:

> Thanks David,
>
> I think I'll stay with Frescobaldi! Emacs doesn't seem to edit .ly files
> any more easily so there isn't much advantage in tweaking it to behave with
> my customised Include files. As for your question about where I found the
> documentation for the location of my Includes: Options > Customise Emacs ->
> All Settings Matching > "lilypond".
>
> It's a shame, I found Emacs to be the best LaTeX editor I tried.

Yes, there is really no comparison.

Emacs has better MIDI recognition than Frescobaldi, and editing
Scheme-only files is nicer.  And it blows the socks off anything as a
viewer for Lilypond's Info documentation.

I use Emacs for editing LilyPond because I am used to working with Emacs
for everything.  But the LilyPond mode is really not holding a candle to
what Frescobaldi offers.

-- 
David Kastrup



Re: top-level `\midi` doesn't work as expected

2023-11-12 Thread David Kastrup
Werner LEMBERG  writes:

> +A @code{@bs{}midi} block outside of @code{@bs{}score} does
> +@emph{not} create a MIDI file.}

MIDI settings can be changed globally (or in a book or bookpart), but
the generation of an actual MIDI file is only triggered when a \midi
block is encountered inside of a \score .

Something like that.  It doesn't help the user as much when you tell
them what doesn't create a MIDI file: after all, they will rather be
looking at how to create one.

-- 
David Kastrup



Re: Cent rit between staves

2023-11-09 Thread David Kastrup
Robin Bannister  writes:

> Will Turner wrote:
>> Thank you. I've been using Lilypond for only a couple weeks. 
>
> This automatic conversion will give you the wrong impression about how
> readable Lilypond code can be.
>
>
>
> I thi[nk] this is
>> the text I should insert:
>> \new Dynamics{
>> s93-"rit." |
>> }
>
> But this code will start the rit when the s93 starts.
> To start the rit when the s93 has finished, insert an empty chord
>{ s93 <>-"rit." }

No such thing as s93.  Maybe s1*93 was meant instead?

-- 
David Kastrup



Re: Two small issues

2023-11-02 Thread David Kastrup
Peter Mayes  writes:

> Ideally what I want is the first version, but with the stave extending
> just 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 continued
to the next line.  This puts the key cancellation _before_ the bar line.

-- 
David Kastrup


Re: Show TacetStaff when StaffGroup empty

2023-11-01 Thread David Kastrup
Jeff Olson  writes:

> On 11/1/2023 6:37 AM, David Kastrup wrote:
>> <https://events.williams.edu/event/viennese-bass-lecture-demo-bret-simner/>
>
> Thanks, David. Now I'm really smiling to have learned something new!
> Your knowledge is more encyclopedic than Wikipedia.

That claim is more of a stretch than a gut string, I am afraid.

-- 
David Kastrup



Re: Show TacetStaff when StaffGroup empty

2023-11-01 Thread David Kastrup
Jeff Olson  writes:

> On 11/1/2023 6:37 AM, David Kastrup wrote:
>> <https://events.williams.edu/event/viennese-bass-lecture-demo-bret-simner/>
>
> Thanks, David. Now I'm really smiling to have learned something new!
> Your knowledge is more encyclopedic than Wikipedia.
>
> I once mail-ordered a fretted u-bass but exchanged it for the fretless
> style, which I find easier to play (lighter touch) and more
> expressive.  Intonation can even be better on fretless as the strings
> can develop nonuniformities in density. Wonder if that's why those
> fretted basses from the 1770's died out?

I think it is more likely due to vibrato having become a tenet of string
sound (partly because it hides the fundamental problem of intonation)
and frets considerably reduce the amount and change the character of
vibrato (I know that you can bend the pitches of the sitar a whole lot,
but the character of its frets is quite different).

Viols were used much more polyphonically than modern bowed strings, so
vibrato wasn't really an option and the frets improved intonation more
than they deteriorated it.

For plucked/hammered/struck strings, the mathematical time/frequency
unsharpness relation makes the intonation stand out less because of the
tone decay (for example, few people notice that pizzicato strings sound
higher than when they are bowed).

-- 
David Kastrup



Re: Show TacetStaff when StaffGroup empty

2023-11-01 Thread David Kastrup
Jeff Olson  writes:

> The only reason I cc'd Harm was that he was one of five listed under
> Documentation in http://lilypond.org/authors.html, and in previous
> posts he had identified himself as a [fellow] classical guitarist.  So
> I imagined he might smile, as I did, at seeing the double bass listed
> among fretted instruments.

<https://events.williams.edu/event/viennese-bass-lecture-demo-bret-simner/>

-- 
David Kastrup



Re: Show TacetStaff when StaffGroup empty

2023-10-31 Thread David Kastrup
Jean Abou Samra  writes:

> Le mardi 31 octobre 2023 à 20:40 +0100, David Kastrup a écrit :
>
>> > I'm not the OP but that is excellent documentation, save for one word:
>> > 
>> > 
>> > "In the following example, staves devoted to wind instruments are
>> > removed in the second system; however, the double bass is not,
>> > because it is part of the larger group of *fretted* strings, which
>> > is playing."
>> > 
>> > 
>> > That larger group in the example consists of Violin I, Violin II,
>> > Alto, Cello, Double bass.
>> > 
>> > 
>> > Nothing to fret about, unless you're in documentation, eh Harm?
>> 
>> I know Harm as a pretty good fretted string instrument player.  Probably
>> this should just be "strings" which it typically associated with the
>> kind of instruments listed there and has the advantage that you don't
>> get into trouble for a) pizzicato (which is weird for "bowed strings")
>> or b) viol (which is both bowed and fretted and may be used in a string
>> section for nostalgically informed practice).
>
>
> Why is the blame being put on Harm here?
>
>
> ```
> commit 8c166ecb8d1049c3c54f0488dbcbe22de6eb6a51
> Author: Jean Abou Samra 
> Date:   il y a 3 ans et 5 mois
>
>
> Add dynamic-interface to keepAliveInterfaces
> 
> This will prevent \Remove[All]EmptyStaves from removing
> Dynamics contexts containing dynamics attached to spacer
> rests but no actual notes (the standard use case
> for a Dynamics context). Also improve the documentation
> about \RemoveEmptyStaves and \RemoveAllEmptyStaves.
> ```
>
>
>
> (That was my first patch.)
>
>
> Given that I was way less comfortable with English at the time
> than I am today, it is possible that I fell into the trap of a
> false cognate: the French "cordes frottées" sounds similar to
> "fretted strings" but in fact means "bowed strings".

Well, maybe I had the wrong reading of the posts here.  Hopefully not
the wrong writing.

<https://gitlab.com/lilypond/lilypond/-/merge_requests/2158>

-- 
David Kastrup



Re: Show TacetStaff when StaffGroup empty

2023-10-31 Thread David Kastrup
Jeff Olson  writes:

> On 10/30/2023 11:27 AM, Michael Werner wrote:
>> This is based on
>> http://lilypond.org/doc/v2.25/Documentation/notation/hiding-staves
>
> I'm not the OP but that is excellent documentation, save for one word:
>
>"In the following example, staves devoted to wind instruments are
>removed in the second system; however, the double bass is not,
>because it is part of the larger group of *fretted* strings, which
>is playing."
>
> That larger group in the example consists of Violin I, Violin II,
> Alto, Cello, Double bass.
>
> Nothing to fret about, unless you're in documentation, eh Harm?

I know Harm as a pretty good fretted string instrument player.  Probably
this should just be "strings" which it typically associated with the
kind of instruments listed there and has the advantage that you don't
get into trouble for a) pizzicato (which is weird for "bowed strings")
or b) viol (which is both bowed and fretted and may be used in a string
section for nostalgically informed practice).

-- 
David Kastrup



Re: Formatting for a tie

2023-10-29 Thread David Kastrup
Jean Abou Samra  writes:

> Le samedi 28 octobre 2023 à 21:21 -0400, Samuel Sloniker a écrit :
>> How can I format this tie in Lilypond? I'm writing a Lilypond file for an
>> existing song; this image is from a scan of a hymnal.
>
>
> If you are having trouble finding the answer to this in the
> documentation or Web searches, it's because the term for this bow is “
> slur” (not “tie”). A tie is between two notes having the same pitch,
> and makes the second silent so that the first one is effectively
> prolonged.

Not every instrument is purely percussive, and even most percussive
instruments have some way of ending a note and/or providing for letting
it decay naturally.  Your description makes it sound as if there is no
difference between a rest and a note continued by a tie.

-- 
David Kastrup



Re: Pickup measure

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

> @David Actually my results (MacPorts lilypond 2.24.2 and 2.25.8) differ from 
> what you report..
>
> PartPOneVoiceOne =  \relative fis' {
> \clef "treble" \time 3/4 \key d \major | % 1
> \tempo "Prayerfully" 4=69 \stemUp fis4 s2 ^\markup{ \bold\large
> {Abide with Me; ’Tis Eventide} } ^\markup{ \bold\large { } } ^
> "Hymn 165" | % 2
>
> The s2 gets inserted for me by musicxml2ly

Ah, you are right.  What musicxml2ly doesn't do, however, is inserting
any \partial.  So the rhythm does not go bonkers because there isn't a
partial measure to start with.

I am not able to properly judge this from the MusicXML: how does this
appear to Finale?  In particular, where does measure 1 start?  With the
"partial" measure or the first full measure?

-- 
David Kastrup



Re: Pickup measure

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

> Thank you, David. Attached is the Musicxml file. I also need to find a way
> for Frescobaldi to import this file as a choirstaff rather than a piano
> staff.. This is so that the cross-staff bar lines are hidden. If you have
> suggestions for that, please let me know. Otherwise, I'll submit a new
> request for help.

Well, musicxml2ly converts the rhythmic structure just fine.  Headers
and footers look somewhat messy, and there is an extraordinary amount of
power chords (essentially, everything that isn't a seventh chord) that I
consider suspect.

I think Frescobaldi has its own MusicXML converter: if that is what you
have been using, you should file a problem report with Frescobaldi
rather than LilyPond.

-- 
David Kastrup



Re: Pickup measure

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

>> On Sat, Oct 28, 2023 at 4:26 AM David Kastrup  wrote:
>>
>>> Will Turner  writes:
>>>
>>> > Here is my code:
>>> > PartPOneVoiceOne =  {
>>> > \clef "treble" \time 3/4 \key d \major | % 1
>>> > \tempo "Prayerfully" 4=69 \stemUp \partial 4 fs'4 s2
>>> >
>>> > And that gives me the problem I described.
>>>
>>> What's the s2 at the end supposed to be for?
>
> I imported this from a Musicxml file that I exported from Finale.

That's sort of important information that you omitted.

> So, Finale put the s2 at the end, but I don't know why.

Or Finale didn't, and musicxml2ly made a mistake.  In which case this
would warrant fixing.  Do you have the MusicXML available?

> Y'all are my heroes. I removed the s2 from the first measure in both
> clefs, and it solved my problem.  Where do I send the check? ;)

My bank actually refuses cashing foreign country checks these days, so
I cannot avail myself of this particular offer.  While I like the
prospect of a simple recurring source of income, I think it would be
more desirable in the long run to make sure that pickup measures travel
with some reliability from Finale into LilyPond.

So it would be good to take a look at the involved MusicXML.

-- 
David Kastrup



Re: Pickup measure

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

> Here is my code:
> PartPOneVoiceOne =  {
> \clef "treble" \time 3/4 \key d \major | % 1
> \tempo "Prayerfully" 4=69 \stemUp \partial 4 fs'4 s2
>
> And that gives me the problem I described.

What's the s2 at the end supposed to be for?

-- 
David Kastrup



Re: Pickup measure

2023-10-27 Thread David Kastrup
Will Turner  writes:

> I imported a Musicxml file of a hymn. The first measure is a pickup measure
> but it imports as a full measure 3/4 with only a quarter note in it. You
> can see that the measure appears to contain room for 3 beats instead of
> one. When I play this in Musescore, it plays as a pickup measure, and the
> measure doesn't have all that space in it.
>
> [image: image.png]
>
> Using \partial 4 on the first measure, I'm trying to make the existing
> first measure look like a pickup measure and, if possible, actually be a
> pickup measure. The result I get looks like this. It redistributes the
> other measures and the end of every line is now a pickup measure. How do I
> make only the first measure a pickup measure?
>
> [image: image.png]

I suspect you write something like

{ \time 3/4 c'4 \partial 4 ...

when you would need to write

{ \time 3/4 \partial 4 c'4 ...

Namely, you need to write \partial 4 _before_ the partial measure, not
after it.

-- 
David Kastrup



Re: Tuplet brackets too short?

2023-10-20 Thread David Kastrup
Mark Knoop  writes:

> At 05:33 on 20 Oct 2023, Werner LEMBERG wrote:
>>> Shouldn't both tuplet brackets span every notecolumn within the
>>> purview of the last note's duration?
>
>> Yes, at least according to Gould.  Using `tupletFullLength` helps, but
>> now tuplet brackets are too long:
>
> Since 2.25 there is also:
>
>   \override TupletBracket.span-all-note-heads = ##t
>
> which I think does the right thing, at least in the Gould
> "old-style".

Not with regard to the problem I describe.

> Surely this should be the default?

Different problem, different question.

-- 
David Kastrup



Tuplet brackets too short?

2023-10-19 Thread David Kastrup

If I write

\new Staff
{ \time 2/4
  << \tuplet 3/2 { c''4 d'' c'' } \\ \tuplet 3/2 { g'4 a'2 } >>
}

the results look awful:


Shouldn't both tuplet brackets span every notecolumn within the purview
of the last note's duration?  I think this might also apply if the upper
voice contained 4 eighths instead of the three triplets:



-- 
David Kastrup


Re: Where is my tuplet bracket?

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

>> \new Staff {
>>   \key c \minor
>>   < es' g' > < bes' d''~ >2. |
>>   \tuplet 3/2 \voices "",2 << { \voiceOne d''4 c'' es'' \oneVoice } \\
>>{ g'4 as'2 } >>
>>   < f' as' >4  |
>> }
>
> Looks like a bug, so please file a report.

The problem is that I don't know where to locate the bug.  The
difference appears to be that \voices creates a \context Staff wrapper
around the parallel construct.  I suspect that the idea is to help with
continuing voices, like if you compare the outputs of

{ << { \voiceOne e'2~ \oneVoice } \new Voice { \voiceTwo c'2 } >> e'2 }

{ \voices "",2 << { \voiceOne e'2~ \oneVoice } \\ c'2 >> e'2 }

The second clearly looks more sensible, but if you look closely, there
still isn't a tie, so the voice does not actually continue in this
situation.  So this situation still is not helped in any manner, and the
one thing \voices has over unadorned << \\ >> is that it takes named
contexts.

Clearly this discrepancy is worth removing; I just don't know right now
why it exists in the first place.  I must have been thinking something.™

Now independent from the two constructs differing by a \context Staff
wrapper (added in voicify-music in scm/music-functions.scm).

What is additionally puzzling is that either change is accomplished by
voicify-music, so why is one use affected and the other not?  Or does
this happen when voicify-music is applied multiple times (the second
time during scorification)?

All this appears mostly unrelated to \tuplet tripping over one but not
the other incantation.

-- 
David Kastrup



Re: Where is my tuplet bracket?

2023-10-16 Thread David Kastrup
William Rehwinkel  writes:

>> On 10/16/23 19:09, David Kastrup wrote:
>>> William Rehwinkel  writes:
>>> 
>>>> Dear David,
>>>>
>>>> This seems like an improper/unintended use of \tuplet.
>>> How so?
>>> How is
>>>\tuplet 3/2 \voices "",2 << { \voiceOne d''4 c'' es'' \oneVoice }
>>> \\
>>>   { g'4 as'2 } >>
>>> improper while
>>>\tuplet 3/2  << { \voiceOne d''4 c'' es'' \oneVoice }
>>> \new Voice { \voiceTwo g'4 as'2 } >>
>>> isn't?  Either one does not create a new voice context for the upper
>>> line, as the tie reaching into the upper voice (here omitted) proves.
>> 
>
>
> I don't know, but what I meant to say is that this use of \tuplet
> outside of \voices or a split into multiple voices seems to me to be
> "undefined behavior" ("unspecified"?).

Says who?  Are you saying that your proposed variant is wrong as it does
not differ in that regard?

-- 
David Kastrup



Re: Where is my tuplet bracket?

2023-10-16 Thread David Kastrup
William Rehwinkel  writes:

> Dear David,
>
> This seems like an improper/unintended use of \tuplet.

How so?

How is

  \tuplet 3/2 \voices "",2 << { \voiceOne d''4 c'' es'' \oneVoice } \\
  { g'4 as'2 } >>

improper while

  \tuplet 3/2  << { \voiceOne d''4 c'' es'' \oneVoice }
\new Voice { \voiceTwo g'4 as'2 } >>

isn't?  Either one does not create a new voice context for the upper
line, as the tie reaching into the upper voice (here omitted) proves.

-- 
David Kastrup



Where is my tuplet bracket?

2023-10-16 Thread David Kastrup
\new Staff {
  \key c \minor
  < es' g' > < bes' d''~ >2. |
  \tuplet 3/2 \voices "",2 << { \voiceOne d''4 c'' es'' \oneVoice } \\
			  { g'4 as'2 } >>
  < f' as' >4  |
}

Admittedly, this is still better than the warning and crash an earlier
version rather than current master puts out.

But now there is neither warning nor crash.

-- 
David Kastrup


Re: Is there a glyph? (or something) to indicate a clap in a vocal piece?

2023-10-16 Thread David Kastrup
Kenneth Wolcott  writes:

> Hi;
>
>   On a related note (pun not intended!) I have seen a Tuba solo score
> where there is a notation to "slap" the instrument, shown as literally
> a "slap" like a "rit." or ".cresc.". I was wondering how to engrave
> that...other than the obvious...

For tuba solo I think it would be important to indicate that one is
supposed to slap the instrument rather than the player.

-- 
David Kastrup



Re: Is there a glyph? (or something) to indicate a clap in a vocal piece?

2023-10-16 Thread David Kastrup
Kevin Cole  writes:

> On Mon, Oct 16, 2023 at 8:33 AM David Kastrup  wrote:
>>
>> Kevin Cole  writes:
>>
>> > I'm transcribing a pub song, and at one point, there's a lyric
>> > "(clap)(clap)" with "X X" on the staff.
>> >
>> > I've seen that one can have a "\drum {hc4 hc4}" but I want something like a
>> > layout of "| e4. a4. | X X g8 |" in 6/8 time all on one staff -- which I
>> > guess in MIDI would probably be something like "r8 hc8 r8 hc8 r4" in a drum
>> > track (voice?) for that measure with the claps...
>>
>> Something like
>>
>> \new OneStaff {
>>   \new Staff {
>> \time 6/8
>> e4. a4. |
>> \drums \with { \omit TimeSignature } { r8 hc8 r8 hc8 r4 } |
>> a2.
>>   }
>> }
>>
>> maybe ?
>
> Thanks. A step in the right direction, but now I have the lyrics in
> the center of the staff, and the "(clap) (clap)" in the lyrics
> skipping over the drum claps. See attached PNG. (Oh, I'm using "s8" in
> place of "r8" too, but I'm thinking that isn't a mistake, since I
> don't want rests to show up.) The minimum [non]-working example:
>
> %
> \score {
>   \new OneStaff {
> <<
>   \new Staff {
> \new Voice = "mel" { \melody }
>   }
>   \new Lyrics \lyricsto mel \words
> >>
>   }
> }
> %

Frankly, I must have completely misinterpreted your request.  It sounded
to me like you were talking about drum-style notes.  A OneStaff context
is for putting several contexts which usually would have their own lines
("vertical axis") into one.

Maybe you want to show a hand-drawn sketch of what you want because at
least I have no idea what we are talking about at this point of time.

-- 
David Kastrup



Re: Is there a glyph? (or something) to indicate a clap in a vocal piece?

2023-10-16 Thread David Kastrup
Kevin Cole  writes:

> I'm transcribing a pub song, and at one point, there's a lyric
> "(clap)(clap)" with "X X" on the staff.
>
> I've seen that one can have a "\drum {hc4 hc4}" but I want something like a
> layout of "| e4. a4. | X X g8 |" in 6/8 time all on one staff -- which I
> guess in MIDI would probably be something like "r8 hc8 r8 hc8 r4" in a drum
> track (voice?) for that measure with the claps...

Something like

\new OneStaff {
  \new Staff {
\time 6/8
e4. a4. |
\drums \with { \omit TimeSignature } { r8 hc8 r8 hc8 r4 } |
a2.
  }
}

maybe ?

-- 
David Kastrup



Re: skip of defined length in lyrics?

2023-10-13 Thread David Kastrup
Graham King  writes:

> I'm setting a verse anthem, in which certain voices are instrument-only
> until the chorus, at which point they are doubled by singers.
>
> How can I include a skip of defined duration in the lyrics?  \skip
> counts notes or syllables,

It doesn't.  It corresponds to one syllable/note whatever the duration.

> but I'd like to count breves and minims, to avoid the lyrics-alignment
> containing a magic number that is sensitive to subsequent editing of
> the preceding music.
>
> I've seen a reference somewhere to #skip-of-length but can't find any
> documentation.

You can just use \skip \music but you have to forego rhythmic alignment
using \lyricsto .

> % ~~
> \version "2.25.7"
>
> notes = { \repeat unfold 12 c'4 }
>
> words = \lyricmode { 
>   \repeat unfold 2 { \skip 1 }  % Lyrics to start at bar 3.
>   one two three four 
> }
>
> { << \new Voice = "cantor" \notes
>  \new Lyrics \lyricsto cantor { \words } 
>   >>
> }
> % ~~

Check out
% ~~
\version "2.25.7"

notes = { \repeat unfold 12 c'4 }

words = \lyricmode { 
  \skip 1*2  % Lyrics to start at bar 3.
  one4 two three four 
}

{ << \new Voice = "cantor" \notes
 \new Lyrics \with { associatedVoice = "cantor" } { \words } 
  >>
}
% ~~
  
Note that the associatedVoice may seem irrelevant when the timing isn't
derived from it, but it is required for a few things like proper
placement of syllable extenders.

Also note how the syllable "one" gets an explicit length of a quarter.
In real music, you'll get a lot more note lengths in the lyrics.

This will look uglier in the source, but it tends to be quite more
robust against music edits not affecting the syllable positions.  And of
course, skips become quite easier to accommodate.

-- 
David Kastrup


Re: Anything similar to to-barline for extender lines of cresc/dim?

2023-10-10 Thread David Kastrup
Mats Bengtsson  writes:

> Hi,
>
> Is there anything analogous to Hairpin.to-barline = #t that applies to
> the extender line of textual dynamics like \cresc or \dim?
>
> Unfortunately, I don't have a copy of Gould, but to me all the options
> I tried below look worse than having an extender line that ends
> exactly below the bar line.
>
> \version "2.25.9"
>
> \fixed c' {
> <>^"Extending into next bar"
> c4 \cresc d e f |
> g \f f g a |
> g4 \dim f e d |
> c \mf  d c b, |
> <>^"Especially ugly at line breaks"
> c4 \cresc d e f |
> g \f f g a |
> g4 \dim f e d | \break
> c1 \mf |
> <>^"Ended (too early) before the bar"
> c4 \cresc d e f \! |
> g \f f g a |
> g4 \dim f e d \! |
> c \mf d c b, |
> <>^\markup\column{"Still too early" "adjusting bound-details" }
> \override DynamicTextSpanner.bound-details.right.attach-dir = #RIGHT
> c4 \cresc d e f \! |
> g \f f g a |
> g4 \dim f e d \! | \break
> c1 \mf |
>
> }
>
> Any ideas, or should I file it as a feature request?

Have you tried not "anything like to-barline" but rather _exactly_
to-barline ?

Like

c -\tweak to-barline ##t \cresc

and its ilk?

-- 
David Kastrup



Re: Still failing to operate lilypond 2.20.0 64-bit version.

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

> msk...@ansuz.sooke.bc.ca writes:
>
>> On Fri, 6 Oct 2023, Werner LEMBERG wrote:
>>
>>> Thanks.  I think it's ghostscript – there are no pre-built packages
>>> available either.  While LilyPond doesn't link to it in normal builds,
>>> gs is needed for converting LilyPond's EPS output files to PDF.  In
>>> other words, a MacPorts user still needs a compiler...
>>
>> If LilyPond doesn't link to gs but only execs it, then gs having an
>> incompatible version of GPL from LilyPond's version should not render
>> either binary undistributable, even together.  GNU's position seems to
>> be that exec is a boundary across which it's not necessary for
>> licenses to be compatible.
>
> GNU has no position, the FSF has.

Post Scriptum: of course in this case, the relevant interpretation (in
terms of whether one lands before court) would be that of Artifex as the
Ghostscript copyright holder.  I don't think that they'd go to court
over LilyPond using a separately distributed Ghostscript that is not
just usable by LilyPond.

The other way round we are talking about LilyPond copyright holders
going to court because of Ghostscript being called by LilyPond.  This
would only make sense for copyright holders before the time that
Ghostscript became a fixture for graphics processing and TeX was used
instead, so we are talking about copyright holders from LilyPond version
1.x and earlier.  At that time, however, LilyPond was licensed under
GPLv2+.

It just doesn't come together as something that I can see as a viable
threat scenario.

-- 
David Kastrup



Re: Still failing to operate lilypond 2.20.0 64-bit version.

2023-10-06 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes:

> On Fri, 6 Oct 2023, Werner LEMBERG wrote:
>
>> Thanks.  I think it's ghostscript – there are no pre-built packages
>> available either.  While LilyPond doesn't link to it in normal builds,
>> gs is needed for converting LilyPond's EPS output files to PDF.  In
>> other words, a MacPorts user still needs a compiler...
>
> If LilyPond doesn't link to gs but only execs it, then gs having an
> incompatible version of GPL from LilyPond's version should not render
> either binary undistributable, even together.  GNU's position seems to
> be that exec is a boundary across which it's not necessary for
> licenses to be compatible.

GNU has no position, the FSF has.  And it is sort of fuzzier: after all,
dynamic libraries are also some kind of boundary.  The principal
differentiation is whether that boundary is artificial and the separate
parts operate as a single unseparable unit.

Ghostscript works with PostScript as a generic interface, it has lots of
other uses, and LilyPond can work without using Ghostscript (it can
produce PostScript files instead).

I think that puts enough of a conceptual barrier between the two.  Using
the Ghostscript API would be different: I'd expect distributions to
avoid that without explicit non-trivial user action.

> Of course, whether MacPorts's automated determination of
> distributability can capture this distinction, is another question.

-- 
David Kastrup



Re: Lyrics above staff

2023-10-06 Thread David Kastrup
Jean Abou Samra  writes:

> 
>
>
>> Le 6 oct. 2023 à 15:47, David Kastrup  a écrit :
>> \new Staff = "staff" {
>>  c'1
>> } \addlyrics \with { alignAboveContext = "staff"} { Om }
>
>
> OMG! I didn't know that syntax at all. It looks undocumented.

<https://gitlab.com/lilypond/lilypond/-/issues/4537>

>From the issue description:

I am actually having problems finding any suitable place to document
this: use of \with ... with anything but \new ... does not seem
documented.

This would likely mean \chords \with ..., \lyrics \with ... and those.

-- 
David Kastrup



Re: Lyrics above staff

2023-10-06 Thread David Kastrup
Dimitrios Sykias  writes:

> Is it possible to place lyrics above staff using \addlyrics? I tried
> “\addlyrics { \with { alignAboveContext = "staff" }” but it didn’t
> work. Thanks!

It does here.

\new Staff = "staff" {
  c'1
} \addlyrics \with { alignAboveContext = "staff"} { Om }

Maybe you are not clear about what the name behind alignAboveContext
signifies?  You need to have a VerticalAxis carrying context at the same
level with the given _name_, not with a particular _type_.

-- 
David Kastrup



Re: Overwrite key signature with numbers

2023-10-03 Thread David Kastrup
Valentin Petzel  writes:

> Damn it, turns out the key engraver has an hardcoded path to always create 
> Key 
> Cancellations for keys with no alteration.
>
> So one would need to do
>
> \override KeyCancellation.stencil = ##f
>
> which is of course a bit wonky as compared to telling Lilypond to not create 
> Cancellations in the first place (not that it matters), which is why I went 
> extra mile to use
>
> printKeyCancellation = ##f
>
> Well, thank you for pointing it out!

If you want to go the extra mile, you'd only print ♮ in key cancellation
messages grobs and would precede them with the _previous_ number of
sharps/flats.  So switching from E major to B♭ major would print 4♮2♭.

You would not get 0♮ however (not as a main signature, not as a
cancellation signature).

This may or may not be what the OP wants.  But it would be one
semi-consistent way of doing this.

-- 
David Kastrup



Re: Overwrite key signature with numbers

2023-10-03 Thread David Kastrup
Robert Mengual  writes:

> Oh David's right, if the music ends with no alterations it is printing the
> key cancellation, even when it has been explicitely set to false.[image:
> image.png]
> What can I do in this case? I would like to keep the number+alteration but
> remove the 7 natural signs before that.

Just add

\omit KeyCancellation

into the context amendment for \Staff in the \layout block.

-- 
David Kastrup



Re: Overwrite key signature with numbers

2023-10-02 Thread David Kastrup
Valentin Petzel  writes:

> Hi Robert,
>
> you could do it like this:
>
> \version "2.23.6"
>
> \layout {
>   \context {
> \Staff
> \override KeySignature.text =
> #(lambda (grob)
>(let* ((alt (ly:grob-property grob 'alteration-alist))
>   (alts (map cdr alt))
>   (tot (* 2 (apply + alts)))
>   (acc (cond ((= tot 0) (markup #:musicglyph 
> "accidentals.natural"))
>  ((> tot 0) (markup #:musicglyph "accidentals.sharp"))
>  (else (markup #:vcenter #:musicglyph 
> "accidentals.flat")
>  (markup #:vcenter #:number (number->string (abs tot)) acc)))
> \override KeySignature.stencil = #ly:text-interface::print
> printKeyCancellation = ##f
>   }
> }
>
> expt = { \key c \major c d e f }
>
> {
>   \clef bass
>   \expt
>   \transpose c cis \expt
>   \transpose c des \expt
>   \transpose c d \expt
>   \transpose c dis \expt
>   \transpose c es \expt
>   \transpose c e \expt
>   \transpose c f \expt
>   \transpose c fis \expt
>   \transpose c ges \expt
>   \transpose c g \expt
>   \transpose c gis \expt
>   \transpose c as \expt
>   \transpose c a \expt
>   \transpose c ais \expt
>   \transpose c bes \expt
>   \transpose c b \expt
> }
>
> Cheers,
> Valentin

To pour some rain on your parade, end the music with a final \expt ...
My revenge for you beating me to the punch line.

-- 
David Kastrup



Re: Initial rests in MIDI not included?

2023-09-28 Thread David Kastrup
David Wright  writes:

> Yes, like lilymidi --pretty, the evidence that there was silence
> at the beginning of the file is circumstantial, necessitating that
> the OP believed I sat through the 160 seconds of silence before
> any notes were played.
>
> BTW where is the output of lilymidi documented?

A quick `git grep lilymidi` confirms that there is is no documentation
for lilymidi.  Zero, zilch, nada.

It is installed with other binaries and is used by
elisp/lilypond-song.el (but what for?).  I'd have expected it to be used
as part of 'make check' for comparing MIDI outputs, but that doesn't
appear to be the case, either.

So I don't really know how I know about it: probably by typing

lily 

and getting curious about the completions.  It is a rather handy
checking tool for which I found no obvious substitute in the boxes of
MIDI tools available on a typical GNU/Linux installation.

-- 
David Kastrup



Re: Initial rests in MIDI not included?

2023-09-27 Thread David Kastrup
Kevin Cole  writes:

> On Wed, Sep 27, 2023 at 8:28 AM Jean Abou Samra  wrote:
>
>> Le mercredi 27 septembre 2023 à 08:22 -0400, Kevin Cole a écrit :
>> > And... we have a winner! It's a timidity problem!
>>
>> From what I can read, it is the expected behavior of timidity, but there
>> is a --preserve-silence option to change it.
>>
>
> Yeah, I was getting to that. ;-) Once it became a timidity issue, I
> suspected there would be an option to alter that behavior. It just
> hadn't occurred to me that timidity would default to happily ignoring
> the quiet bits.

I have no idea why anybody would consider that a sensible default, to be
honest.  I have a hard time imagining a sensible use case at all.

Possibly skipping initial silences in manually recorded MIDI files that
aren't edited at all in a sequencer?

But that does not really sound all that sensible.

-- 
David Kastrup



Re: Initial rests in MIDI not included?

2023-09-27 Thread David Kastrup
Jean Abou Samra  writes:

> Le mercredi 27 septembre 2023 à 08:22 -0400, Kevin Cole a écrit :
>> And... we have a winner! It's a timidity problem!
>
>
> From what I can read, it is the expected behavior of timidity, but there
> is a --preserve-silence option to change it.

I don't have timidity installed and consequently am also missing its
manual pages or I'd have checked.

-- 
David Kastrup



Re: Initial rests in MIDI not included?

2023-09-27 Thread David Kastrup
Kevin Cole  writes:

> I just tried it again with the attached, and still do not get "The Sound of
> Silence" ;-)
>
> $ cat mwe.ly
> \version "2.24.2"
> \language "english"
> global = {
>   \time 4/4
>   \key f \major
>   \tempo 4=150
> }
> PartFour = \relative a {
>   \global
>   \clef "treble"
>   \partial 4 a4
> }
> \score {
>   \new Voice = "PartFour" {
> R1*32 R1*24
> \repeat unfold 4 {
>   \transpose c c,, { \PartFour  }
> }
>   }
>   \midi { }
> }

$ lilymidi --pretty /tmp/mwe.midi 
Filename: /tmp/mwe.midi
MIDI format:  1 (one or more simultaneous tracks)
Divisions:1536 per whole note
#Tracks:  2

Track 1:
Time 0:
Text:   creator: 
Text:   LilyPond 2.24.2   
Time signature: 4/4, metronome 1/4
Tempo:  100 msec/quarter
Time 86016: 
Time signature: 4/4, metronome 1/4
Tempo:  40 msec/quarter
Time 86400: 
Time signature: 4/4, metronome 1/4
Time 86784: 
Time signature: 4/4, metronome 1/4
Time 87168: 
Time signature: 4/4, metronome 1/4
Time 87552: 
End of Track

Track 2:
Time 0:
Track name: \new:PartFour
Time 86016: 
Key signature: F major
Note on: Channel 0, A1(33)@90
Time 86400: 
Note off: Channel 0, A1(33)
Key signature: F major
Note on: Channel 0, A1(33)@90
Time 86784: 
Note off: Channel 0, A1(33)
Key signature: F major
Note on: Channel 0, A1(33)@90
Time 87168: 
Note off: Channel 0, A1(33)
Key signature: F major
Note on: Channel 0, A1(33)@90
Time 87552: 
Note off: Channel 0, A1(33)
End of Track


What is apparent is that it may be a bad idea to first pause a number of
bars and only then include \global with a different \tempo .

But the location of the tempo change aside your principal problem, like
before, seems to be that timidity as a player skips initial rests.

Try fluidsynth -ia pulseaudio -n on your MIDI file as an alternative (on
my system, I get inexplicable problems with -ia pipewire or -ia alsa)
instead.

-- 
David Kastrup



Re: Initial rests in MIDI not included?

2023-09-27 Thread David Kastrup
David Wright  writes:

> On Wed 27 Sep 2023 at 01:13:09 (+0200), Jean Abou Samra wrote:
>> After replacing “ ... ” with “ c' ”, I got the expected MIDI output with
>> LilyPond 2.24.2, i.e., lots of silence and four C notes at the end.
>
> I did the same, and I attach a screenshot of audacious playing the
> file, called mid.midi. The little white blip above the Play button
> is the equaliser graph displaying the first c' at 2 min 40 sec of
> playing time. (Yawn.)
>
> I also attach a screenshot of timidity playing the same file. Notice
> the length of the file: 4 seconds; and that's how long it plays for.

That's all circumstantial evidence.  Nobody so far has actually attached
the resulting MIDI file and/or the output of

lilymidi --pretty

on it.  That would be way more informative.

-- 
David Kastrup



Re: Strange behavior of repeat unfold inside a repeat volta with alternatives.

2023-09-26 Thread David Kastrup
Stéphane SOPPERA  writes:

> I observed a strange behavior with a /repeat unfold/ inside a /repeat
> volta/ with /alternatives/. See the attached /bug_repeat__ok.ly/ for
> full source.
>
> Using Lilypond 2.24.1:
>
>     \repeat volta 2 {
>   %% Here we repeat three times the same music.
> *  \relative { c'4 e g r } |**
> **  \relative { c'4 e g r } |**
> **  \relative { c'4 e g r } |*
>   \alternative {
>     \volta 1 \relative { b4 d f g | }
>     \volta 2 \relative { b4 d g  | }
>   }
>     }
>
> works as intended, but:
>
>     \repeat volta 2 {
>   %% Here we replaced the repetition with an `unfold` repeat.
> *  \repeat unfold 3 { \relative { c'4 e g r } | }*
>   \alternative {
>     \volta 1 \relative { b4 d f g | }
>     \volta 2 \relative { b4 d g  | }
>   }
>     }
>
> fails. The measure 5 appears before measure 4, the volta is misplaced
> and alternatives are lost (see /bug_repeats__ok.pdf/).
>
> To fix the issue I can put the /repeat unfold/ inside curly brackets:
>
>     \repeat volta 2 {
>   %% Here we put the `unfold` repeat inside curly braces.
> *  { \repeat unfold 3 { \relative { c'4 e g r } | } }*
>   \alternative {
>     \volta 1 \relative { b4 d f g | }
>     \volta 2 \relative { b4 d g  | }
>   }
>     }
>
> Any idea why Lilypond behaves this way? Am I missing something?

It is a consequence of syntax compatibility to previously when
\alternative could follow a \repeat rather than be inside of its body.
So the last music before an in-\repeat \alternative must not be a
\repeat without \alternative or it will sweep up the \alternative for
itself.  As you noticed, braces are the proper workaround.

-- 
David Kastrup



Re: Symmetrical hairpins

2023-09-25 Thread David Kastrup
Valentin Petzel  writes:

> Hello Arjen,
>
> I’m wondering if in your case it ight be beneficial to not create two
> Hairpins, but rather a special case stencil like this:

Huh.  Maybe this would not be the worst strategy for implementing messa
di voce graphically in general.  It would take care of symmetry and
length issues.

-- 
David Kastrup



Re: Images in Info files

2023-09-22 Thread David Kastrup
Ben Bradshaw  writes:

> Hello,
> I've been trying to get images to work in the info manuals (inside emacs on
> arch linux) but have had no luck so far. I tried to do what is in this post
>  https://lists.gnu.org/archive/html/lilypond-user/2014-08/msg00341.html
> <https://lists.gnu.org/archive/html/lilypond-user/2014-08/msg00341.html> ,
> but it doesn't seem to work. As far as I can tell, when I gunzip one of the
> info.gz files and get an info file, the code doesn't have anything in it to
> link to an image. The html files that get installed have the paths, and
> those files work fine, but the info manuals don't. Is there a way to
> compile the documentation to get images in the info manuals? The usage
> manual suggests that there is a --info-images-dir argument in
> lilypond-book, but I'm not sure where to try that. Any help would be
> appreciated!

make info

will do the info pages with images, as opposed to just

make all

which creates info pages without images.  I am not 100% sure whether
"make info" works without a preceding "make doc" these days.  There was
some aggrievance of that kind at some point of time in the recent past.

-- 
David Kastrup



Re: Scheme used badly: syntax problem

2023-09-16 Thread David Kastrup
Graham King  writes:

> Many thanks David!
>
> (In the course of trying to convert the \note syntax, I discovered the
> existence of \note-by-number which solved 90% of my problem.  Sorry for
> the confusing reference to \note.)

Well, \note-by-number #1 #0 #UP is essentially the same as \note {2} #UP

If you are not calculating note values, \note tends to have the simpler
syntax.

-- 
David Kastrup



Re: Scheme used badly: syntax problem

2023-09-16 Thread David Kastrup
Graham King  writes:

> I'm trying to convert a naive Scheme function which has been broken by
> the new syntax for \note.  Some arithmetic gives me the index (in this
> MNWE, 96) to a list  of pairs, foo, from which I want to extract some
> markup.
>
> The 300-LOC problem seems to boil down to this:
>
> %~~~
> \version "2.25.7"
>
> #(define foo '((96 . #{ \markup { \note-by-number #1 #0 #UP }#})))
>
> { c'1^\markup {#(cdr (assoc 96 foo))} }
> %~~~
>
> Please could a kind Scheme expert point out the stupid and obvious
> mistake that has eluded me for several evenings?

Uh, there isn't even \note in there?

The problem in the above is a quoting problem: you mustn't quote
#{...#}, and you can avoid quoting it using quasiquote and unquote:

\version "2.25.7"

#(define foo `((96 . ,#{ \markup { \note-by-number #1 #0 #UP }#})))

{ c'1^\markup {#(cdr (assoc 96 foo))} }

-- 
David Kastrup



Re: slurs

2023-09-16 Thread David Kastrup
"Mark Stephen Mrotek"  writes:

> Hello All:
>
>  
>
> \version "2.22.2"
>
> \relative c'' {
>
>   \slurDown 4
>
> (bes16) (a c bes d c ees d)
>
> }

Good example why it is a bad idea to use non-standard input formatting
for aesthetic reasons: you lose a proper idea about what you are
actually doing.  Both ( and ) are post-events following a note and can
have a direction prescribed using _ and ^ (ok, it is only heeded for the
opening brace).

So you can just write:

\version "2.22.2"

\relative c'' {
   4_(
   bes16)( a c bes d c ees d)

}


-- 
David Kastrup



Re: Merging dynamics with music

2023-09-16 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes:

> Thank you.  That works for the given example.  However, with more
> complicated music that already contains multiple voices (as is typical of
> the piano music where a between-staff Dynamics context would be used in
> the first place), it doesn't work.  For example:
>
> MyMusic = { << { c'1 c'1 } \\ { e'1 e'1 } >> }
> MyDynamics = { s1\ppp s1\fff }
>
> \score {
>   \new Voice << \MyMusic \MyDynamics >>
>   \layout { }
>   \midi { }
> }
>
> With that code all the notes end up at default velocity.
>
> You mention that Dynamic_performer "lives at Voice level" by default.  Is
> this a default I can override, and would that help?

Yes, and yes.

\midi {
   \context {
  \Voice
  \remove Dynamic_performer
}
\context {
  \Staff
  \consists Dynamic_performer
}
}

-- 
David Kastrup



Re: Merging dynamics with music

2023-09-16 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes:

> On Sat, 16 Sep 2023, David Kastrup wrote:
>
>> Try
>>
>> \new Staff << \MyMusic \MyDynamics >>
>>
>> since otherwise the variables will end up in separate Staff contexts.
>
> With the following code, the notes in the MIDI file still are both at
> default velocity.  Explicitly instantiating the Staff does make a
> difference in the visual output.
>
> MyMusic = { c'1 c'1 }
> MyDynamics = { s1\ppp s1\fff }
>
> \score {
>   \new Staff << \MyMusic \MyDynamics >>
>   \layout { }
>   \midi { }
> }

My mistake: Dynamic_performer by default lives at Voice level, so you'd
need \new Voice here in order to issue the dynamics on a level visible
to MIDI.

-- 
David Kastrup



Re: Merging dynamics with music

2023-09-16 Thread David Kastrup
msk...@ansuz.sooke.bc.ca writes:

> I'm trying to use a Dynamics context to put dynamics between the staves of
> a PianoStaff.  As such, I've got my notes and my dynamics in two separate
> variables.  For MIDI output, I'd like to merge the contents of the music
> variable and the dynamics variable and generate MIDI from the result.
> But I can't find a way to merge the two variables and have the dynamics
> really affect the MIDI velocity of the notes.
>
> Here's some code I've tried; I've also tried many much more complicated
> variations.  Note that although the Dynamics context is part of the
> motivation for this question, the question is about merging music
> variables and the problem shows up even without the existence of a
> Dynamics context.
>
> MyMusic = { c'1 c'1 }
> MyDynamics = { s1\ppp s1\fff }
>
> \score {
>   << \MyMusic \MyDynamics >>
>   \layout { }
>   \midi { }
> }
>
> After compiling that, I get a MIDI file in which the notes are just at the
> default velocity without any dynamics being applied.

Try

\new Staff << \MyMusic \MyDynamics >>

since otherwise the variables will end up in separate Staff contexts.

-- 
David Kastrup



Re: automatic accidentals in subsequent measure(s) of *a different staff* in a PianoStaff context

2023-09-06 Thread David Kastrup
Kieren MacMillan  writes:

> Hi all,
>
>>> Haven't you been dreaming about your First Patch™ for quite a while?
>
> Why, yes… yes I have!
>
>> You mean, in a dozen years?
>
> My immediate reactions was “wait wut i actually made three commits at
> some point?” LOL

Graham was really good at getting people involved and matching their
capabilities to tasks.  It's a good sign that you seem to be getting
there again.

-- 
David Kastrup



Re: automatic accidentals in subsequent measure(s) of *a different staff* in a PianoStaff context

2023-09-05 Thread David Kastrup
Jean Abou Samra  writes:

>> > > Nice!  Shall we add this to LilyPond proper?
>> > I have no opinion.
>> 
>> I do (surprise surprise):
>> Yes.
>> Though possibly with a different name (?).
>> Regardless, seems like a useful LSR item.
>
>
> Haven't you been dreaming about your First Patch™ for quite a while?

You mean, in a dozen years?  Because I have

commit 03cb2f1ebc5ba2ca8ef2a7d05954a33babae5ac3
Author: Kieren MacMillan 
Date:   Thu May 27 09:48:37 2010 -0600

Add independent control of thickness and offset for underline markup

commit 5795203d3821ceaa5cd0e024350682fcfaf90691
Author: Kieren MacMillan 
Date:   Fri Mar 13 11:12:29 2009 -0400

Add docstrings to functions in music-functions-init.ly; from Kieren.

commit 17ab05d3eb28ffc7112c3a4af47116dd8dd7207c
Author: Kieren MacMillan 
Date:   Tue Sep 30 11:36:46 2008 +0100

Docs: Templates: piano centered dynamics

> I mean, this would just be a matter of adding the style to the
> accidental-styles alist in scm/music-functions.scm (plus updating the
> documentation and regtests). Just saying...

Indeed that sounds like a job for an uncautious "Yes" sayer.

-- 
David Kastrup



Re: custom replace/map of one set of pitches to another

2023-09-01 Thread David Kastrup
Lukas-Fabian Moser  writes:

> Hi Valentin,
>
> Am 01.09.23 um 00:41 schrieb Valentin Petzel:
>> I don’t think this is a particularly good idea. Lilypond conceptually first
>> creates data for the sementic meaning of the music (or the actual content) 
>> and
>> have engravers turn this into graphical content.
>>
>> Mapping pitches to other pitches is not a layout option, but a musical
>> transformation and should thus be done on the music level, not the layout
>> level. Using an engraver will mean it is hard to combine this with other
>> musical transformations, and it will also cause order issues as soon as you
>> have an engraver that depends on the pitch property.
>
> I agree about the possible problems, and to be honest, I wasn't aware
> that a music function solution like yours can deal with \transpose and
> \relative gracefully (since the assignment of actual pitches is
> complete when the music function is applied on the outside).

Iff the music function is applied on the outside.

-- 
David Kastrup



Re: Newbie questions

2023-09-01 Thread David Kastrup
Mats-Olof Liljegren  writes:

> Hello!
>
> I'm a beginner with Lilypond but have decent programming
> knowledge. Something I haven't managed to figure out is how to best
> organize my projects. It becomes a very long file if everything is in
> the same one, so I've tried splitting it into separate `.ly` files for
> lyrics, soprano, alto, tenor, bass, and so on. It works, but I'm
> guessing there are smarter ways to organize scores and lyrics.
>
> I've heard about `.ily` files, and if anyone could provide me with
> links where I can learn and understand more, I would be grateful.

.ily is just an arbitrary extension to indicate "included LilyPond
file".  The only actual difference to LilyPond is that if you call

lilypond somefilename

and somefilename does not exist, somefilename.ly will be tried instead.

So .ily is not more than a convention.  Enough so that editors and other
utilities making decisions (like syntax highlighting) based on the file
name will tend to know what to do with .ily.

-- 
David Kastrup



Re: Automatic annotation of slide positions/fingerings for brass instruments.

2023-08-29 Thread David Kastrup
samarutuk via LilyPond user discussion  writes:

> Hi,
> I am not sure if I understand "iterated music" correctly? Is it about
> the internal order of processing to get to the PDF score?

"Iteration" is the main processing pass of music in musical time order.

There are several processing stages for music: out of my head:

Entry, scorification, iteration (several different internal phases for
that as well), page breaking and output.

Iteration is done separately for typesetting and MIDI and of course page
breaking is just done for typesetting.

-- 
David Kastrup



Re: Automatic beam behavior for 16th note triplets in 6/8 time

2023-08-26 Thread David Kastrup
Joseph Srednicki  writes:

>  Hi David:
> Thanks for answering my inquiry about beaming 16th-note triplets.
> However, it looks provided an example in a file called "js.ly" that
> was scrubbed as indicated below.
> If the example is not too long and it's not too much trouble, can you
> reply pasting the content of "js.ly" in the body of the message?

For one, I sent you a direct reply which should contain the example
file.  For two, it is present in the mailing list archive:

<https://lists.gnu.org/archive/html/lilypond-user/2023-08/msg00240.html>

The mailing list _digests_ may omit attachments, but why would you be
referring to them when you have a copy of the mail?

-- 
David Kastrup



Re: Automatic beam behavior for 16th note triplets in 6/8 time

2023-08-26 Thread David Kastrup
Joseph Srednicki  writes:

> Hello: 
>
> The tiny example below contains a bar of sixteenth-note triplets in
> 6/8 time. In this example, I used the "[" and "]" characters to
> achieve the desired beaming manually.
>
> Instead of using the "[" and "]" characters, what is the correct code
> to set the automatic beam behavior for these sixteenth-note triplets?
>
> I tried to set the automatic beam behavior by using \set
> Timing.beamExceptions and \set Timing.beatStructure as described in
> section 3.5 of the Lilypond Notation Reference (LilyPond Notation
> Reference: 1.2.4 Beams), but I am not achieving the desired
> result. Most likely, I have misunderstood or missed something in the
> documentation or snippets.
>
> Thanks to anyone who is willing to provide an answer that will avoid the 
> manual
> beaming of these triplets.

I have no idea what you tried, but the below works as expected for me.

\version "2.24.1"
\language "english"

global = {
  \key e \minor
  \time 6/8
}

melody = \relative c' {
  \global
  \tuplet 3/2 8 { e16 [ g e ] g [ e g ] a [ e a ] b [ d b ] c [ g c ] b g b} |
  \tuplet 3/2 8 { e16 g e g e g a e a b d b c g c b g b} |
}

\score {
  <<
\new Staff \melody
\new Staff \with {
  beamExceptions = \beamExceptions { \tuplet 3/2 {
	16 [ 16 16 ] 16 [ 16 16 ] 16 [ 16 16 ] 16 [ 16 16 ] 16 [ 16 16 ] 16 [ 16 16 ] } } }
\melody
  >>
}


-- 
David Kastrup


Re: rall. autocalculation function in Scheme

2023-08-23 Thread David Kastrup
Pierre-Luc Gauthier  writes:

> And what do you know :
>
> git diff to the rescue.
> -
> +\include "articulate.ly"
> -<<
> +   \articulate <<
>
> I tried different avenues and \articulate seems to have creeped its
> way in in this floating point exception core dump…
>
> 'No idea why though nor do I need \articulate anyway. closing.

Well, it certainly expands the problem space.  But my own uses also
employ articulate.ly .  So it will still require something more special
to trigger problems.

-- 
David Kastrup



Re: rall. autocalculation function in Scheme

2023-08-23 Thread David Kastrup
Pierre-Luc Gauthier  writes:

> I'm not quite sure how to use it correctly yet but I suppose a typical
> usage would be :
>
> \time 6/8 % btw
>
>   \tempoChange 8 1/2 0 {
> \skip 2.*4 |
>   }
>
> ^ I.e. : To slow down every 8th during 2.*4 to reach (and keep (0)) a
> tempo half the speed it was.
>
> I get inconsistent results either :
>   - working correctly
>   - Hanging forever after [8][16][24][32][40][48][56]…
>   - Or (with 2.25.8) :
> MIDI output to `output.mid'...[1]1213296 floating point
> exception (core dumped)
>
>> it has worked for at least a year or so here.
>
> No MWE for now but will provide if needed.

Can you think of a case where it wouldn't be needed?

-- 
David Kastrup



  1   2   3   4   5   6   7   8   9   10   >