lilypond-user
[Top][All Lists]
Advanced

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

Display the name of the staff of a note/rest/chord/skip-event


From: Paolo Prete
Subject: Display the name of the staff of a note/rest/chord/skip-event
Date: Sat, 30 Nov 2019 18:39:13 +0000 (UTC)

Hello, 

given a note/rest/chord/skip-event is there a way to display the name of its staff? I need to check if it belongs to staff "UP" or "DOWN" of a piano-staff.
What if I use map-some-music() function?

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

      (map-some-music (lambda (evt) 
         (let ((name (ly:music-property evt 'name)))   
           (cond       
             ((or (eq? name 'NoteEvent )(eq? name 'EventChord) (eq? name 'RestEvent ) (eq? name 'SkipEvent ))                       
                
                %%%%%%%  (display ?????) %%%%%%%%%
                
                evt)
             (else #f)))) ; => #f = continue, go deeper 
      music) 

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

Thanks.

reply via email to

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