[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
variable variables
From: |
Gerjan Piksen |
Subject: |
variable variables |
Date: |
Thu, 11 Dec 2014 20:20:25 +0100 |
Hi everyone,
In the piece I’m writing right now I use a lot of clusters, to notate these
clusters i use a custom note head. And the code looks like this:
qRecta=
#(ly:make-stencil (list 'embedded-ps
"gsave
currentpoint translate
newpath
0 0.55 moveto
0.33375 0.55 lineto
0.33375 -0.55 lineto
0 -0.55 lineto
closepath
fill
grestore")
(cons 0.5 1.3125)
(cons 0 0))
In my \score I can recall this with:
\override NoteHead #'X-offset = #0
\override NoteHead #'stencil = \qRecta
What I would like is to be able to change the length of my rectangle note
heads. therefore i have to change this number 0.33375.
So what i would like is something like this:
qRecta=
#(ly:make-stencil (list 'embedded-ps
"gsave
currentpoint translate
newpath
0 0.55 moveto
X 0.55 lineto
X -0.55 lineto
0 -0.55 lineto
closepath
fill
grestore")
(cons 0.5 1.3125)
(cons 0 0))
\score
{ \absolute
\override NoteHead #'X-offset = #0
\override NoteHead #'stencil = \qRecta
\X = 0.3 <e' f' g’ a’ b’ c’>8 \X = 0.5 <e' f' g’ a’ b’ c’>8
}
I would be very very very happy with some help on this : )
- variable variables,
Gerjan Piksen <=