Re: visualize-padding

2020-01-22 Thread Paolo Prete
Y > > All of my helper functions for overlaying stencils are really just > hacks; they might work for some grobs and fail for others. And when > things stop working, you just have to look for another hack. For > instance, if messing with the stencil for TupletBracket is not working, > perhaps

Re: visualize-padding

2020-01-22 Thread Aaron Hill
On 2020-01-22 7:26 am, Paolo Prete wrote: The problem is associated with: https://lists.gnu.org/archive/html/lilypond-user/2020-01/msg00467.html Sorry if I insist again with this: is there a fix (or work-around) for it? The function is ***very*** useful, You can really see what happens with

Re: HorizontalBracket's stencil

2020-01-22 Thread Paolo Prete
On Wed, Jan 22, 2020 at 8:47 PM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Rutger, > > > Cannot you fake it using a TupletBracket (\tuplet 1/1) and override the > TupletNumber.text? > > Absolutely — that’s a great solution. > > Hi Kieren and Rutger, Unfortunately I can't use

Re: turning a markuplist into a chain of [individual] markups or strings

2020-01-22 Thread Kieren MacMillan
Hi David, > One element per note is tricky. How about making this a music > function instead that outputs lyrics? > > diffints = > #(define-music-function (mus) (ly:music?) > #{ \lyricmode { $@(map ...) } #}) For my current purposes, that’s perfect — thanks. My need (as originally stated)

Re: HorizontalBracket's stencil

2020-01-22 Thread Kieren MacMillan
Hi Rutger, > Cannot you fake it using a TupletBracket (\tuplet 1/1) and override the > TupletNumber.text? Absolutely — that’s a great solution. The other (more flexible and configurable) solution is David Nalesnik’s MeasureAttachedSpanner. Cheers, Kieren.

Re: HorizontalBracket's stencil

2020-01-22 Thread Rutger Hofman
Cannot you fake it using a TupletBracket (\tuplet 1/1) and override the TupletNumber.text? Rutger On 1/22/20 8:14 PM, Paolo Prete wrote: Hello, is it possible to obtain a stencil, for a HorizontalBracket, similar to the TupletBracket one? Something like:   some-text  |   

HorizontalBracket's stencil

2020-01-22 Thread Paolo Prete
Hello, is it possible to obtain a stencil, for a HorizontalBracket, similar to the TupletBracket one? Something like: some-text | | I see that there is a .bracket-flare property for the grob, but it's not enough for achieving this result.

Re: turning a markuplist into a chain of [individual] markups or strings

2020-01-22 Thread David Kastrup
David Kastrup writes: > Kieren MacMillan writes: > >> Hi David, >> >>> Uh, a markuplist typically _is_ a list of markups. Except when it isn't >>> (like when it is the result of calling a markup list command). But when >>> it isn't, you can only turn it into a list of stencils. >> >> Hmmm… So

Re: turning a markuplist into a chain of [individual] markups or strings

