Simon, I have several questions now that I have had a chance to review you code.
1) I wish to show the key for each staff line in lieu of showing all the accidentals relative to c. Is this possible with your current strategy? 2) If I wish to change the octave of either bass or treble clef on any particular staff line is this possible? Best regards, Lance On Tue, Apr 21, 2015 at 7:20 PM, Simon Albrecht <[email protected]> wrote: > Hi Harm, > > very impressive, but don’t you also think that it’s a little overkill to > launch such big efforts on this small task? If it were on a larger scale, > the automation would be more efficient, but with myself I observe that I > tend to invest far more time into using as much automation as possible than > I’d have needed with simpler code. > One comment I added below… > > Yours, Simon > > Am 22.04.2015 um 01:47 schrieb Thomas Morley: > >> 2015-04-22 1:32 GMT+02:00 Thomas Morley <[email protected]>: >> >>> 2015-04-21 19:34 GMT+02:00 SonusProj . <[email protected]>: >>> >>>> Attached (for ease of reading this post, code not embedded) is a simple >>>> project that has a staff for C Major and all Major flat keys. Above >>>> each >>>> 7th chord is the chord name. >>>> >>>> I want to add below the chord, treble clef, the associated Roman numeral >>>> description of each chord. >>>> >>>> I.E. on the C Major I would have I, the Dm7 would have ii7 with the 7 in >>>> superscript, the Em7 would have iii7 with the 7 in superscript, etc. >>>> >>>> I see several avenues for this but I don't see an avenue where I can >>>> write >>>> the code once and use many times. I want the Roman numerals to appear >>>> for >>>> all keys and don't want an overly clutter code. >>>> >>>> Can someone point me in the correct direction? >>>> >>>> Best regards, >>>> Lance >>>> >>>> _______________________________________________ >>>> lilypond-user mailing list >>>> [email protected] >>>> https://lists.gnu.org/mailman/listinfo/lilypond-user >>>> >>>> Hi, >>> >>> how about: >>> >>> \version "2.18.2" >>> >>> \header { >>> title = "Root Position 7th Chords" >>> composer = "Lance James" >>> } >>> >>> diatonicScale = { c d e f g a b } >>> >>> chrd = { <c' e' g' b'>1 } >>> >>> multipleModalTransposes = >>> #(define-music-function (parser location m music)(ly:music? ly:music?) >>> (music-clone m >>> 'elements >>> (map (lambda (pitch) >>> (ly:music-property >>> #{ \modalTranspose c $pitch $diatonicScale \context Bottom >>> $music #} >>> 'element)) >>> (event-chord-pitches m)))) >>> >>> multipleTransposes = >>> #(define-music-function (parser location m music)(ly:music? ly:music?) >>> (music-clone m >>> 'elements >>> (map (lambda (pitch) >>> (ly:music-property #{ \transpose c $pitch $music #} 'element)) >>> (event-chord-pitches m)))) >>> >>> #(define (note-name->roman-number-markup pitch lowercase?) >>> "Return roman-number-markup for @var{pitch}." >>> (make-simple-markup >>> (vector-ref >>> #("i" "ii" "iii" "iv" "v" "vi" "vii") >>> (ly:pitch-notename pitch)))) >>> >> %% more concise: >> >> #(define (note-name->roman-number-markup pitch lowercase?) >> "Return roman-number-string for @var{pitch}." >> (vector-ref #("i" "ii" "iii" "iv" "v" "vi" "vii") >> > or > #("I" "ii" "iii" "IV" "V" "vi" "vii") > in order to differentiate between major and minor. > >> (ly:pitch-notename pitch))) >> >> \score { >>> \new PianoStaff >>> << >>> \new ChordNames >>> \multipleTransposes >>> { c f bes ees aes des ges ces } >>> \multipleModalTransposes \diatonicScale \chordmode { \chrd } >>> >>> \new Staff >>> \multipleTransposes >>> { c f bes, ees aes, des, ges, ces } >>> { >>> \key c \major >>> \multipleModalTransposes \diatonicScale \chrd >>> \break >>> \bar "||" >>> } >>> >>> \new ChordNames >>> \with { >>> minorChordModifier = "" >>> %chordNameLowercaseMinor = ##t >>> majorSevenSymbol = "7+" %#whiteTriangleMarkup >>> chordRootNamer = #note-name->roman-number-markup >>> \remove "Staff_performer" >>> } >>> \repeat unfold 8 >>> \multipleModalTransposes \diatonicScale \chordmode { \chrd } >>> >>> \new Staff { >>> \clef bass >>> \multipleTransposes >>> { c f bes ees aes des ges ces' } >>> { >>> \key c \major >>> \multipleModalTransposes \diatonicScale \transpose c c,, >>> \chrd >>> } >>> \bar "|." >>> } >>> >> >>> >>> \layout { >>> \context { >>> \Staff >>> explicitKeySignatureVisibility = #end-of-line-invisible >>> printKeyCancellation = ##f >>> } >>> } >>> \midi { } >>> } >>> >>> >>> Cheers, >>> Harm >>> >> _______________________________________________ >> lilypond-user mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/lilypond-user >> > >
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
