|
From: | David Kastrup |
Subject: | Re: Scheme function to force any noteEvent to a skipEvent |
Date: | Mon, 04 Apr 2016 14:59:35 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Joseph Chrestien <address@hidden> writes: > Hi all, > > is it possible to change all notes in a voice to skips through a function ? > > E.g. ` \silence c4 \tempo 4=100 f8\p g8 ` would be compiled as ` s4 \tempo > 4=100 s8\p s8 `. Note all other events would stay the same. \version "2.19.32" silence = #(define-music-function (arg) (ly:music?) (map-some-music (lambda (m) (and (music-is-of-type? m 'note-event) (make-music 'SkipEvent m))) arg)) \displayLilyMusic \silence { c4 \tempo 4=100 f8\p g8 } For version 2.18 you'll likely have to write (parser location arg) instead of just (arg) but I think the rest would work fine. -- David Kastrup
[Prev in Thread] | Current Thread | [Next in Thread] |