2017-08-26 21:35 GMT+02:00 David Kastrup <[email protected]>:
> Thomas Morley <[email protected]> writes:
>
>> 2017-08-26 20:24 GMT+02:00 David Kastrup <[email protected]>:
>>>
>>> Uh, this was a proposal for a user interface that does not need to look
>>> at punctuation etc but rather goes by [...] for figuring out where the
>>> "true" dynamics are, likely defaulting to taking the first pair for
>>> alignment as well as Midi dynamics.
>>
>> Ok, lol
>>
>> Valentins original code used underscores, iirc.
>
> Hm, [...] might actually be used for editorial annotations. So maybe
> not the best markup for this application. {...} maybe?
>
> --
> David Kastrup
Do you mean something at the lines below?
(Only the markup-part for now)
#(define char-set:dynamics
(char-set #\f #\m #\p #\r #\s #\z))
#(define (split-string strg char-pair)
;; split a string at all occurrences of both characters in char-pair
;; remark: with guilev2 string-split accepts a char-set as second argument
(append-map
(lambda (s) (string-split s #\}))
(string-split strg #\{)))
#(define-markup-command (dyn-test layout props strg)(string?)
#:properties ((chars (cons #\{ #\})))
(interpret-markup layout props
(make-concat-markup
(map
(lambda (word)
(if (string-every char-set:dynamics word)
(make-dynamic-markup word)
word))
(split-string strg chars)))))
\markup \dyn-test #"poco {f}, but {p} sub. ma non troppo"
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user