> From: "Paolo Prete" <[email protected]>
> To: "bobroff" <[email protected]>
> Cc: "Lillypond Users Mailing List" <[email protected]>
> Sent: Monday, June 17, 2024 5:19:38 PM
> Subject: Re: Spontini and tags

> On Mon, Jun 17, 2024 at 4:39 PM [ mailto:[email protected] | 
> [email protected]
> ] < [ mailto:[email protected] | [email protected] ] > wrote:

>> Still monkeying around with Spontini to get familiar with this new (to me) 
>> tool.
>> When setting parts in different clefs it is handy to be able to use tags. 
>> When
>> notating a part in bass vs tenor or alto clef (pedagogical trombone music) it
>> is often necessary to adjust shapes/positions differently for different 
>> clefs.
>> Before Spontini I would need to code tags for each clef. After a bit of
>> experimentation I found that it worked to simply tag the first one. Remove it
>> from the output (i.e. \removeWithTag), add a second slur + tag, keep that tag
>> and adjust it. Remove both tags, add a third slur, tag, adjust, and finally
>> 'keep' the one I needed. In the example below I've set up three different 
>> slur
>> shapes and tagged them (they're silly for ease of identification). This 
>> works.
>> Is there a better way?

> Glad to see you used the "add __JSSVG__ bloch mechanism". As you can see, the
> code becomes much more compact and shorter.

Yes, just having to get used to the tool. 

> That said, why do you need to \removeWithTag while adding slurs?

Because it's a new tool to me and I don't know what I'm doing yet! :-) 

> Just use the \jsShape on the symbols tab, this time. Then click on it three
> consecutive times) and tag each of them. That's all.

Thank you! That was the "better way" I was asking about. 

Thanks again! 

> In addition: It just occurred to me that I implemented a way to have a
> smart/auto include of your stuff with definitions, jsShapes etc, in the past.

> See this example:

> [
> https://github.com/paopre/Spontini/blob/master/examples/string-quartet-template-example.ly
> |
> https://github.com/paopre/Spontini/blob/master/examples/string-quartet-template-example.ly
> ]

> And play with this snippet:

> %%%%%
> \version "2.24.2"

> \include "../lib/ly/ [ http://jssvg.ly/ | jssvg.ly ] "

> %-----------------%
> % START __JSSVG__ %
> %-----------------%

> %{__BLOCK__includes%}
> "j3" = #(define-music-function (parser location sym mus) ((symbol-list? '())
> ly:music?) #{
> \tag #'third \jsShape "3" "cpts" #'((0 . 0) (11.253 . -24.393) (-11.476 .
> -24.309) (0 . 0)) $sym $mus
> #})

> "j2" = #(define-music-function (parser location sym mus) ((symbol-list? '())
> ly:music?) #{
> \tag #'second \jsShape "2" "cpts" #'((0 . 0) (41.644 . 5.148) (-22.418 .
> -20.692) (0 . 0)) $sym $mus
> #})

> "j1" = #(define-music-function (parser location sym mus) ((symbol-list? '())
> ly:music?) #{
> \tag #'first \jsShape "1" "cpts" #'((0 . 0) (21.58 . -23.991) (-26.632 . 
> 4.428)
> (0 . 0)) $sym $mus
> #})
> %{%}

> %-----------------%
> % END __JSSVG__ %
> %-----------------%

> music = \relative c' {
> c d e f
> \break
> g \tag #'first -\jsShape "4" "cpts" #'((0 . 0) (29.753 . -24.22) (0 . 0) (0 .
> 0)) ( \tag #'second -\jsShape "5" "cpts" #'((0 . 0) (0 . 0) (-12.35 . -36.061)
> (0 . 0)) ( a b c-)-))

> }

> \score {
> \keepWithTag #'second
> \music
> }
> %%%%%

> HTH!

Reply via email to