2020-01-22 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > >> Uh, a markuplist typically _is_ a list of markups. Except when it isn't >> (like when it is the result of calling a markup list command). But when >> it isn't, you can only turn it into a list of stencils. > > Hmmm… So in my function > >

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread David Nalesnik
On Wed, Jan 22, 2020 at 8:26 AM Simon Albrecht wrote: > On 21.01.20 22:05, Kieren MacMillan wrote: > > I’m pretty sure I would have taken quite a while to find my way to > "make-simple-markup" > > > Note that > > (make-simple-markup "foo") > > is equivalent to > > (markup #:simple "foo") > > in

Re: Detecting double accidentals

2020-01-22 Thread SK
Thank you David, that works perfectly. I would have probably never found this way, even if I understand what it does. Sorry for the late response, didn't expect an answer that fast. If anyone is interested in this project, the full code as well as a quick-and-dirty documentation is available as

visualize-padding (was: \offset Y-offset)

2020-01-22 Thread Paolo Prete
To Aaron (and any other helpful contributor): As you can see in the below snippet, the visualize-padding function you so kindly provided, doesn't work in some cases with TupletBracket. Here is a snippet where the bug occurs. The problem is associated with:

Re: turning a markuplist into a chain of [individual] markups or strings

2020-01-22 Thread Kieren MacMillan
Hi David, > Uh, a markuplist typically _is_ a list of markups. Except when it isn't > (like when it is the result of calling a markup list command). But when > it isn't, you can only turn it into a list of stencils. Hmmm… So in my function #(define-markup-list-command (diffints layout props

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread Simon Albrecht
On 21.01.20 22:05, Kieren MacMillan wrote: I’m pretty sure I would have taken quite a while to find my way to "make-simple-markup" Note that (make-simple-markup "foo") is equivalent to (markup #:simple "foo") in other words it’s the spelled-out version of what’s usually accessed through

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread Kieren MacMillan
Hi David (N), > Exactly. Even though I took Mike's original more or less as-is and > just added a couple of things, I still got my fair share of errors. > With my memory I *always* end up looking up a few things. Well, that makes me feel a little better… Given the speed, complexity, and

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread David Nalesnik
On Wed, Jan 22, 2020 at 1:33 AM Urs Liska wrote: > > Am Dienstag, den 21.01.2020, 20:11 -0500 schrieb Kieren MacMillan: > > or the life of me, I can’t quite figure out where exactly such a > > construct would appear in the code. Everywhere I try throws > > [different] errors. =( > > I can promise

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread David Kastrup
Kieren MacMillan writes: > Hi David, > >> I'd use (lambda (d) (format "~@d" d)) here myself > > Good to learn that tool! > >> but it does differ in writing +0 (in case that's undesired). > > It is. > >> If one wants to avoid an unnecessary string-append, one can go >> (lambda (d) (let ((s

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread Kieren MacMillan
Hi Urs, > I can promise you, it will be that way for a very long time. Everyone on this list is so encouraging… ;) > But I can also promise you that at some point (and if you continue at > that pace that may be rather sooner than later) the errors will stop > scaring you and rather point you

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread Kieren MacMillan
Hi Aaron, > Instead of string-append and number->string, try (format #f "~@d" d). > > ~d formats an integer as a decimal value > @ includes "+" for positive values > > One caveat is it formats zero as "+0". > > Perhaps: (lambda (d) (if (zero? d) "0" (format #f "~@d" d))) That’s great —

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread Kieren MacMillan
Hi David, > I'd use (lambda (d) (format "~@d" d)) here myself Good to learn that tool! > but it does differ in writing +0 (in case that's undesired). It is. > If one wants to avoid an unnecessary string-append, one can go > (lambda (d) (let ((s number->string d)) > (if (positive?

Re: turning a markuplist into a chain of [individual] markups or strings

2020-01-22 Thread David Kastrup
Kieren MacMillan writes: > Hi all, > > Is there a way to turn a markuplist into individual markups or strings? > > I have a markuplist of lyrics > > (a b c) > > and I’d like to turn that into a chain of markups > >\lyricmode { \markup a \markup b \markup c } > > or strings > >

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread David Kastrup
Kieren MacMillan writes: > HOLD THE PRESSES!! > > I think I have it: > > SNIPPET BEGINS > \version "2.19.83" > > some-music = { a'4 bes' b' aes' g' cis' d' ees' fis' f' e' c' } > > #(define-markup-list-command (diffints layout props mus) (ly:music?) >(interpret-markup-list layout props

Re: [Scheme coding] turning a list into a markup/string

2020-01-22 Thread Brian Barker
At 17:03 21/01/2020 -0500, Kieren MacMillan wrote: ... it seemed a wonderfully magical start out of the gate, but we were ultimately unable to take it to the goal-line. Also, I mixed my sporting metaphors in that sentence; oh well. That's nothing: a moment ago we had someone playing football