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
Glissando as a multi-segment line. #1536
Conversation
Wow, anchor to notes too? That's going to make some people very happy! I don't particularly care about the ability to change anchors, but if this new implementation - being Sline-based - also comes with the ability to adjust line length, that's going to make even more people happy! |
Yes, I think it needs a new file version, and if only to make Beta 1 users aware that it won't be able to read files (using glissandi) created with this version. |
If it helps you decide, I also considered raising version number when I added the slash notation support. Scores created using the new slash facility won't open (and will likely crash) older versions. I mentioned something about it at the time but never followed through. Between that and this, and perhaps also changes made recently for custom key signatures, I'm thinking we should. |
@Jojo-Schmitz and @MarcSabatella : about the version number, I agree but I think I'll leave to @lasconic e/o @wschweer to decide. About anchors: I believe that the ability to change the anchor points is not marginal; when the ending point is a multi-note chord, the algorithm defaults to the chord top note (as the old algorithm did; also for backward compatibility). This might or might not be what the user intended. Also, the glissando is dropped to the starting note and defaults to end at the (top note of the) next chord of that part; I can think of cases where this is not necessary the 'right thing' (for instance, in keyboard parts, in orchestral divisi or in general in multi-part staves): the intended end of the glissando might be several chords beyond or in the 'other staff'. I believe the implementation to be easy enough to be worth pursuing. But I also wanted to make the PR available ASAP, also to profit from for discussions like this. About dragging grips: the ability to drag ending grips of individual segments comes 'for free' with About melisma: no, it is not implemented, I'm working on it now. Simply, as I was adding new types to About the failing test: I'll have a look; perhaps the test needs updating, but it is well possible I did not take all the side effects into account (this selection stuff is new to me) and then my code is to be corrected. |
http://musescore.org/en/node/19155 I don't understand the mentions of melisma - could someone explain? |
Btw, would also be worth taking another look at http://musescore.org/en/node/21725. I'd guess this change invalidates the existing PR for that. Maybe it ends up being fixed automatically, maybe it requires a different fix. |
Trying to fix the failing tests; one was just a matter of re-aligning the test ref. score, but:
@MarcSabatella: as glissando is now note-to-note, it should draw correctly from a grace note (assuming enough space is created and the final note is correctly 'guessed'). I'll have a look, but I would like to have the tests fixed first. |
Added an intermediate fix (for MusicXML and Selection filter) to keep the ball rolling. Guitar Pro import still needs updating, though: I hope @jpirie can have a look at it or at least explain to me how to go on... |
Sorry haven't replied earlier, it's been crazy in the run up to Christmas for me! :-) I have taken a look at this today and I've been able to modify the Guitar Pro import implementation in order to work with the new glissando implementation, but for some reason I only see the glissando on the score, and not when viewing the part. I'm not sure if that's something that I need to solve at my import time or whether something needs to be modified in your change. I'll have a think about that anyway - if you have any additional information on that then do let me know. As I was testing this out I discovered some kind of bug that causes MuseScore to segfault. I can reproduce with the following steps, can you see if you can reproduce on your end? -> Open Musescore Stack trace from GDB given below:
|
Hi Maurizio, sorry for late reply, been very busy on other subjects. I did a quick check Do the test cases (testArpGliss1..3.xml) still pass ? Is the result of Regards, Leon. On Sun, Dec 21, 2014 at 9:38 AM, Maurizio M. Gavioli <
|
@jpirie : Hi, John; I know, this is not the most serendipitous moment in the year... Thanks for looking into the matter! About the gliss. in part issue: as GP import does not really work here, I don't actually know, I should have a look at the 'working' code. Could you send it to me in some way? In the meantime I'll look at the crash while dragging. @lvinken : Hi Leon, thanks for looking into the matter. 'Yes' to all your three questions: Yes, all MXML import/export tests do pass now. Yes, the imported XML scores match their PDF's. Yes, I assume test coverage to be sufficient; unless the MXML format allows variations of the glissando stuff which were not supported by MuseScore before and are now; basically, if MXML supports glissando starting from and/or ending into multi-note chords and/or between non-adjacent chords, it might be worth adding more tests for that. I would say this is somewhat lower priority than having the fix working, though. |
@mgavioli Sure thing. I've committed to the glissando_v2 branch of my fork of Musescore a patch which makes the gliss display (in the main score only) with your new implementation in the shift slide tests (e.g. mtest/guitarpro/shift-slide.gp5). I hope this is useful to you. I'll have a glance at it over Christmas also and see if I can think of a reason why the slide would only show up in the main score. I think I might have solved a similar problem in the past but I cannot remember how.. |
@jpirie Got it and working on it. |
|
Once merged, we need to bump up the file revision in mscore.h |
Can you rebase this PR and maybe bump up the file revision number then? |
- Implemented as a sub-class of `SLine`. - Anchor type changed from CHORD to NOTE: allows to attach glissando start and end points to individual notes, rather than generically to chords (with note within the chord chosen by the program). - The Glissando element is now stored in the `Note::_spannerFor` list. - `Chord::_glissando` has been removed and replaced by a `bool _endsGlissando`, recording whether the chord is at the end of glissando (as gliss.-end chords require more space if mid-measure or system-initial). - Debugger UI for `Chord` updated accordingly. - Glissando in now save into score file as a spanner, within the initial note, and with appropriate `<endSpanner>` tag in the Glissando ending note. - Existing scores with the old Glissando file format are correctly read back. Notes: - MusicXML import/export of the new Glissando implementation NOT IMPLEMENTED. - This version can read scores from older versions, but older versions **cannot read** scored from this version (they do not expect a <Glissando> tag within a Note). Does this require a NEW FILE VERSION NUMBER? - This implementation would allow rather easily to move the start and end anchors around (as for slurs) to override the note/chord chosen by the program when the glissando is initially created; but the UI for this is not implemented yet.
- MXML I/O code has been adapted to the new glissando code. - Ref. scores for Selection filter tests have been updated. Guitar Pro: import code needs to be adapted to the new glissando code and I have no idea how to do that.
For both parts (file `excerpt.cpp`, func. `cloneStaves()`) and linked staves (func. `cloneStaff()`).
Also, some code clean-up (mainly deleting old code commented out)
@lasconic : rebased, aligned with recent changes and increased file version number; Travis is having its moods again, but sooner or later... |
@lasconic : Travis octroya Sa grace! |
Let's merge it. This is hopefully the last big change we merge before MuseScore 2.0 RC. |
Glissando as a multi-segment line.
SLine
.Note::_spannerFor
list.Chord::_glissando
has been removed and replaced by abool _endsGlissando
, recording whether the chord is at the end of glissando (as gliss.-end chords require more space if mid-measure or system-initial).Chord
updated accordingly.<endSpanner>
tag in the Glissando ending note.Notes:
<Glissando>
tag within a Note). This probably requires a new file version number; as the file version number increased fairly recently, it might make sense to piggy-back this change, if merged soon.The latest commits should make the PR fully functional.