lilypond-user
[Top][All Lists]
Advanced

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

sustainOff/On macro with pedal brackets


From: Dieter Grollmann
Subject: sustainOff/On macro with pedal brackets
Date: Thu, 21 Jul 2011 03:52:56 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello all,

(first tiny steps in LilyPond-Scheme ...)

I want to have the piano pedal change \sustainOff\sustainOn in one
command. This doesn't work:

PED = \sustainOff\sustainOn


The following only works properly with "pedalSustainStyle = #'text",
brackets are not connected (found in
http://lists.gnu.org/archive/html/lilypond-user/2010-10/msg00535.html):

PED = #(begin
        (make-span-event 'SustainEvent STOP)
        (make-span-event 'SustainEvent START))

(See also the attached sample file)


Here a solution I figured out (reading "Extending") that works also
with brackets, but this time the command has to be placed _before_
the note, breaking LilyPonds input rules:

PED = #(make-music
        'EventChord
        'elements
        (list 
         (make-span-event
          'SustainEvent STOP)
         (make-span-event
          'SustainEvent START)))


To figure out how to write a properly working function for this is
currently beyond my skills. Has anyone a hint, how and where to
start, or even a solution?

Thanks in advance.

Dieter

Attachment: ped-test.ly
Description: Text document

Attachment: ped-test.pdf
Description: Adobe PDF document


reply via email to

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