Re: Force LilyPond to show same time signature again

2024-04-20 Thread Mark Knoop
This line:

\override Score.TimeSignature.stencil = ##f

means that the time signature will not be displayed (its stencil is set
to false). Either remove it, or if you need it for some other reason,
prefix with \once.

Regards,

Mark

At 10:13 on 20 Apr 2024, Hajo Baess wrote:
> This time  w i t h   screenshot attached - sorry about that... Delete
> the previous one ;-)

> Unfortunately this does not work - because I have tried exactly this
> one, and there is no time signature. I attach a screenshot of the
> passage. My piece is in 3/4, and in the top part in bar 185, I have to
> do some rhythmical scaling, whereas the other parts continue in 3/4. I
> could as well have written triplets, of course, to achieve the same
> musical result, but I wanted to keep the original 'flavor'.
> I bar 199, for the top part, I want to revert to the original 3/4, but
> \time 3/4 does not do the trick. It even does not show a time signature
> which is different from the previous one, although LilyPond typesets it
> ok. As you will notice, I have set a (nonsensical) 6/4 signature there
> in all the parts for testing purposes.
> There must be some other mechanism involved which prevents the time
> signature from being indicated, but which one?

> Here's the top part code for the passage in the screenshot:

>> d2.
>> \time 3/4 \set Staff.timeSignatureFraction = 9/8
>> \scaleDurations 2/3 {
>> \repeat unfold 3 { f8 ( d a ) }  \repeat unfold 3 { e' ( cis a ) }
>> \repeat unfold 3 { f'8 ( d a ) }
>> \repeat unfold 3 { g' ( e c ) } \repeat unfold 3 { a' ( f c ) }
>> \repeat unfold 3 { g' ( e c ) }
>> \repeat unfold 3 { f8 ( d a ) }
>> } 
>> \override Score.TimeSignature.stencil = ##f \time 3/4 cis4\trill cis2
>> \set Staff.timeSignatureFraction = 9/8
>> \scaleDurations 2/3
>> \repeat unfold 3 { d8 ( a f ) } \time 3/4 cis'4\trill cis2
>> \set Staff.timeSignatureFraction = 9/8
>> \scaleDurations 2/3 \repeat unfold 3 { d8 ( a f ) }
>> \time 3/4 e'4 e2 \time 3/4 \set Staff.timeSignatureFraction
>> = 9/8
>> \scaleDurations 2/3
>> {\repeat unfold 3 { f8 ( c a ) } \repeat unfold 3 { e' ( c g
>> ) }}
>> \time 6/4 f8 d' cis4. d8 d2. 

> Could it have something to do with the scaling applied before?


> Am Freitag, dem 19.04.2024 um 17:44 -0700 schrieb Knute Snortum:
>> On Fri, Apr 19, 2024 at 4:31 PM Hajo Baess  wrote:
>> 
>> > Hello all,
>> > 
>> > I look for a way to force LilyPond to show the same time signature
>> > again, although there is no change - just as a reminder. I could
>> > not
>> > find anything in the NR and in the Snippet Repository.
>> > 
>> > 
>> Unless I'm misunderstanding, just repeating the \time should do it:
>> 
>> \version "2.24.3"
>> \score {
>>   \new Staff {
>>     \relative {
>>   \time 4/4
>>   \repeat unfold 8 { c'8 } |
>>   \time 4/4
>>   \repeat unfold 8 { c8 } |
>>     }
>>   }
>> }
>> 
>> 
>> --
>> Knute Snortum


> [2. image/png; Auswahl_081.png]...

-- 
Mark Knoop



Re: MIDI Drums to lilypond

2023-11-17 Thread Mark Knoop
You'll find it in drumpitch-init.ly, I believe it's just the
standard General MIDI percussion keymap.

At 10:52 on 17 Nov 2023, Luca Fascione wrote:
> Hi,
> I'm converting a MIDI file to lilypond with a drumset track.

> My process goes through MusicXML, but the `musicxml2ly` script I have
> (2.22.2) emits pitches instead of percussion notes.

> I can write a script to map those, but if anyone had a starting point,
> that'd be grand.

> In my mind, the mapping lilypond uses to go from the percussion notes to
> its MIDI output is all I need (and then I can reverse that). If someone
> could get me a breadcrumb to that, that'd be grand.

> Thanks
> Luca

--
Mark Knoop



Re: Tuplet brackets too short?

2023-10-20 Thread Mark Knoop


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". Surely 
this should be the default?

--
Mark Knoop



Re: clef bass_16

2023-06-23 Thread Mark Knoop
At 11:15 on 23 Jun 2023, Andrew Bernard wrote:
> In notation octavations both up and down are always 8 and 15. Nothing
> to do with lilypond specifically. So 8va, 15va, 8vb, 15vb. These apply
> to clefs and octavation lines.

Unless you're Olivier Messiaen...

--
Mark Knoop



Re: Bow positions (sul pont, sul tasto) with transition arrows

2023-06-20 Thread Mark Knoop
Hi Nate,

At 06:31 on 20 Jun 2023, Nate Whetsell wrote:
> Hi,

> I’m trying to figure out the “right” (most flexible, best looking) way
> to put bow positions like sul pont and sul tasto (really their
> abbreviations s.p. and s.t.) above a staff with transition arrows,
> like in Gould’s Behind Bars p. 407. Here are some things I’ve tried:

> • Use a TextSpanner
> (https://lilypond.org/doc/Documentation/notation/line-spanners), as
> suggested at
> https://lists.gnu.org/archive/html/lilypond-user/2017-12/msg00347.html.
> This has the advantage of being relatively simple to use. Some
> disadvantages are that the text at the ends of the arrow tends to be
> misaligned (although this can be fixed with some hacks), and the
> line-breaking behavior can produce unreadable results.

I've generally come to the conclusion that TextSpanner is the most
flexible solution for this. My custom function include file is attached
- it contains some examples at the bottom (commented out by default). I
think the text alignments are fixed. I'm not sure what problems you're
having with line-breaking - perhaps the list can help with those?

Regards,

Mark


transitionSpanner.ily
Description: Binary data

--
Mark Knoop


Re: \uppercase function

2023-06-16 Thread Mark Knoop
Wait, I see there is already a \fontCaps command - does that not work?

At 15:10 on 16 Jun 2023, Mark Knoop wrote:
> Not offhand, but I'd start with make-small-caps in
> define-markup-commands.scm and strip out the is-lower logic.

> At 09:41 on 16 Jun 2023, Kieren MacMillan wrote:
>> Hi all!

>> Anyone have a good \uppercase function they could share?

>> I tried to make one, and it doesn’t throw an error, but also doesn’t
>> work:

>> \version "2.25.2"

>> #(define-markup-command (uppercase layout props arg) (markup?)
>>(interpret-markup layout props (string-upcase (markup->string arg

>> \header {
>>   title = "My Awesome Piece"
>> }

>> \paper {
>>   scoreTitleMarkup = \markup \uppercase \fromproperty #'header:title
>> }

>> { c1 }

>> Thanks,
>> Kieren.


--
Mark Knoop



Re: \uppercase function

2023-06-16 Thread Mark Knoop
Not offhand, but I'd start with make-small-caps in
define-markup-commands.scm and strip out the is-lower logic.

At 09:41 on 16 Jun 2023, Kieren MacMillan wrote:
> Hi all!

> Anyone have a good \uppercase function they could share?

> I tried to make one, and it doesn’t throw an error, but also doesn’t
> work:

> \version "2.25.2"

> #(define-markup-command (uppercase layout props arg) (markup?)
>(interpret-markup layout props (string-upcase (markup->string arg

> \header {
>   title = "My Awesome Piece"
> }

> \paper {
>   scoreTitleMarkup = \markup \uppercase \fromproperty #'header:title
> }

> { c1 }

> Thanks,
> Kieren.

--
Mark Knoop



Re: Time signature cancellation

2023-06-04 Thread Mark Knoop


At 14:59 on 04 Jun 2023, Damian leGassick wrote:
> you just want a recent real-world example? Birtwistle: Harrison’s
> Clocks.

See bar 1 here: https://www.youtube.com/watch?v=ufDaECmsXNw

I see this usage occasionally, but not sure that I'd quite call it a
standard. It is however fairly clear, and so long as any LilyPond
implementation is able to be overridden (by the usual methods) I see no
harm in adding it.

>> On 4 Jun 2023, at 14:51, Werner LEMBERG  wrote:
>>>> Has anyone here ever used or seen the X-shaped time-signature
>>>> cancellation sign pictured at [1], or anything similar?
>>>
>>> It's one standard for open meter.
>>>
>>> Here's the Dorico manual info: [...]
>>
>> Thanks, but ideally we would like to see a real-world example that
>> predates recent notation programs – they probably all try to implement
>> the stuff from Gould's book...
>>
>>
>>Werner
--
Mark Knoop



Re: Openlilylib questions

2023-04-07 Thread Mark Knoop
Hi Andrew,

> Since handing over OLL I have lost track of processes. What is the
> communications platform for queries and discussions now?

This mailing list seems best.

> And are we in fact still open for business? I need to submit a pull
> request to add some code for my slash stem functions which somehow
> never made it in.

Yes - please do so in the relevant github repo.

Cheers, M

--
Mark Knoop



Re: Function for turning music upside-down.

2023-03-28 Thread Mark Knoop


At 13:10 on 28 Mar 2023, Jean Abou Samra wrote:
> Le mardi 28 mars 2023 à 09:30 +0200, Silvain Dupertuis a écrit :
>> How are enharmonic notes supposed to be treated in such a function?

> Inversion in, e.g., a Bach fugue subject is a bit different, as it
> inverts the diatonic steps but keeps the notes on the scale,
> effectively changing the heard intervals (e.g., in C major, if you
> invert D around C like this, you get B, not B♭); LilyPond doesn't
> implement this.

Actually it does, see \modalInversion

--
Mark Knoop



Re: Message size limit

2023-03-05 Thread Mark Knoop


At 15:28 on 05 Mar 2023, Andrew Bernard wrote:
> Hello All,

> I can't help feeling a twinge of schadenfreude on hearing this. :-)

> Although one can impose such restrictions in Discourse, you don't have
> to unless you are constrained by organisational problems as here with
> GNU. As to my suggestion about implementing Discourse, I'd be
> proposing running it on a dedicated linux server at one of the hosting
> providers, well clear of GNU infrastructure and limitations. Discourse
> also handles attachments and images very well, both in the web
> interface and in the email interface, no problems, and you can set
> maximum size allowed with ease to whatever your system can handle in
> terms of disk space.

Whilst the discussion regarding Discourse emerged from a general thread
about the mailing list infrastructure, I think it's unfair to score this
as a point against the current Mailman/GNU setup.

We are currently benefiting from the GNU project's provision of disk
space and bandwidth for the mailing lists - and indeed have "set maximum
size allowed with ease" on this occasion to avoid wasting that
provision.

As you say in your next email regarding Discourse, that itself would
rely on user donations to fund it - it seems likely that a similar
maximum size limit would be set.

--
Mark Knoop



Re: Lilypond 2.24.1 convert-ly writes version 2.24.0 to the converted file(s)?!

2023-03-01 Thread Mark Knoop


At 17:41 on 01 Mar 2023, Kenneth Wolcott wrote:
> Hi;

> I think that convert-ly should write the current version to the
> converted file(s).

> If that statement is correct, then Lilypond version 2.24.1 writes the
> older version (2.24.0) to the converted file(s).

Please see the -c, --current-version option to convert-ly.


--
Mark Knoop



Re: Policy for posts from non-members

2023-02-22 Thread Mark Knoop


At 12:34 on 22 Feb 2023, Jean Abou Samra wrote:
>> I've said this already, and I'm happy to say this again: To me, the
>> LilyPond community is likely the most friendly, helpful place I've
>> ever encountered on "the internet". We shouldn't erect too high a
>> barrier to entering it, and for people who are not familiar (e.g.)
>> with automatic e-mail filtering/sorting rules etc., I think
>> subscribing to an e-mail list does look like a barrier: We should
>> advertise doing it, but not force people contacting us for the first
>> time to do it.

> So you want to keep the possibility to post while not being
> subscribed, but make the messages that I'm manually sending now be
> sent automatically?

> At first, I thought this wasn't possible, but it actually appears
> possible (the configuration for the held message notice text is just
> in a completely different place than the configuration for the
> rejection notice text in the Mailman 2 UI...). That would be fine with
> me as well. Mark, WDYT?

Absolutely - this sounds ideal if it's possible.

--
Mark Knoop



Re: Policy for posts from non-members

2023-02-21 Thread Mark Knoop


At 23:36 on 21 Feb 2023, Jean Abou Samra wrote:
> Hi,

> I've not been an admin of this list for very long, yet I'm already
> weary of telling people who post without being subscribed to the list
> that they should subscribe in order to avoid each of their messages
> being manually approved. I wonder what you (meaning everyone, but
> especially Mark, the other admin) would think about changing the list
> configuration to reject post from non-members instead of holding them
> on moderation, with a message such as

> “Welcome to the lilypond-user mailing list. We apologize, but in order
> to prevent spam, we need you to subscribe to the list before you post.
> Please fill out the subscription form on
> [https://lists.gnu.org/mailman/listinfo/lilypond-user](https://lists.gnu.org/mailman/listinfo/lilypond-user).

> Once you are subscribed, you will receive all posts to the list, so
> you can help out other people as well. However, if you only wish to
> interact with this list infrequently, you may disable mail
> subscription in your membership preferences after you have subscribed.

> If you believe you are already subscribed to the list, it probably
> means that you accidentally posted from a different email address than
> the one you are subscribed with.

> If you have any question or encounter problems, feel free to contact
> the list admins at lilypond-user-ow...@gnu.org”

> On the plus side, this means that instead of delaying the message
> until Mark or me looks at it, the feedback will come instantly.

> Jean

Thanks Jean, I support this proposal.


--
Mark Knoop



Re: change format of bookOutputSuffix

2023-02-21 Thread Mark Knoop


At 09:36 on 21 Feb 2023, Kieren MacMillan wrote:
> Hi all,

> What’s the simplest way to modify the format of \bookOutputSuffix? For
> example, say I want the trailing hyphen to be an underscore — i.e.,
> currently I get

>   MyPiece-suffix.pdf

> and I want

>   MyPiece_suffix.pdf

> Do I have to [locate and] rebuild the music function, or is there an
> easy parameter I don’t know about?

It seems to be hard-coded in the function get-outfile-name (lily-library.scm).

--
Mark Knoop



Re: Accidental repeated with ottava

2023-02-10 Thread Mark Knoop


At 10:38 on 10 Feb 2023, Knute Snortum wrote:
> I have run into something in LilyPond that's annoying -- it probably
> doesn't rise to the level of bug.  When you have two notes in
> different octaves but "on the same level" because of an ottava, the
> accidental is repeated.  This makes sense logically because they are
> not the same note, but it doesn't look right to me, at least.  Maybe
> it's the intended behavior?

FWIW, Gould writes:

"Repeat an accidental if sounding at a different octave, even when the
same pitch is used with an octave sign."

--
Mark Knoop



Re: Openlilylib repository

2023-02-09 Thread Mark Knoop


At 21:50 on 09 Feb 2023, Andrew Bernard wrote:
> I seem to have become completely detached from OLL.

> Where is the repository located now? The only repos I can find are
> last modified 6-10 years ago.

The repositories are here. (You can sort them by last updated to see the
active ones more easily.)

https://github.com/orgs/openlilylib/repositories

As I mentioned a while ago I would like to convert the oldest one to an
"entry-point" to help with visibility - see
https://github.com/openlilylib/openlilylib/pull/1

Unfortunately I don't have any rights over that repo to merge this.

--
Mark Knoop



Re: autobeaming over rests,Re: autobeaming over rests

2023-01-29 Thread Mark Knoop


At 10:27 on 29 Jan 2023, Valentin Petzel wrote:
> Hello Werner,

> this would not be hard to get done. Here’s an experimental commit:

> https://gitlab.com/vpetzel/lilypond/-/commit/5267b574d27316b7c5d45080b32200dabc5d37dc[1]

> Using this test:

> {
>   c'8 d' r e' r f' g' r | r r r a' b' s s c'' | r r r r s s s s \break
>   \set autoBeamRests = ##t
>   c'8 d' r e' r f' g' r | r r r a' b' s s c'' | r r r r s s s s \break
>   \set autoBeamRests = ##f \set autoBeamSkips = ##t
>   c'8 d' r e' r f' g' r | r r r a' b' s s c'' | r r r r s s s s \break
>   \set autoBeamRests = ##t
>   c'8 d' r e' r f' g' r | r r r a' b' s s c'' | r r r r s s s s
> }

> this produces the appended result.
> Valentin

This is great! It would be nice if there were an option to beam only
over *enclosed* rests/spaces, i.e.

c'8 d' r e' r f' g' r | r r r a' b' s s c''

would result in:

c'8[ d' r e'] r f'[ g'] r | r r r a'\noBeam b'[ s s c'']

Could this be possible?

--
Mark Knoop



Re: German notation

2023-01-29 Thread Mark Knoop
I think Wim may be referring to the various standards of transposing the
B-flat bass clarinet.

- either in bass clef a major 2nd higher than sounding (as in this
  Strauss excerpt)

- or in treble clef a major 9th higher than sounding (which is what he
  wants)

But Wim, we need some of your LilyPond code to see what you're starting
with in order to help with any necessary changes.

Mark

At 10:54 on 29 Jan 2023, Thomas Scharkowski wrote:
> Hi Wim,

> I looked at the score of the Menuet - I do not find anything
> extraordinary there. The Bass clarinet in B flat (Si b) is transposed
> as usual. I still do not understand what you mean by „German“ and
> „French notation“.

> Thomas

> BTW: The French Horn parts (4 Corni) are also transposed, these are in
> F (french: Fa).


>> Am 29.01.2023 um 10:29 schrieb Wim van Dommelen :
>>
>> Hi Thomas,
>>
>> "Short" is a dificult concept
>>
>> I think the best is to point you to a live example, check entry
>> PMLP255074 on the (magnificant) IMSLP collection (do not hit print,
>> this is bad for your carbon footprint as the full score is 170 pages
>> <;0). I myself looked at part III "Menuette" (still 29 pages :-).
>> Within the score look for the Bass clarinet line and compare this
>> score with the other instruments, both concerning the pitch to play
>> it as checking the key in which it is done. A befriended professional
>> player confirmed me this is "German notation". I'm looking for help
>> in converting this to the regular way of working.
>>
>> Regards,
>> Wim.
>>
>>
>>> On 29 Jan 2023, at 10:00 , Thomas Scharkowski  
>>> wrote:
>>>
>>> Hi Wim,
>>>
>>> could you provide short example?
>>>
>>> Thomas
>>>
>>> PS: I do not unterstand this sentence: << I want to play it properly
>>> notation (which is „French“ >>
>>>>
>>>> Am 29.01.2023 um 09:43 schrieb Wim van Dommelen :
>>>>
>>>> I encountered a piece written in so-called "German notation" and I
>>>> want to play it properly notation (which is "French"
>>>>
>>>> I can do the basic transposes but the key is always interfering and
>>>> produces strange results.
>>>>
>>>> Is there a quick Lilypond recipe to convert this (from "German" to
>>>> "French" written) ?
>>>>
>>>> Thanks,
>>>> Wim van Dommelen
>>>>
>>>>
>>>
>>


--
Mark Knoop



Re: irrational meters

2023-01-18 Thread Mark Knoop


At 16:46 on 17 Jan 2023, "H. S. Teoh" via LilyPond user discussion wrote:
> On Tue, Jan 17, 2023 at 07:08:41PM -0500, David Zelinsky wrote:
>> Kieren MacMillan  writes:
>>
>>> Hi Silvain,
>>>
>>>> I wonder about the term “irrational” meter. Should not we say
>>>> “irregular” ??  as in mathematics, an irrational number is a number
>>>> which cannot be represented as a fraction...
>>>
>>> As both a published composer *and* a published number theorist, I
>>> wholeheartedly concur with your intuition — I’ve been pushing for
>>> decades against “irrational” as a descriptor for time signatures
>>> [except where it actually applies, of course, as in π/4].
>>>
>>> “Irregular” is better… but ultimately I prefer “non-dyadic” to
>>> describe any time signature where the bottom number (a.k.a.
>>> “denominator”, a label I also avoid) is not an integer power of 2.
> [...]
>> As another professional number theorist and musician (though not a
>> composer), I also find this use of "irrational" to mean "non-dyadic"
>> very grating.  But I once said as much on the Music Engraving Tips
>> facebook group, and got summarily shot down as ignorant and elitist.
>> The argument, such as it was, held that this is about *music*, not
>> *mathematics*, so there's no reason to adopt mathematicians' quirky
>> terminology.  This left me rather speechless, so I gave up.  However,
>> if I ever have reason to discuss this type of meter, will always call
>> it "non-dyadic".
> [...]

> This is off-topic, but it would be interesting if somebody composed a
> piece with an actually irrational meter, like π/4 or 3/π.  Only thing
> is, it would be impossible for human performers to play correctly, since
> there isn't any way to count the beats correctly (counting beats implies
> a rational fraction, since by definition it's impossible to count up to
> an irrational ratio by counting finite parts).

Perhaps one should define "correctly" before assuming impossibility. By
any definition of correctly which makes sense in this context (i.e.
precise rhythmic execution), it is arguably equally impossible to play
music in a *dyadic* meter correctly.

--
Mark Knoop



Re: Unicode accidentals vs. Markup accidentals,Re: Unicode accidentals vs. Markup accidentals

2023-01-16 Thread Mark Knoop


At 12:51 on 16 Jan 2023, Werner LEMBERG wrote:
>> \new Staff {
>>   \override TextScript.before-line-breaking =
>>   #(lambda (grob)
>>  (ly:grob-set-property! grob 'text
>> (markup #:replace
>> `(("♭" . ,#{ \markup{ \tflat} #})
>>   ("♯" . ,#{ \markup{ \tsharp} #})
>>   ("♮" . ,#{ \markup{ \tnatural} #}))
>> (ly:grob-property grob 'text
>>   c'1^"B♭"
>>   c'1^"C♯"
>>   c'1^"D♮"
>> }

> *This* is nice!  It sort-of corresponds to 'active characters' in TeX.
> Is there a possibility to register this or a similar function globally
> so that all markup strings can use it?

How does this differ from the current mechanism using
add-text-replacements! and replacement-alist? Could these be extended to
allow the replacement string to include \markup?

--
Mark Knoop



Re: Different default arpeggio positions

2022-12-01 Thread Mark Knoop


At 23:08 on 30 Nov 2022, Abraham Lee wrote:
> Happy Holidays!

> A number of versions ago, I created the following function to extend
> the top and bottom ends of the Arpeggio grob, which I find more
> aesthetically pleasing (generally), though I know it's not perfect:

Can you not just use \offset?

https://lilypond.org/doc/v2.23/Documentation/notation/the-offset-command

--
Mark Knoop



Re: Future of OpenLilyLib

2022-11-22 Thread Mark Knoop
Thanks to all for your responses. There seems to be a general agreement
about the desired direction but I'd still like to hear who is actually
using this code at the moment. Is it just Kieren and me?

### Usage

Several people mentioned difficulties using OLL.

- how to install?
- what does it do?
- combersome, unwieldy, unmaintained

This is the prime reason I decided to propose this reorganization. I
have started work to improve documentation and plan to work through most
of it incrementally. See below re maintenance.

### Shouldn't this all be in LilyPond or LSR?

Possibly, but it isn't at the moment.

Certainly there are features in OLL which could/should be moved into
LilyPond, and some which already have been. I believe maintaining _and_
**using** that code in the meantime is the best way to a) work out which
features should be prioritized, and b) come to some agreement about
interfaces and syntax for those features.

_Shouldn't this be done in code review as part of adding to LilyPond
directly?_

Possibly, but users are not always able to be focussed on this at the
time of development. If I'm engraving a score which is due next week and
need to do X then I'm most likely to write/adapt/hack together something
which works "well-enough" to get the score out next week. I almost
certainly won't have time to polish it to the point of submitting, and
following up, a merge request to LilyPond.

But I might be able to include it as an OLL module which somebody else
might see and either improve, use to solve a different problem, expand,
etc.

LSR has it's own set of problems, some of which have already come up in
this thread.

### There should be a better/easier way to include modular code in LilyPond

Yes, I think we all agree on that. At the moment there isn't, but even
if and when that might be implemented, I can still see a role for a
repository such as OpenLilyLib to collect and host those modules. Is the
future really copying blocks of code from websites or email attachments
and saving them to randomly organized local files?

In the meantime, OLL (mostly) works and can be improved with better
documentation.

### Maintenance

At the moment I use several parts of the OLL (mostly edition-engraver,
scholarly and bits from oll-misc) and so will keep maintaining them. I'm
also happy to help maintain any other parts which are used by others.
I'd like to identify what _isn't_ used so it can be marked as
unmaintained/deprecated/scavenged for parts.

Regards,

Mark
--
Mark Knoop



Re: Future of OpenLilyLib

2022-11-21 Thread Mark Knoop
Thanks Jean for your thoughts, which are not so far from my own. A few comments:

> Maybe what I'm going to say will sadden some, but personally,
> I never quite understood what the advantage of developing
> openLilyLib as a library external to LilyPond, as opposed to
> contributing features to LilyPond itself, was supposed to be.

Having just looked through quite a lot of the code in openLilyLib, I
think there will always be code there that is not suitable for inclusion
in LilyPond, for many reasons (highly specialized use cases, code which
works just-well-enough™, etc...).

It's no criticism of the core LilyPond developers to acknowledge that
not every desired feature will be accepted, and even if so, there is
still a significantly higher hurdle to contributing to LilyPond than to
OpenLilyLib (and rightly so).

Almost all programming languages have non-core features which are
developed in a modular way - this fact would seem to support the case
for something similar for LilyPond.

> I was going to add my lyrics code to LSR, actually. It's just
> more convenient for users to grab, and it's not like this is
> a very large piece of code that really needs version control
> (although version control in LSR *would* be nice).

I see two advantages over LSR, the primary one being version control
(which includes being able to search it locally with git grep); the
other being the potential to include code which is larger in scale and
interacts sensibly. (Once you start importing several LSR snippets into
one project, the potential for adverse side-effects becomes > 0.)

> To be honest, although I wasn't there at the time, it is my
> impression that this split was partly motivated by some personal
> conflicts that reduced Urs' willingness to submit patches to
> LilyPond, which is not relevant for us today.

Indeed, this isn't relevant, except to acknowledge that for whatever
reason, there is at the moment a bunch of useful stuff which is a) not
yet in LilyPond, and b) bit-rotting until it is dealt with.

> Some of the OLL stuff has been made part of LilyPond over the
> years, for example Merge_mmrest_numbers_engraver and \vshape.
> There is also \staffHighlight, which serves a purpose that
> overlaps a bit with the purpose of AnaLYsis. Long-term, I would
> like to see edition-engraver go that route as well (with a
> better, iterator-based implementation).

Absolutely I'd also love to see this. (Another task which I didn't put
in my first email is to clean out code that *has* made it into LilyPond.)

Whilst I was able to fix-up the edition-engraver for Guile 2, I am
certainly not up to rewriting it "better" - and I don't expect anybody
else to do that either.

My hope is that by making OLL a little more usable and less chaotic, it
might be possible to identify firstly which features are being most
used, and secondly use that information to prioritize moving those into
LilyPond in the best way possible.

--
Mark Knoop



Future of OpenLilyLib

2022-11-21 Thread Mark Knoop
With the imminent release of LilyPond 2.24, I thought it would be good
to (once again) raise the topic of OpenLilyLib. There has been some
recent movement on this (thanks to Jean and Andrew) to get the code
mostly working with recent LilyPond versions and Guile 2.

I have also just pushed a bunch of commits to resolve (as far as I can
tell) the remaining errors and warnings, at least in the usage examples
included in the repositories. (See pull requests below.)

I believe there is still an important role for OpenLilyLib - the
edition-engraver in particular is an integral part of my own usage of
LilyPond - and it would seem to me to be a much better vehicle than the
LSR for anything more complex than small code examples. The recent
discussions on the lilypond-user list regarding the \alignTo function
and Jean's lyric spacing code would indicate that these would be prime
contenders for inclusion.

It would be good to get a feel from users how much this resource is
used, and which bits are most important to maintain. Following are my
impressions of the current problems with openlilylib and a proposal to
(begin to) address them.

## Problems

- unclear documentation
- too many repositories, duplicated and out-of-date content
- un-maintained code

## Proposal

1. Centralize into main 'entry-point' repository using git submodules
   containing newest, working code. This will contain clear instructions
   as to how to install `openlilylib`.

2. Update, fix or remove non-working code from this core set

3. Only target current stable LilyPond from 2.24.0 onwards (update to
   2.23.81 for now)

### Core repositories

I propose to include these as git submodules.

- `oll-core` :: core functions
- `edition-engraver`, and these packages that depend on it
  - `breaks`, `page-layout`, `partial-compilation`
- `analysis` :: graphical highlighting of musical analysis
- `ji` :: just intonation
- `notation-fonts` :: manage font selection
- `oll-misc` :: various helper functions
- `stylesheets` :: hierarchical stylesheets
- `scholarly` :: toolbox for annotating scores

### Older repositories - propose to deprecate

AFAICT these are deprecated and/or unused. I propose they are
"officially" dropped unless there are any regular users who are able to
maintain them.

- `openlilylib` :: very deprecated - turn this into the 'entry-point' repository
- `LO-ly` :: moved to https://github.com/OOoLilyPond
- `bezier` :: slur-attachment function and improved `\shape`
- `contemporary` :: nothing here
- `gridly` :: music editing in independent segments
- `grob-tools` :: moved to `oll-core`
- `lalily-templates` :: template package
- `lilypond-export` :: export to other formats
- `snippets` :: mostly moved to `oll-misc`
- `templates` :: templates and predefined instruments

## Pull requests

- https://github.com/openlilylib/oll-misc/pull/10
- https://github.com/openlilylib/scholarly/pull/73
- https://github.com/openlilylib/analysis/pull/17
--
Mark Knoop



Re: Checkpoints

2022-11-19 Thread Mark Knoop


At 11:46 on 19 Nov 2022, Kieren MacMillan wrote:
>>> p.s. Jean: Any reason why this shouldn’t be in the core codebase?!
>>> I will gladly take this one on — including documentation — if it’s
>>> patch-worthy.
>>
>> IMHO it is.

> and watched everything Do The Right Thing™.

The only buglet I've come across is that final notes can be silently
converted to whole notes, however this is easy to work around. (Probably
also fixable, but I've never bothered.)

Change the definition of accompaniment to the following to demonstrate:

accompaniment = \relative c' {
\repeat unfold 3 b1
R1 \tag #'verse
b2 b2
R2 \tag #'bridge
c1
R1 \tag #'coda
d2. d4.
R1*9/8*3
r2. d8 8 8 % NB final 8th note becomes a whole note...
% | ... unless it is followed by a barcheck
}

--
Mark Knoop



Re: Checkpoints (was re: Adding durations (for \after))

2022-11-19 Thread Mark Knoop

At 08:59 on 19 Nov 2022, Kieren MacMillan wrote:
>> I have been using \alignTo for years for this purpose, I think
>> originally from this thread:

>> https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01296.html

> I'm somewhat embarrassed to say that I was on that thread and totally
> forgot about it!

> Can you provide a MWE of the feature for us?

Attached is the ily file from my standard library. Just uncomment the
bottom section for the example.



alignTo.ily
Description: Binary data

--
Mark Knoop


Re: Checkpoints (was re: Adding durations (for \after))

2022-11-18 Thread Mark Knoop


At 11:01 on 18 Nov 2022, Kieren MacMillan wrote:
> Hi Jean,

>> Well, it's not too hard to implement them.

> In the hopes that it’s also not too hard for Super-Jean to implement
> anchors… ;)

> Is there a world in which one could write something like

> global = {
>   \anchor #'intro
>   s1*8
>   \anchor #'verse
>   s1*8
>   \anchor #'chorus
>   s1*8
> }

> and then

> chorusMusic = {
>   \gotoAnchor #'chorus
>   c'1
> }

> would make a whole note c' appear in the 17th measure of the score?

I have been using \alignTo for years for this purpose, I think originally from 
this thread:

https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01296.html



--
Mark Knoop



Re: edition-engraver engine.scm with 2.23.6

2022-09-28 Thread Mark Knoop
Hi Kieren,

At 20:02 on 27 Sep 2022, Kieren MacMillan wrote:
> I ran with --verbose, and here's the output:

Would it be possible to send that as text?

> I downloaded the files from
> <https://github.com/markk/edition-engraver> about a week ago — do you
> have a different set/source?

Probably best to switch back to
https://github.com/openlilylib/edition-engraver now, we're merging
everything back to that. (Although I don't know if there are currently
any differences between the two...)

If you can send some code I'll try to have a look later today.

Cheers,

Mark


--
Mark Knoop



Re: LilyPond compared

2022-09-16 Thread Mark Knoop
At 07:50 on 16 Sep 2022, Werner LEMBERG wrote:
> Attached is an image from the Urtext edition of Schumann's
> 'Humoreske', typeset around 2009.

This image would seem to show that Henle's accidentals have diverged
quite a lot from LP's. In this Schumann example the sharp's vertical
lines are considerably longer and the glyph is narrower, and the slope of the 
natural beams is also quite a lot steeper.

--
Mark Knoop



Re: LilyPond compared

2022-09-16 Thread Mark Knoop
At 09:05 on 16 Sep 2022, Martin Tarenskeen wrote:
> The comparison also shows something that looks a bit ugly (according
> to some people, and I tend to agree): the design of the natural sign.
> Are there more people here who think the hole in the middle of the
> natural sign is too large and doesn't fit nicely on/between the
> stafflines? Is there room for improvement here? Let's discuss.

I agree that LilyPond wins this contest easily. (I was quite surprised
that Dorico gets so much wrong here, particularly the order of
accidentals in the last beat...)

Whilst in this particular context (one bar, in quite high zoom, with
lots of naturals) you could say that the naturals stand out. But it's
important to consider them in more normal contexts before rushing to judgement.

I always appreciate the clarity of Emmentaler's accidentals when reading
(and I sightread a *lot* of music set using other fonts). Each
accidental is clearly distinct and has it's own character - one almost
doesn't need to read them at all - unlike many other fonts where
naturals can look very similar to sharps at smaller sizes (particularly 
Sibelius).

--
Mark Knoop



Re: OLL with 2.23.11

2022-08-14 Thread Mark Knoop

At 17:50 on 14 Aug 2022, Andrew Bernard wrote:

Ah, I have just seen on the Discourse server for OLL Jean has the patches. 
Jean, please contact me off list and we will discuss how to move forward.


Hi Andrew,

My forks of some of the OLL repositories have recent commits which run smoothly 
on 2.23.11.

https://github.com/markk/oll-core
https://github.com/markk/edition-engraver
https://github.com/markk/partial-compilation
https://github.com/markk/breaks


--
Mark Knoop



Re: Glissando stems

2022-08-08 Thread Mark Knoop

At 17:19 on 08 Aug 2022, Thomas Morley wrote:

That said, meanwhile I don't like the whole approach anymore...
The need to recreate things LilyPond already has done is an alarm
sign. Maybe there are other still uncovered bugs.
Alas, I don't have a working alternative :(


Many thanks Harm, I have it working now. I also had to filter out DynamicTexts 
from the Scripts list. But yes, I agree, this is messing with too much and 
would be better done as a dedicated grob.

--
Mark Knoop



Glissando stems

2022-08-08 Thread Mark Knoop
eamOff } }

\score { \tst-I \layout { ragged-right = ##f \autoBeamOn } }
%}
% {
{
  \override Glissando.breakable = ##t
  \override Glissando.after-line-breaking = #(glissando-and-stems 0)
  r2.
  \once \override Beam.details.beamed-glissando-stem-positions = #'(4 . 8)
  b8
  b8\glissando
  \startStemmedGlissando
  \repeat unfold 4 { c'16 d' e' f' }
  \break
  \repeat unfold 4 { c'16 d' e' f' }
  \break
  \repeat unfold 2 { c'16 d' e' f' }
  %% The Glissando ends in the middle of some beamed notes.
  %% `glissando-and-stems´ is not smart enough to deal with this situation, thus
  %% some manual intervenrion is needed.
  \once \override Beam.details.beamed-glissando-stem-positions = #'(3 . 3.2)
  a' a'
  \stopStemmedGlissando
  a' a'
}
%}

% {
\transpose c c'
{
  \voiceTwo
  \override Glissando.after-line-breaking = #(glissando-and-stems 0)
%  \override Glissando.breakable = ##t
  c''4\glissando
  \startStemmedGlissando
  %% For automatic Beams, set the values carefully
  \once \override Beam.details.beamed-glissando-stem-positions = #'(-4 . -8)
  b'8-.
  b'->
  \repeat unfold 4 bes'32-.
  %% For manual Beams set the direction accordingly.
  \once \override Beam.details.beamed-glissando-stem-positions = #'(4 . 8)
  bes'8-.^[
  a'64*8-_
  aes']-.---\prall
%  \break
  \stemUp g'2
  \stopStemmedGlissando
  fis2
}
%}

mus = {
  c''4\glissando
  \startStemmedGlissando
  b'8-.
  \noBeam
  b'->
  bes'-.
  \noBeam
  \override Stem.details.beamed-lengths =
#'(
   3.26  ;; 8
   3.5   ;; 16
   3.6  ;; 32 etc
   )
  bes'8-.[
  a'64*8-_
  aes']-.---\prall
  %\break
  g'2
  \stopStemmedGlissando
  fis'2
}

% {
\multipleTransposes {
c, d, e,  f, g,
a, b,
c d e f
g a b
}
{
  \override NoteHead.layer = -1000
  \override Glissando.breakable = ##t
  \override Glissando.after-line-breaking = #(glissando-and-stems 0)
  \mus
}
%}


--
Mark Knoop


Re: Different minimum-length for broken spanner

2022-08-04 Thread Mark Knoop



At 08:41 on 04 Aug 2022, Kieren MacMillan wrote:

Hi Mark,


Ideally there could be a property `minimum-length-before-break` to
match `minimum-length-after-break` to address this? Or am I simply
approaching this problem from the wrong angle?


Does \alterBroken work? Or does it fail because minimum-length is one of > the "spanner 
properties accessed before line-breaking such as direction" > [known issue]?


That's correct - I tried \alterBroken first. The springs-and-rods callback 
which reads minimum-length has to run before the spanner can be broken.

--
Mark Knoop



Different minimum-length for broken spanner

2022-08-04 Thread Mark Knoop

Hi,

I'm creating a TextSpanner to indicate a gradual transition between 
instrumental techniques. In order that the left and right texts don't collide, 
my before-line-breaking callback sets the minimum-length property of the 
spanner to the sum of the width of the two markups.

This all works well, until the spanner is broken. Then, the first part retains 
this minimum-length, making it unnecessarily long. The problem is that once the 
spanner has been broken, it is too late to reset minimum-length.

Ideally there could be a property `minimum-length-before-break` to match 
`minimum-length-after-break` to address this? Or am I simply approaching this 
problem from the wrong angle?

See attachments for code and examples.

Thanks for any input,

Mark

\version "2.23.10"

#(define (get-markup-width grob text)
  (let* ((layout (ly:grob-layout grob))
 (props (ly:grob-alist-chain
 grob
 (ly:output-def-lookup layout 'text-font-defaults
(interval-length
 (ly:stencil-extent
  (interpret-markup layout props (markup text))
  X

#(define (text-spanner-minimum-length grob padding)
  (let* ((details (ly:grob-property grob 'bound-details))
 (lprops (assoc-get 'left details '()))
 (ltext (assoc-get 'text lprops '()))
 (lwidth (get-markup-width grob ltext))
 (rprops (assoc-get 'right details '()))
 (rtext (assoc-get 'text rprops '()))
 (rwidth (get-markup-width grob rtext))
 (minlength (+ lwidth rwidth padding)))
;; (pretty-print (list lwidth rwidth minlength))
(ly:grob-set-property! grob 'minimum-length minlength)
;; TODO ideally we could set a property `minimum-length-before-break'
(ly:grob-set-property! grob 'minimum-length-after-break rwidth)))

transitionSpanner =
#(define-music-function
   (padding from to)
   ((number? 2) markup? markup?)
   (_i "Set up a TextSpanner to indicate transition from one technique to 
another.
Spanner is forced to a @code{minimum-length} of the combined widths of
the markups @var{from} and @var{to} plus the extra value of 
@var{padding}.
@var{to} markup is right-aligned.")
   ;; TODO recalculate minimum-length when broken, otherwise individual parts 
are stretched unnecessarily
   ;; PROBLEM: springs-and-rods has already run by the time the spanner is 
broken
   #{
 \override TextSpanner.style = #'dashed-line
 \override TextSpanner.dash-fraction = 0.35
 \override TextSpanner.dash-period = 1.2
 \override TextSpanner.bound-details.left.text = \markup \concat { #from 
\hspace #0.5 }
 \override TextSpanner.bound-details.right.text = \markup \halign #RIGHT 
\concat { \hspace #0.5 #to }
 \override TextSpanner.bound-details.left-broken.text = ##f
 \override TextSpanner.bound-details.right-broken.text = ##f
 \override TextSpanner.bound-details.left.padding = #0
 \override TextSpanner.bound-details.right.padding = #0
 \override TextSpanner.bound-details.right.attach-dir = #RIGHT
 \override TextSpanner.bound-details.left.stencil-offset = #'(0 . -0.5)
 \override TextSpanner.bound-details.right.stencil-offset = #'(0 . -0.5)
 \override TextSpanner.bound-details.right.arrow = ##t
 \override TextSpanner.before-line-breaking = #(lambda (grob) 
(text-spanner-minimum-length grob padding))
 \override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
   #})

% { %% EXAMPLES AND TESTS
{
  c'1
  \once \transitionSpanner "sul pont" "sul tasto"
  \once \override TextSpanner.before-line-breaking = ##f
  c'4\startTextSpan^\markup \with-color #red \box \column { "without 
adjustment" "BAD" }
  bes'4
  bes'4
  f''4\stopTextSpan
  \repeat unfold 16 c'16
  \once \transitionSpanner "sul pont" "sul tasto"
  c'4\startTextSpan^\markup \with-color #blue \box \column { "with adjustment" 
"GOOD" }
  bes'4
  bes'4
  f''4\stopTextSpan
  c'1
  c'1
  \repeat unfold 16 c'16
  c'4 4
  \once \transitionSpanner "sul pont" "sul tasto"
  c'4\startTextSpan^\markup \with-color #red \box \column { "but too long" 
"when broken" "BAD" }
  bes'4
  \break
  bes'4
  f''4\stopTextSpan
  c'2
  \repeat unfold 16 c'16
  c'4 4
  \once \transitionSpanner "sul pont" "sul tasto"
  \once \override TextSpanner.before-line-breaking = ##f
  c'4\startTextSpan^\markup \with-color #blue \box \column { "without" 
"adjustment" "GOOD" }
  bes'4
  \break
  bes'4
  f''4\stopTextSpan
  c'2
  \repeat unfold 24 c'16
  2
}
%}


transitionSpanner.pdf
Description: Adobe PDF document



--
Mark Knoop


Re: Openlilylib

2022-07-29 Thread Mark Knoop

At 15:56 on 17 Jul 2022, Mark Knoop wrote:

I note a bug with the edition-engraver which can no longer address the
first moment of the score. This needs further investigation (unless
somebody else has already solved this?).


Further to this, I've just pushed a fix for the first moment bug to my fork of 
the edition-engraver. The solution was to remove the conditional calling of 
`start-translation-timestep` and always call it.

https://github.com/markk/edition-engraver/commit/cda9acb4a721c562f738e84b560dc8f7bda4df4e

This also means that the partial-compilation module now works again.

--
Mark Knoop



Re: Openlilylib

2022-07-17 Thread Mark Knoop

Hi Andrew and other OLL users,

At 18:24 on 27 May 2022, Andrew Bernard wrote:

The upshot of that is that I suppose I should revive the OLL work. I'll
recreate the dedicated server I set up, recreate the Discourse forum for
discussion, and work on the git repository, then people can
collaboratively work together again and I can take pull requests and so
on.


Just a note to say that I have forks of some of the OLL repositories on Github 
as follows.

https://github.com/markk/oll-core
https://github.com/markk/edition-engraver
https://github.com/markk/partial-compilation
https://github.com/markk/breaks

Some of these have some minor updates to make them compatible with current 
LilyPond and Guile 2.2.

Andrew, I'm happy for you to host an alternative repository if you prefer, but 
it would be good to avoid multiple forks and duplicated effort.

I note a bug with the edition-engraver which can no longer address the first 
moment of the score. This needs further investigation (unless somebody else has 
already solved this?).

--
Mark Knoop



Re: DurationLine avoiding RehearsalMarks

2022-04-17 Thread Mark Knoop

At 13:09 on 16 Apr 2022, Thomas Morley wrote:

Am Mo., 11. Apr. 2022 um 11:03 Uhr schrieb Thomas Morley
:


I hesitate to post untested wip-code on the user-list, I'll send it privately.



Hi Mark,

MR is now open:
https://gitlab.com/lilypond/lilypond/-/merge_requests/1310
Apart from huge simplifictions it fixes the initial problem of this
thread as well.

NB the fix here:
https://gitlab.com/lilypond/lilypond/-/merge_requests/1294
is not part of it.

Many thanks to Jean!

Best,
  Harm


That's brilliant, thanks Harm, and Jean. Will test on my project shortly.

--
Mark Knoop



Re: DurationLine avoiding RehearsalMarks

2022-04-11 Thread Mark Knoop

At 11:03 on 11 Apr 2022, Thomas Morley wrote:

Am Mo., 11. Apr. 2022 um 10:56 Uhr schrieb Mark Knoop :

At 10:30 on 11 Apr 2022, Thomas Morley wrote:

Am Mo., 11. Apr. 2022 um 09:53 Uhr schrieb Mark Knoop :

At 19:12 on 10 Apr 2022, Mark Knoop wrote:

I'm trying to debug some issues I'm having with the new DurationLine grob. 
Previously I've been using a TextSpanner to achieve similar results.

One issue is that DurationLine adds space at the left side of a broken spanner, 
seemingly to avoid overlapping with a RehearsalMark. I'd like it to start 
underneath the RehearsalMark, as the TextSpanner does.

The problem is illustrated in this example.

\version "2.23.6"
\header { tagline = ##f }
\score {
<<
\new Dynamics {
\repeat unfold 31 { s1 \mark \default }
}
\new Voice \with {
\consists Duration_line_engraver
} {
c'1:32\-^\markup "using DurationLine" s1*18
s1
\override TextSpanner.style = #'line
\override TextSpanner.thickness = #4
\override TextSpanner.outside-staff-priority = ##f
\override TextSpanner.Y-offset = #0
r4\startTextSpan^\markup "using TextSpanner" 4 4 4
R1*16
<>\stopTextSpan
R1
}



}


I'm able to remove the extra space with

\override Score.RehearsalMark.non-musical = ##f

but this has some undesirable consequences for RehearsalMark positioning. Is 
there a way to set this only for RehearsalMarks at the start of a line?


Hi Mark,

DurationLine is designed not to be printed if breakable items at line-end/start 
are present, like Clef, KeySignature etc. I wasn't aware RehearsalMark is 
ofcourse one of them. Currently I'm preparing a patch to disregard 
RehearsalMark. Is your use-case urgent?

Cheers,
Harm


Thanks Harm,

I understand. My deadline is end of this week, but if you're able to give me a 
pointer as to where to start on this then I can have a go at fixing it myself.


I hesitate to post untested wip-code on the user-list, I'll send it privately.


Many thanks.


I've noticed a couple of other occasional (possible) bugs with DurationLine in 
complex situations, but haven't been yet able to reproduce in a MWE. (Sometimes 
stopping at the wrong place or not appearing at all.)


Well, without bug-report, no fix ;)


Will definitely send a report if/when I manage to extract the issue.

--
Mark Knoop



Re: DurationLine avoiding RehearsalMarks

2022-04-11 Thread Mark Knoop

At 10:30 on 11 Apr 2022, Thomas Morley wrote:

Am Mo., 11. Apr. 2022 um 09:53 Uhr schrieb Mark Knoop :

At 19:12 on 10 Apr 2022, Mark Knoop wrote:

I'm trying to debug some issues I'm having with the new DurationLine grob. 
Previously I've been using a TextSpanner to achieve similar results.

One issue is that DurationLine adds space at the left side of a broken spanner, 
seemingly to avoid overlapping with a RehearsalMark. I'd like it to start 
underneath the RehearsalMark, as the TextSpanner does.

The problem is illustrated in this example.

\version "2.23.6"
\header { tagline = ##f }
\score {
<<
\new Dynamics {
\repeat unfold 31 { s1 \mark \default }
}
\new Voice \with {
\consists Duration_line_engraver
} {
c'1:32\-^\markup "using DurationLine" s1*18
s1
\override TextSpanner.style = #'line
\override TextSpanner.thickness = #4
\override TextSpanner.outside-staff-priority = ##f
\override TextSpanner.Y-offset = #0
r4\startTextSpan^\markup "using TextSpanner" 4 4 4
R1*16
<>\stopTextSpan
R1
}
>>
}


I'm able to remove the extra space with

\override Score.RehearsalMark.non-musical = ##f

but this has some undesirable consequences for RehearsalMark positioning. Is 
there a way to set this only for RehearsalMarks at the start of a line?


Hi Mark,

DurationLine is designed not to be printed if breakable items at
line-end/start are present, like Clef, KeySignature etc.
I wasn't aware RehearsalMark is ofcourse one of them.
Currently I'm preparing a patch to disregard RehearsalMark.
Is your use-case urgent?

Cheers,
Harm


Thanks Harm,

I understand. My deadline is end of this week, but if you're able to give me a 
pointer as to where to start on this then I can have a go at fixing it myself.

I've noticed a couple of other occasional (possible) bugs with DurationLine in 
complex situations, but haven't been yet able to reproduce in a MWE. (Sometimes 
stopping at the wrong place or not appearing at all.)

--
Mark Knoop



Re: DurationLine avoiding RehearsalMarks

2022-04-11 Thread Mark Knoop



At 19:12 on 10 Apr 2022, Mark Knoop wrote:

I'm trying to debug some issues I'm having with the new DurationLine grob. 
Previously I've been using a TextSpanner to achieve similar results.

One issue is that DurationLine adds space at the left side of a broken spanner, 
seemingly to avoid overlapping with a RehearsalMark. I'd like it to start 
underneath the RehearsalMark, as the TextSpanner does.

The problem is illustrated in this example.

\version "2.23.6"
\header { tagline = ##f }
\score {
  <<
\new Dynamics {
  \repeat unfold 31 { s1 \mark \default }
}
\new Voice \with {
  \consists Duration_line_engraver
} {
  c'1:32\-^\markup "using DurationLine" s1*18
  s1
  \override TextSpanner.style = #'line
  \override TextSpanner.thickness = #4
  \override TextSpanner.outside-staff-priority = ##f
  \override TextSpanner.Y-offset = #0
  r4\startTextSpan^\markup "using TextSpanner" 4 4 4
  R1*16
  <>\stopTextSpan
  R1
}
  >>
}


I'm able to remove the extra space with

  \override Score.RehearsalMark.non-musical = ##f

but this has some undesirable consequences for RehearsalMark positioning. Is 
there a way to set this only for RehearsalMarks at the start of a line?

--
Mark Knoop



DurationLine avoiding RehearsalMarks

2022-04-10 Thread Mark Knoop

I'm trying to debug some issues I'm having with the new DurationLine grob. 
Previously I've been using a TextSpanner to achieve similar results.

One issue is that DurationLine adds space at the left side of a broken spanner, 
seemingly to avoid overlapping with a RehearsalMark. I'd like it to start 
underneath the RehearsalMark, as the TextSpanner does.

The problem is illustrated in this example.

\version "2.23.6"
\header { tagline = ##f }
\score {
  <<
\new Dynamics {
  \repeat unfold 31 { s1 \mark \default }
}
\new Voice \with {
  \consists Duration_line_engraver
} {
  c'1:32\-^\markup "using DurationLine" s1*18
  s1
  \override TextSpanner.style = #'line
  \override TextSpanner.thickness = #4
  \override TextSpanner.outside-staff-priority = ##f
  \override TextSpanner.Y-offset = #0
  r4\startTextSpan^\markup "using TextSpanner" 4 4 4
  R1*16
  <>\stopTextSpan
  R1
}
  >>
}


--
Mark Knoop


Re: TextScript vertical alignment in Dynamics context

2022-04-06 Thread Mark Knoop

At 12:21 on 05 Apr 2022, Jean Abou Samra wrote:

Le 05/04/2022 à 09:48, Mark Knoop a écrit :

Hi,

I'm trying to align markups in a Dynamics context to their baseline, but they 
always align their tops. Can't figure out what property to set to achieve this.

Example follows - I'd like the markups on the first line (which are in a 
Dynamics context) to align DOWN rather than UP, i.e. to match the behaviour of 
the markups on the second line (which are in a Voice context).

Thanks in advance for any help on this.



The alignment of text scripts is done via side positioning 
(side-position-interface). Here they position against nothing, so the alignment 
code just keeps them aligned on a fictive line at 0. The direction of these 
text scripts is DOWN, so in effect they align on their tops. If you want them 
aligned on their bottoms, set them to the other direction.


\new Dynamics \with {
  \override TextScript.direction = #UP
} ...


Alternatively, use a mechanism that makes more sense for your use case, self 
alignment (self-alignment-interface).


\new Dynamics \with {
  \override TextScript.Y-offset =
#ly:self-alignment-interface::y-aligned-on-self
  \override TextScript.self-alignment-Y = #DOWN
} ...



Best,
Jean


Thanks Jean!


--
Mark Knoop



TextScript vertical alignment in Dynamics context

2022-04-05 Thread Mark Knoop

Hi,

I'm trying to align markups in a Dynamics context to their baseline, but they 
always align their tops. Can't figure out what property to set to achieve this.

Example follows - I'd like the markups on the first line (which are in a 
Dynamics context) to align DOWN rather than UP, i.e. to match the behaviour of 
the markups on the second line (which are in a Voice context).

Thanks in advance for any help on this.

\version "2.23.6"
\header { tagline = ##f }

\score {
  \new Score {
<<
  \new Dynamics \with {
  } {
\markLengthOn
\repeat unfold 12 { \mark \default s1 }
  }
  \new Dynamics \with {
  } {
s1-\markup \column { one two three }
s1-\markup \column { one two three four }
s1-\markup \column { one two }
s1-\markup \column { one two }
s1-\markup \column { one two three four five }
s1-\markup \column { one two three }
\break
  }
  \new Staff \with {
  } {
<<
  \repeat unfold 12 { c'4 4 4 4 }
  \new Voice {
s1*6
s1^\markup \column { one two }
s1^\markup \column { one two three four five }
s1^\markup \column { one two three }
s1^\markup \column { one two }
s1^\markup \column { one two three four five }
s1^\markup \column { one two three }
  }
>>
      }
    >>
  }
}



--
Mark Knoop


Re: Transposing pitches in the lilypond file itself?

2022-01-12 Thread Mark Knoop

You might be interested in python-ly 
(https://python-ly.readthedocs.io/en/latest/) which is actually written by the 
Frescobaldi developers and used within it.

This provides a command-line tool that can do transposition (and more) and 
shouldn't be too hard to use from within Emacs.

At 05:06 on 12 Jan 2022, Alasdair McAndrew wrote:

Thanks, Guy.

I use the Linux Emacs editor (which has a lilypond mode), and there might be 
something there, but I was just after a little advice - I have used 
Frescobaldi, but for me Emacs is faster and more efficient.

cheers,
Alasdair

On Wednesday 12 January 2022 16:03:58 (+11:00), Guy Stalnaker wrote:


Alasdair,

Though it may not match your use, Frescobaldi, the LilyPond Editor, can do this using one 
of its built-in features. In essence you specify the interval to transpose when selecting 
the feature, e.g., "c d" would transpose up a major 2nd.

Many on this list use other editors, but personally I cannot imagine writing 
Lilypond without Frescobaldi given its features. For your purpose, it might be 
worth an install simply to use the transpose feature?

If there are other ways of doing this in other editors, I'm sure list 
subscribers will chime in.

Regards

--

“Happiness is the meaning and the purpose of life, the whole aim and end of 
human existence.”

― Aristotle

On Tue, Jan 11, 2022 at 10:27 PM Alasdair McAndrew  wrote:


I'm not quite sure how to search online for this, hence my asking here. I'm 
doing a little bit of arranging of some baroque pieces for specific 
instruments, which usually requires some transposition. I can transpose within 
the lilypond file so that the output score has the correct (transposed) notes, 
but what I really want is to have the transposed notes in the lilypond file 
itself. This means I can print out the score without needing to transpose 
anything. So basically I want to change an input from, say \transpose c,f {c d 
e f}

to simply

{f g a bf}

In other words, I want the transposition in the file itself, not just in the 
typeset output. Is there a way of doing this - maybe with an external command 
(I'm using Linux)?

Thank you very much,
Alasdair

--
Mark Knoop



Re: \omit-ing a specific type of Script [globally or via edition-engraver]

2021-12-27 Thread Mark Knoop

At 20:11 on 26 Dec 2021, Valentin Petzel wrote:

But if you want this in only one place you should consider using something like
  c1-\tweak stencil ##f ^\fermata _\espressivo
Instead.

If you want a omit like command you can do
twomit = \tweak stencil ##f \etc
And then
  c1-\twomit^\fermata _\espressivo


You can just use \omit directly as a tweak:

c1-\omit^\fermata _\espressivo

--
Mark Knoop



Re: multi-line markup inside a single box

2021-12-07 Thread Mark Knoop



At 01:40 on 07 Dec 2021, Josiah Boothby wrote:

Maybe I'm missing something obvious (it's 1:30 in the morning...it's
not unlikely!), but I'm trying to include a small two-line markup
inside a single box. The thing that seems obvious is producing two
boxed lines, which is not what I'm aiming for and is too visually
cluttered for me to accept as a compromise:

\markup\right-column\box{
  \line{Solos: 1st x tpt}
  \line{2nd x clr}
}

Any ideas?


You want the box to be around the columns? So:

\markup \box \right-column {
 \line{Solos: 1st x tpt}
 \line{2nd x clr}
}

--
Mark Knoop



Re: Dynamics and tempo alignment?

2021-11-04 Thread Mark Knoop



At 14:16 on 04 Nov 2021, Kevin Cole wrote:

Hi,

I think I'm making great strides with my wee little transcriptions,
but here's my latest puzzle:

I have the following measure:

  g2^\>\tempo \markup { \italic "Slower." } 4 = 65
  <<
{ \voiceOne fs8\!\p([ g8]) }
\new Voice
{ \voiceTwo fs8 g8 }
  >>
  \oneVoice  | %  20

I want the "Slower (♩= 65)" to appear above and at the start of the
decrescendo. But instead it appears to the right of it. (See attached
PNG.)  There seem to be a lot of different -- and to me -- overly
complicated -- ways of doing this. Is there a "recommended" way
without trying to give relative coordinates to move to?


\tempo is not a postfix command like dynamics and markups. Just put it before 
the g2.

--
Mark Knoop



Re: Cannot get a text stencil from this font

2021-09-05 Thread Mark Knoop



At 16:43 on 05 Sep 2021, Jean Abou Samra wrote:

Le 05/09/2021 à 16:22, Mark Knoop a écrit :

Hi,

I'm using Aaron's excellent overlayMarkup function from this thread: 
https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00052.html and am 
seeing different behaviour for Script objects depending if they are attached to 
notes or to multimeasure rests. See the following example. Any ideas how to 
deal with this?


Script has font-encoding set to 'fetaMusic, to look
up glyphs in music fonts. That's curious as it doesn't
seem to need it (it uses music font defaults for its
default stencil anyway). Try:

\version "2.23.3"

overlayMarkup =
#(define-scheme-function
 (self-x self-y parent-x parent-y markup)
 ((number? 0) (number? 0) (number? 0) (number? 0) markup?)
 (grob-transformer 'stencil
  (lambda (grob orig)
   (let* ((xex (ly:stencil-extent orig X))
  (yex (ly:stencil-extent orig Y))
  (xoff (interval-index xex parent-x))
  (yoff (interval-index yex parent-y))
  (sten (grob-interpret-markup grob markup)))
    (set! sten (ly:stencil-aligned-to sten X self-x))
    (set! sten (ly:stencil-aligned-to sten Y self-y))
    (ly:stencil-add orig
 (ly:stencil-translate sten (cons xoff yoff)))

{
  R1
 -\tweak stencil \overlayMarkup 0 0 0 3 "test"
 \fermata
 g'1
 -\tweak stencil \overlayMarkup 0 0 0 3
   \markup \override #'(font-encoding . latin1) "test"
 \fermata
}


Many thanks Jean, that's it. Strange that this is affected by the Grob the 
Script is being attached to.

--
Mark Knoop



Cannot get a text stencil from this font

2021-09-05 Thread Mark Knoop

Hi,

I'm using Aaron's excellent overlayMarkup function from this thread: 
https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00052.html and am 
seeing different behaviour for Script objects depending if they are attached to 
notes or to multimeasure rests. See the following example. Any ideas how to 
deal with this?


\version "2.23.3"

overlayMarkup =
#(define-scheme-function
 (self-x self-y parent-x parent-y markup)
 ((number? 0) (number? 0) (number? 0) (number? 0) markup?)
 (grob-transformer 'stencil
  (lambda (grob orig)
   (let* ((xex (ly:stencil-extent orig X))
  (yex (ly:stencil-extent orig Y))
  (xoff (interval-index xex parent-x))
  (yoff (interval-index yex parent-y))
  (sten (grob-interpret-markup grob markup)))
(set! sten (ly:stencil-aligned-to sten X self-x))
(set! sten (ly:stencil-aligned-to sten Y self-y))
(ly:stencil-add orig
 (ly:stencil-translate sten (cons xoff yoff)))

{
 %% this usage works
 R1
 -\tweak stencil \overlayMarkup 0 0 0 3 "test"
 \fermata

 %% this usage fails
 %%programming error: Cannot get a text stencil from this font
 %%continuing, cross fingers
 g'1
 -\tweak stencil \overlayMarkup 0 0 0 3 "test"
 \fermata
}
%%%%%%%%

--
Mark Knoop
m...@markknoop.com
https://markknoop.com/



Re: Lilypond and SuperCollider

2021-07-24 Thread Mark Knoop

At 01:24 on 21 Jul 2021, Adalberto Tovar Gomez wrote:

Hi!!

There is some kind of code that implements SuperCollider and
Lilypond. I used SuperFomus, a SuperCollider Class, but apparently is
no longer available.


Take a look at Fosc: https://github.com/n-armstrong/fosc

--
Mark Knoop



Re: Pitch value of previous note

2021-04-30 Thread Mark Knoop

At 12:15 on 30 Apr 2021, David Kastrup wrote:

David Sumbler  writes:

How can I access the pitch value of this most recent note for use in a
Scheme function after some rests?


Other value-propating mechanisms exist for default durations (attached
by the parser upon reading expressions), pitch-less durations (added
during the scorifying stage when a music expression is accepted into a
\score block), chord repeats (also at scorification).

"For use in a Scheme function" is too hand-waving to have an idea which
phase of LilyPond's interpretation you would want to be interfering
with, so it would probably make more sense to present the problem you
are trying to solve rather than guess about the tools you think LilyPond
must be using internally.


I don't know what David (Sumbler)'s use-case is, but one could imagine in an 
analysis situation something like:

{ c'1 g'1-\intervalFunction }

where 'intervalFunction' created the markup string "Perfect 5th above previous 
pitch".

--
Mark Knoop



Re: Line breaks not working despite using \break

2021-03-15 Thread Mark Knoop



At 11:46 on 15 Mar 2021, Robert Blackstone wrote:

Hi all,

I’m presently struggling with a keyboard score and I know exactly where line 
breaks have to be inserted to make the score readable. So I enter \break at 
those points, in all voices, but it does not work at all. The result is a 
cluttered, ugly and for the pianist practically unreadable score.

Does any of you know another way to force a line break? I’m using TeXShop on my Mac. 
Usually "\break" works perfectly.


Things to check when \break doesn't work:

- breaks must be at a bar-line, include \bar "" if you want one mid-bar

- are you using bar-checks? often a failed break is a symptom of an error in 
the entry of durations

- some things are not breakable by default (Beams, note durations), see here 
for solutions.

http://lilypond.org/doc/v2.18/Documentation/notation/line-breaking

--
Mark Knoop



Re: crescendo hairpin terminates too early?

2021-02-04 Thread Mark Knoop

At 08:53 on 04 Feb 2021, Martin Tarenskeen wrote:

On Thu, 4 Feb 2021, Mark Knoop wrote:


At 08:29 on 04 Feb 2021, Martin Tarenskeen wrote:



 { c'4\< d' e' f' | g1\! }
 the hairpin ends way too early, before the barline.



If you look a little further down the page you'll find "Setting hairpin
behavior at bar lines".


OK. I see. Still strange to see an example image in the manual that doesn't 
match the accompanying description though.


Which image? The paragraph from which you quoted ends with:

"A hairpin ending on a downbeat will stop at the preceding bar line."

--
Mark Knoop



Re: crescendo hairpin terminates too early?

2021-02-04 Thread Mark Knoop

At 08:29 on 04 Feb 2021, Martin Tarenskeen wrote:

Hi,

https://lilypond.org/doc/v2.23/Documentation/notation/expressive-marks-attached-to-notes.en.html#dynamics

says:

"A hairpin that is terminated with \! will end at the right edge of the note that 
has the \! assigned to it."

But if I try this:

{ c'4\< d' e' f' | g1\! }

the hairpin ends way too early, before the barline. This same error (?) can 
also be seen in the example image in the manual just above the above mentioned 
quote.

Using lilypond 2.23.0 right now.


If you look a little further down the page you'll find "Setting hairpin behavior at 
bar lines".


--
Mark Knoop



Re: how to automatically add ovtaves to some pitches

2020-11-28 Thread Mark Knoop
At 14:53 on 28 Nov 2020, Stefan Thomas wrote:
> Dear community,
> I wanted to add an octavation only to specific pitches. I hope that
> the following snippet shows better what I want. Unfortunately it
> doesn't work.
>  SNIPPET
> \version "2.20.0"
>
> % a pitch filter
> whenPitchAbove =
> #(define-scheme-function
> (pitch proc)
> (ly:pitch? procedure?)
> (lambda (m)
> (let ((p (ly:music-property m 'pitch)))
> (if (and (ly:pitch? p) (ly:pitch (proc m)
> m
> % add octave below
> okT = #(define-music-function (x) (ly:music?)
> #{
> \context Voice <<$x \transpose c' c { $x } >>
> #})
>
> global = {
> \time 6/8  \clef "treble_8"  }
> Music =  {
> \global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'
> dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }
>
> MusicWithOnlySomeOctaves = {
> \musicMap \whenPitchAbove c''  \okT \Music
> }
>  END OF THE SNIPPET %%

Have a look at the \customOutOfRange function in this snippet

http://lsr.di.unimi.it/LSR/Item?id=773

>> At 10:51 on 28 Nov 2020, Stefan Thomas wrote:
>>>* Dear community,*
>>>* I would like to add automatically an octabe to certain pitches, e.g.*
>>>* higher than d''.*
>>>* I have in mind something like this:*
>>>* %% SNIPPET*
>>>* \version "2.18.2"*
>>>* global = {*
>>>* \time 6/8  \clef "treble_8"  }*
>>>* okT = #(define-music-function (x) (ly:music?)*
>>>*#{*
>>>*  \context Voice <<$x \transpose c' c { $x } >>*
>>>*#})*
>>>* Music =  {*
>>>* \global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'*
>>>* dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }*
>>>* MusicWithOctaves = {*
>>>* \global \okT dis'' fis' a' d'' fis' a'  \okT dis'' fis' \okT e'' f'*
>>>* \okT dis'' fis' a' \okT d'' fis' a' \okT dis'' fis' \okT e'' f'*
>>>* }*
>>>* %% END SNIPPET*
>>>* I thought it could be done with musicMap but I can't get it to work.*
>>>* Has someone a hint for me?*
>> http://lsr.di.unimi.it/LSR/Item?id=445
--
Mark Knoop



Re: how to automatically add ovtaves to some pitches

2020-11-28 Thread Mark Knoop
At 10:51 on 28 Nov 2020, Stefan Thomas wrote:
> Dear community,
> I would like to add automatically an octabe to certain pitches, e.g.
> higher than d''.
> I have in mind something like this:
> %% SNIPPET
> \version "2.18.2"
> global = {
> \time 6/8  \clef "treble_8"  }
> okT = #(define-music-function (x) (ly:music?)
>#{
>  \context Voice <<$x \transpose c' c { $x } >>
>#})
> Music =  {
> \global dis'' fis' a' d'' fis' a' dis'' fis' e'' f'
> dis'' fis' a' d'' fis' a' dis'' fis' e'' f' }
> MusicWithOctaves = {
> \global \okT dis'' fis' a' d'' fis' a'  \okT dis'' fis' \okT e'' f'
> \okT dis'' fis' a' \okT d'' fis' a' \okT dis'' fis' \okT e'' f'
> }
> %% END SNIPPET
> I thought it could be done with musicMap but I can't get it to work.
> Has someone a hint for me?

http://lsr.di.unimi.it/LSR/Item?id=445


--
Mark Knoop



Re: The grace issue

2020-08-15 Thread Mark Knoop
At 01:55 on 15 Aug 2020, Andrew Bernard wrote:
> I need to put the grace note in the top voice before the bar. I use
> this technique throughout my score and it works fine:
>
> \grace { \bar "" c'8 \bar "\" }
>
> I am also aware of the notorious issue with grace notes where I have
> to put spacer filler graces in all staves to make it all line up.
> Although tedious, that workaround for the issue seen in the attached
> image is acceptable.
>
> But, in this case, with long notes in the other staves, I don't see
> how I can get a spacer grace filler in the needed place.
>
> Any suggestions?

Hi Andrew,

This is untested, but perhaps:

{
  \once \set tieWaitForNote = ##t
  c'1*1/4~ \grace s8 s1*3/4 | c'1
}

will work?

--
Mark Knoop



Re: Frenched score and rehearsal marks.

2020-08-12 Thread Mark Knoop
At 13:10 on 12 Aug 2020, Hwaen Ch'uqi wrote:
> Greetings All,
>
> In preparing an orchestral score, I am running into a very practical
> question that others surely must have encountered. I have removed
> Mark_engraver from the score context and placed it in the appropriate
> staff contexts - that is, in the uppermost staff of each instrument
> family. Furthermore, in order to reduce space, I have invoked
> \RemoveEmptyStaves in the staff context of the layout block. However,
> there are then many occasions when rehearsal marks naturally do not
> appear, because the relevant staff is appropriately hidden. In fact, I
> have entire pages where no rehearsal marks appear, even though more
> than one has actually occurred! Of course, I could get around this by
> including Mark_engraver in all staves, but this sort of duplication is
> precisely what I am trying to avoid. Has anyone a solution? This
> question also applies to Metronome_mark_engraver. Could the answer lie
> somehow in the StaffGroup context? Having trouble to wrap my head
> around it!

I needed to do this a few years ago and couldn't find a way without patching 
the Keep_alive_together_engraver. David K rightly rejected my patch (which was 
not fully worked through, although did enable this particular usage). I'm 
afraid I haven't had a chance to look at it again since then.

Details here: https://gitlab.com/lilypond/lilypond/-/issues/4973

--
Mark Knoop



Re: [OT] modify midi

2020-06-15 Thread Mark Knoop
At 11:09 on 15 Jun 2020, Gianmaria Lari wrote:
> Sometimes I would like to modify a bit the midi file generated by
> Lilypond. What stops me from doing that is that in case I modify the
> lilypond source I lose all the work done on the midi and I have to do
> it again from scratch.
>
> So I was wondering if anyone knows a software that gives you the
> possibility to record the list of operations I do on a midi file so
> that I can reapply them "automatically". Of course I understand the
> limitation that a software like this will have: the midi file you want
> to apply the change has to be "very similar" to the original one (for
> example changing only the note pitch etc. etc.).

There are various utilities on the web for converting midi to and from text 
formats, e.g. http://www.archduke.org/midi/

You could have a potential workflow as follows:

- convert Lilypond's MIDI output to text
- edit as necessary
- save diff of the edit
- convert back to MIDI for playback
...
- edit Lilypond, export new MIDI, convert to text
- use patch to apply previous diff
- convert back to MIDI for playback

https://www.pair.com/support/kb/paircloud-diff-and-patch/

--
Mark Knoop



Re: Line breaks in polymetric music

2020-06-01 Thread Mark Knoop
At 07:49 on 01 Jun 2020, Sami Amiris wrote:
> Thank you for your response.
>
> I did research it and found nothing. Would you have a suggestion for
> me to look at?

Hi Sami,

Basically, there can only be a line-break on a note or rest boundary. So the 
approach is:

1. Decide where you want the break, say in this example halfway through the 
second 4/8 bar

2. Split the note at that point into two, you will have to do the maths to make 
this work. It might look like { c4*3/7 c4*4/7 }

3. Hide the second of these notes { c4*3/7 \once \hideNotes c4*4/7 }


--
Mark Knoop



Re: Mac OS X Catalina 64-bit compile ?

2020-05-30 Thread Mark Knoop


At 11:41 on 30 May 2020, Wim van Dommelen wrote:
> Hi Carl,
>
> When I go to: https://bintray.com/marnen/lilypond-darwin-64  I see three(3) 
> builds/packages (2.19.83, 2.18.2 and 2.20.0), each with a link to a tar.gz 
> file. Downloading, unpacking and dowloading each gives me a LilyPond.app 
> directory with the usual files underneath it. Running this .app file is 
> caught by the Apple security check, so I lowered my defenses temporarily by 
> allowing this app to proceed. Btw, bottomline it downloads it from 
> cloudfront.net . I can only assume this is safe (-(|..
> (It would be nice to have a sha checksum so I can test that file indeed to be 
> what marnen produced originally.)

There is a sha256 checksum on each download page, e.g.: 
https://bintray.com/marnen/lilypond-darwin-64/lilypond-2.20.0

> Running from the Mac Applications folder then works, the example-file does a 
> typeset, I will test more later on.
>
> Running it as a command-line program (for make or any script wanting to 
> compile a set of music) is yet another problem, it complains about the Python 
> Info.plist being badly formatted, it doesn't produce the minimum "--version" 
> output but hangs in that. Have to look into that later also... Convert.ly  
> --version seems to run though.
>
> But when I then browse around a little bit to get some feeling of what this 
> platform is, whether it is something I could use, I see a button "Pricing" 
> ($150/month?, Open Source registration in the bottom), "Sign in", "Start your 
> free trial", etc. That gets me feel a little uncomfortable. Is this wrapping 
> everything, where will we end?
>
> Regards,
> Wim.
>
>> On 29 May 2020, at 23:32 , Carl Sorensen  wrote:
>>
>> Wim,
>>
>> I'm not sure what you mean by these things.
>>
>> The links worked perfectly for me, and there was neither registration nor a 
>> charge.
>>
>> Carl
>>
>> On 5/29/20, 12:39 PM, "Wim van Dommelen"  wrote:
>>
>> Hi Karlin,
>>
>> I've seen this setup. It has (at least) two problems:
>> - most of the links are broken, trying to do a straightforward download is 
>> almost impossible
>> - when I register myself, I'am to pay for this platform
>>
>> Has LilyPond come so far now?, When will it be ready to be sold out and 
>> split for other people's profit?
>>
>> Regards,
>> Wim.
>>
>>> On 29 May 2020, at 19:43 , Karlin High  wrote:
>>>
>>> On 5/29/2020 11:29 AM, Wim van Dommelen wrote:
>>>> Is there somebody already working on a proper 64-bit compile of LilyPond 
>>>> for the new Mac OS X 10.15.4 "Catalina" version?
>>>
>>> Yes: Marnen Laibow-Koser has produced this.
>>>
>>> I haven't seen a build yet for the 2.21 series, though.
>>> --
>>> Karlin High
>>> Missouri, USA
>>

--
Mark Knoop



Re: Can't modify multiple shapes on a chord

2020-03-25 Thread Mark Knoop
At 14:44 on 25 Mar 2020, Paolo Prete wrote:
> Hello.
>
> Please consider this (tested on 2.19.84):
>
> \new Voice <<
>   {  \shape #'((0 . 0) (0 . 0) (0 . 0) (3 . 0)) Tie c' ~ c' }
>   {  \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Tie c'' ~ c'' }
>>>
>
> If I modify the shape on the first tie, changes are applied on the second
> tie. Is this a bug? If so, is there a fix/workaround for this?
> I tried  \partcombine too, and the issue persists.

Since both ties occur at the same moment, you need to use the tweak form of 
\shape. See this page for details.

http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes

--
Mark Knoop



Re: printing a tiny pianostaff at the beginning of a score

2020-02-19 Thread Mark Knoop


At 07:56 on 19 Feb 2020, Sandro Santilli wrote:
> Thanks, the \scale hint was very useful.
> Doing it before the \score block isn't convenient as I'd have
> to repeat the insertion in every book. Using markup
> in header seems ok for now, I'd only need some proper alignment,
> as I'm currently doing this wild thing:
>
>   piece = \markup {
> \italic "  With a beat  "
> \scale #(cons 0.8 0.8)
> \score {
>   ...
> }
>   }
>
> The spaces I'm using to move the tiny score more or less at
> the center of the sheet, but is fragile. Also the "With a beat"
> text position is too high, it would be nice to have better
> control over it.

Take a look at the \translate markup command.

http://lilypond.org/doc/v2.18/Documentation/notation/align

--
Mark Knoop



Re: Lots of temporary files when generating png files

2020-02-04 Thread Mark Knoop
At 10:25 on 04 Feb 2020, Anthony Rushforth wrote:
> Hello,
>
> I use this command line to generate png files :
> lilypond  -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts
> -dpixmap-format=pngalpha -dresolution=100 --png c1c1e1g1.ly
>
> I took the command line from
> http://lilypond.org/doc/v2.19/Documentation/usage-big-page#lilypond-output-in-other-programs
>
> It generates these files :
> c1c1e1g1-1.eps
> c1c1e1g1-systems.count
> c1c1e1g1-systems.tex
> c1c1e1g1-systems.texi
> c1c1e1g1.eps
>
> Is it possible to avoid these files or put them in another location ?

-dno-aux-files will get rid of most, although not the ...-1.eps file.

--
Mark Knoop



Re: Workarounds for issue #5538

2020-01-24 Thread Mark Knoop
At 20:27 on 23 Jan 2020, Daniel Rosen wrote:
> Does anyone have any ideas for a workaround for Issue #5538 “bendAfter
> broken by chords”?
> (https://sourceforge.net/p/testlilyissues/issues/5538/)

No, sorry. After reporting this bug I ended up using a TextSpanner instead.

--
Mark Knoop



Re: Dynamic Line Spanner question

2019-09-10 Thread Mark Knoop
At 01:35 on 10 Sep 2019, Craig Dabelstein wrote:
> Hi all,
>
> In the following MWE, how do I get the dashed line to finish before
> the barline instead of after it. I've had no success with
> \endSpanners.

See Internals Reference 3.2.111 spanner-interface:

to-barline (boolean)
If true, the spanner will stop at the bar line just before it would otherwise 
stop.

Thus:

\version "2.19.82"
\score {
  \relative c' {
c2 -\tweak to-barline ##t \cresc c c c
    R1*4 \!
  }
}


--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Overlay "ossia" voice

2019-04-04 Thread Mark Knoop
I'm trying to create something a bit like an ossia voice which should be 
overlaid on top of the principal voice, but without affecting the layout of 
each; i.e. ignoring all collisions.

In the following example, ideally the Dots and Ties on the Gs in the first line 
should have the same positioning as on the second.

It's mostly working, except for the Dots which don't seem to have an equivalent 
property to NoteColumn.ignore-collision. Any thoughts on this?

%
\version "2.19.82"

dimNotes = {
  \override NoteHead.color = #grey
  \override Stem.color = #grey
  \override Dots.color = #grey
  \override Tie.color = #grey
  \override NoteColumn.ignore-collision = ##t
}

{
  \time 3/4
  R1*3/4
  << {
g'2.~
\temporary \dimNotes
2.~ 2.~ 2.~ 2.~
\undo \dimNotes
2.
  } \new Voice \magnifyMusic #5/7 {
\override NoteColumn.ignore-collision = ##t
\tweak NoteHead.transparent ##t
\tweak Stem.transparent ##t
\tweak Dots.transparent ##t
g'2.\glissando
aes'\glissando
des'\glissando
ges'\glissando
b'\glissando
\tweak NoteHead.transparent ##t
\tweak Stem.transparent ##t
\tweak Dots.transparent ##t
g'
  } >>
}
%%%%%

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Adding parallel thirds to the notes of a melody

2019-04-03 Thread Mark Knoop

At 07:15 on 03 Apr 2019, Gianmaria Lari wrote:
> The following "test" function adds parallel thirds to the notes of a
> melody:
>
> \version "2.21.0"
> scale = {c d e f g a b}
> test  =
> #(define-music-function (music) (ly:music?)
>#{
>  \partCombine $music \modalTranspose c e \scale $music
>#})
>
> \test {\voiceOne a b c'}
>
> I don't have lilypond programming experience and I would like to know:
>
> - if there are hidden mistakes
> - if it is better to write the function in a different way
> - how I could avoid to write \voiceOne in \test {\voiceOne a b c'}
> - how I can encapsulate scale, inside the "test" function

Funnily enough, I wrote something to do this last week, adapted from 
http://lsr.di.unimi.it/LSR/Item?id=445

%
\version "2.19.82"
%% adapted from http://lsr.di.unimi.it/LSR/Item?id=445

#(define (third-up m)
   (let* ((new-note (ly:music-deep-copy m))
  (new-pitch (ly:pitch-transpose
  (ly:music-property m 'pitch)
  (ly:make-pitch 0 2 0
 (set! (ly:music-property new-note 'pitch) new-pitch)
 new-note))

#(define (addthird-chord elements)
   (cond ((null? elements) elements)
 ((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
  (cons (car elements)
(cons (third-up (car elements))
  (addthird-chord (cdr elements)
 (else (cons (car elements) (addthird-chord (cdr elements))

#(define (addthird music)
   (if (eq? (ly:music-property music 'name) 'EventChord)
   (ly:music-set-property! music 'elements (addthird-chord
(ly:music-property music 
'elements
   music)

makeThirds =
#(define-music-function
   (mus)
   (ly:music?)
   (music-map (lambda (x)
(addthird x)) (event-chord-wrap! mus)))

\makeThirds {
  \clef bass
  dis8( e dis)~ dis8.( cis16 b8 ais gis dis) cis( dis )
  c d e fis gis aes bes c'
  \clef treble
  bes des' ees' f' g' a' b' c'' d'' e'' fis''
  
}
%

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Markup beyond the final barline

2019-03-15 Thread Mark Knoop
At 08:44 on 15 Mar 2019, Urs Liska wrote:
> Hi all, this is more out of curiousity.
>
> Markups can't flow beyond the end of a score (horizontally) and widen
> the score if necessary:
>
> \version "2.19.82"
>
> {
>c'1 -"This is a long text that widens the score because it can't protrude."
>c'1
> }
>
> Is there a possibility to override this behaviour so that the score is
> just spaced naturally and the markup just goes as long as it needs?

Hi Urs, I've achieved this in the past by overriding the final barline stencil, 
combining it with a spacer markup to push it to the left.

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hide staff with Arrows Possible without other program?

2019-03-03 Thread Mark Knoop
At 17:18 on 03 Mar 2019, Reggie wrote:
> Mark Knoop-4 wrote
>> You can do this with a simple TextSpanner:
>>
>> \version "2.19.82"
>>
>> onStaffExtender = {
>>   \override TextSpanner.style = #'line
>>   \override TextSpanner.thickness = #6
>>   \override TextSpanner.to-barline = ##t
>>   \override TextSpanner.outside-staff-priority = ##f
>>   \override TextSpanner.Y-offset = #0
>>   \override TextSpanner.bound-details.left.padding = #0
>>   \override TextSpanner.bound-details.right.padding = #0
>>   \override TextSpanner.bound-details.right-broken.text =
>>   \markup \fontsize #5 \arrow-head #X #RIGHT ##t
>>   \override TextSpanner.bound-details.right.text =
>>   \markup \fontsize #5 \arrow-head #X #RIGHT ##t
>> }
>>
>> \score {
>>   <<
>> \new Staff \repeat unfold 80 c'4
>> \new Staff {
>>   c'1
>>   \stopStaff
>>   \once \onStaffExtender
>>   <>\startTextSpan
>>   s1*18
>>   \startStaff
>>   <>\stopTextSpan
>>   c'1
>> }
>>   >>
>> }
>>
> Mark this is so helpful to me thank you. Can you answer this however?
> What if I would like the arrow to be solid straight line and only one
> arrowpoint at end of everything not every system arrow at end of
> system?

I can't check this right now, but you may have to use \alterBroken:
http://lilypond.org/doc/v2.18/Documentation/notation/modifying-broken-spanners

> Also, how to hide clef for each arrow line system while line occurs
> instead of treble showing in your example each system has line + clef
> instead of just line? Thank you so very much.

Add:
  \temporary \omit Staff.Clef

and:
  \undo \omit Staff.Clef

either side of the TextSpanner.

http://lilypond.org/doc/v2.19/Documentation/notation/visibility-of-objects

> And what is <> that you use at end?

This is an empty zero-length chord which is useful for attaching objects such 
as TextSpanners or Markups.


--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hide staff with Arrows Possible without other program?

2019-03-03 Thread Mark Knoop
At 16:45 on 03 Mar 2019, Reggie wrote:
> Hello I was trying to create a score where a staff goes away and a
> simple horizontal arrow continues in its place even over page breaks.
> I cannot understand where to find this answer and I believe the
> framengraver is too much for myneeds. Is it possible?
>
> I would like to have a simple arrow go across the page or pages in
> place of staff then the staff would appear later as normal as found in
> many contemporary scores. Do I need to leave blank space and go add
> arrows in image software after LilyPond I hope not.
>
> Thank you for helping me with my question. I have a photo to show my
> help. The arrows will not always stay on one page but travel pages in
> place of staff in some cases which is very common.

Hi Reggie,

You can do this with a simple TextSpanner:

\version "2.19.82"

onStaffExtender = {
  \override TextSpanner.style = #'line
  \override TextSpanner.thickness = #6
  \override TextSpanner.to-barline = ##t
  \override TextSpanner.outside-staff-priority = ##f
  \override TextSpanner.Y-offset = #0
  \override TextSpanner.bound-details.left.padding = #0
  \override TextSpanner.bound-details.right.padding = #0
  \override TextSpanner.bound-details.right-broken.text =
  \markup \fontsize #5 \arrow-head #X #RIGHT ##t
  \override TextSpanner.bound-details.right.text =
  \markup \fontsize #5 \arrow-head #X #RIGHT ##t
}

\score {
  <<
\new Staff \repeat unfold 80 c'4
\new Staff {
  c'1
  \stopStaff
  \once \onStaffExtender
  <>\startTextSpan
  s1*18
  \startStaff
  <>\stopTextSpan
  c'1
}
  >>
}

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tracking usage of variables

2019-03-03 Thread Mark Knoop
At 13:17 on 03 Mar 2019, David Kastrup wrote:
> Mark Knoop  writes:
>> Often in the music I'm engraving a single variable might be used and
>> transformed in multiple contexts and repetitions throughout the
>> piece. This can become difficult to keep track of, particularly if
>> subsequent changes are made which might want to affect only one or
>> some of the instances.
>>
>> It would be great to be able to display the use of variables
>> throughout a score, I imagine by writing a custom engraver for this.
>
> Variable use does not sound like a use case for engravers since
> engravers work at a different stage than variable use.

Yes, I thought this might be the case.

> How about something like
>
> motif = { c'4 e' g' c'' }
>
> make-obvious =
> #(define-void-function (x) (symbol?)
>(let ((old (ly:music-deep-copy (ly:parser-lookup x
>  (ly:parser-define! x
>(define-music-function () ()
>  #{ \context Bottom << <>-#(format "Variable: ~s" x) $old >> #}
>
> \make-obvious motif
>
> I apologize for vandalizing your code and throwing out the bulk of
> functionality and markup you put in but that was just a quick and easy
> job.

That's brilliant, thanks. I'll work more with that and see where it takes me.

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Tracking usage of variables

2019-03-03 Thread Mark Knoop
Often in the music I'm engraving a single variable might be used and 
transformed in multiple contexts and repetitions throughout the piece. This can 
become difficult to keep track of, particularly if subsequent changes are made 
which might want to affect only one or some of the instances.

It would be great to be able to display the use of variables throughout a 
score, I imagine by writing a custom engraver for this. Such an engraver would 
create two helpful components:

1. Add markup to every use of a variable in the music. The point-and-click link 
of this markup would be to the use of the variable (rather than its definition).

2. Output a text report listing the musical locations (bar/beat) and contexts 
of each variable.

The example below demonstrates what such an engraver would create. I don't 
really know how to start with this, or if it is even possible - any thoughts or 
pointers from scheme gurus would be extremely helpful.

Thanks,

Mark


\version "2.19.82"

motif = { c'4 e' g' c'' }

#(define-markup-command
  (variable layout props varname)
  (string?)
  "Format variable name."
  (interpret-markup layout props
   #{
   \markup
   \with-dimensions #'(0 . 0) #'(0 . 0)
   \with-color #red
   \raise #1
   \column {
 \box \fontsize #-3 \typewriter #varname
 \combine
 \draw-line  #'(0 . 3)
 \arrow-head #Y #DOWN ##f
   }
   #}))

varname =
#(define-event-function (text) (markup?)
  #{
  -\tweak parent-alignment-X #CENTER
  -\tweak layer #-10
  ^\markup \variable #text
  #})

\score {
  <<
\new Staff = "flute" \with {
  instrumentName = "flute"
} {
  <>\varname "motif"
  \motif
  R1
  \repeat unfold 3 \transpose c' e' { <>\varname "motif" \motif }
  \bar "|."
}
\new Staff = "viola" \with {
  instrumentName = "viola"
} {
  \clef "alto"
  R1
  \repeat unfold 4 \shiftDurations 2 0 { <>\varname "motif" \motif }
  R1*2
  <>\varname "motif"
  \motif
}
  >>
}

%{ output to text file:
Variable report
===

motif:

  1 0/4: flute
  2 0/4: viola
  2 1/4: viola
  2 2/4: viola
  2 3/4: viola
  3 0/4: flute
  4 0/4: flute
  5 0/4: flute
  5 0/4: viola

%}


--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Gvim and point and click on Ubuntu 18.10

2019-02-24 Thread Mark Knoop
At 22:33 on 24 Feb 2019, Andrew Bernard wrote:
> Before I post long winded and complex error issues with my setup, is
> anybody else using this combination to good effect? I am having no end of
> trouble with error messages and unwanted behaviour from gvim. Even the
> various vim forums are barren of information on what I am seeing and what
> is happening. So this is an initial probe.

When I was using gvim the command shown in the documentation always worked for 
me, i.e.:

$ gvim --remote +:%(line)s:norm%(column)s "%(file)s"

The only difficulties I had were several years ago with registering the 
textedit:// protocol during the changes from Gnome 2 to Gnome 3. But that was 
unrelated to the gvim end of things.

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Mark Knoop


At 15:23 on 05 Feb 2019, Urs Liska wrote:
> I succeeded overriding a MultiMeasureRest's stencil with a custom markup
> to display arbitrary markups centered in a measure. So I know how to use
> the MMR's properties to determine a measure's center and place custom
> stencils appropriately.
>
> However, now I have to do the same but not with text but with arbitrary
> notes. Unfortunately there's no stencil for a "note", so I'm not sure if
> I can make this approach work.
>
> Would it be possible to manually combine (arbitrary) notehead, stem and
> flag to a custom stencil that I can then place inside the staff by
> overriding a MMR's stencil? Are there even tools to help me with that?

It seems overkill, but you could try getting the stencil from a \markup \score 
block stripped of unnecessary engravers.

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Change pitch in part of a music fragment

2018-12-01 Thread Mark Knoop
At 20:29 on 01 Dec 2018, Jean-Julien Fleck wrote:
>Hello,
>
>I have a music fragment stored in a variable:
>
>myfragment = \relative c' {c d e f g a b c d e f g}
>
>The fragment was initially written for another instrument than the one
>I'm targeting so that the range is not big enough to play the whole
>fragment without octaviation. Here, for example, the target instrument
>would need use
>
>\relative c' {c d e f g a b c, d e f g} % note the comma after the
>middle c
>
>Is it possible to use the variable \myfragment and manually tell
>lilypond (without editing the code of the fragment) that, for example
>here from the third time of the second measure until the end of the
>third measure, I would like to octaviate ?
>
>The goal is obviously to be able to switch instruments without
>copy/pasting global music fragment but just locally tell lilypond to
>octaviate when needed for a given instrument.

Take a look at <http://lsr.di.unimi.it/LSR/Item?id=773>. The 
\correctOctaveOutOfRange function should do what you want.

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Extract the first notes from a musical expression

2018-11-14 Thread Mark Knoop
At 00:16 on 15 Nov 2018, Gianmaria Lari wrote:
>Consider a simple code similar to the following one:
>
>\version "2.19.82"
>myVar = \fixed c' { a4 b c' a | a4 4 b c | b4 a b c' | 
>{\myVar}
>
>
>This will generate a score containing *all* the notes specified in
>myVar.
>
>Now, suppose that I don't want to generate all the notes in myVar but
>only the first 8 quarter notes (the first 2 bars) . Is there any
>function that can do it? something like "\extractMusic \myVar 4*4".

There is indeed code available to do this. 

http://gillesth.free.fr/Lilypond/extractMusic/

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Adjusting angle of glissando

2018-11-08 Thread Mark Knoop
At 20:31 on 08 Nov 2018, Andrew Bernard wrote:
>My colleague wants a glissando on an angle down from the first note to
>the last in the typical example of his work attached.
>
>How can one adjust the endpoints of a glissando? I looked everywhere
>to no avail.

You want something like

-\tweak extra-dy #-1 \glissando

>While we are here, I am told that this is stock standard and common
>notation. Is it actually (esp, having to make the hack with a grace
>note at the end)?
>
>Sorry the MWE cant be shorter, but it needs to be this ling to show to
>the full context. The musical problem the engraver faces of course, as
>opposed to a man with a pencil, is that C# and C are at the same
>level, and he wants the angle to show the slope down in pitch (I
>remain unconvinced.)
>
>Andrew
>
>%%
>
>\version "2.19.82"
>
>glissandoSkipOn = {
>  \override NoteColumn.glissando-skip = ##t
>  \hide NoteHead
>  \override NoteHead.no-ledgers = ##t
>}
>
>glissandoSkipOff = {
>  \revert NoteColumn.glissando-skip
>  \undo \hide NoteHead
>  \revert NoteHead.no-ledgers
>}
>
>{
>  \time 1/4
>  \clef bass
>  \stemUp
>  \tuplet 3/2 {
>deh,4\glissando
>\glissandoSkipOn cis,16
>\glissandoSkipOff
>cis,16\glissando
>\glissandoSkipOn
>  }
>  \tuplet 3/2 {
>c,4
>\glissandoSkipOff
>\grace { \once \override Stem.transparent = ##t c,!8 }
>\breathe
>d8\rest
>  }
>}
>
>%%


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Time signature and beat markers

2018-11-07 Thread Mark Knoop
At 21:16 on 06 Nov 2018, Andrew Bernard wrote:
>Answering my own question, this simple approach works:
>
>  \time 5/4
>  \set Timing.measureLength = #(ly:make-moment 1/4)
>
>I'm happy to make the thincker barlines manually, unless anybody has
>some clever special engraver ideas.

Try something like this:

\version "2.19.21"

barSigs = #(define-music-function
  (numbars timesig)
  (number? fraction?)
  (_i "make empty bars")
  (let* ((tsnumerator (car timesig))
 (tsdenominator (cdr timesig))
 (dotbeats (- tsnumerator 1)))
#{
\time #timesig
\repeat unfold #numbars {
  \repeat unfold #dotbeats { s4 \bar "|" }
  s4 \bar "."
}
#}))

{
  <<
{ % this is your global variable
  \barSigs 3 5/4 % 3 bars of 5/4
  \barSigs 1 3/4 % 1 bar of 3/4
}
{ % this is your music
  \repeat unfold 18 c'4
}
  >>
}

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Score and parts with global variable

2018-11-04 Thread Mark Knoop
At 21:37 on 04 Nov 2018, Andrew Bernard wrote:
>After a long time using lilypond, for solo instrumental music
>exclusively, now setting a string quartet for the first time and
>needing score and parts. I confess that I am confused about using a
>global variable for tempo indications and so on and so forth. Two
>newbie questions.
>
>1.
>
>In the NR template for a SQ with part this is given:
>
>music = {
>  <<
>\tag #'score \tag #'vn1
>\new Staff \with { instrumentName = "Violin 1" }
><< \global \Violinone >>
>
>\tag #'score \tag #'vn2
>\new Staff \with { instrumentName = "Violin 2" }
><< \global \Violintwo>>
>
>\tag #'score \tag #'vla
>\new Staff \with { instrumentName = "Viola" }
><< \global \Viola>>
>
>\tag #'score \tag #'vlc
>\new Staff \with { instrumentName = "Cello" }
><< \global \Cello >>
>  >>  
>}
>
>I am unable to understand why the \global information does not print
>four times. How does this work? The template by the way does not give
>example code for the \global variable.

Yes, it does somewhat depend on what you put in global. I do something like 
this:

global = {
  \time 4/4
  \tempo 4=72
  s1*4
  \bar "||"
  \time 3/4
  \tempo 4=96
  s1*3/4*12
  \bar "|."
}

% define violinone. violintwo, viola, cello

\book {
  \bookOutputName "score"
  \score {
\new Score {
  <<
\new Dynamics \global
\new Staff \violinone
\new Staff \violintwo
    \new Staff \viola
\new Staff \cello
  >>
}
  }
}

\book {
  \bookOutputName "violinone"
  \score {
\new Score {
  <<
\new Dynamics \global
\new Staff \violinone
  >>
}
  }
}

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lutoslawski-style box notation

2018-11-04 Thread Mark Knoop
At 19:28 on 03 Nov 2018, David Nalesnik wrote:
>Oops, sorry about the empty response.
>
>Sure, yes, I just want to make sure that I release it under the right
>license (I suppose it must be GPLed) and include whatever I must
>relative to LilyPond coverage by the GPL .  I just jumped the gun,
>that's all.

Thanks David, Harm, and Ben for reminding me of the frameEngraver - this is 
exactly what I need. And yes, David, it would be great to have all your code 
available somewhere, I hope you can work out the best way to do this.

Cheers,

Mark


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Edition Engraver regex/wildcard bug

2018-10-25 Thread Mark Knoop
Apologies if this is a known issue, but I think I've found a bug in the 
regex/wildcard handling of edition engraver paths.

It seems that mixing editionMods with normal paths together with those formed 
with wildcards and/or regular expressions causes the wildcard/regex editionMods 
to break. This is using code adapted from usage-examples/development-3.ly. 

A workaround is of course to simply use wildcards or regexes in all 
editionMods, but this seems arcane.

%%%
\version "2.19.82"
\include "oll-core/package.ily"
\loadPackage edition-engraver
\consistToContexts #edition-engraver Score.Staff.Voice.Lyrics
\addEdition test

% { comment this block for green noteheads
\editionMod test 1 0/4 la.Voice \once \override NoteHead.color = #red
\editionMod test 2 0/4 le.Voice \once \override NoteHead.color = #blue
%}
\editionMod test 3 0/4 "{l*}".Voice \once \override NoteHead.color = #green
\editionMod test 4 0/4 "/l.*/".Voice \once \override NoteHead.color = #green

%{ workaround using regular expressions
\editionMod test 1 1/4 "/^la$/".Voice \once \override NoteHead.color = #red
\editionMod test 2 1/4 "/^le$/".Voice \once \override NoteHead.color = #blue
%}
%{ workaround using wildcards
\editionMod test 1 2/4 "{la}".Voice \once \override NoteHead.color = #red
\editionMod test 2 2/4 "{le}".Voice \once \override NoteHead.color = #blue
%}

<<
  \new Staff \with {
\editionID le
  } \repeat unfold 24 e''4
  \new Staff \with {
\editionID la
  } \repeat unfold 24 e''4
>>
%%%

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Moving just text, leaving articulations in place?

2018-04-19 Thread Mark Knoop
At 17:38 on 18 Apr 2018, Robert Hickman wrote:
>Tried using "\override TextScript.staff-padding" to move the text
>annotations in the attached image up but it also moves the Larson
>articulation symbols up as well. I want these to stay in the same
>place and the text to move up a bit away from them. Is lilypond
>treating the articulation symbols as text?
>
>\header {tagline = ""}
>
>{
>\override TextScript.staff-padding = #5
>\numericTimeSignature
>\time 3/8
>
>g'4.\cut^\markup {\tiny Cut } |  g'4.\strike^\markup {\tiny
> Strike } |
>}

Use \tweak instead of \override, viz:

{
\numericTimeSignature
\time 3/8

g'4.\cut -\tweak staff-padding #5 ^\markup {\tiny Cut } |  
g'4.\strike -\tweak staff-padding #5 ^\markup {\tiny Strike } |
}

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \pushToTag and \appendToTag help

2018-04-13 Thread Mark Knoop
At 11:48 on 13 Apr 2018, David Kastrup wrote:
>Gianmaria Lari <gianmarial...@gmail.com> writes:
>> I simply don't understand it. I don't understand it because: it is
>> too long, there are too many things, I don't understand the example
>> goal, and I don't understand the explication following the code.  
>
>It adds material at two points to \test: in the inner parallel music,
>and the outer sequential music.  The first version adds successively
>g', e', and c' at the front of those expression, the second at the end
>of those expressions.
>
>Ok, it is probably trying to show to much at once.  What's the scope
>that you think you could deal with?  Two separate examples for
>sequential and parallel music (probably not a good idea to work on
>multiple tags here)?  Not adding more than a single term?

I remember studying this section of documentation and having to try
several things before understanding how these commands work. I
probably should have made a patch at the time... Probably a simpler 
example would be more helpful, perhaps something like:

melody = { c' \tag #'append { d' } \tag #'push <f'>2 }

{
  \melody
  \pushToTag #'push e'2 \melody
  \appendToTag #'append e'2 \melody
}

Perhaps I'm wrong, but it's my understanding that \pushToTag requires 
that the tagged expression is simultaneous music (enclosed within <>),
and that \appendToTag requires that the tagged expression is 
sequential music (enclosed within {}). Or, at least, if in the above 
example, melody is defined as:

melody = { c' \tag #'append d' \tag #'push f'2 }

then it doesn't work.

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text level with the staff

2018-01-17 Thread Mark Knoop
At 04:35 on 17 Jan 2018, Vivyan wrote:
>I mean like this (photoshopped);
>
><http://lilypond.1069038.n5.nabble.com/file/t5486/Screen_Shot_2018-01-17_at_11.png>
> 

Something like this perhaps:

\version "2.19.80"
\language "english"

\header {
  title = "XMAS_EVET"
  tagline = "" % removed
}

\score {
  {
<<
  \new Staff {
\time 4/4
\clef bass
\set Staff.instrumentName = #"synth"
R1
\once \override Staff.BarLine.layer = #20
\once \override Staff.BarLine.stencil = #(lambda (grob)
  (ly:stencil-combine-at-edge
  (ly:bar-line::print grob)
  X RIGHT
  (grob-interpret-markup grob #{
\markup
\whiteout
\vcenter
\pad-around #2
    "rest for X 16"
#})
  0))
  }
>>
  }
}


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond code in (pdf/lua/xe)latex documents

2017-12-06 Thread Mark Knoop
At 09:05 on 06 Dec 2017, Mark Knoop wrote:
>At 09:41 on 06 Dec 2017, Knut Petersen wrote:
>>Hi everybody!
>>
>>Some years ago I published example code how to integrate lilypond code
>>in latex documents. The attached file is an extended update, it might
>>be used with pdflatex, lualatex or xelatex, and it demonstrates how to
>>use the new command line options that replaced --bigpdf in master.
>>
>>The file should be translated with either
>>
>>  * pdflatex --shell-escape lyInLatex
>>  * lualatex --shell-escape lyInLatex
>>  * pdflatex --shell-escape lyInLatex  
>
>Thanks for this Knut, very helpful. Presumably the 3rd of these should
>be xelatex.
>
>Interestingly, only pdflatex produces all four bars/systems of
>fragment 1. When run with lualatex and xelatex only the first system
>is shown. Any idea why this might be?
>
Apologies - I was missing a hyphen in the commandline - all produce correct 
results.

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond code in (pdf/lua/xe)latex documents

2017-12-06 Thread Mark Knoop
At 09:41 on 06 Dec 2017, Knut Petersen wrote:
>Hi everybody!
>
>Some years ago I published example code how to integrate lilypond code
>in latex documents. The attached file is an extended update, it might
>be used with pdflatex, lualatex or xelatex, and it demonstrates how to
>use the new command line options that replaced --bigpdf in master.
>
>The file should be translated with either
>
>  * pdflatex --shell-escape lyInLatex
>  * lualatex --shell-escape lyInLatex
>  * pdflatex --shell-escape lyInLatex

Thanks for this Knut, very helpful. Presumably the 3rd of these should be 
xelatex.

Interestingly, only pdflatex produces all four bars/systems of fragment 1. When 
run with lualatex and xelatex only the first system is shown. Any idea why this 
might be?


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: clef_8

2017-12-02 Thread Mark Knoop
At 12:47 on 02 Dec 2017, bb wrote:
>I have a problem with the 8 under the clef clef_8. That number 8 does
>not disappear with    
>\override Staff.Clef #'stencil = #ly:text-interface::print
>I cannot decide if this is a bug?

The "8" is not part of the Clef object, but is a ClefModifier object. Try:

\omit Staff.ClefModifier


>Thanks for any help!
>
>Regards
>
>Example code:
>
>\version "2.19.2"
>   MTbass-five = \stringTuning < dis, g, b, dis g >
>   
>roottoroot-one  = {
>    \clef "bass_8" 
>    \transpose g g, { g8 a b d' c' bes a g \bar "||" \break }
>}
>
>chordroottoroot-one =\chordmode { g2:7 c:7 }
>
>#(set-global-staff-size 27)
>
>\score {
>  <<
>    \new ChordNames \chordroottoroot-one
>    \new Staff \transpose c c, \roottoroot-one
>    \new TabStaff {
>    \override Staff.Clef #'stencil = #ly:text-interface::print
>    \override Staff.Clef #'text =
>    \markup
>    \whiteout
>    \raise #1.0
>    \bold
>    \override #'(baseline-skip . 0.5)
>    \center-column {
>    \abs-fontsize #12 { g dis b, g, dis, }
>    }
>    \set TabStaff.stringTunings = #MTbass-five
>    \roottoroot-one
>    }
>  >>
>  \layout { }
>    \midi { }
>}
>
>
>___
>lilypond-user mailing list
>lilypond-user@gnu.org
>https://lists.gnu.org/mailman/listinfo/lilypond-user


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: tempo percentage

2017-11-08 Thread Mark Knoop
At 14:14 on 08 Nov 2017, Gianmaria Lari wrote:
>Talking about midi, is there any way to to reduce or increase the
>tempo of some measures by a certain percentage instead of setting it
>to an absolute value?
>
>For example instead of:
>
>\tempo 4=100 a b c d
>\tempo 4=110 e f g a
>
>
>something like
>
>\tempo 4=100 a b c d
>\tempo 4=currentTempo*1.1 e f g a


baseTempo = 100

\relative c' {
  \tempo 4 = #baseTempo
  a b c d
  \tempo 4 = #(inexact->exact (round (* baseTempo 1.1)))
  e f g a
}


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to change the position of an expressive mark relative to a beam in another voice

2017-06-23 Thread Mark Knoop
At 20:19 on 23 Jun 2017, Andrew Bernard wrote:
>Hi Robert,
>
>Any use?
>
>\version "2.19.61"
>
>\new Staff  {
>  \clef bass
>  \time 4/4
>
>  \stemUp
>  \set fontSize = #4.5
>  \once \override Script.X-offset = #6
>  c'16^^ [es'8.] s2.
>}
>
>You can fiddle Y-offset also.
>
>As to how to beam across to a minim, that is tricky indeed, if you are
>going to go the whole hog with this score.

Beaming to a minim, just add:

\once \override NoteHead.duration-log = #1

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: pushing items "through" or "beyond" other contexts

2017-06-03 Thread Mark Knoop
At 15:53 on 02 Jun 2017, Kieren MacMillan wrote:
>Hi,
>
>> Couldn't you do \new Dynamics { \alignAboveContext = "upper"
>> s4/p }?  
>
>No.  =\
>
>p.s. I’ve now included a compilable snippet, if anyone wants to try
>stuff out.
>
>Thanks,
>Kieren.
>
>%%%  SNIPPET BEGINS
>\version "2.19.61"
>
>upperStuff = {
> c''2 d''4( c'')
>}
>
>centredDynamics = {
>  s2\f
>  % I want the following dynamic above the upper staff.
>  % Currently, I have to use extra-offset (or similar)
>  \once \override DynamicText.extra-offset = #'(0 . 8.5)
>  s2\p
>}
>
>lowerStuff = {
>  \clef bass
>  c1
>}
>
>\new PianoStaff <<
>  \new Staff = “upper” \upperStuff
>  \new Dynamics = “dyn” \centredDynamics
>  \new Staff = “lower” \lowerStuff
>>>  
>%%%  SNIPPET ENDS

What about

\context Staff = "upper" s2^\p

?

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Pedal style doesn't seem to work

2017-02-07 Thread Mark Knoop
At 11:52 on 07 Feb 2017, Peter Toye wrote:
>Wanting to use bracket style pedals. The snippet below gives me 19-th
>century style "Ped" mark. What am I doing wrong please?

A Dynamics context is not a Staff context. See below...

>\version "2.19.52"
>
>\language "english"
>
>\score {
>  <<
>\new Staff {
>  \clef "treble"
>  \relative {
>c''4 d e f | g f e d | c d e f
>  }
>}
>
>\new Dynamics {
  % \set Staff.pedalSustainStyle = #'bracket
  % use Dynamics
  \set Dynamics.pedalSustainStyle = #'bracket
  % or specify no context
  \set pedalSustainStyle = #'bracket
>  s1\sustainOn
>  s1\sustainOff\sustainOn
>  s1\sustainOff
>}
>
>  >>
>}

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Forcing some horizontal space between two notes

2017-01-03 Thread Mark Knoop
Great start Urs! Why do you invert the stem direction in the first beat
from (at least my copy of) the original? Having the RH 6tuplet stems up
would seem to allow for closer staff spacing...

Lots of lilypond challenges in this piece. Looking forward to your
compound slurs on the penultimate page of the final movement!

At 16:27 on 03 Jan 2017, Urs Liska wrote:
>Just for reference, attached you'll find my preliminary result with a
>compound slur that is somewhat more "mainstream" than the original
>Sorabji example :-)
>
>Best
>Urs
>
>
>Am 03.01.2017 um 13:45 schrieb Urs Liska:
>> Hi all,
>>
>> it seems to me this should be easily doable, but I don't find the
>> right incantation.
>>
>> I would like to force some space between the first group in the right
>> hand and the following grace notes. This is necessary in order to 
>> squeeze a slur between them, coming from the dis in the left hand.
>>
>> From the manual I found
>>
>> \override Score.NonMusicalPaperColumn.padding = #10
>>
>> looking like it's what I need. But used like this it introduces space
>> between *all* notes, regardless of where it is placed. Trying to use
>> it with \once it doesn't have any effect (using 2.19.52).
>>
>> Any suggestion would be welcome.
>>
>> Urs
>>
>>
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user  
>


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Getting a new computer

2016-11-17 Thread Mark Knoop
36 seconds on i5-2500 3.3GHz, 8GB RAM, LilyPond 2.19.49

At 13:24 on 17 Nov 2016, Vaughan McAlley wrote:
>Greetings,
>
>My 2008 iMac is reaching the end of its useful life, and I would like
>to replace it with some kind of desktop computer that runs Debian.
>Given that a significant proportion of my time on this new computer
>will be compiling Lilypond files, I was wondering which specs I should
>be prioritizing.
>
>I’ve included a large project if anyone with a newish computer would
>like to test their compilation time. The main file is MDSM.ly. It
>takes my computer between 4 and 5 minutes to compile.
>
>Cheers,
>Vaughan


-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: No readline in scheme-sandbox

2016-10-21 Thread Mark Knoop
At 17:11 on 21 Oct 2016, David Sumbler wrote:
>> > > > > Given that, on my 64-bit Linux system, I have Guile 1.8
 ^^

>> > > I downloaded lilypond-2.19.48-1.linux-64.sh from http://lilypond.
 ^^

>Yes.  The output from 'aptitude search guile-1.8-libs' is:
>
>i A guile-1.8-libs
>p   guile-1.8-libs:i386


This may be your problem. Try installing the 64-bit libs.

--
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Notes on wrong side of stem in triads

2016-10-18 Thread Mark Knoop
At 17:05 on 18 Oct 2016, Davide Liessi wrote:
>I reproduced the issue with this:
>
>\version "2.19.47"
>\layout { #(layout-set-staff-size 19) }
>{ <c'' e'' g''> }
>
>Using #(set-global-staff-size 19) instead works as expected.
>I couldn't find a bug report for this.
>Any ideas?

Very weird, and certainly a bug. This works as expected also:

\version "2.19.47"
\layout { #(layout-set-staff-size 19.0001) }
{ <c'' e'' g''> }

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: (Automatically) split partcombined voices to temporary staff

2016-09-16 Thread Mark Knoop
At 18:24 on 16 Sep 2016, Urs Liska wrote:
>Hi all,
>
>thanks so far for the links. When that recent thread went by I didn't
>realize that it might be relevant to me so soon ...

As mentioned, this mostly works at the moment. The additional part I'm
currently working on (well, trying to find time to work on) is allowing
different groups of instruments to combine and separate independently.
See attachments for how this works. NB this code is not yet merged, or
even ready for review. 

>Am 16.09.2016 um 17:29 schrieb Urs Liska:
>>
>> Hi all,
>>
>> I have a question regarding complicated orchestral material. Note
>> that I don't need a solution right now, only a plausible estimate if
>> that's possible to implement at all.
>>
>> Consider the situation of a staff with two partcombined voices (say,
>> flutes). If there are spots (measures or ranges of measures) where
>> the voices are so individualized or complex that the part combination
>> becomes unreadable I would like to split this range (measure) to two
>> individual staves.
>>
>> The attached image shows the (manually constructed) intended result.
>> Let's assume I would consider m. 7 too complex to be combined and
>> therefore want the whole "current" system to be split in two staves.
>>
>> The ideal way would be to have an automatic function that I can call
>> within such a measure (tagging it as "non-combinable") that would:
>>
>>   * Determine in which system I'm currently in and from where to
>> where it spans (i.e. previous and next line break)
>>   * Create a temporary staff for exactly that range
>>   * Copy the music of the second voice to that staff
>>   * remove the second voice from the current staff
>>   * (suppress partcombine texts)
>>
>> In the potential score at hand the music will be maintained in a
>> measure based grid. That means if I could get just the first of these
>> (i.e.. determining the current and previous line breaks) I *might* be
>> able to achieve something. But it would be a great feature (and a
>> "selling point" for LilyPond) if we could integrate it. I got this
>> request from a professional engraver who says it's a problem he's
>> dealing with all the time: manually handling the combination and
>> temporary splitting of voices in a staff - and especially fixing
>> things if the line breaking happens to change. He said it would be a
>> dramatic advantage if LilyPond could do that automatically.
>>
>> Any suggestions welcome.
>>
>> Urs
-- 
Mark Knoop
\version "2.19.49"
targetstaff = #(define-scheme-function
  (ctx) (string?)
  #{
\set Staff.keepAliveInterfaces = #'()
\context Staff = #ctx { \unset Staff.keepAliveInterfaces }
  #})
sopnotes = \relative c'' {
  \targetstaff #"tutti"
  c1 1 1 1 \break
  \targetstaff #"sopalt"
  c4 d e f g f e d c1 R1 \break
  \targetstaff #"sop"
  \repeat unfold 8 { c8 e g e } \break
  \targetstaff #"sopalt"
  c4 d e f g f e d c1 \break
  c4 d e f g f e d c1 R1
  \bar "|."
}
altnotes = \relative g' {
  \targetstaff #"tutti"
  g1 1 1 1
  \targetstaff #"sopalt"
  c4 d e f g f e d c1 R1
  \targetstaff #"alt"
  \repeat unfold 8 { c,8 e g e }
  \targetstaff #"sopalt"
  c4 d e f g f e d c1
  c4 d e f g f e d c1 R1
}
tennotes = \relative e' {
  \targetstaff #"tutti"
  e1 1 1 1
  \targetstaff #"tenbas"
  c4 d e f g f e d c1 R1
  \targetstaff #"ten"
  \repeat unfold 28 { c8 e }
  \targetstaff #"tutti"
  R1*4
}
basnotes = \relative c' {
  \targetstaff #"tutti"
  c1 1 1 1
  \targetstaff #"tenbas"
  c4 d e f g f e d c1 R1
  \targetstaff #"bas"
  \repeat unfold 28 { e,8 g }
  \targetstaff #"tutti"
  R1*4
}
soplyrics = \lyricmode {
  \repeat unfold 4 la
  \repeat unfold 9 la
  \repeat unfold 32 la
  \repeat unfold 18 la
}
altlyrics = \lyricmode {
  \repeat unfold 4 la
  \repeat unfold 9 la
  \repeat unfold 32 hi
  \repeat unfold 18 la
}
tenlyrics = \lyricmode {
  \repeat unfold 4 la
  \repeat unfold 9 di
  \repeat unfold 56 do
}
baslyrics = \lyricmode {
  \repeat unfold 4 la
  \repeat unfold 9 di
  \repeat unfold 56 dum
}

\layout {
  short-indent = 8
  \context {
\StaffGroup
\consists Keep_alive_together_engraver
  }
  \context {
\Staff
\override VerticalAxisGroup.remove-first = ##t
\override VerticalAxisGroup.remove-empty = ##t
  }
  \context {
\Lyrics
\override VerticalAxisGroup.remove-layer = #'above
keepAliveInterfaces = #'()
  }
}

\score {
  \new StaffGroup <<
\new Staff = "tutti" \with {
  instrumentName = "SATB"
  shortInstrumentName = "SATB&quo

Re: Keep alive together - call for use cases

2016-08-22 Thread Mark Knoop
At 12:01 on 22 Aug 2016, Kieren MacMillan wrote:
>Hi Mark,
>
>> Yes, sorry, they require a version built with the 3rd patchset here  
>
>Ah…
>
>> that's why I also attached the pdfs,
>> so you can see the results without compiling.  
>
>I was hoping to try it out on my real-world choral example, so that I
>could report back on its sufficiency and usability. I’ll see what I
>can figure out without actually compiling the score.

I'd be happy to try it on one of your scores if you send me the source.

-- 
Mark Knoop

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


  1   2   3   >