lilypond-user
[Top][All Lists]

## Modify a NoteEvent to RestEvent

 From: paolo prete Subject: Modify a NoteEvent to RestEvent Date: Sat, 10 Mar 2018 21:12:06 +0100

Hello.
Do you know how to modify a NoteEvent so that it becomes a RestEvent, or (vice-versa) in Scheme?

I tried:

(ly:music-set-property! x 'name 'RestEvent)

The note actually becomes a rest, but I don't know if it's the proper way to obtain that, because if I display the scheme object with \displayMusic I see (note the duplication of 'RestEvent token):

(make-music
'RestEvent
'name
'RestEvent
'duration
(ly:make-duration 2))