From: Graham Percival Date: Tue, 15 May 2007 03:58:16 +0000 (-0700) Subject: LSR: minor tweaks. Rename "pitches" to "pitch" because lilypond makefiles X-Git-Tag: release/2.11.24-1~6^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ef99e2a6a974bbabab79c1052019a78b1a835c8d;p=lilypond.git LSR: minor tweaks. Rename "pitches" to "pitch" because lilypond makefiles barf on the plural form. (?!) --- diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile index 4a706f8bc7..951962ec08 100644 --- a/input/lsr/GNUmakefile +++ b/input/lsr/GNUmakefile @@ -1,7 +1,7 @@ depth = ../../ SUBDIRS = ancient chords connecting contemporary education expressive -SUBDIRS += guitar parts pitches repeats spacing staff text vocal scheme other +SUBDIRS += guitar parts pitch repeats spacing staff text vocal scheme other STEPMAKE_TEMPLATES=documentation texinfo tex LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc diff --git a/input/lsr/LSR.ly b/input/lsr/LSR.ly index 40f5c0d897..dfeb0b6fa1 100644 --- a/input/lsr/LSR.ly +++ b/input/lsr/LSR.ly @@ -21,7 +21,7 @@ These pages show LilyPond examples (snippets) from the @strong{@uref{parts/collated-files.html,Preparing parts}} -@strong{@uref{pitches/collated-files.html,Pitches}} +@strong{@uref{pitch/collated-files.html,Pitch}} @strong{@uref{repeats/collated-files.html,Repeats}} diff --git a/input/lsr/pitch/AAA-intro-advanced.ly b/input/lsr/pitch/AAA-intro-advanced.ly new file mode 100644 index 0000000000..fe8a536d36 --- /dev/null +++ b/input/lsr/pitch/AAA-intro-advanced.ly @@ -0,0 +1,22 @@ +%% Do not edit this file; it is auto-generated from LSR! +\version "2.11.23" +%% +.ly: Be the first .ly file for lys-to-tely.py. +%% Better to make lys-to-tely.py include "introduction.texi" or +%% other .texi documents too? + +\header{ +texidoc = #(string-append " +@unnumbered Introduction + +This document shows examples from the +@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. + +In the web version of this document, you can click on the file name +or figure for each example to see the corresponding input file. + +This document is for LilyPond version +" (lilypond-version) "." ) +} + +% make sure .png is generated. +\lyrics { " " } diff --git a/input/lsr/pitch/GNUmakefile b/input/lsr/pitch/GNUmakefile new file mode 100644 index 0000000000..3819fda13a --- /dev/null +++ b/input/lsr/pitch/GNUmakefile @@ -0,0 +1,15 @@ +depth = ../../../ + +STEPMAKE_TEMPLATES=documentation texinfo tex +LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc + +## Hmm, would this work? No -- if we really want examples, move +## to other dir (input/) comes to mind. +## examples = font20 ancient-font +## LOCALSTEPMAKE_TEMPLATES += ly mutopia + +EXTRA_DIST_FILES= + +include $(depth)/make/stepmake.make + +TITLE=Advanced snippets diff --git a/input/lsr/pitch/SConscript b/input/lsr/pitch/SConscript new file mode 100644 index 0000000000..f72bfffc28 --- /dev/null +++ b/input/lsr/pitch/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env', 'collate') +collate (title = 'Advanced snippets') diff --git a/input/lsr/pitches/AAA-intro-advanced.ly b/input/lsr/pitches/AAA-intro-advanced.ly deleted file mode 100644 index fe8a536d36..0000000000 --- a/input/lsr/pitches/AAA-intro-advanced.ly +++ /dev/null @@ -1,22 +0,0 @@ -%% Do not edit this file; it is auto-generated from LSR! -\version "2.11.23" -%% +.ly: Be the first .ly file for lys-to-tely.py. -%% Better to make lys-to-tely.py include "introduction.texi" or -%% other .texi documents too? - -\header{ -texidoc = #(string-append " -@unnumbered Introduction - -This document shows examples from the -@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. - -In the web version of this document, you can click on the file name -or figure for each example to see the corresponding input file. - -This document is for LilyPond version -" (lilypond-version) "." ) -} - -% make sure .png is generated. -\lyrics { " " } diff --git a/input/lsr/pitches/GNUmakefile b/input/lsr/pitches/GNUmakefile deleted file mode 100644 index 3819fda13a..0000000000 --- a/input/lsr/pitches/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ -depth = ../../../ - -STEPMAKE_TEMPLATES=documentation texinfo tex -LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc - -## Hmm, would this work? No -- if we really want examples, move -## to other dir (input/) comes to mind. -## examples = font20 ancient-font -## LOCALSTEPMAKE_TEMPLATES += ly mutopia - -EXTRA_DIST_FILES= - -include $(depth)/make/stepmake.make - -TITLE=Advanced snippets diff --git a/input/lsr/pitches/SConscript b/input/lsr/pitches/SConscript deleted file mode 100644 index f72bfffc28..0000000000 --- a/input/lsr/pitches/SConscript +++ /dev/null @@ -1,4 +0,0 @@ -# -*-python-*- - -Import ('env', 'collate') -collate (title = 'Advanced snippets') diff --git a/input/new/pitch/AAA-intro-advanced.ly b/input/new/pitch/AAA-intro-advanced.ly new file mode 100644 index 0000000000..b907dd0d52 --- /dev/null +++ b/input/new/pitch/AAA-intro-advanced.ly @@ -0,0 +1,21 @@ +\version "2.10.0" +%% +.ly: Be the first .ly file for lys-to-tely.py. +%% Better to make lys-to-tely.py include "introduction.texi" or +%% other .texi documents too? + +\header{ +texidoc = #(string-append " +@unnumbered Introduction + +This document shows examples from the +@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. + +In the web version of this document, you can click on the file name +or figure for each example to see the corresponding input file. + +This document is for LilyPond version +" (lilypond-version) "." ) +} + +% make sure .png is generated. +\lyrics { " " } diff --git a/input/new/pitch/GNUmakefile b/input/new/pitch/GNUmakefile new file mode 100644 index 0000000000..3819fda13a --- /dev/null +++ b/input/new/pitch/GNUmakefile @@ -0,0 +1,15 @@ +depth = ../../../ + +STEPMAKE_TEMPLATES=documentation texinfo tex +LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc + +## Hmm, would this work? No -- if we really want examples, move +## to other dir (input/) comes to mind. +## examples = font20 ancient-font +## LOCALSTEPMAKE_TEMPLATES += ly mutopia + +EXTRA_DIST_FILES= + +include $(depth)/make/stepmake.make + +TITLE=Advanced snippets diff --git a/input/new/pitch/SConscript b/input/new/pitch/SConscript new file mode 100644 index 0000000000..f72bfffc28 --- /dev/null +++ b/input/new/pitch/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env', 'collate') +collate (title = 'Advanced snippets') diff --git a/input/new/pitch/makam.ly b/input/new/pitch/makam.ly new file mode 100644 index 0000000000..549df765c8 --- /dev/null +++ b/input/new/pitch/makam.ly @@ -0,0 +1,158 @@ +\header { + + texidoc = "Makam is Turkish type of melody that uses 1/9 tone + microtonal alterations." + +} + + +\version "2.11.6" + +%{ + +Define 1/9 alterations. + +%} + + +#(define-public KOMA 1/9) +#(define-public BAKIYE 4/9) +#(define-public KUCUK 5/9) +#(define-public BUYUKMUCENNEB 8/9) + +%{ + +Define pitch names + +%} + +makamPitchNames = #`( + (c . ,(ly:make-pitch -1 0 NATURAL)) + (d . ,(ly:make-pitch -1 1 NATURAL)) + (e . ,(ly:make-pitch -1 2 NATURAL)) + (f . ,(ly:make-pitch -1 3 NATURAL)) + (g . ,(ly:make-pitch -1 4 NATURAL)) + (a . ,(ly:make-pitch -1 5 NATURAL)) + (b . ,(ly:make-pitch -1 6 NATURAL)) + + (cc . ,(ly:make-pitch -1 0 KOMA)) + (dc . ,(ly:make-pitch -1 1 KOMA)) + (ec . ,(ly:make-pitch -1 2 KOMA)) + (fc . ,(ly:make-pitch -1 3 KOMA)) + (gc . ,(ly:make-pitch -1 4 KOMA)) + (ac . ,(ly:make-pitch -1 5 KOMA)) + (bc . ,(ly:make-pitch -1 6 KOMA)) + + (cb . ,(ly:make-pitch -1 0 BAKIYE)) + (db . ,(ly:make-pitch -1 1 BAKIYE)) + (eb . ,(ly:make-pitch -1 2 BAKIYE)) + (fb . ,(ly:make-pitch -1 3 BAKIYE)) + (gb . ,(ly:make-pitch -1 4 BAKIYE)) + (ab . ,(ly:make-pitch -1 5 BAKIYE)) + (bb . ,(ly:make-pitch -1 6 BAKIYE)) + + (ck . ,(ly:make-pitch -1 0 KUCUK)) + (dk . ,(ly:make-pitch -1 1 KUCUK)) + (ek . ,(ly:make-pitch -1 2 KUCUK)) + (fk . ,(ly:make-pitch -1 3 KUCUK)) + (gk . ,(ly:make-pitch -1 4 KUCUK)) + (ak . ,(ly:make-pitch -1 5 KUCUK)) + (bk . ,(ly:make-pitch -1 6 KUCUK)) + + (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB)) + (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB)) + (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB)) + (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB)) + (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB)) + (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB)) + (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB)) + + ;; f for flat. + (cfc . ,(ly:make-pitch -1 0 (- KOMA))) + (dfc . ,(ly:make-pitch -1 1 (- KOMA))) + (efc . ,(ly:make-pitch -1 2 (- KOMA))) + (ffc . ,(ly:make-pitch -1 3 (- KOMA))) + (gfc . ,(ly:make-pitch -1 4 (- KOMA))) + (afc . ,(ly:make-pitch -1 5 (- KOMA))) + (bfc . ,(ly:make-pitch -1 6 (- KOMA))) + + (cfb . ,(ly:make-pitch -1 0 (- BAKIYE))) + (dfb . ,(ly:make-pitch -1 1 (- BAKIYE))) + (efb . ,(ly:make-pitch -1 2 (- BAKIYE))) + (ffb . ,(ly:make-pitch -1 3 (- BAKIYE))) + (gfb . ,(ly:make-pitch -1 4 (- BAKIYE))) + (afb . ,(ly:make-pitch -1 5 (- BAKIYE))) + (bfb . ,(ly:make-pitch -1 6 (- BAKIYE))) + + (cfk . ,(ly:make-pitch -1 0 (- KUCUK))) + (dfk . ,(ly:make-pitch -1 1 (- KUCUK))) + (efk . ,(ly:make-pitch -1 2 (- KUCUK))) + (ffk . ,(ly:make-pitch -1 3 (- KUCUK))) + (gfk . ,(ly:make-pitch -1 4 (- KUCUK))) + (afk . ,(ly:make-pitch -1 5 (- KUCUK))) + (bfk . ,(ly:make-pitch -1 6 (- KUCUK))) + + (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB))) + (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB))) + (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB))) + (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB))) + (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB))) + (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB))) + (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB))) + +) + + +%% set pitch names. +pitchnames = \makamPitchNames +#(ly:parser-set-note-names parser makamPitchNames) + +\paper +{ + ragged-right = ##t +} + + +makamGlyphs = #'((1 . "accidentals.doublesharp") + (8/9 . "accidentals.sharp.slashslashslash.stemstem") + (5/9 . "accidentals.sharp.slashslashslash.stem") + (4/9 . "accidentals.sharp") + (1/9 . "accidentals.sharp.slashslash.stem") + (0 . "accidentals.natural") + (-1/9 . "accidentals.mirroredflat") + (-4/9 . "accidentals.flat.slash") + (-5/9 . "accidentals.flat") + (-8/9 . "accidentals.flat.slashslash") + (-1 . "accidentals.flatflat") + ) + +\relative { + + %{ define alteration <-> symbol mapping. The following glyphs are available. + + accidentals.sharp + accidentals.sharp.slashslash.stem + accidentals.sharp.slashslashslash.stemstem + accidentals.sharp.slashslashslash.stem + accidentals.sharp.slashslash.stemstemstem + accidentals.natural + accidentals.flat + accidentals.flat.slash + accidentals.flat.slashslash + accidentals.mirroredflat.flat + accidentals.mirroredflat + accidentals.flatflat + accidentals.flatflat.slash + accidentals.doublesharp + + %} + + \override Accidental #'glyph-name-alist = \makamGlyphs + + \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs + \set Staff.keySignature = #'( + (3 . 4/9) + (6 . -1/9)) + + c cc db fk gbm gfc gfb efk dfbm +} diff --git a/input/new/pitches/AAA-intro-advanced.ly b/input/new/pitches/AAA-intro-advanced.ly deleted file mode 100644 index b907dd0d52..0000000000 --- a/input/new/pitches/AAA-intro-advanced.ly +++ /dev/null @@ -1,21 +0,0 @@ -\version "2.10.0" -%% +.ly: Be the first .ly file for lys-to-tely.py. -%% Better to make lys-to-tely.py include "introduction.texi" or -%% other .texi documents too? - -\header{ -texidoc = #(string-append " -@unnumbered Introduction - -This document shows examples from the -@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}. - -In the web version of this document, you can click on the file name -or figure for each example to see the corresponding input file. - -This document is for LilyPond version -" (lilypond-version) "." ) -} - -% make sure .png is generated. -\lyrics { " " } diff --git a/input/new/pitches/GNUmakefile b/input/new/pitches/GNUmakefile deleted file mode 100644 index 3819fda13a..0000000000 --- a/input/new/pitches/GNUmakefile +++ /dev/null @@ -1,15 +0,0 @@ -depth = ../../../ - -STEPMAKE_TEMPLATES=documentation texinfo tex -LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc - -## Hmm, would this work? No -- if we really want examples, move -## to other dir (input/) comes to mind. -## examples = font20 ancient-font -## LOCALSTEPMAKE_TEMPLATES += ly mutopia - -EXTRA_DIST_FILES= - -include $(depth)/make/stepmake.make - -TITLE=Advanced snippets diff --git a/input/new/pitches/SConscript b/input/new/pitches/SConscript deleted file mode 100644 index f72bfffc28..0000000000 --- a/input/new/pitches/SConscript +++ /dev/null @@ -1,4 +0,0 @@ -# -*-python-*- - -Import ('env', 'collate') -collate (title = 'Advanced snippets') diff --git a/input/test/makam.ly b/input/test/makam.ly deleted file mode 100644 index 549df765c8..0000000000 --- a/input/test/makam.ly +++ /dev/null @@ -1,158 +0,0 @@ -\header { - - texidoc = "Makam is Turkish type of melody that uses 1/9 tone - microtonal alterations." - -} - - -\version "2.11.6" - -%{ - -Define 1/9 alterations. - -%} - - -#(define-public KOMA 1/9) -#(define-public BAKIYE 4/9) -#(define-public KUCUK 5/9) -#(define-public BUYUKMUCENNEB 8/9) - -%{ - -Define pitch names - -%} - -makamPitchNames = #`( - (c . ,(ly:make-pitch -1 0 NATURAL)) - (d . ,(ly:make-pitch -1 1 NATURAL)) - (e . ,(ly:make-pitch -1 2 NATURAL)) - (f . ,(ly:make-pitch -1 3 NATURAL)) - (g . ,(ly:make-pitch -1 4 NATURAL)) - (a . ,(ly:make-pitch -1 5 NATURAL)) - (b . ,(ly:make-pitch -1 6 NATURAL)) - - (cc . ,(ly:make-pitch -1 0 KOMA)) - (dc . ,(ly:make-pitch -1 1 KOMA)) - (ec . ,(ly:make-pitch -1 2 KOMA)) - (fc . ,(ly:make-pitch -1 3 KOMA)) - (gc . ,(ly:make-pitch -1 4 KOMA)) - (ac . ,(ly:make-pitch -1 5 KOMA)) - (bc . ,(ly:make-pitch -1 6 KOMA)) - - (cb . ,(ly:make-pitch -1 0 BAKIYE)) - (db . ,(ly:make-pitch -1 1 BAKIYE)) - (eb . ,(ly:make-pitch -1 2 BAKIYE)) - (fb . ,(ly:make-pitch -1 3 BAKIYE)) - (gb . ,(ly:make-pitch -1 4 BAKIYE)) - (ab . ,(ly:make-pitch -1 5 BAKIYE)) - (bb . ,(ly:make-pitch -1 6 BAKIYE)) - - (ck . ,(ly:make-pitch -1 0 KUCUK)) - (dk . ,(ly:make-pitch -1 1 KUCUK)) - (ek . ,(ly:make-pitch -1 2 KUCUK)) - (fk . ,(ly:make-pitch -1 3 KUCUK)) - (gk . ,(ly:make-pitch -1 4 KUCUK)) - (ak . ,(ly:make-pitch -1 5 KUCUK)) - (bk . ,(ly:make-pitch -1 6 KUCUK)) - - (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB)) - (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB)) - (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB)) - (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB)) - (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB)) - (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB)) - (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB)) - - ;; f for flat. - (cfc . ,(ly:make-pitch -1 0 (- KOMA))) - (dfc . ,(ly:make-pitch -1 1 (- KOMA))) - (efc . ,(ly:make-pitch -1 2 (- KOMA))) - (ffc . ,(ly:make-pitch -1 3 (- KOMA))) - (gfc . ,(ly:make-pitch -1 4 (- KOMA))) - (afc . ,(ly:make-pitch -1 5 (- KOMA))) - (bfc . ,(ly:make-pitch -1 6 (- KOMA))) - - (cfb . ,(ly:make-pitch -1 0 (- BAKIYE))) - (dfb . ,(ly:make-pitch -1 1 (- BAKIYE))) - (efb . ,(ly:make-pitch -1 2 (- BAKIYE))) - (ffb . ,(ly:make-pitch -1 3 (- BAKIYE))) - (gfb . ,(ly:make-pitch -1 4 (- BAKIYE))) - (afb . ,(ly:make-pitch -1 5 (- BAKIYE))) - (bfb . ,(ly:make-pitch -1 6 (- BAKIYE))) - - (cfk . ,(ly:make-pitch -1 0 (- KUCUK))) - (dfk . ,(ly:make-pitch -1 1 (- KUCUK))) - (efk . ,(ly:make-pitch -1 2 (- KUCUK))) - (ffk . ,(ly:make-pitch -1 3 (- KUCUK))) - (gfk . ,(ly:make-pitch -1 4 (- KUCUK))) - (afk . ,(ly:make-pitch -1 5 (- KUCUK))) - (bfk . ,(ly:make-pitch -1 6 (- KUCUK))) - - (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB))) - (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB))) - (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB))) - (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB))) - (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB))) - (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB))) - (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB))) - -) - - -%% set pitch names. -pitchnames = \makamPitchNames -#(ly:parser-set-note-names parser makamPitchNames) - -\paper -{ - ragged-right = ##t -} - - -makamGlyphs = #'((1 . "accidentals.doublesharp") - (8/9 . "accidentals.sharp.slashslashslash.stemstem") - (5/9 . "accidentals.sharp.slashslashslash.stem") - (4/9 . "accidentals.sharp") - (1/9 . "accidentals.sharp.slashslash.stem") - (0 . "accidentals.natural") - (-1/9 . "accidentals.mirroredflat") - (-4/9 . "accidentals.flat.slash") - (-5/9 . "accidentals.flat") - (-8/9 . "accidentals.flat.slashslash") - (-1 . "accidentals.flatflat") - ) - -\relative { - - %{ define alteration <-> symbol mapping. The following glyphs are available. - - accidentals.sharp - accidentals.sharp.slashslash.stem - accidentals.sharp.slashslashslash.stemstem - accidentals.sharp.slashslashslash.stem - accidentals.sharp.slashslash.stemstemstem - accidentals.natural - accidentals.flat - accidentals.flat.slash - accidentals.flat.slashslash - accidentals.mirroredflat.flat - accidentals.mirroredflat - accidentals.flatflat - accidentals.flatflat.slash - accidentals.doublesharp - - %} - - \override Accidental #'glyph-name-alist = \makamGlyphs - - \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs - \set Staff.keySignature = #'( - (3 . 4/9) - (6 . -1/9)) - - c cc db fk gbm gfc gfb efk dfbm -} diff --git a/input/test/smart-transpose.ly b/input/test/smart-transpose.ly deleted file mode 100644 index f6e31ca57d..0000000000 --- a/input/test/smart-transpose.ly +++ /dev/null @@ -1,82 +0,0 @@ -\version "2.10.0" -\sourcefilename "smart-transpose.ly" - -\header { -texidoc="@cindex Smart Transpose - -There is a way to enforce enharmonic modifications for notes in order -to have the minimum number of accidentals. In that case, ``Double -accidentals should be removed, as well as E-sharp (-> F), bC (-> B), -bF (-> E), B-sharp (-> C).'', as proposed by a request for a new feature. -In this manner, the most natural enharmonic notes are chosen in this example. -" -} -% -% Modified to use the standard transpose mechanism. The question is -% how useful these enharmonic modifications are. Mats B. -% -% Why not to have a function that minimizes the number of accidentals? -HJJ -% Works also for quarter tones. -HJJ -% - -#(define (naturalise-pitch p) - (let* ((o (ly:pitch-octave p)) - (a (ly:pitch-alteration p)) - (n (ly:pitch-notename p))) - - (cond - ((and (> a 1) (or (eq? n 6) (eq? n 2))) - (set! a (- a 2)) - (set! n (+ n 1))) - ((and (< a -1) (or (eq? n 0) (eq? n 3))) - (set! a (+ a 2)) - (set! n (- n 1)))) - - (cond - ((> a 2) (set! a (- a 4)) (set! n (+ n 1))) - ((< a -2) (set! a (+ a 4)) (set! n (- n 1)))) - - (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7)))) - (if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7)))) - - (ly:make-pitch o n a))) - -#(define (naturalise music) - (let* ((es (ly:music-property music 'elements)) - (e (ly:music-property music 'element)) - (p (ly:music-property music 'pitch))) - - (if (pair? es) - (ly:music-set-property! - music 'elements - (map (lambda (x) (naturalise x)) es))) - - (if (ly:music? e) - (ly:music-set-property! - music 'element - (naturalise e))) - - (if (ly:pitch? p) - (begin - (set! p (naturalise-pitch p)) - (ly:music-set-property! music 'pitch p))) - - music)) - -music = \relative c' { c4 d e f g a b c } - -naturaliseMusic = -#(define-music-function (parser location m) - (ly:music?) - (naturalise m)) - -\score { - \context Staff { - \transpose c ais \music - \naturaliseMusic \transpose c ais \music - \transpose c deses \music - \naturaliseMusic \transpose c deses \music - } - \layout { ragged-right = ##t} -} -