lilypond-user
[Top][All Lists]
Advanced

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

Re: Markup & Midi output


From: Thomas Morley
Subject: Re: Markup & Midi output
Date: Sat, 1 Sep 2012 16:41:27 +0200

2012/9/1 Andreas Pavlogiannis <address@hidden>:
> Hi,
>
> I 'm a new lilypond user, pretty excited so far.

I'm not a new user, but I'm still excited!

> I 'm having the following
> difficulties, on the following code.
>
> [1] In order to align scores on a line, I use the \markup environment, which
> seems to suppress the midi output. When removing the \markup (and \line),
> midi output is produced.

No need to use markup. See code below.

>
> [2] Even in that case, the midi is empty. I suspect this has to do with the
> multiple voices, as once I remove the "\\", the midi sounds correct.

Use explicit voices instead.


The `space'-function inserts some adjustable space between the measures.
Note: I didn't put the bar-lines into drumI or drumII to avoid
difficulties at a line-break.


\version "2.16.0"

\paper {
        indent = 0
}

space =
#(define-music-function (parser location width) (number?)
#{
        \stopStaff
        \noBreak
        \cadenzaOn
        \once\override TextScript #'extra-spacing-width = #'(0 . 0)
        \once\override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
        s1*1/1000000-\markup { \with-dimensions #(cons 0 width) #'(0 .
0) \null }
        \cadenzaOff
        \noBreak
        \once \override Score.Clef #'full-size-change = ##t
        \once \override Score.Clef #'X-extent = #'(0 . 2)
        \set Score.forceClef = ##t
        \override Score.TimeSignature #'break-visibility = #'#(#f #t #t)
        \startStaff
#})

drumI =  \new DrumVoice \drummode { \voiceOne \time 2/4  hh8 hh <hh sn> hh  }
drumII = \new DrumVoice \drummode { \voiceTwo bd4 r16 bd8. }

musI = { \bar ":|:" << \drumI \drumII >> \bar ":|" }
musII = { \bar "|:" << \drumI \drumII >> \bar ":|" }

\score {
        \new DrumStaff {
                \musII \space #2 \musII \space #2 \musII
                \break
                \musI \space #2 \musII \space #2 \musII
        }
        \midi{}
        \layout{}
}

HTH,
  Harm



reply via email to

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