-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MU3 Backend] ENG-40 dynamics inference #8347
[MU3 Backend] ENG-40 dynamics inference #8347
Conversation
rebase needed |
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match.
f1cf095
to
d90d91f
Compare
Rebased! |
|
||
// variant with ligatures, works for both emmentaler and bravura: | ||
|
||
static Dyn dynList[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This resulte in a ton (>120) of compiler warnings reg. a defined but unused variable:
warning: 'Ms::dynList' defined but not used [-Wunused-variable]
Variables should never ever get defined in header files IMHO...
But just declaring it won't work, as the size then is unkown?!?
Hmm, making that static const Dyn dynList[] = {
fixes the compiler warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, fair point. I couldn't figure out a simple way to make this list available to the XML importer without declaring it in the header file, but I understand defining it there is a bit dirty. Perhaps a vector rather than array, to define it without having to know the size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding the const
appeases the compiler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a PR with that then—thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add fixes for the other warnings, from your other PRs?
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times)
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
A common XML exporter error is to mistake dynamics for direction text. This commit adds two functions for correcting these mistakes. 1. In the case that a whole direction is dynamic, this converts that whole direction to the specified dynamic, including handling the velocity change). 2. In the case that a direction contains a dynamic in addition to other text (i.e. mf cresc.), this converts the dynamic portion to the proper MuseScore dynamic symbol (with no velocity change). In pursuit of this, the dynList of Dyn structs is moved from dynamic.cpp to dynamic.h, so it can be used as the list of symbols to match. Duplicate of musescore#8347, plus fixing a compiler warning (which shows some 120 times), duplicate of musescore#8478
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier)
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier). An mtest fails on this, but the next commit fixes that, so it seems that change just ended up in the wrong commit.
Backport of musescore#22143, commit 1, which in turn is a port of musescore#8347 and musescore#8478 (which at least partly had been ported to 3.x earlier). An mtest fails on this, but the next commit fixes that, so it seems that change just ended up in the wrong commit.
Resolves: ENG-40: Dynamics are sometimes rendered as plain text
A common XML exporter error is to mistake dynamics for direction text.
This commit adds two functions for correcting these mistakes.
that whole direction to the specified dynamic, including handling the
velocity change.
text (i.e. mf cresc.), this converts the dynamic portion to the proper
MuseScore dynamic symbol (with no velocity change).
In pursuit of this, the
dynList
ofDyn
structs is moved fromdynamic.cpp
to
dynamic.h
, so it can be used as the list of symbols to match.