The pan setting (stereo effect) is not exported to MusicXML
Only the full left and full right are exported as -90 and +90
All other settings are exported as 0
The problem exists in version 1.3 and in nightly build 2013-12-28
OS: Windows 7 sp1
the corresponding code seems to be in mscore/exportxml.cpp, lines 4184 and 4202:
xml.tag("pan", ((int)((part->pan() - 63.5) / 63.5)) * 90); //-90 hard left, +90 hard right
Could it be just a problem of paranthesis order?
We are casting to int a real number between -1 and 1: that's why it becomes either 0 or 1 (or -1).
What if we multiply by 90 before casting to int? xml.tag("pan", (int)(((part->pan() - 63.5) / 63.5) * 90));
Comments
The problem exists in version 2.0 beta 1
the corresponding code seems to be in mscore/exportxml.cpp, lines 4184 and 4202:
xml.tag("pan", ((int)((part->pan() - 63.5) / 63.5)) * 90); //-90 hard left, +90 hard right
Could it be just a problem of paranthesis order?
We are casting to int a real number between -1 and 1: that's why it becomes either 0 or 1 (or -1).
What if we multiply by 90 before casting to int?
xml.tag("pan", (int)(((part->pan() - 63.5) / 63.5) * 90));
Indeed, the cast to int is too early.
See PR #1529
Fixed in 5b9c5b95c1
Automatically closed -- issue fixed for 2 weeks with no activity.