lilypond-user
[Top][All Lists]
Advanced

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

Re: chords in RhythmicStaff [temporary hack]


From: andersvi
Subject: Re: chords in RhythmicStaff [temporary hack]
Date: Tue, 30 Sep 2008 12:55:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

If anybody else needs this heres some first-aid to start with.

It works in the special case below (with input from a 'SequentialMusic
structure).  It should use some lilypond-aware mapping-procedure finding
all the 'EventChord's in the input and applying the filtering to these,
leaving the rest intact.  Maybe there is such a ly-map thing already?

\version "2.11.57"

filterChords = #(define-music-function (parser location music) (ly:music?)
  "Return: { list of chords with only one note in each }."
  (make-music 'SequentialMusic 'elements
            (map (lambda (chord)
                   (make-music 'EventChord 'elements
                               (list (car (ly:music-property chord 
'elements)))))
                 (ly:music-property music 'elements))))

music = { g16[ g < g a> g]}

\score {
  <<
  \new RhythmicStaff { \time 4/8 \relative c'' { \filterChords \music }}
  \new Staff { \time 4/8 \relative c'' \music }
  >>
}

And a nice picture:

Attachment: tmp.png
Description: PNG image


reply via email to

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