From 377e93f7919c32e0f35c1f5c885e8704cbcf15b0 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Tue, 18 Nov 2008 20:16:19 +0100 Subject: [PATCH] MusicXML: Add a way to force a pitch output to be in absolute pitch Even when we convert in relative pitch mode, some pitches will still need to be written out in absolute pitch. Examples are the arguments of \transposition or \transpose... --- python/musicexp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/musicexp.py b/python/musicexp.py index 22cfcdcd53..e0f3f52c97 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -271,6 +271,7 @@ class Pitch: self.alteration = 0 self.step = 0 self.octave = 0 + self._force_absolute_pitch = False def __repr__(self): return self.ly_expression() @@ -340,7 +341,7 @@ class Pitch: def ly_expression (self): str = self.ly_step_expression () - if relative_pitches: + if relative_pitches and not self._force_absolute_pitch: str += self.relative_pitch () else: str += self.absolute_pitch () -- 2.39.2