On 2023-02-03 7:42 am, Aaron Hill wrote:
On 2023-02-03 7:27 am, Paulo Matos wrote:
Hi,

I would like to define command aliases for \SustainOn, \SustainOff and
the combination \SustainOn\SustainOff and tried the obvious:

pup = \SustainOn
pdown = \SustainOff
...

This didn't work. I guess I miss an understanding on how these things
interact with each other.

What's the correct way to define aliases and shortcuts for sequences of
commands?

Firstly, was that a typo in your email? The comamnds are \sustain... with a lowercase 's'.

But I think this should work:

%%%%
\version "2.22.0"

pup = -\sustainOn
pdown = -\sustainOff
pupdown = -\sustainOn \sustainOff

{ b'4\pup 2 4\pupdown 2. 4\pdown }
%%%%

Well, and those names are non-sensical. \sustainOn implies depressing the pedal.

%%%%
\version "2.22.0"

pdown = -\sustainOn
pup = -\sustainOff
pupdown = -\sustainOff \sustainOn

{ b'4\pdown 2 4\pupdown 2. 4\pup }
%%%%

That probably makes more sense.


-- Aaron Hill

Reply via email to