[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Improving snippet 326
From: |
Gilles |
Subject: |
Improving snippet 326 |
Date: |
Mon, 19 Dec 2011 23:16:10 +0100 |
User-agent: |
Opera Mail/11.60 (Win32) |
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
snippet326.ly
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Improving snippet 326,
Gilles <=