bug-lilypond
[Top][All Lists]
Advanced

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

Devnull


From: Han-Wen Nienhuys
Subject: Devnull
Date: Thu, 1 Apr 2004 01:08:07 +0200

address@hidden writes:
> OK, pretty sure this is a bug in 2.1.35 (as opposed to StemUp :P).
> 
> If the Devnull context is supposed to discard all musical info given to 
> it, it doesn't.
> 
> Assume myMusic = \notes {...} has polyphony on a single staff in it. 
> Naturally, calling \myMusic works fine. BUT, doing this:

try this

****************

\header {
    texidoc = "A second staff can be aligned to
a fragment (say, a cadenza), using a Scheme function: the
function creates a skip of the same length as the cadenza. "

   }

\version "2.1.37"

cadenza = \notes \relative c' {
    c4 d8 << { e f g } \\ { d4. } >>
    g4 f2 g4 g
}


#(define (skip-of-length mus)
  "Create a skip of exactle the same length as MUS."
  (let*
   ((skip
     (make-music
      'SkipEvent
      'duration (ly:make-duration 0 0))))

   (make-event-chord (list (ly:music-compress skip (ly:music-length mus))))
))


#(define (mmrest-of-length mus)
  "Create a mmrest of exactly the same length as MUS."
  
  (let*
   ((skip
     (make-multi-measure-rest
      (ly:make-duration 0 0) '() )))
   (ly:music-compress skip (ly:music-length mus))
   skip
))


\score {
    \notes
    \relative c' \new GrandStaff <<
        \new Staff { \cadenza c4 \bar "|." }
        \new Staff {
            #(ly:export (mmrest-of-length cadenza))
            c4 \bar "|." }
    >>

    \paper {}
}

-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

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