Hello all, A few queries related to my ongoing project to implement customizable transposition/naturalization styles.
It was suggested to me to use music properties to set the rules. I've come to the conclusion that this may not be the right approach. Why? Because as far as I can see music properties work via an "outmost wins" hierarchy: if I have, \withMusicProperty #'some-property = #1 { \withMusicProperty #'some-property = #2 { \withMusicProperty #'some-property = #3 { \myMusic } } } ... then #'some-property will have a value of 1 for \myMusic. By contrast I think that a naturalization style needs to work like the \relative command -- it should be the _innermost_ one that matters. Specifically, the naturalization style should have the following characteristics: (i) possible to set a default value at Score, StaffGroup, Staff and Voice level, with innermost overriding outermost [sample use-case: in general a score will have a default style, but individual instruments (e.g. harp) may have special rules] (ii) possible to alter within the music, with innermost overriding outermost [sample use case: whatever the character of the piece, individual passages may need to be designated tonal, chromatic, or whatever else suits] (iii) ideally, possible to override in a manner that _ignores_ any inner modifications [sample use case: an instrument like the harp, where you need to be able to guarantee that the music will be notated according to certain rules] (iv) an option to employ naturalization _only_ for music that has been passed through the "transpose" function, or alternatively to apply to _all_ music where a rule is set -- so it can be alternatively a transposition style _or_ a means of enforcing a general notation style. Again, this property can be set at Score, StaffGroup, Staff or Voice level. Sample pseudo-Lilypond of use, excluding the 3rd case which I'm not sure how best to notate. \new Score \with { % this setting turns naturalization "off", % i.e. uses Lilypond's defaults. naturalizationStyle = ##f % this setting determines whether naturalization % is applied to all music (#f) or just transposed % music (#t). By default it is #t. naturalizeTransposedOnly = ##f } { << \new Staff = "Clarinet" \with { naturalizationStyle = #'chromatic } { \transpose a c' { \someMusic \naturalize #'tonal { \someTonalMusic } } } \new PianoStaff = "Harp" \with { naturalization = #'harp } { \harpMusic } \new Staff = "Voices" { << \new Voice = "Soprano" \with { naturalization = #'chromatic } { \chromaticVocalPart } \new Voice = "Alto" { \defaultVocalPart } >> } >> } What I'd like: first, thoughts on the appropriateness and feasibility of the above notation and "conceptual" model of the naturalize functionality. Second, advice on implementing it, since I don't think music properties are the way to go. In particular, where should naturalization be called if it's aimed to apply to _all_ notes? (It's clear where it should be called if it's to apply only to transposed music.) Thanks in advance, -- Joe _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel