As i found the snippet :
http://lsr.dsi.unimi.it/LSR/Item?id=326
beautiful and useful, i have a little proposition to improve it.

With the current snippet, you have to do 2 versions: a layout version and a midi version (using \tag).
By using this little function below  (inspired from :
http://lsr.dsi.unimi.it/LSR/Item?id=694 ), only one version would be necessary.

%%%%%%%%%%%%%%%%%%%%%%%
\version "2.14.2"

changeNotesPos =
#(define-music-function (parser location amount music) (integer? ly:music?)
"Change the display of notes by adding `amount in their staff line position."
#{
   \set staffLineLayoutFunction =
            #(lambda (x) (+ (ly:pitch-steps x) $amount))
   $music
   \unset staffLineLayoutFunction
#})
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% test %%%%%%%%
music = \relative { c d ees f}
\new Staff \music
\new Staff \changeNotesPos #2 \music
%%%%%%%%%%%%%%%%%%%%%%%%

I have joined a version of all the original snippet, just using the above function instead. I have no ways to know who wrote this useful snippet, but perhaps that the author will think as me, that it would be an improvement for the users.

Gilles

Attachment: snippet326.ly
Description: Binary data

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

Reply via email to