3

我的 lilypond 片段生成了一个分数,其中包含正确的滑音(从一个音高滑到另一个音高)。它会生成一个 MIDI 文件,但听起来不像是从一个音高到另一个音高的幻灯片。这听起来像是 2 个不同的音高。我的乐器设置为小提琴。

在 midi 文件中生成滑音的正确方法是什么?

\version "2.18.2"
\include "articulate.ly"


\score {
  \articulate
  <<
  \new Staff {
    \set Staff.midiInstrument = #"violin"

    \relative a' {
      a4 \glissando d
    }
  }
  >>  
  \layout { }
  \midi { }

}
4

2 回答 2

1

不幸的是,LilyPond 在其 MIDI 输出中不支持滑音。

于 2018-04-15T10:32:31.877 回答
1

LilyPond 无法自动制作 midi glissando(即使在最新版本 2.23 中),但您可以手动制作:

诀窍是为 pdf 和 midi 使用单独的分数块,并使用从这些块中过滤出来的标签\removeWithTag(带有)。

\version "2.18.2"
\include "articulate.ly"

contents = {
    <<
        \new Staff {
            \set Staff.midiInstrument = #"violin"
            \relative a' {
                \tag #'pdfonly {
                    a4 \glissando^\markup{\italic"gliss."} d r2 |
                }
                \tag #'midionly {
                    \tuplet 5/4 {a16 ais b c cis} d4 r2 |
                }
            }
        }
    >>  
}

% PDF
\score {
    \removeWithTag #'midionly
    \contents
    \layout { }
}

% MIDI
\score {
    \removeWithTag #'pdfonly
    \articulate
    \contents
    \midi { }
}

  • 我用 a\tuplet来适应音符之间的所有离散音高。真正的滑音不会是离散的,但这与使用 midi 可以获得的一样好。

  • 我还将\articulate.ly脚本移到了 midi 块中。将此脚本应用于 midi 是有意义的,但它会弄乱 pdf。

于 2022-02-09T16:22:17.353 回答