From 1965ca6b70aaf2c04a25ace9ed3f1fb4e1222f5a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 24 Dec 2006 16:14:40 +0100 Subject: [PATCH] revert change of instrumentTransposition definition. Document why. --- lily/note-performer.cc | 2 +- ly/music-functions-init.ly | 7 +++---- scm/define-context-properties.scm | 9 ++++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lily/note-performer.cc b/lily/note-performer.cc index a5b4afce87..6bfc82211b 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -66,7 +66,7 @@ Note_performer::process_music () } Audio_note *p = new Audio_note (*pitp, get_event_length (n), - tie_event, transposing); + tie_event, transposing.negated ()); Audio_element_info info (p, n); announce_element (info); notes_.push_back (p); diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 9baec24ae3..05ed471320 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -599,7 +599,7 @@ as a first or second voice." 'quoted-context-id "cue" 'quoted-music-name what 'quoted-voice-direction dir - 'quoted-transposition (ly:pitch-negate (pitch-of-note pitch-note)) + 'quoted-transposition (pitch-of-note pitch-note) 'origin location)) @@ -610,9 +610,8 @@ transposition = (context-spec-music (make-property-set 'instrumentTransposition - (pitch-of-note pitch-note)) - 'Staff -)) + (ly:pitch-negate (pitch-of-note pitch-note))) + 'Staff)) tweak = #(define-music-function (parser location sym val arg) (symbol? scheme? ly:music?) diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 16dddf3e7e..43a738d6ae 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -260,10 +260,13 @@ the @code{instr} property labels following lines.") (instrumentEqualizer ,procedure? " Function taking a string (instrument name), and returning a (@var{min} . @var{max}) pair of numbers for the loudness range of the instrument. ") + + ;; the definition is reversed wrt traditional transposition + ;; this because \transpose { \transposition .. } won't work + ;; otherwise. (instrumentTransposition ,ly:pitch? "Defines the transposition of -the instrument. Its value is the pitch that sounds when the instrument -plays written middle C. This is used to transpose the MIDI output, -and @code{\\quote}s.") +the instrument. Its value is the pitch that sounds like middle C. This +is used to transpose the MIDI output, and @code{\\quote}s.") (internalBarNumber ,integer? "Contains the current barnumber. This property is used for internal timekeeping, among others by the @code{Accidental_engraver}.") -- 2.39.2