<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lilypond.community/index.php?action=history&amp;feed=atom&amp;title=Custom_tuning_and_MIDI_rendering</id>
	<title>Custom tuning and MIDI rendering - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lilypond.community/index.php?action=history&amp;feed=atom&amp;title=Custom_tuning_and_MIDI_rendering"/>
	<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;action=history"/>
	<updated>2026-05-04T15:42:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=4099&amp;oldid=prev</id>
		<title>Lemzwerg: New category</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=4099&amp;oldid=prev"/>
		<updated>2025-11-21T23:14:18Z</updated>

		<summary type="html">&lt;p&gt;New category&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:14, 21 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l189&quot;&gt;Line 189:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 189:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Pitches]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Pitches]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Midi]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Midi]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:World music]][[Category:Snippet]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:World music]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Snippet]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=3390&amp;oldid=prev</id>
		<title>Lemzwerg at 22:51, 21 November 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=3390&amp;oldid=prev"/>
		<updated>2025-11-21T22:51:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:51, 21 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l189&quot;&gt;Line 189:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 189:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Pitches]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Pitches]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Midi]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Midi]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:World music]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:World music&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]][[Category:Snippet&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lemzwerg</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=2278&amp;oldid=prev</id>
		<title>Jean Abou Samra: Replace version=&quot;2.24.0&quot; with version=&quot;2.24&quot; now that the LilyWiki extension supports auto-selecting the latest release in a stable series</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=2278&amp;oldid=prev"/>
		<updated>2025-11-16T18:47:59Z</updated>

		<summary type="html">&lt;p&gt;Replace version=&amp;quot;2.24.0&amp;quot; with version=&amp;quot;2.24&amp;quot; now that the LilyWiki extension supports auto-selecting the latest release in a stable series&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:47, 16 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is an example where you can hear the difference between quarter-comma meantone, 24-tone equal-temperament, etc.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here is an example where you can hear the difference between quarter-comma meantone, 24-tone equal-temperament, etc.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;lilypond version=&quot;2.24&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.0&lt;/del&gt;&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;lilypond version=&quot;2.24&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%% http://lsr.di.unimi.it/LSR/Item?id=785&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%% http://lsr.di.unimi.it/LSR/Item?id=785&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jean Abou Samra</name></author>
	</entry>
	<entry>
		<id>https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=742&amp;oldid=prev</id>
		<title>Jean Abou Samra: Import snippet from LSR</title>
		<link rel="alternate" type="text/html" href="https://wiki.lilypond.community/index.php?title=Custom_tuning_and_MIDI_rendering&amp;diff=742&amp;oldid=prev"/>
		<updated>2025-10-26T22:47:13Z</updated>

		<summary type="html">&lt;p&gt;Import snippet from LSR&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;For custom tuning in MIDI output, you define both the pitches of the basic scale (c d e f) and the pitch change for each alteration. Both the basic scale and the alteration contribute to the pitch adjustment in the MIDI output.&lt;br /&gt;
&lt;br /&gt;
MIDI implements tuning as a &amp;amp;quot;pitch-bend&amp;amp;quot; adjustment from equal-temperament, changing with every note. Each MIDI channel has its own pitch-bend. You can put each voice on a separate MIDI channel, so each voice can have an independent pitch-bend.&lt;br /&gt;
&lt;br /&gt;
You can use Scheme expressions to generate the pitches and alterations, or you can type the pitches as a list of numbers, in terms of cents or semitones.&lt;br /&gt;
&lt;br /&gt;
Here is an example where you can hear the difference between quarter-comma meantone, 24-tone equal-temperament, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;lilypond version=&amp;quot;2.24.0&amp;quot;&amp;gt;&lt;br /&gt;
%% http://lsr.di.unimi.it/LSR/Item?id=785&lt;br /&gt;
&lt;br /&gt;
% The tempered fifth in quarter-comma meantone is (from any mathematical&lt;br /&gt;
  %  music theory reference book) 0.5805 of an octave, which is 696.6 cents&lt;br /&gt;
FIFTH = # 5805/10000  % or equivalently, # 6966/12000&lt;br /&gt;
  % 31-equal-temperament has&lt;br /&gt;
  %  FIFTH = # 18/31&lt;br /&gt;
  % 12-equal-temperament has&lt;br /&gt;
  %  FIFTH = # 7/12&lt;br /&gt;
  % 53-equal-temperament has&lt;br /&gt;
  %  FIFTH = # 31/53&lt;br /&gt;
  %&lt;br /&gt;
  % When you experiment, stay within the range 1/2 &amp;lt; FIFTH &amp;lt; 3/5&lt;br /&gt;
  % so that two fifths &amp;lt;c d&amp;#039;&amp;gt; is more than an octave,&lt;br /&gt;
  % and five fifths &amp;lt;c b&amp;#039;&amp;#039;&amp;gt; is less than three octaves.&lt;br /&gt;
  %&lt;br /&gt;
#(define fracpart (lambda (x) (- x (floor x))))&lt;br /&gt;
#(define tones-from-c (lambda (nfifths) (* 6 (fracpart (* FIFTH nfifths)))))&lt;br /&gt;
  %&lt;br /&gt;
  % This is a list of pitches, in units of an equal tempered whole tone,&lt;br /&gt;
  %  for the notes c d e f g a b, relative to c&lt;br /&gt;
scalepitches = #(list-&amp;gt;vector (map tones-from-c &amp;#039;(0 2 4 -1 1 3 5)))&lt;br /&gt;
&lt;br /&gt;
  % One may skip the Scheme code and simply enter the pitches in cents.&lt;br /&gt;
  % For quarter-comma meantone, these can be found in a book:&lt;br /&gt;
  % scalepitches = ##(0 193/200 386/200 503/200 697/200 890/200 1083/200)&lt;br /&gt;
&lt;br /&gt;
#(ly:set-default-scale (ly:make-scale scalepitches))&lt;br /&gt;
&lt;br /&gt;
%% LSR-editor&amp;#039;s remark&lt;br /&gt;
%% To avoid bleed over we not re-set/define SHARP, FLAT, DOUBLE-FLAT and &lt;br /&gt;
%% DOUBLE-SHARP, but use different identifiers --Harm&lt;br /&gt;
&lt;br /&gt;
#(define MSHARP (tones-from-c 7))&lt;br /&gt;
  % Alternatively, for quarter-comma meantone, MSHARP = # 76/200&lt;br /&gt;
#(define MFLAT (- MSHARP))&lt;br /&gt;
#(define DOUBLE-MSHARP (* MSHARP 2))&lt;br /&gt;
#(define DOUBLE-MFLAT (* MFLAT 2))&lt;br /&gt;
&lt;br /&gt;
%% The former 2.18.-code:&lt;br /&gt;
%%    % Reload the note names (c, cis, des, d, etc.) ...&lt;br /&gt;
%%    #(ly:load &amp;quot;define-note-names.scm&amp;quot;) \language &amp;quot;nederlands&amp;quot;&lt;br /&gt;
%% does not work in 2.20.&lt;br /&gt;
%% Thus we redefine &amp;#039;language-pitch-names&amp;#039;, &amp;#039;note-names-language&amp;#039; and &amp;#039;language&amp;#039;&lt;br /&gt;
&lt;br /&gt;
#(define language-pitch-names&lt;br /&gt;
  (map&lt;br /&gt;
    (lambda (language)&lt;br /&gt;
      (cons &lt;br /&gt;
        (car language)&lt;br /&gt;
        (map&lt;br /&gt;
          (lambda (pitch) &lt;br /&gt;
            (cons &lt;br /&gt;
              (car pitch)&lt;br /&gt;
              (ly:make-pitch&lt;br /&gt;
                (ly:pitch-octave (cdr pitch))&lt;br /&gt;
                (ly:pitch-notename (cdr pitch))&lt;br /&gt;
                (let ((alt (ly:pitch-alteration (cdr pitch))))&lt;br /&gt;
                  (case alt&lt;br /&gt;
                    ((-1/2) MFLAT)&lt;br /&gt;
                    ((1/2) MSHARP)&lt;br /&gt;
                    ((1) DOUBLE-MSHARP)&lt;br /&gt;
                    ((-1) DOUBLE-MFLAT)&lt;br /&gt;
                    (else alt))))))&lt;br /&gt;
          (cdr language))))&lt;br /&gt;
    language-pitch-names))&lt;br /&gt;
  &lt;br /&gt;
#(define-public (note-names-language str)&lt;br /&gt;
  &amp;quot;Select note names language.&amp;quot;&lt;br /&gt;
  (let ((alist (assoc-get (string-&amp;gt;symbol str)&lt;br /&gt;
                          language-pitch-names&lt;br /&gt;
                          &amp;#039;())))&lt;br /&gt;
    (if (pair? alist)&lt;br /&gt;
        (begin&lt;br /&gt;
          (ly:debug &amp;quot;Using `~a&amp;#039; note names...&amp;quot; str)&lt;br /&gt;
          (set! pitchnames alist)&lt;br /&gt;
          (ly:parser-set-note-names alist))&lt;br /&gt;
        (ly:warning &amp;quot;Could not find language `~a&amp;#039;.  Ignoring.&amp;quot; str))))&lt;br /&gt;
&lt;br /&gt;
language =&lt;br /&gt;
#(define-void-function (language) (string?)&lt;br /&gt;
   &amp;quot;Set note names for language @var{language}.&amp;quot;&lt;br /&gt;
   (note-names-language language))&lt;br /&gt;
&lt;br /&gt;
\language &amp;quot;nederlands&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  % and the table of glyphs for alterations ...&lt;br /&gt;
alterationList = #`(&lt;br /&gt;
  (,NATURAL . &amp;quot;accidentals.natural&amp;quot;)&lt;br /&gt;
  (,MFLAT . &amp;quot;accidentals.flat&amp;quot;)&lt;br /&gt;
  (,MSHARP . &amp;quot;accidentals.sharp&amp;quot;)&lt;br /&gt;
  (,DOUBLE-MSHARP . &amp;quot;accidentals.doublesharp&amp;quot;)&lt;br /&gt;
  (,DOUBLE-MFLAT . &amp;quot;accidentals.flatflat&amp;quot;)&lt;br /&gt;
)&lt;br /&gt;
  % and the table of alterations in any modes (major, minor, dorian) you use&lt;br /&gt;
minor = #`(&lt;br /&gt;
  (0 . ,NATURAL)&lt;br /&gt;
  (1 . ,NATURAL)&lt;br /&gt;
  (2 . ,MFLAT)&lt;br /&gt;
  (3 . ,NATURAL)&lt;br /&gt;
  (4 . ,NATURAL)&lt;br /&gt;
  (5 . ,MFLAT)&lt;br /&gt;
  (6 . ,MFLAT)&lt;br /&gt;
)&lt;br /&gt;
  % so that these tables are indexed to pitches from our tuning.&lt;br /&gt;
&lt;br /&gt;
  % keyAlterationOrder needs to know our pitches to typeset key signatures.&lt;br /&gt;
  % Each object that draws accidentals to know the size of our alterations.&lt;br /&gt;
\layout{&lt;br /&gt;
  \context {&lt;br /&gt;
    \Score&lt;br /&gt;
  keyAlterationOrder = #`(&lt;br /&gt;
    (6 . ,MFLAT) (2  . ,MFLAT) (5 . ,MFLAT) (1  . ,MFLAT) (4  . ,MFLAT) (0  . ,MFLAT) (3  . ,MFLAT)&lt;br /&gt;
    (3 . ,MSHARP) (0 . ,MSHARP) (4 . ,MSHARP) (1 . ,MSHARP) (5 . ,MSHARP) (2 . ,MSHARP) (6 . ,MSHARP)&lt;br /&gt;
    (6 . ,DOUBLE-MFLAT) (2 . ,DOUBLE-MFLAT) (5 . ,DOUBLE-MFLAT ) (1 . ,DOUBLE-MFLAT) (4 . ,DOUBLE-MFLAT) (0 . ,DOUBLE-MFLAT) (3 . ,DOUBLE-MFLAT)&lt;br /&gt;
    (3 . ,DOUBLE-MSHARP) (0 . ,DOUBLE-MSHARP) (4 . ,DOUBLE-MSHARP) (1 . ,DOUBLE-MSHARP) (5 . ,DOUBLE-MSHARP) (2 . ,DOUBLE-MSHARP) (6 . ,DOUBLE-MSHARP)&lt;br /&gt;
    )&lt;br /&gt;
    \override KeySignature.alteration-glyph-name-alist = \alterationList&lt;br /&gt;
    \override Accidental.alteration-glyph-name-alist = \alterationList&lt;br /&gt;
    \override AccidentalCautionary.alteration-glyph-name-alist = \alterationList&lt;br /&gt;
    \override TrillPitchAccidental.alteration-glyph-name-alist = \alterationList&lt;br /&gt;
    \override AmbitusAccidental.alteration-glyph-name-alist = \alterationList&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
  % MIDI implements microtones as a pitch bend, with one bend per channel.&lt;br /&gt;
  % These lines below assign one channel to each Voice, in case there are&lt;br /&gt;
  % multiple voices on a staff, so that each voice can have its correct&lt;br /&gt;
  % pitch bend.&lt;br /&gt;
\midi {&lt;br /&gt;
  \context {&lt;br /&gt;
    \Staff&lt;br /&gt;
    \remove &amp;quot;Staff_performer&amp;quot;&lt;br /&gt;
    \remove &amp;quot;Key_performer&amp;quot; % avoid midi bug, issue 748&lt;br /&gt;
  }&lt;br /&gt;
  \context {&lt;br /&gt;
    \Voice&lt;br /&gt;
    midiInstrument = &amp;quot;drawbar organ&amp;quot;&lt;br /&gt;
    \consists &amp;quot;Staff_performer&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  \tempo 4 = 30&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  % The end of a Chorale from Bach&amp;#039;s St Matthew Passion.&lt;br /&gt;
  %&lt;br /&gt;
  % The original choral music, in B-minor, involves notes such as&lt;br /&gt;
  % E-sharp and D-sharp that do not exist on an organ, those keys&lt;br /&gt;
  % being tuned to F and E-flat, respectively.&lt;br /&gt;
  %&lt;br /&gt;
  % Therefore we transpose to D minor to make it playable on the organ.&lt;br /&gt;
  %&lt;br /&gt;
\score { &lt;br /&gt;
  \new PianoStaff \with { instrumentName = &amp;quot;Organ&amp;quot; } \transpose b d&amp;#039; &amp;lt;&amp;lt;&lt;br /&gt;
    \partial 4&lt;br /&gt;
    \new Staff \relative c&amp;#039;&amp;#039; {&lt;br /&gt;
      \key b\minor&lt;br /&gt;
      s1*0^\markup\huge&amp;quot;transposed from St. Matthew Passion, J. S. Bach&amp;quot;&lt;br /&gt;
      &amp;lt;&amp;lt; {&lt;br /&gt;
        d4 | cis  b  e  d8 cis | cis2 b&lt;br /&gt;
      } \\ {&lt;br /&gt;
        fis4 | e8 fis gis ais b4 b | b ais fis2&lt;br /&gt;
      } &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
    \new Staff \relative c&amp;#039; {&lt;br /&gt;
      \key b\minor&lt;br /&gt;
      s1*0_\markup { \line { $(format #f &amp;quot;Fifths tempered by ~,1F cents relative to perfect fifth&amp;quot;&lt;br /&gt;
      (* (- FIFTH 0.5849625) 1200)) }}&lt;br /&gt;
      &amp;lt;&amp;lt; {&lt;br /&gt;
        \clef bass&lt;br /&gt;
        a8 b | cis dis e4 b8 cis d4 | gis, cis dis2&lt;br /&gt;
      } \\ {&lt;br /&gt;
        fis,8 gis | a4 gis g fis | eis fis b,2&lt;br /&gt;
      } &amp;gt;&amp;gt;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
  \layout{}&lt;br /&gt;
  \midi{}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/lilypond&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Pitches]]&lt;br /&gt;
[[Category:Midi]]&lt;br /&gt;
[[Category:World music]]&lt;/div&gt;</summary>
		<author><name>Jean Abou Samra</name></author>
	</entry>
</feed>