[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apply a music-function script to all elements of a list
From: |
zaord |
Subject: |
Re: Apply a music-function script to all elements of a list |
Date: |
Sat, 6 May 2017 10:19:00 -0700 (MST) |
Hi,
I have a new (small ?) question :
I have define a markup command (below) and this command is calling the
differents functions .
Actually this command is making the differents elements of my customs
diagrams. Firsly the unvariants circles (representing the keyboard of the
instrument in bold) and then the differents colored dots (in itallic on the
code below) depends on the notes of the différents chords.
Now I would like to split this into two differents function, one which
engrave the keybord layout and the other which makes the colored dots since
I need sometines only the colored dots.
#(define-markup-command (complete layout props the-chord)
(ly:music?)
(ly:stencil-scale
(ly:stencil-add
(*ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 0)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 1)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 2)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 3)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 0)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 1)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 2)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 3)) 0 0 0 )
*
/(make-dot-list
(map (lambda (m) (ly:music-property m 'pitch))
(extract-named-music the-chord 'NoteEvent) ))) 1 1))/
I tried to make a other function like this :
#(define (make-background )
ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0 #f)
(cons 0 0)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 1)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 2)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 0 3)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 0)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 1)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 2)) 0 0 0 )
(ly:stencil-in-color(ly:stencil-translate (make-circle-stencil 0.4 0
#f) (cons 1 3)) 0 0 0 )
)
But this make only one dot of the background and not the full keyboard.
Thanks by advance !
Ewen
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Apply-a-music-function-script-to-all-elements-of-a-list-tp200313p202976.html
Sent from the User mailing list archive at Nabble.com.
- Re: Apply a music-function script to all elements of a list, zaord, 2017/05/04
- Re: Apply a music-function script to all elements of a list, Thomas Morley, 2017/05/04
- Re: Apply a music-function script to all elements of a list, David Kastrup, 2017/05/04
- Re: Apply a music-function script to all elements of a list, Simon Albrecht, 2017/05/04
- Re: Apply a music-function script to all elements of a list,
zaord <=
- Re: Apply a music-function script to all elements of a list, Simon Albrecht, 2017/05/06
- Re: Apply a music-function script to all elements of a list, zaord, 2017/05/10
- Re: Apply a music-function script to all elements of a list, Andrew Bernard, 2017/05/10
- Re: Apply a music-function script to all elements of a list, Andrew Bernard, 2017/05/10
- Re: Apply a music-function script to all elements of a list, David Nalesnik, 2017/05/10
- Re: Apply a music-function script to all elements of a list, daviau ewen, 2017/05/10
- Re: Apply a music-function script to all elements of a list, David Nalesnik, 2017/05/10
- Re: Apply a music-function script to all elements of a list, David Nalesnik, 2017/05/10
- Re: Apply a music-function script to all elements of a list, David Nalesnik, 2017/05/10
- Re: Apply a music-function script to all elements of a list, zaord, 2017/05/11