lilypond-user
[Top][All Lists]
Advanced

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

Re: Beginner's questions about long repeats & MIDI files


From: Flaming Hakama by Elaine
Subject: Re: Beginner's questions about long repeats & MIDI files
Date: Fri, 14 Oct 2016 12:26:08 -0700


From: Mojca Miklavec <address@hidden>
Subject: Beginner's questions about long repeats & MIDI files
 Hi,

I have some simple beginner's questions about different aspects of
repeats, mostly from the perspective of creating proper MIDI files.

1.) Let's assume that the song has one of the following patterns

Intro-A1-A2-B1-B2-A1-A2-A3

Intro-A1-A2-B1-B2-A1-A2-B1-B3

A1 = part A with the first ending
B3 = part B with the third ending etc.

Can the song be written in such a way that one could get the proper
engraving & the proper midi file at the same time (in particular for
the second example which is easier)?


I generally use tags to distinguish content between PDF and MIDI.
Generally, this includes things like trills, breath marks and fermatas.

While your approach seems reasonable, a tag approach could look like:

\version "2.19.15"

melodyIntro = { a'1 1 1 1 }
melodyA = { b'1 1 1 }
melodyAI = { c'1 }
melodyAII = { d'1 }
melodyB = { e'1 1 1 }
melodyBI = { f'1 }
melodyBII = { g'1 }

melody = {
    \melodyIntro
    \repeat volta 2 { \melodyA }
    \alternative {
        { \melodyAI }
        { \tag #'MIDI { \melodyA } \melodyAII }
    }
    \repeat volta 2 { \melodyB }
    \alternative {
        { \melodyBI }
        { \tag #'MIDI { \melodyB } \melodyBII }
    }
}

\score {
    \header { piece = "PDF Version" }
    <<
        \keepWithTag #'(PDF) \melody
    >>
    \layout {}
}


\score {
    \header { piece = "MIDI Version" }
    <<
        \keepWithTag #'(MIDI) \melody
    >>
    \midi {}

    %  You can print this MIDI version to validate on paper,
    %  just ignore the repeat signs and endings.
    \layout {}
}

 
David Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
address@hidden
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

reply via email to

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