[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: chords in RhythmicStaff [temporary hack]
From:       andersvi () extern ! uio ! no
Date:       2008-09-30 10:55:28
Message-ID: m3k5ctsy1r.fsf () extern ! uio ! no
[Download RAW message or body]

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:


["tmp.png" (image/png)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic