lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tweaking Clefs


From: Peter Gentry
Subject: tweaking Clefs
Date: Wed, 1 Mar 2017 18:02:54 -0000

Is it possible to tweak clef properties in the same way that you can tweak color and notehead style of a ly:pitch? Object.

 

Ie

;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

               (acons 'style 'harmonic-mixed

                 (ly:music-property music 'tweaks)))))))

 

 

The clef properties I am trying to tweak are indicated by …data but items in an ‘elements structure are harder to get hold of.  Am I wasting my time trying?

The reason for trying is that for a lot of the time I transpose various quartets including bassoon, cello etc for a bass clarinet and or alto flute.

 

It would be nice to be able to change the clef at the same time as transposing.

I often forget one or other and it is easier to input data in the original clef for checking input.

 

Having started down this road it has become a challenge…..Any help for a ageing muso who has forgotten almost all the scheme/lily learnt last year very gratefully received.

 

'RelativeOctaveMusic

(make-music

'SequentialMusic

'elements

(list (make-music

'ContextSpeccedMusic

'context-type

'Staff

'element

(make-music

'SequentialMusic

'elements

(list (make-music

'PropertySet

'value

"clefs.G"     …data

'symbol

'clefGlyph)

(make-music

'PropertySet

'value

-6            …data   

'symbol

'middleCClefPosition)

(make-music

'PropertySet

'value

-2            …data  

'symbol

'clefPosition)

(make-music

'PropertySet

'value

0             …data

'symbol

'clefTransposition)

(make-music

'PropertySet

'value

'default      …data

'symbol

'clefTranspositionStyle)

(make-music

'ApplyContext

'procedure

ly:set-middle-C!))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]