From e45059ae37b240ce52639ad5c49110b510a89481 Mon Sep 17 00:00:00 2001 From: Valentin Villenave Date: Mon, 7 Mar 2016 09:56:21 +0100 Subject: [PATCH] Define French as a separate input language MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit French users now have the ability to enter the D pitch as "ré" instead of Italian-like "re". In addition, the French input language accepts double sharps entered using the -x suffix. --- Documentation/changes.tely | 7 ++ Documentation/notation/pitches.itely | 14 +++- input/regression/note-names.ly | 7 +- python/musicexp.py | 6 ++ scm/define-note-names.scm | 111 ++++++++++++++++++++++++++- 5 files changed, 136 insertions(+), 9 deletions(-) diff --git a/Documentation/changes.tely b/Documentation/changes.tely index f8dd50a2e4..21e06b9ed9 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -61,6 +61,13 @@ which scares away people. @end ignore +@item +French note names are now defined specifically instead of +being aliased to Italian note names: in addition to the +generic Italian-derived syntax, the @var{d} pitch may be +entered as @code{ré}. Double sharps may also be +entered using the @code{-x} suffix. + @item Additional bass strings (for lute tablature) are supported. @lilypond[quote,verbatim] diff --git a/Documentation/notation/pitches.itely b/Documentation/notation/pitches.itely index 2b7d0fbee5..9529c6704b 100644 --- a/Documentation/notation/pitches.itely +++ b/Documentation/notation/pitches.itely @@ -489,7 +489,7 @@ using Italian note names: The available languages and the note names they define are: @quotation -@multitable {@code{nederlands}} {do re mi fa sol la sib si} +@multitable {@code{nederlands}} {do re/re mi fa sol la sib si} @headitem Language @tab Note Names @item @code{nederlands} @@ -502,7 +502,9 @@ The available languages and the note names they define are: @tab c d e f g a bf b @item @code{espanol} or @code{español} @tab do re mi fa sol la sib si -@item @code{italiano} or @code{français} +@item @code{français} + @tab do ré/re mi fa sol la sib si +@item @code{italiano} @tab do re mi fa sol la sib si @item @code{norsk} @tab c d e f g a b h @@ -535,7 +537,9 @@ also vary depending on the language: @tab -@code{ff}/-@code{-flatflat} @item @code{espanol} or @code{español} @tab -@code{s} @tab -@code{b} @tab -@code{ss}/-@code{x} @tab -@code{bb} -@item @code{italiano} or @code{français} +@item @code{français} + @tab -@code{d} @tab -@code{b} @tab -@code{dd}/-@code{x} @tab -@code{bb} +@item @code{italiano} @tab -@code{d} @tab -@code{b} @tab -@code{dd} @tab -@code{bb} @item @code{norsk} @tab -@code{iss}/-@code{is} @tab -@code{ess}/-@code{es} @tab -@code{ississ}/-@code{isis} @@ -589,7 +593,9 @@ appear in this table do not provide special note names yet. @tab -qs @tab -qf @tab -tqs @tab -tqf @item @code{espanol} or @code{español} @tab -cs @tab -cb @tab -tcs @tab -tcb -@item @code{italiano} or @code{français} +@item @code{français} + @tab -sd @tab -sb @tab -dsd @tab -bsb +@item @code{italiano} @tab -sd @tab -sb @tab -dsd @tab -bsb @item @code{portugues} @tab -sqt @tab -bqt @tab -stqt @tab -btqt diff --git a/input/regression/note-names.ly b/input/regression/note-names.ly index 3a50f48384..972ebb1d02 100644 --- a/input/regression/note-names.ly +++ b/input/regression/note-names.ly @@ -1,4 +1,4 @@ -\version "2.19.22" +\version "2.19.38" \header { texidoc = "Various languages are supported for note names input. @@ -22,6 +22,7 @@ and doesn't break point-and-click abilities. bes4 a g fis %% The \language command acts in the same way: - \language "italiano" - sol4 fa mib re + \language "français" + %% Accented characters are supported in some languages: + sol4 fa mib ré } diff --git a/python/musicexp.py b/python/musicexp.py index a564f29ce5..86eb2b1cfe 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -258,6 +258,10 @@ def pitch_italiano (pitch): def pitch_catalan (pitch): return pitch_italiano (pitch) +def pitch_francais (pitch): + str = pitch_generic (pitch, ['do', 'ré', 'mi', 'fa', 'sol', 'la', 'si'], ['b', 'sb', 'sd', 'd']) + return str + def pitch_espanol (pitch): str = pitch_generic (pitch, ['do', 're', 'mi', 'fa', 'sol', 'la', 'si'], ['b', None, None, 's']) return str @@ -275,8 +279,10 @@ def set_pitch_language (language): "norsk": pitch_norsk, "svenska": pitch_svenska, "italiano": pitch_italiano, + "français": pitch_francais, "catalan": pitch_catalan, "espanol": pitch_espanol, + "español": pitch_espanol, "vlaams": pitch_vlaams} pitch_generating_function = function_dict.get (language, pitch_general) diff --git a/scm/define-note-names.scm b/scm/define-note-names.scm index 9eab9d5d69..5825967428 100644 --- a/scm/define-note-names.scm +++ b/scm/define-note-names.scm @@ -535,6 +535,114 @@ )) + ;; Language: Français ----------------------------------------------; + ;; Valentin Villenave , + ;; + ;; b = flat (bémol) + ;; bb = double-flat + ;; sb = quarter-tone flat (demi-bémol) + ;; bsb = three-quarter-tones flat + ;; + ;; d = sharp (dièse) + ;; dd = double-sharp + ;; x = double-sharp + ;; sd = quarter-tone sharp (demi-dièse) + ;; dsd = three-quarter-tones sharp + ;; + ;; English: c d e f g a b + ;; French: do ré mi fa sol la si + + (français . ( + (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT)) + (dobsb . ,(ly:make-pitch -1 0 THREE-Q-FLAT)) + (dob . ,(ly:make-pitch -1 0 FLAT)) + (dosb . ,(ly:make-pitch -1 0 SEMI-FLAT)) + (do . ,(ly:make-pitch -1 0 NATURAL)) + (dosd . ,(ly:make-pitch -1 0 SEMI-SHARP)) + (dod . ,(ly:make-pitch -1 0 SHARP)) + (dodsd . ,(ly:make-pitch -1 0 THREE-Q-SHARP)) + (dodd . ,(ly:make-pitch -1 0 DOUBLE-SHARP)) + (dox . ,(ly:make-pitch -1 0 DOUBLE-SHARP)) + + (rébb . ,(ly:make-pitch -1 1 DOUBLE-FLAT)) + (rébsb . ,(ly:make-pitch -1 1 THREE-Q-FLAT)) + (réb . ,(ly:make-pitch -1 1 FLAT)) + (résb . ,(ly:make-pitch -1 1 SEMI-FLAT)) + (ré . ,(ly:make-pitch -1 1 NATURAL)) + (résd . ,(ly:make-pitch -1 1 SEMI-SHARP)) + (réd . ,(ly:make-pitch -1 1 SHARP)) + (rédsd . ,(ly:make-pitch -1 1 THREE-Q-SHARP)) + (rédd . ,(ly:make-pitch -1 1 DOUBLE-SHARP)) + (réx . ,(ly:make-pitch -1 1 DOUBLE-SHARP)) + + (rebb . ,(ly:make-pitch -1 1 DOUBLE-FLAT)) + (rebsb . ,(ly:make-pitch -1 1 THREE-Q-FLAT)) + (reb . ,(ly:make-pitch -1 1 FLAT)) + (resb . ,(ly:make-pitch -1 1 SEMI-FLAT)) + (re . ,(ly:make-pitch -1 1 NATURAL)) + (resd . ,(ly:make-pitch -1 1 SEMI-SHARP)) + (red . ,(ly:make-pitch -1 1 SHARP)) + (redsd . ,(ly:make-pitch -1 1 THREE-Q-SHARP)) + (redd . ,(ly:make-pitch -1 1 DOUBLE-SHARP)) + (rex . ,(ly:make-pitch -1 1 DOUBLE-SHARP)) + + (mibb . ,(ly:make-pitch -1 2 DOUBLE-FLAT)) + (mibsb . ,(ly:make-pitch -1 2 THREE-Q-FLAT)) + (mib . ,(ly:make-pitch -1 2 FLAT)) + (misb . ,(ly:make-pitch -1 2 SEMI-FLAT)) + (mi . ,(ly:make-pitch -1 2 NATURAL)) + (misd . ,(ly:make-pitch -1 2 SEMI-SHARP)) + (mid . ,(ly:make-pitch -1 2 SHARP)) + (midsd . ,(ly:make-pitch -1 2 THREE-Q-SHARP)) + (midd . ,(ly:make-pitch -1 2 DOUBLE-SHARP)) + (mix . ,(ly:make-pitch -1 2 DOUBLE-SHARP)) + + (fabb . ,(ly:make-pitch -1 3 DOUBLE-FLAT)) + (fabsb . ,(ly:make-pitch -1 3 THREE-Q-FLAT)) + (fab . ,(ly:make-pitch -1 3 FLAT)) + (fasb . ,(ly:make-pitch -1 3 SEMI-FLAT)) + (fa . ,(ly:make-pitch -1 3 NATURAL)) + (fasd . ,(ly:make-pitch -1 3 SEMI-SHARP)) + (fad . ,(ly:make-pitch -1 3 SHARP)) + (fadsd . ,(ly:make-pitch -1 3 THREE-Q-SHARP)) + (fadd . ,(ly:make-pitch -1 3 DOUBLE-SHARP)) + (fax . ,(ly:make-pitch -1 3 DOUBLE-SHARP)) + + (solbb . ,(ly:make-pitch -1 4 DOUBLE-FLAT)) + (solbsb . ,(ly:make-pitch -1 4 THREE-Q-FLAT)) + (solb . ,(ly:make-pitch -1 4 FLAT)) + (solsb . ,(ly:make-pitch -1 4 SEMI-FLAT)) + (sol . ,(ly:make-pitch -1 4 NATURAL)) + (solsd . ,(ly:make-pitch -1 4 SEMI-SHARP)) + (sold . ,(ly:make-pitch -1 4 SHARP)) + (soldsd . ,(ly:make-pitch -1 4 THREE-Q-SHARP)) + (soldd . ,(ly:make-pitch -1 4 DOUBLE-SHARP)) + (solx . ,(ly:make-pitch -1 4 DOUBLE-SHARP)) + + (labb . ,(ly:make-pitch -1 5 DOUBLE-FLAT)) + (labsb . ,(ly:make-pitch -1 5 THREE-Q-FLAT)) + (lab . ,(ly:make-pitch -1 5 FLAT)) + (lasb . ,(ly:make-pitch -1 5 SEMI-FLAT)) + (la . ,(ly:make-pitch -1 5 NATURAL)) + (lasd . ,(ly:make-pitch -1 5 SEMI-SHARP)) + (lad . ,(ly:make-pitch -1 5 SHARP)) + (ladsd . ,(ly:make-pitch -1 5 THREE-Q-SHARP)) + (ladd . ,(ly:make-pitch -1 5 DOUBLE-SHARP)) + (lax . ,(ly:make-pitch -1 5 DOUBLE-SHARP)) + + (sibb . ,(ly:make-pitch -1 6 DOUBLE-FLAT)) + (sibsb . ,(ly:make-pitch -1 6 THREE-Q-FLAT)) + (sib . ,(ly:make-pitch -1 6 FLAT)) + (sisb . ,(ly:make-pitch -1 6 SEMI-FLAT)) + (si . ,(ly:make-pitch -1 6 NATURAL)) + (sisd . ,(ly:make-pitch -1 6 SEMI-SHARP)) + (sid . ,(ly:make-pitch -1 6 SHARP)) + (sidsd . ,(ly:make-pitch -1 6 THREE-Q-SHARP)) + (sidd . ,(ly:make-pitch -1 6 DOUBLE-SHARP)) + (six . ,(ly:make-pitch -1 6 DOUBLE-SHARP)) + )) + + ;; Language: Italiano ----------------------------------------------; ;; Paolo Zuliani , ;; Eric Wurbel @@ -993,8 +1101,7 @@ (append language-pitch-names (list (cons (cadr pair) (cdr (assoc (car pair) language-pitch-names))))))) - '((espanol español) - (italiano français))) + '((espanol español))) (define-public (note-names-language str) (_ "Select note names language.") -- 2.39.2