lilypond-user
[Top][All Lists]
Advanced

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

Re: MIDI file creation - or not?


From: Guy Stalnaker
Subject: Re: MIDI file creation - or not?
Date: Mon, 1 Jul 2019 22:03:27 -0500

Ben,

It's your use of \markup in this example. If I comment out the \markup line, the \fill-line line, and the final two lines (the last two } ) then I get a midi file.

If you want to center the output, there is perhaps a better way. Folks on this list can help with that (one approach is to set margins explicitly that move the beginning of the line from the left page edge):

\paper {
  top-margin = .5\in
  bottom-margin = .5\in
  right-margin = .5\in
  left-margin = .5\in
}

You might also wish to add tempo for your listening -- this as engraved uses a default tempo. It is quite slow when playing an Anglican chant like this one with whole and half notes. You can add \tempo 4 = ## to your \global section, or in the \midi { } add thus

\midi {
  \tempo 4 = 72
}

Regards.
Guy Stalnaker
address@hidden


On Mon, Jul 1, 2019 at 8:47 PM Ben Potter <address@hidden> wrote:
I am very new to Lilypond but hope to use it to develop my composition
skills, initially by writing Anglican chants. I have no keyboard skills
and, at 71, am too old to learn them. I hope, therefore, to use Lilypond
to create MIDI files to play so I can hear the results of my efforts.

I took the example chant and engraved it as a test - fine. I then added
a \midi{} command in, I believe, the correct place but still get no MIDI
file to play. I am stuck - please can someone help this beginner?

I append the file I've been using.

Many thanks,

Ben

--

We have been broadcasting our presence to the Universe for 100 years now. If there is a detachment of Galactic
Pest Control within 100 light years, they are already on the way.
        -- Anon.

\version "2.18.2"
#(ly:set-option 'midi-extension "mid")

SopranoMusic = \relative {
   g'1 | c2 b | a1 | \bar "||"
   a1 | d2 c | c b | c1 | \bar "||"
}

AltoMusic = \relative {
   e'1 | g2 g | f1 |
   f1 | f2 e | d d | e1 |
}

TenorMusic = \relative {
   c'1 | c2 c | c1 |
   d1 | g,2 g | g g | g1 |
}

BassMusic =  \relative {
   c1 | e2 e | f1 |
   d1 | b2 c | g' g | c,1 |
}

global = {
   \time 2/2
}

#(ly:set-option 'midi-extension "mid")

% Use markup to center the chant on the page
\markup {
   \fill-line {
     \score {  % centered
       <<
         \new ChoirStaff <<
           \new Staff <<
             \global
             \clef "treble"
             \new Voice = "Soprano" <<
               \voiceOne
               \SopranoMusic
             >>
             \new Voice = "Alto" <<
               \voiceTwo
               \AltoMusic
             >>
           >>
           \new Staff <<
             \clef "bass"
             \global
             \new Voice = "Tenor" <<
               \voiceOne
               \TenorMusic
             >>
             \new Voice = "Bass" <<
               \voiceTwo
               \BassMusic
             >>
           >>
         >>
       >>
       \layout {
         \context {
           \Score
           \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/2)
         }
         \context {
           \Staff
           \remove "Time_signature_engraver"
         }
       }
      \midi { }
     }  % End score
   }
}  % End markup



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user

reply via email to

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