-
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
1518 articulations #1946
1518 articulations #1946
Conversation
Is this intended to replace #1939 or accompany it? |
Replace it. I closed the other one. |
qreal chordTimeMS = (chord->actualTicks() / ticksPerSecond) * 1000; | ||
ontime = qMin(500, static_cast<int>((graceTimeMS / chordTimeMS) * 1000)); | ||
} | ||
else if (chord->dots() == 1) { |
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.
It's been suggested we tweak this to use 333 if not in compound meter (eg, check time signature, it's compound if denominator >= 8 and numerator % 3 = 0. I have no real insight into that, but thought it worth mentioning here.
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.
Hi Marc, is there is issue in the issue tracking dbase related to changing this to use 333?
Maybe there is some justification there I can investigate.
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.
It's not an issue but a forum post - https://musescore.org/en/node/52716
Justification is clear enough to me: the commonly stated advice of 2/3 length for appoggiaturas on dotted notes probably presupposes you are in compound meter. If not, then maybe that rule shouldn't apply. On the other hand, maybe it should. Other than some YouTube recording of one particular piece that do indeed support the idea, I don't see anything solid to go on here.
I've appended to this branch. |
Seems to fail mtests in tst_midi |
Hi Joachim, I don’t want to try to refactor any tests until we agree on the functionality which is necessary. That being the case, I do understand that we(I) have to make the tests pass in order to add this enhancement to to the released version. Jim
|
57382c0
to
6ad95b4
Compare
The mtest target on xcode seems to do something very strange. I get 25/40 failing tests, even on the upstream master. I need to figure out how to make this work before I can really proceed with updating the test cases for the code I'm intending to change. Is anyone running the tests with xcode on the mac? |
The problem seems to be that the mtests cannot find the style & template files, so there are errors relating to chord symbol and instrument definitions. I know on Windows I once had to manually copy these files to a particular location, but I don't seem to be doing that any more (on Linux or Windows) and I don't remember for sure how this worked. |
4286350
to
3f5aa10
Compare
3afa135
to
ca426b4
Compare
@@ -240,6 +242,7 @@ enum class P_TYPE : char { | |||
COLOR, | |||
DIRECTION, // enum class MScore::Direction | |||
DIRECTION_H, // enum class MScore::DirectionH | |||
ORNAMENT_STYLE, // enum class MScore::OrnamentStyle |
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.
Why twice ORNAMENT_STYLE ?
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.
What do you mean? Once is P_TYPE::ORNAMENT_STYLE and the other is P_ID::ORNAMENT_STYLE
Is that what you mean?
On 05 May 2015, at 11:41, Nicolas Froment notifications@github.com wrote:
In libmscore/property.h #1946 (comment):
@@ -240,6 +242,7 @@ enum class P_TYPE : char {
COLOR,
DIRECTION, // enum class MScore::Direction
DIRECTION_H, // enum class MScore::DirectionH
Why twice ORNAMENT_STYLE ?ORNAMENT_STYLE, // enum class MScore::OrnamentStyle
—
Reply to this email directly or view it on GitHub https://github.com/musescore/MuseScore/pull/1946/files#r29654920.
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.
Ok. I just overlooked it.
Looks like my recent commit causes a guitar test to fail. I'll look into it. |
It's not your commit. The test on volta.gp5.mscx is also failing on master. |
OK, is the 15180-articulations branch tested as merged into master? or is On Wed, May 6, 2015 at 12:46 PM, Nicolas Froment notifications@github.com
|
it gets tested against latest master when you add a new commit, whether rebased or not |
3cf7fa2
to
783c93f
Compare
@@ -169,6 +169,10 @@ static const PropertyData propertyList[] = { | |||
{ P_ID::LASSO_SIZE, false, 0, P_TYPE::SIZE_MM }, | |||
|
|||
{ P_ID::TIME_STRETCH, false, 0, P_TYPE::REAL }, | |||
{ P_ID::ORNAMENT_STYLE, false, "ornamentStyle", P_TYPE::ORNAMENT_STYLE}, |
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.
As stated in the comment at the start of the array, the first element here needs to be in the exact same order than the enum class P_ID in property.h.
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.
Isn’t there a way to enforce that? Or at least check it at runtime?
On 11 May 2015, at 17:39, Nicolas Froment notifications@github.com wrote:
In libmscore/property.cpp #1946 (comment):
@@ -169,6 +169,10 @@ static const PropertyData propertyList[] = {
{ P_ID::LASSO_SIZE, false, 0, P_TYPE::SIZE_MM },{ P_ID::TIME_STRETCH, false, 0, P_TYPE::REAL },
As stated in the comment at the start of the array, the first element here needs to be in the exact same order than the enum class P_ID in property.h.{ P_ID::ORNAMENT_STYLE, false, "ornamentStyle", P_TYPE::ORNAMENT_STYLE},
—
Reply to this email directly or view it on GitHub https://github.com/musescore/MuseScore/pull/1946/files#r30050097.
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.
ahhh
that’s what this terse comment means?
//
// always: propertyList[subtype].id == subtype
//
//
On 11 May 2015, at 17:39, Nicolas Froment notifications@github.com wrote:
In libmscore/property.cpp #1946 (comment):
@@ -169,6 +169,10 @@ static const PropertyData propertyList[] = {
{ P_ID::LASSO_SIZE, false, 0, P_TYPE::SIZE_MM },{ P_ID::TIME_STRETCH, false, 0, P_TYPE::REAL },
As stated in the comment at the start of the array, the first element here needs to be in the exact same order than the enum class P_ID in property.h.{ P_ID::ORNAMENT_STYLE, false, "ornamentStyle", P_TYPE::ORNAMENT_STYLE},
—
Reply to this email directly or view it on GitHub https://github.com/musescore/MuseScore/pull/1946/files#r30050097.
hoping to solve an unreproducable casting problem reported by shoogle. updated midi test as per current state of mordent implementation
…e and Performance A Handbook, by Robert Donington,(c) 1982 implemented tied ornament notes added some documentation for the OrnamentExcursion data structure and removed some old debug comments refactored articulationExcursion into local function
refactored some code into local function makeEvent trying to simply to debug non-homogeneous trills updated test case for mordent updated xml read and write to use strings rather than numbers for ornamentStyle white space comments
added play button for glissando also updated test case updated glissando accidentals to work correctly based on end note, even if in different staff
and added test cases for this situation
0f2cc11
to
98fb35b
Compare
@@ -731,6 +735,478 @@ bool Score::isSubdivided(ChordRest* chord, int swingUnit) | |||
return false; | |||
} | |||
|
|||
void renderTremolo(Chord *chord, QList<NoteEventList> & ell){ |
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.
Indentation of these new functions is completely off. There is no comment before the function. Idem for renderArpeggio()
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.
Hi Nicolas, yes these functions don’t have comments.
The functions are their because I took one huge function that spanned many screen-fulls, and divided them into
individual functions the names of which describe what the code does.
The code is more or less the same as before. The code had no comments before I touched it, and still does not.
I can try to invent a comment for the functions, but in my opinion, if the deserve a comment now, then they
already deserved a comment before I touched the code.
What do you think?
On 18 May 2015, at 12:36, Nicolas Froment notifications@github.com wrote:
In libmscore/rendermidi.cpp #1946 (comment):
@@ -731,6 +735,478 @@ bool Score::isSubdivided(ChordRest* chord, int swingUnit)
return false;
}+void renderTremolo(Chord *chord, QList & ell){
Indentation of these new functions is completely off. There is no comment before the function. Idem for renderArpeggio()—
Reply to this email directly or view it on GitHub https://github.com/musescore/MuseScore/pull/1946/files#r30496906.
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.
Hi Nicolas, as far as the indentation. I can fix it, in as much as I understand the indentation rules.
However, I tried to preserve the indentation which was already their. I basically just move some code in an overbloated function
into several smaller functions, making the original function much easier to read.
On 18 May 2015, at 12:36, Nicolas Froment notifications@github.com wrote:
In libmscore/rendermidi.cpp #1946 (comment):
@@ -731,6 +735,478 @@ bool Score::isSubdivided(ChordRest* chord, int swingUnit)
return false;
}+void renderTremolo(Chord *chord, QList & ell){
Indentation of these new functions is completely off. There is no comment before the function. Idem for renderArpeggio()—
Reply to this email directly or view it on GitHub https://github.com/musescore/MuseScore/pull/1946/files#r30496906.
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.
the factorization into functions is great. Thank you for making it. As you will see all around the code, every function has an header
//---------------------------------------------------------
// functionName
// optional explanation on multiple line if needed
//---------------------------------------------------------
Regarding the indentation, we use 6 spaces to indent. (the code is 4 spaces indented in your PR) The { after a functionName are on a new line. We use if (nospace) {
and idem for while, case etc... I started to reindent it so don't bother for this one.
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.
�Apparently here are the controls xcode allows me.
I’ve changed the tab width to 6.
Any idea what the others mean and how I should set them?
//---------------------------------------------------------
// functionName
// optional explanation on multiple line if needed
//---------------------------------------------------------
Regarding the indentation, we use 6 spaces to indent. (the code is 4 spaces indented in your PR) The { after a functionName are on a new line. We use if (nospace) { and idem for while, case etc... I started to reindent it so don't bother for this one.
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.
For QtCreator we have something that does it automagically, but not for xcode I think
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.
something that works from the command line would be great as well.
On 18 May 2015, at 14:33, Joachim Schmitz notifications@github.com wrote:
In libmscore/rendermidi.cpp #1946 (comment):
@@ -731,6 +735,478 @@ bool Score::isSubdivided(ChordRest* chord, int swingUnit)
return false;
}+void renderTremolo(Chord *chord, QList & ell){
For QtCreator we have something that does it automagically, but not for xcode I think—
Reply to this email directly or view it on GitHub https://github.com/musescore/MuseScore/pull/1946/files#r30502743.
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.
if you commit your indentation changes, I can merge that into my own to avoid us having conflicting indentation changes.
On 18 May 2015, at 14:20, Nicolas Froment notifications@github.com wrote:
//---------------------------------------------------------
We use if (nospace) { and idem for while, case etc... I started to reindent it so don't bother for this one.—
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.
indent
? Need a couple options...
I just merged it but I discovered you didn't sign the MuseScore CLA yet. Could you http://musescore.org/en/cla ? Thanks ! |
OK
|
Great! Good to go. The indentation is now correct, using 6 spaces, if/while/switch etc have the right number of spaces. I tried to removed {} when the if/else statement has a single line but added them with the if/else statement is a single expression on single line (like a long for() loop).
|
thanks. needless to say, i don’t think they make code harder to read. on the contrary i think they can make the code easier. Are you sure the idea of function pointers applies to local functions? Local functions are not pointers any more than global functions are pointers, right? I mean they are all readlly pointers when you get down to the low level. Perhaps I need to take up the discussion with Werner? Perhaps he is right about the slow down. I also noticed you change the spelling of the xml values. now none of my files read correctly :-(.
|
MSCZ are just zip files. On the command line you can run |
I see you removed my mod7 function and replaced it by adding 700 before moding. https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/fun_modcm_rem.html https://www.cs.cmu.edu/Groups/AI/html/hyperspec/HyperSpec/Body/fun_modcm_rem.html (rem -1 5) => -1 |
I just know that it's the way we do it anywhere else in MuseScore :) and that was one less local function. |
there are two other files zipped together in the mscz, Can I simply ignore the container.xml and the .png? M Filemode Length Date Time File -rw------- 155 18-May-2015 18:04:24 META-INF/container.xml
On 18 May 2015, at 17:37, Nicolas Froment notifications@github.com wrote:
|
Yes |
Hi Nicolas, there was one think missing from your refactoring. The issue is that the code WAS passing around a useless variable, passing by value, and performing flow control based on its value.
|
Can you make a PR with this commit ? |
are you on IRC? I needed to discuss that with you.
|
Implementation of several ornaments/articulations including Trill, Turn, ReverseTurn
refactored Mordent, and Prall to use the new function renderArticulation()