avoid orphan

2018-06-20 Thread Gianmaria Lari
I have a code similar to this \version "2.19.81" \markup "Etude" {a b c' d'} \markup "Etude" {a b c' d'} [.] Is there any way to keep the markup and score together? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/

Re: avoid orphan

2018-06-20 Thread Malte Meyn
Am 20.06.2018 um 10:15 schrieb Gianmaria Lari: I have a code similar to this \version "2.19.81" \markup "Etude" {a b c' d'} \markup "Etude" {a b c' d'} [.] Is there any way to keep the markup and score together? What do you mean by “together”? And have you cons

Re: avoid orphan

2018-06-20 Thread Jan-Peter Voigt
Hi Gianmaria, like Malte already pointed out, you can use the header field piece. If your intention is something else, I guess you are looking for \noPageBreak: \score { {a b c' d'} \layout {} \header { piece = "Etude" } } \markup "Etude" \noPageBreak {a b c' d'} HTH Jan-Peter Am 20.06.201

Function template (or whatever it's called)

2018-06-20 Thread Urs Liska
I'm providing users with the option to configure some behaviour by providing custom styling functions. These functions must have a certain interface and will typically retrieve the same information from their arguments. I would like to simplify this task by providing a "function template". I th

weird de-beaming behavior

2018-06-20 Thread N. Andrew Walsh
Hi List, I have the following MWE: \version "2.19.80" \relative c'' { \time 3/4 e8 d16 c d8 d \bar "" \break g, f'~ } Notice that the last two eighth-notes in that first line, in this case, are un-beamed. However, when I comment out the next line (starting with the \ba

Re: dynamics and line spanning

2018-06-20 Thread David Kastrup
Reilly Farrell writes: > Hi All, > > Is there an easy way to configure dynamics and markup text so that they > occupy they share the same vertical alignment relative to the staff? My > hope is that I can align regular dynamic marks with special dynamic > instructions (\cresc won't cut it in this

Re: Function template (or whatever it's called)

2018-06-20 Thread Jan-Peter Voigt
Hi Urs, define-macro is the method you are looking for: %%% \version "2.19.80" % define macro #(define-macro (define-my-custom-function code) ; all wrapping code is (semi)quoted `(define-music-function (mus)(ly:music?) (let* ((elts (ly:music-pr

Re: Function template (or whatever it's called)

2018-06-20 Thread David Kastrup
Urs Liska writes: > \version "2.19.80" > > myFunc = > #(define-music-function (mus)(ly:music?) >(let* > ((elts (ly:music-property mus 'elements)) > (cnt (length elts))) > (ly:message "The music has ~a elements" cnt) > mus)) > > { > \myFunc { c' e' } > } > > Create a music f

Re: Function template (or whatever it's called)

2018-06-20 Thread Urs Liska
Hi Jan-Peter, thanks for the quick response! Am 20.06.2018 um 11:35 schrieb Jan-Peter Voigt: Hi Urs, define-macro is the method you are looking for: Indeed, that's what I need. I might have managed to look that up myself, but I think that with the quoting stuff in place it would have drive

Re: Function template (or whatever it's called)

2018-06-20 Thread Urs Liska
Am 20.06.2018 um 11:38 schrieb David Kastrup: Urs Liska writes: \version "2.19.80" myFunc = #(define-music-function (mus)(ly:music?) (let* ((elts (ly:music-property mus 'elements)) (cnt (length elts))) (ly:message "The music has ~a elements" cnt) mus)) { \myFun

Re: Function template (or whatever it's called)

2018-06-20 Thread Jan-Peter Voigt
Hi Urs, just one pointer on Davids message (thank you!): in my example the code has to be a singular expression, which is the case in most of my cases where I use let or begin. If you want to use more than one statement use the optional-argument-dot (define-my-custom-function . code) and unquo

Re: weird de-beaming behavior

2018-06-20 Thread Phil Holmes
It strikes me that, by forcing a line break in the middle of a beam and in the middle of a bar, you make it difficult for lily to work out what beaming you actually want. Simple workaround: [ ] - manual beaming for this unusual situation. -- Phil Holmes - Original Message - From

Re: weird de-beaming behavior

2018-06-20 Thread N. Andrew Walsh
Hi Phil, thanks for your message. The thing is, here's another example: \version "2.19.80" \relative c'' { c e, g16 a b8 \bar "" \break r e, g16 a b8 } The 'g16 a b8' in the first line is beamed correctly. Is this something peculiar to 3/4 time? Cheers, A > _

Re: Function template (or whatever it's called)

2018-06-20 Thread David Kastrup
Urs Liska writes: > Am 20.06.2018 um 11:38 schrieb David Kastrup: > >> #(define-macro (define-my-custom-function . body) >>`(define-music-function (mus) (ly:music?) >> (let* >>((elts (ly:music-property mus 'elements)) >> (cnt (length elts))) >> ,@body >> m

Re: weird de-beaming behavior

2018-06-20 Thread David Kastrup
"N. Andrew Walsh" writes: > Hi Phil, > > thanks for your message. The thing is, here's another example: > > \version "2.19.80" > > \relative c'' { > > c e, g16 a b8 > \bar "" \break > r e, g16 a b8 > } > > The 'g16 a b8' in the first line is beamed correctly. Is this something > peculiar to 3/4 t

Re: avoid orphan

2018-06-20 Thread Gianmaria Lari
My apologies, my msg. was not clear. I wanted the score and the text on the same page. I tried with \noPageBreak and it works well. I will test also the header later. Thanks a lot Jan and Malte On Wed, 20 Jun 2018 at 10:43, Jan-Peter Voigt wrote: > Hi Gianmaria, > > like Malte already pointed

Re: weird de-beaming behavior

2018-06-20 Thread N. Andrew Walsh
Hi David On Wed, Jun 20, 2018 at 12:33 PM David Kastrup wrote: > > In this case you have 3 beats before the break. The bar is complete. > In your first example you had only two. > Both MWEs are complete in themselves, thus the latter, with no \time statement, is in the default 4/4. Sorry, I sho

Re: weird de-beaming behavior

2018-06-20 Thread David Kastrup
"N. Andrew Walsh" writes: > Hi David > On Wed, Jun 20, 2018 at 12:33 PM David Kastrup wrote: > >> >> In this case you have 3 beats before the break. The bar is complete. >> In your first example you had only two. >> > > Both MWEs are complete in themselves, thus the latter, with no \time > stat

Re: weird de-beaming behavior

2018-06-20 Thread Phil Holmes
I'm no expert on lily's beaming system. However, in your second example you don't break an existing beam with a bar/line break, so it's rather different from the first where the "correct" beaming was broken. -- Phil Holmes - Original Message - From: N. Andrew Walsh To: Phil Ho

Re: weird de-beaming behavior

2018-06-20 Thread N. Andrew Walsh
Hi Phil, On Wed, Jun 20, 2018 at 1:18 PM Phil Holmes wrote: > I'm no expert on lily's beaming system. However, in your second example > you don't break an existing beam with a bar/line break, so it's rather > different from the first where the "correct" beaming was broken. > > Not knowing anythi

Re: weird de-beaming behavior

2018-06-20 Thread Phil Holmes
Well, This example is almost identical to your first example. A beamed note is broken by a bar and break and the beam is broken. Lily doesn't know how to beam them. The 2 leftover notes are beamed in both examples - again i don't know why, but it's quite consistent behaviour and consistent w

Re: weird de-beaming behavior

2018-06-20 Thread David Kastrup
"N. Andrew Walsh" writes: > Hi Phil, > On Wed, Jun 20, 2018 at 1:18 PM Phil Holmes wrote: > >> I'm no expert on lily's beaming system. However, in your second example >> you don't break an existing beam with a bar/line break, so it's rather >> different from the first where the "correct" beamin

Re: weird de-beaming behavior

2018-06-20 Thread Urs Liska
Am 20. Juni 2018 14:26:51 MESZ schrieb Phil Holmes : >Well, > >This example is almost identical to your first example. A beamed note >is broken by a bar and break and the beam is broken. Lily doesn't know >how to beam them. The 2 leftover notes are beamed in both examples - >again i don't kno

Re: weird de-beaming behavior

2018-06-20 Thread N. Andrew Walsh
Hi Phil, On Wed, Jun 20, 2018 at 2:26 PM Phil Holmes wrote: > > You could keep making odd examples of undefined beaming until the cows > come home, but surely it would be a lot quicker just to beam manually??? > I suppose, actually (and I'll talk to Urs about this) that since the sources I'm wor

Re: weird de-beaming behavior

2018-06-20 Thread Carl Sorensen
On 6/20/18, 6:45 AM, "Urs Liska" wrote: PS: As to the *why* I have the vague recollection that beaming rules define where beams can be *ended*. This would explain why the beam before the break doesn't work but the one after does. Automatic beaming starts when a beamable note is e

Re: Function template (or whatever it's called)

2018-06-20 Thread Simon Albrecht
On 20.06.2018 11:18, Urs Liska wrote: (let*     ((elts (ly:music-property mus 'elements)) (cnt (length elts) OT: Is ‘cnt’ a common abbreviation in programming? Because it would seem to me like it’s too close to offensive… Best, Simon ___ lily

Re: Function template (or whatever it's called)

2018-06-20 Thread David Kastrup
Simon Albrecht writes: > On 20.06.2018 11:18, Urs Liska wrote: >> (let* >>     ((elts (ly:music-property mus 'elements)) >> (cnt (length elts) > > OT: Is ‘cnt’ a common abbreviation in programming? Because it would > seem to me like it’s too close to offensive… "count" doesn't seem that muc

Embedded Lilypond

2018-06-20 Thread J Martin Rushton
I monitor the Dokuwiki* mailing list and today an interesting question came up. A user was trying to set a song with guitar chords over the relevant notes, but proportional text was destroying his formatting. A couple of solutions were proposed: override the proportional text (which needn't conce

How to write a training sign (Übungszeichen) before any note?

2018-06-20 Thread Bernhard Kleine
Could you please help me with that? Bernhard -- spitzhalde9 D-79853 lenzkirch bernhard.kle...@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09 signature.asc Description: Open