Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-20 Thread Thomas Morley
Am So., 20. Sept. 2020 um 17:30 Uhr schrieb Xavier Scheuer : > > On Sun, 20 Sep 2020 at 13:03, Thomas Morley wrote: > > > > Hi Martin, > > > > in general I'm more with Aaron. > > P.e., I have no clue which default text one could think of for > > TextSpanner's left/right-text!? > > Otoh, I'd wish w

Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-20 Thread Xavier Scheuer
On Sun, 20 Sep 2020 at 13:03, Thomas Morley wrote: > > Hi Martin, > > in general I'm more with Aaron. > P.e., I have no clue which default text one could think of for > TextSpanner's left/right-text!? > Otoh, I'd wish we'd have a LilyPond-data-structure to assign a list of > key/value pairs in ly-

Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-20 Thread Martín Rincón Botero
Hi Thomas, thank you for your interest in this very constructive discussion with Aaron! > in general I'm more with Aaron. > P.e., I have no clue which default text one could think of for > TextSpanner's left/right-text!? Exactly, me neither. Forcing the default to be empty text without giving the

Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-20 Thread Thomas Morley
Am So., 20. Sept. 2020 um 12:05 Uhr schrieb Martín Rincón Botero : > > In short, you and I simply > > disagree on what is satisfactory for syntax. > > > Well, it seems we already agreed on one satisfactory syntax with the way you > finished the script in the other thread, so I suppose it’s not imp

Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-20 Thread Martín Rincón Botero
> In short, you and I simply > disagree on what is satisfactory for syntax. Well, it seems we already agreed on one satisfactory syntax with the way you finished the script in the other thread, so I suppose it’s not impossible to agree on something ;-). > We just come to LilyPond from two differ

Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-19 Thread Aaron Hill
On 2020-09-19 12:31 am, Martín Rincón Botero wrote: [ . . . ] I was going to comment on your reply in greater detail, but I realized it would not be terribly productive. In short, you and I simply disagree on what is satisfactory for syntax. And that is not a bad thing. We just come to Li

