Hi,
I’d suggest to use two different \score s, one for \layout and the other for \midi, then you can setup them differently. I attached my own template – you can’t use it directly, since I left out the file with my settings, and you probably don’t want that German stuff, but you get an idea about the structure.

Hraban

Am 27.05.22 um 03:40 schrieb Kevin Cole:
Hi,

I have a score with an outline shown below. I managed to get the vocal
part doing "choir aahs", and the piano defaults to a piano instrument,
but is there a way to have ChordNames / FretBoards do anything with
"acoustic guitar (nylon)"?  Even if the playback isn't super accurate
in terms of duration, it seems like, with the fretboards, it would be
able to have a half-educated notion of which notes to sound.)

(And, is there a better way to set the "choir aahs" -- without
changing the whole thing around too much? It somehow feels redundant
to add "\new Staff" around the "\new Voice" since the staff was
already showing without it, but I couldn't get the MIDI to sound
without adding the "\new Staff".)

Thanks.

%%%%%%%%
\version "2.22.1"
\language "english"

global = {
   \time 2/4
   \key c \major
   \tempo 4 = 80
}

chordNames = \chordmode   { ... }
melody     = \relative c' { ... }
words      = \lyricmode   { ... }
upper      = \relative c' { ... }
lower      = \relative c  { ... }

\score {
   <<
     \new ChordNames \chordNames
     \new FretBoards \chordNames
     \new Staff \with { midiInstrument = #"choir aahs" }
     <<
       \new Voice = "mel" { \melody }
     >>
     \new Lyrics \lyricsto mel \words
     \new PianoStaff
     <<
       \new Staff = "upper" \upper
       \new Staff = "lower" \lower
     >>
   >>
   \layout { }
   \midi   { }
}
%%%%%%%%

%\version "2.20.0"
\include "../global.ly"
\include "articulate.ly" % für besseres MIDI

\header{
  title = ""
  poet = ""
  %composer = "M: "
  %arranger = "arr."
  %instrument = "2 voc + git"
  source = ""
  %maintainer = "Henning Hraban Ramm"
  %maintainerWeb = "http://angerweit.tikon.ch/lieder/";
  lastupdated = "2020-05-15"
}


global = {
  \clef treble
  \key a \minor
  \time 4/4
}

akkorde = \chordmode {
}

dynamics = \relative c {
  r4\mp
}

oberstimme = \relative c' {
  \bar "|."
}

%{
  unterstimme = \relative c' {
  }
%}

textI = \lyricmode {
  %\set stanza = "1. "
  la la la la
}

% Papier-Ausgabe
\score {
  <<
    \context ChordNames {
      \akkorde
    }
    \context Staff = Oben <<
      \global
      \context Voice = "eins" \oberstimme
    >>
    \new Lyrics \lyricsto "eins" { \textI }
    %{
      \context Staff = Unten <<
      \global
      \context Voice = "zwei" \unterstimme
      >>
    %}
  >>
  \layout { }
}
\markup{ \vspace #2.0 }
\markup {
  \fill-line {
    \hspace #0.1 % Abstand vom linken Rand
    \column {
      \line {
        "1."
        \column {
          ""
          %"‿"
        }
      }
      \vspace #1.0 % Abstand zwischen Strophen
      \line {
        "2."
        \column {
          ""
        }
      }
    }
    \hspace #0.5  % Abstand zwischen Spalten
    \column {
      \line {
        "3."
        \column {
          ""
        }
      }
      \vspace #1.0 % Abstand zwischen Strophen
      \line {
        "4."
        \column {
          ""
        }
      }
    }
    \hspace #0.1 % Abstand zum rechten Rand
  }
}

% MIDI
\score {
  \unfoldRepeats {
    <<
      \set Score.midiReverbLevel = #0.5
      \set Score.midiChorusLevel = #0.5
      \context Staff = "chords" <<
        \set Staff.midiInstrument = #"fx 4 (atmosphere)"
        \context Voice = "vchords" {
          \transpose c c, << \dynamics \akkorde >>
        }
      >>
      \context Staff = ober <<
        \articulate
        %\set Staff.midiInstrument = #"violin"
        \context Voice = "vober" \oberstimme
      >>
      %{
        \context Staff = unter <<  \articulate
        \set Staff.midiInstrument = #"viola"
        % see 
https://lilypond.org/doc/v2.20/Documentation/internals/midi_005fcontrol_005fchange_005fperformer
        % -1 (#LEFT), 0 (#CENTER) and 1 (#RIGHT)
        %\set Staff.midiPanPosition = #RIGHT
        %\set Staff.midiBalance = #LEFT
        \context Voice = vunter \unterstimme
        >>
      %}
      \new Lyrics \lyricsto "vober" { \textI }
    >>
  }
  \midi {
    \tempo 4 = 120
  }
}

Reply via email to