[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tweaking in scheme
From: |
Peter Gentry |
Subject: |
Tweaking in scheme |
Date: |
Mon, 29 Jun 2015 11:54:19 +0100 |
Tweaking in scheme
The heart of the scheme procedure I'm trying is
#(define (instrumentrange music instrument )
( ly:music? string? )
; extract the various portions of the music object
(let ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
(p (ly:music-property music 'pitch)));rebuild the pitch and if a
changed pitch add the color tweak
...
...
(if (ly:pitch? p)
(let ((new-pitch (naturalize-instrument-range p instrument)))
(ly:music-set-property! music 'pitch new-pitch)
(if (and (not (equal? p new-pitch)) (color? my-color))
(ly:music-set-property! music 'tweaks
(acons
'color my-color
(ly:music-property music 'tweaks))))))
music))
This works fine and I have used \displayMusic to show the music stream to
investigate other possible properties that can be
specified in this way.
I would like to specify note head style but this does not seem to appear as a
property that can be applied in the acons list.
In display music there is a complex list
(make-music
'ContextSpeccedMusic
'contextt-type
'Bottom
'element
(make-music
'OverrideProperty
'pop-first
#t
'grob-property-path
(list (quote style))
'grob-value
'harmonic
'symbol
'NoteHead))
Can this in any way be implimented by the 'tweaks method.
regards
Peter Gentry