Hi Kevin,

On Mon, Nov 27, 2023 at 7:43 AM Kevin Cole <dc.l...@gmail.com> wrote:

> Thanks. Not sure how I missed that in my search... That seems the best
> answer -- though, alas, the MIDI arpeggiator cannot take advantage of it.
> (I may be able to suss that out "the hard way" manually though.)
>

Sorry, but MIDI is an area I know almost nothing about, as I almost never
use it. My main focus is hardcopy.  Best I can come up with is to do
something a little like what is shown in


> MIDI arpeggiator:
> https://lists.gnu.org/archive/html/lilypond-user/2020-12/msg00036.html
>

It would involve basically making a parallel version of your music that,
while not looking like what you want the printed output to look like, will
sound right (or close to it) once run through the MIDI system. The two
versions would then be decided on via the tags as shown in the
linked example. It'll be a bit of a tedious PITA, but it'll get the job
done. Sorta kinda. Anyway, something like:

\version "2.25.10"
\language "english"

\include "../include/arpeggioMIDI.ly"

music = \relative c' {
  \set Staff.connectArpeggios = ##t % Need to tell Lilypond to play connect
the dots with the arpeggios
  e4 e e
  \tag #'layout {
    <<
      { e4\arpeggio e4 b4 | e2 b8[ b8] | }
      \\
      { <gs~ b>2.\arpeggio | \stemUp gs2 \stemNeutral s4 | }
    >>
  }
  \tag #'midi {
    <<
      { \midiArpeggio 12 <gs b e>4 e b | e2 b8 b }
      \\
      { <gs~ b>2. | gs2 s4 }
    >>
  }
  d'4 d d
}

\score {
  \new Staff \with {
    \consists "Span_arpeggio_engraver" % Could also be done in a layout
block
  } {
    \time 3/4
    \new Voice {
      \removeWithTag #'midi \music
    }
  }
  \layout {}
}

\score {  % Added this one out of curiosity - wanted to see what it would
look like.
  \new Staff \with {
    \consists "Span_arpeggio_engraver" % Could also be done in a layout
block
  } {
    \time 3/4
    \new Voice {
      \removeWithTag #'layout \music
    }
  }
  \layout {}
}

\score {
  \new Staff {
    \time 3/4
    \new Voice {
      \removeWithTag #'layout \music
    }
  }
  \midi {}
}

That's the rough approach. And I'm not real sure just how close that MIDI
output sounds compared to what it should be. There's bound to be a better
way to do this. I just don't know what that better way might be.
-- 
Michael

Reply via email to