lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with Scheme code


From: Stefano Troncaro
Subject: Re: Need help with Scheme code
Date: Tue, 17 Dec 2019 19:18:22 -0300

Hi Paolo,

Look at this:

\version "2.19.83"

token = -\tweak output-attributes #'((id . "foobar")) \etc

\relative { c'4 d8 -\token [ e ] f2 }


That achieves half of what you want. Now, how to make "foobar" automatically increment I don't know, perhaps someone else can help with that.

Hope that helps!
Stéfano

El mar., 17 dic. 2019 a las 19:06, Paolo Prete (<address@hidden>) escribió:
Hello all,

In order to automate the reverse process of the lilypond+_javascript_ snippets (write the GUI modifications of the grobs to the .ly file) I need to make the following code work:

%%%%%%%%%%%%%%%%%%%%%%%%%
token = \tweak output-attributes  #'((id . "foobar"))

\score
{
   {
      a8 \token [ c' c' c']
   }
}

%%%%%%%%%%%%%%%%%%%%%%%%%

But it doesn't compile.
What's the right way to define the "token" variable?

Note that I can compile on 2.19.84 (but not on 2.19.55) the following code

%%%%%%%%%%%%%%%%%%%%%%%%%

\score
{
   {
      a8 \tweak output-attributes  #'((id . "foobar")) [ c' c' c']
   }
}

%%%%%%%%%%%%%%%%%%%%%%%%%

In addition: how can replace "foobar" with a global variable (string + number) that is incremented at each call of "token"  ?
The ids must be: foobar_1, foobar_2  etc.

Thanks,
Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]