Re: TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-19 Thread Martín Rincón Botero
> I am uncertain what you mean by "proper" markup syntax. Sorry, I meant syntax for markup tagging. > while interesting, is invalid syntax and surely not proper. Perhaps > you simply meant something that *looks* like it could be valid LilyPond. how can a proposed syntax (for which functions have

TextSpanner usability improvements (was Re: Scheme predicative types)

2020-09-18 Thread Aaron Hill
On 2020-09-18 2:06 pm, Martín Rincón Botero wrote: [...] There are two unsatisfactory problems for usability involved from my point of view. One is the impossibility to use proper markup syntax for text spanners. I am uncertain what you mean by "proper" markup syntax. Even though they are c

Re: Scheme predicative types

2020-09-18 Thread David Kastrup
Martín Rincón Botero writes: > Thank you Aaron for this explanation of the ly:prob-property! I see a > function like *ly:duration->string*, is there any way to "convert" > predicate types like ly:duration and number to markup? There is value->lily-string once you previously call #(use-modules (

Re: Scheme predicative types

2020-09-18 Thread Martín Rincón Botero
Sorry, I said "That an \override has to be used for making a basic input (and mostly for actually overriding a property)", I meant "*instead* of mostly for actually overriding...". Am Fr., 18. Sept. 2020 um 23:06 Uhr schrieb Martín Rincón Botero < martinrinconbot...@gmail.com>: > Regardless, I wi

Re: Scheme predicative types

2020-09-18 Thread Martín Rincón Botero
> > Regardless, I will leave you with my final contribution of a "cleaned > up" version with some logic and usage updates. In particular, I > reordered the arguments to enable default values for the alignments. > And the main refactoring uses a different approach to assembling the > markup, which

Re: Scheme predicative types

2020-09-18 Thread Aaron Hill
On 2020-09-18 4:40 am, Martín Rincón Botero wrote: Thank you very much, Aaron! The \markup \null construction is something that I will have to study carefully in the next few days to fully grasp it. I made some adjustments to the formatting, so that it matches the default \tempo formatting of

Re: Scheme predicative types

2020-09-18 Thread Martín Rincón Botero
Thank you very much, Aaron! The \markup \null construction is something that I will have to study carefully in the next few days to fully grasp it. I made some adjustments to the formatting, so that it matches the default \tempo formatting of Lilypond, especially when using a tempo range (Lilypond

Re: Scheme predicative types

2020-09-18 Thread Aaron Hill
On 2020-09-18 2:01 am, Martín Rincón Botero wrote: [ . . . ] The thing I couldn't adapt from your script is the Text part, when the user writes a new tempo with a construction like \tempo "Allegro". I suppose I have to somehow put my \once \override TextSpanner #'(bound-details right text) in s

Re: Scheme predicative types

2020-09-18 Thread Martín Rincón Botero
"I called the function \tempoTextSpan" should be "I named the function \tempoTextSpan" to avoid confusion with programming jargon ;-). Am Fr., 18. Sept. 2020 um 11:01 Uhr schrieb Martín Rincón Botero < martinrinconbot...@gmail.com>: > Dear Aaron, > > thanks again for that script! I could successf

Re: Scheme predicative types

2020-09-18 Thread Martín Rincón Botero
Dear Aaron, thanks again for that script! I could successfully adapt part of your script to most of what I wanted. I called the function \tempoTextSpan for use in constructions like rit. _ _ _ _ $new tempo with \startTextSpan \stopTextSpan, and it accepts a left text (e.g. "rit."), a tempo definit

Re: Scheme predicative types

2020-09-17 Thread Aaron Hill
On 2020-09-17 4:01 am, Martín Rincón Botero wrote: Dear Aaron, thank you very much for your help! After using ly:duration->string for the tempo-unit, I'm still missing a way to have the new string tempo-unit string in "", so that I can display it as a \note in a \markup. How can I achieve th

Re: Scheme predicative types

2020-09-17 Thread Martín Rincón Botero
Dear Aaron, thank you very much for your help! After using ly:duration->string for the tempo-unit, I'm still missing a way to have the new string tempo-unit string in "", so that I can display it as a \note in a \markup. How can I achieve that? Sorry for taking so much of your time! Best regards,

Re: Scheme predicative types

2020-09-17 Thread Aaron Hill
On 2020-09-17 3:18 am, Lukas-Fabian Moser wrote: I think what triggered my feeling uncomfortable was just the slight mismatch between the name of the predicate (tempo?) and the actual tests it contained. Maybe some verbose thing like music-with-tempo-definition? would make things clearer. I lik

Re: Scheme predicative types

2020-09-17 Thread Lukas-Fabian Moser
Hi Aaron, #(define (tempo? arg)   (and (ly:music? arg)    (not (null? (extract-typed-music arg 'tempo-change-event) Maybe I'm overly cautious, but I'd prefer this to be more specific so that it accepts only actual "\tempo ..."-constructs. For example: #(use-modules (scm display-lily))

Re: Scheme predicative types

2020-09-17 Thread Aaron Hill
On 2020-09-17 1:30 am, Aaron Hill wrote: On 2020-09-17 1:14 am, Lukas-Fabian Moser wrote: Hi Aaron, The three forms  * \tempo 4 = 96  * \tempo Crazy 4 = 260-270  * \tempo "Sluggishly slow" are hardcoded as variants into the parser. My guess is that this might be hard (or impossible) to acco

Re: Scheme predicative types

2020-09-17 Thread Aaron Hill
On 2020-09-17 1:14 am, Lukas-Fabian Moser wrote: Hi Aaron, The three forms  * \tempo 4 = 96  * \tempo Crazy 4 = 260-270  * \tempo "Sluggishly slow" are hardcoded as variants into the parser. My guess is that this might be hard (or impossible) to accomplish in a music function. You just nee

Re: Scheme predicative types

2020-09-17 Thread Lukas-Fabian Moser
Hi Aaron, The three forms  * \tempo 4 = 96  * \tempo Crazy 4 = 260-270  * \tempo "Sluggishly slow" are hardcoded as variants into the parser. My guess is that this might be hard (or impossible) to accomplish in a music function. You just need to be a little creative. That's what I hoped would

Re: Scheme predicative types

2020-09-17 Thread Aaron Hill
On 2020-09-17 12:08 am, Martín Rincón Botero wrote: Thank you Aaron for this explanation of the ly:prob-property! I see a function like *ly:duration->string*, is there any way to "convert" predicate types like ly:duration and number to markup? Strings are primitive markup, so you just need to c

Re: Scheme predicative types

2020-09-17 Thread Martín Rincón Botero
Thank you Aaron for this explanation of the ly:prob-property! I see a function like *ly:duration->string*, is there any way to "convert" predicate types like ly:duration and number to markup? Regards, Martín. Am Do., 17. Sept. 2020 um 01:23 Uhr schrieb Aaron Hill < lilyp...@hillvisions.com>: > O

Re: Scheme predicative types

2020-09-16 Thread Aaron Hill
On 2020-09-16 4:13 pm, Aaron Hill wrote: On 2020-09-16 12:09 pm, Lukas-Fabian Moser wrote: I'm sure more knowledgeable people will be able to provide more insightful answers, but for what it's worth: Looking at lily/parser.yy, I see tempo_event:     TEMPO steno_duration '=' tempo_range    {    

Re: Scheme predicative types

2020-09-16 Thread Aaron Hill
On 2020-09-16 12:09 pm, Lukas-Fabian Moser wrote: I'm sure more knowledgeable people will be able to provide more insightful answers, but for what it's worth: Looking at lily/parser.yy, I see tempo_event:     TEMPO steno_duration '=' tempo_range    {         $$ = MAKE_SYNTAX (tempo, @$, SCM_EOL,

Re: Scheme predicative types

2020-09-16 Thread Martín Rincón Botero
Thanks Lukas for your answer. I was fearing that it maybe can't be done :-). Am Mi., 16. Sept. 2020 um 21:09 Uhr schrieb Lukas-Fabian Moser : > Hi, > > After struggling with understanding Lilypond/Scheme's predicative types, > of which I found basically no documentation other than a list of them

Re: Scheme predicative types

2020-09-16 Thread Lukas-Fabian Moser
Hi, After struggling with understanding Lilypond/Scheme's predicative types, of which I found basically no documentation other than a list of them with a minimal description here http://lilypond.org/doc/v2.20/Documentation/notation/predefined-type-predicates, I would like to ask what type of

Scheme predicative types

2020-09-16 Thread Martín Rincón Botero
Dear all, I just started writing my first scheme function :-). It basically substitutes for now our lack of a "tempo spanners" syntax, something that I still find quite irritating in Lilypond. It accepts a quite "clumsy" set of arguments, namely two markups for tempo and two "numbers" for padding.