lilypond-user
[Top][All Lists]
Advanced

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

Re: Struggling with Midi and long repeats


From: Knute Snortum
Subject: Re: Struggling with Midi and long repeats
Date: Thu, 5 May 2022 10:00:31 -0700

Well, that was the output you gave me.  Below I've cleaned up the example with some notes that make more sense to illustrate the use of \unfoldRepeats with alternate endings.  You can change it or apply it any way you want.

(In the future, please post examples that compile.)

%%%
\version "2.22.2"

upper = \relative c' {
  \voiceOne
  \tempo 4 = 90

  \repeat volta 2 { b b b b }

  \alternative {
    { a a a a  }
    { g g g g  \mark \markup { \italic "Fine"   } \bar "||" }
  }

  c d e f g a b c \mark \markup { \italic "D.C. al Fine" }
}

lower = \relative c {
  \key g \major
  \voiceTwo

  \repeat volta 2 { b b b b }

  \alternative {
    { a a a a  }
    { g g g g }
  }

  c d e f g a b c
}

\score {
  <<
    \new StaffGroup = "tab with traditional" <<
      \new Staff = "guitar traditional" <<
        \clef "treble_8"
        \context Voice = "upper" \upper
        \context Voice = "lower" \lower
      >>
      \new TabStaff = "guitar tab" <<
        \context TabVoice = "upper" \upper
        \context TabVoice = "lower" \lower
      >>
    >>
  >>
 
  %%% Below, tells LilyPond to only create PDF
  \layout {}

}

%%% Below, create a MIDI-only score with repeats unfolded
\score {
  \unfoldRepeats {
    \new Staff <<
      \new Voice \upper
      \new Voice \lower
    >>
  }
  \midi {}
}
%%%

--
Knute Snortum



On Thu, May 5, 2022 at 1:03 AM Omer Katzir <komer83@gmail.com> wrote:
I’m getting a bad result here, 



On 4 May 2022, at 19:26, Knute Snortum <ksnortum@gmail.com> wrote:

I'm sorry you're having troubles with LilyPond.  If you tell me what you don't get I (or someone) can help with that.

As a starting point, here's the LilyPond source code you posted, corrected so it will compile, and with the MIDI honoring the repeats:

%------
\version "2.22.2"


\header {
  title = “%%%%"
  composer = "Omer Katzir"
  tagline = "http://omerkatzir.net"
}



upper = \relative c' {
  \time 3/4
  \key g\major
  \voiceOne
  \tempo 4 = 90


b b b b


}

lower = \relative c {
  \key g \major
  \voiceTwo

  \repeat volta 2 { b b b b b    }


  \alternative {
    { a a a a  }
    { a a a a  \mark \markup { \italic "Fine"   } \bar "||"
  }




  }

c d e f g a b c \mark \markup { \italic "D.C. al Fine" }


}

\score {
  <<
    \new StaffGroup = "tab with traditional" <<
      \new Staff = "guitar traditional" <<
        \clef "treble_8"
        \context Voice = "upper" \upper
        \context Voice = "lower" \lower
      >>
      \new TabStaff = "guitar tab" <<
        \context TabVoice = "upper" \upper
        \context TabVoice = "lower" \lower
      >>
    >>
  >>
 
  %%% Below, tells LilyPond to only create PDF
  \layout {}

}

%%% Below, create a MIDI-only score with repeats unfolded
\score {
  \unfoldRepeats {
    \new Staff <<
      \new Voice \upper
      \new Voice \lower
    >>
  }
  \midi {}
}
%-----

--
Knute Snortum



On Wed, May 4, 2022 at 8:50 AM Omer Katzir <komer83@gmail.com> wrote:
Well, I’ll be ashamed but honest. I didn’t understand anything from it. Maybe lilypond is just not for me for more complicated pieces. 

On 4 May 2022, at 18:41, Knute Snortum <ksnortum@gmail.com> wrote:


On Wed, May 4, 2022 at 8:35 AM Omer Katzir <komer83@gmail.com> wrote:
I have this music, but when I try to make midi out of it, it doesn’t do the repeats. Does anyone have any suggestions on how to do it?
I’m really struggling with lilypond lately :-(

\version "2.22.2"


\header {
  title = “%%%%"
  composer = "Omer Katzir"
  tagline = "http://omerkatzir.net"
}



upper = \relative c' {
  \time 3/4
  \key g\major
  \voiceOne
  \tempo 4 = 90


B b b b


}

lower = \relative c {
  \key g \major
  \voiceTwo

  \repeat volta 2 { b b b b b    }


  \alternative {
    { a a a a  | }
    { a a a a  \mark \markup { \italic "Fine"   } \bar "||"
  }




  }

C d e f g a b c \mark \markup { \italic "D.C. al Fine" }


}

\score {
  <<
    \new StaffGroup = "tab with traditional" <<
      \new Staff = "guitar traditional" <<
        \clef "treble_8"
        \context Voice = "upper" \upper
        \context Voice = "lower" \lower
      >>
      \new TabStaff = "guitar tab" <<
        \context TabVoice = "upper" \upper
        \context TabVoice = "lower" \lower
      >>
    >>
  >>

}



reply via email to

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