Without giving you any solution, I can give you a hint:

 

Write the music in the traditional way, with and without your modification.

 

In your lilypond file put:

\displayMusic oldmusic

\displayMusic newmusic

 

And what you can see wht you have to write by observing the differences

 

Jaap

 

From: lilypond-user <[email protected]> On 
Behalf Of Paolo Prete
Sent: Wednesday, December 18, 2019 3:30 PM
To: Aaron Hill <[email protected]>
Cc: lilypond-user <[email protected]>
Subject: Re: Need help with Scheme code

 

Thanks again.

Now, from what I see, I can extract if #mus is a Beam with  (ly:music-property 
mus 'name)  --> BeamEvent

After that, how can I set, inside the same function you wrote, a variable with 
the  beam-thickness value of the corresponding Beam? 

something like (pseudo code):  (set! myVar current-value-of-beam-thickness )

 

 

 

On Wed, Dec 18, 2019 at 5:14 AM Aaron Hill <[email protected] 
<mailto:[email protected]> > wrote:

On 2019-12-17 6:01 pm, Paolo Prete wrote:
> And thanks again to the Scheme-master Aaron.

I appreciate the kind words, though I doubt my experience rises to the 
level of "master".

> One last thing:
> 
> how can I arrange that function so to obtain output-attributes =
> output-attributes + id ?
> 
> For example: if output-attributes is (('a' . 'aa') ('i' . 'ii'))  it 
> must
> become:    (('a' . 'aa') ('i' . 'ii') ('id' . 'foobar_1'))

Where or how are the other output-attributes being set?  It is my 
understanding that output-attributes is unset by default, so any 
\override or \tweak would not need to worry about existing definitions.

That said, consider this pattern:

%%%%
\version "2.19.83"
{ \tweak Accidental.output-attributes.id 
<http://Accidental.output-attributes.id>  123 bes'4 }
%%%%

Keep in mind this only *adds* a new key-value pair to the alist; it does 
not change an existing entry with the same key.


-- Aaron Hill

Reply via email to