Am 22.08.2008 um 19:21 schrieb Gilles THIBAULT:


Talking about utilities: Has anybody ever seen one that transforms a simple voice (pitches and durations) into a "ghost voice" consisting of spacers and
durations only  (e.g. c2 d e ==> s2 s s).

In scheme, it can be quite short :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
skipMusic = #(define-music-function (parser location music) (ly:music? )
(music-map
  (lambda (x)
   (let ((dur (ly:music-property x 'duration)))
     (if (ly:duration? dur)
        (make-music 'SkipEvent 'duration dur)
        x)))
  music))

notes = {  a2-"hello" b4 r  b2 a-"bye" }

\skipMusic \notes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Gilles

You have no idea how much I love this.


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to