Jump to content

Music/Software/Lilypond

From Wikiversity
To sample audio files for each of the 128 instruments available on LilyPond visit this link:

Music/Software/Lilypond/MIDI
 

Two versions of LylyPond

[edit | edit source]

Lilypond.org (GNU)]

[edit | edit source]
This "GNU" version is the stronger of the two, with documentation so well written that users of the weaker and more restricted WMF version can glean useful information:
The editor Frescobaldi is essential for this version. For a Windows machine, downloading instructions are available at:

Wikimedia Foundation (WMF)

[edit | edit source]
A restricted version of LilyPond has been installed for use by the Wikimedia Foundation. Two good resources for this version can be found at:
LilyPond wikimedia Playback speed

[http:// wave convert MIDI

  1. Bulleted list item

linked page 周哓远【MIDI广告】

==WAV, OGG, and MIDI sound files==riff
The simple approach to sound used by the WMF version is described at Wikipedia's Help:Score#MIDI_instruments. As shown in the figure to the right, editors have the option of including a tab that not only plays the sound, but also allows readers to modify the playback speed, as well as download a MIDI sound file. The methods described by Wikipedia:Help:Score create what looks like an image from Wikimedia Commons. But it is actually hypertext markup.
The Lilypond.org (GNU) version is also suitable for WMF editors, provided adjustments are made to the muscore3 editor. These adjustments include changing the ouput format from wave to an muscore xml image.[1]

Musical instruments available through the MIDI sound option

[edit | edit source]

To hear a MIDI sound file for each of the 128 "instruments" available on LilyPond vist:

This link allows you to play short riffs that samples the sound of these instruments at various tempos and pitches. Stravinsky's riff was deliberately made unmusical, with the last fermata extra long so that the listener can hear both rapid, as well as sustained notes. For example, if the MIDI instrument selection is #"bassoon", the corresponding WMF LilyPond script, score, and audio are:

<score sound="1"> \relative c''{\set Staff.midiInstrument = #"bassoon"\clef treble\cadenzaOn  c2\grace { b16[c] } [b g e (b'] a1~a2) } </score>
 \relative c''{\set Staff.midiInstrument = #"bassoon"\clef treble\cadenzaOn  c2\grace { b16[c] } [b g e (b'] a1~a2) }


The purpose of the \cadenzaOn command was to remove all bar lines from the printed score. It has no effect on the tempo. Since three tempos are given for each "instrument", this code had to be written in 384 times, each with small changes in the parameters. The python code that performed this feat is documented at:

Modifying the tempo

[edit | edit source]

The tempo of the passages can be changed by replacing the text \set Staff.midiInstrument by \set Score.tempoHideNote = ##t \tempo 4 = 40 to obtain:[2][3]

 \relative c''{\set Score.tempoHideNote = ##t \tempo 4 = 40 \set Staff.midiInstrument = #"bassoon"\clef treble\cadenzaOn  c2\grace { b16[c] } [b g e (b'] a4) }

Glockenspiel's strange harmonics

[edit | edit source]

I noticed that the glockenspiel plays strange harmonics and subharmonics. In this passage all values of C are half-notes.

 \relative c{\set Score.tempoHideNote = ##t \tempo 4 = 80 \set Staff.midiInstrument = #"glockenspiel"\clef treble\cadenzaOn  
 c2 d4 e f g a b  c2 d4 e f g a b  c2 d4 e f g a b  c2 d4 e f g a b c2}

List of subpages
  1. I had trouble doing this on my Windows machine. See lilypond.org/doc/v2.23/Documentation/learning/graphical-setup-under-windows and
  2. w:special:permalink/1118265754#Hiding_tempo
  3. We also replaced the last note by a4 since the slower pace does not need such a long note at the end.