Quantcast

skip 1st ending

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

skip 1st ending

Jim Newton
Can someone point me to the code, or perhaps explain how iteration through the score works when producing midi playback events.  Somewhere there has to be code which examines voltas and somehow orders the measures, repeating some measures etc.  

I'd like to investigate enhancing that code with the option to skip 1st endings, and effectively jump to 2nd endings.  Admittedly I don't know what will happen for 3rd endings etc.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skip 1st ending

Marc Sabatella
I think the code in repeatlist.cpp deals with this.  Note we already skip the first ending on a DS; I guess maybe you mean an option to skip first ending even when not on the DS?  We already have an option to turn off repeats, but this plays both first and second ending.  Might be just as well to have it skip the first ending.  But it seems this would just be for testing purposes; in real life, you'd want the repeat or you'd not write it in the first place.  What *would* be useful in real life is an option - probably a property you'd set on an individual DS or DC element - to cause repeats to be taken on the DS/DC.  That's a big part of https://musescore.org/en/node/8064, and see also https://musescore.org/en/node/56451.

On Sun, Aug 2, 2015 at 11:53 AM Jim Newton <[hidden email]> wrote:
Can someone point me to the code, or perhaps explain how iteration through
the score works when producing midi playback events.  Somewhere there has to
be code which examines voltas and somehow orders the measures, repeating
some measures etc.

I'd like to investigate enhancing that code with the option to skip 1st
endings, and effectively jump to 2nd endings.  Admittedly I don't know what
will happen for 3rd endings etc.





--
View this message in context: http://dev-list.musescore.org/skip-1st-ending-tp7579482.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

------------------------------------------------------------------------------

_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skip 1st ending

Jim Newton
Why would I want to skip 1st endings? Well, I usually would like to enter the score as it is written.
I use this often for rehearsal with a real instrument.  In some cases I want to play the entire piece, but sometimes I want to play the "short form", meaning always take the 2nd ending, never the first.

BTW. I'm not sure what the purpose of "no repeats is" .  When would you really want to play the 1st ending, followed immediately by the 2nd ending?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skip 1st ending

ericfontainejazz
>> BTW. I'm not sure what the purpose of "no repeats is" .  When would you really want to play the 1st ending, followed immediately by the 2nd ending?

"no repeats" represents the score in its unrolled form.  I find it useful when I want to check my to score to make sure all my notes have been inputted correctly, and it gives me something to fall back on in case I have errors with my jumps.

>> sometimes I want to play the "short form", meaning always take the 2nd ending, never the first.

Can't you achieve this behavior by putting a D.C. at the end and playing back the score from the end?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skip 1st ending

Jim Newton
I've never tried the trick of putting the DC at the end.  I can give it a try.   However, that would involve modifying the score, so it would not play back normally if I start at the beginning.  But as you suggest, it is a small change.

On the other hand, if it does work, that means the code to do what I want is basically already there.  I would just have to add a "button" which would effectively: play from end as if there were a DC there.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skip 1st ending

ericfontainejazz
>> On the other hand, if it does work, that means the code to do what I want is basically already there.  I would just have to add a "button" which would effectively: play from end as if there were a DC there.

I've been recently working on RepeatList::unwind(), which is where all the implementation for skipping all but last ending would likely go, so I'd advise you stay out of there for now, since I have a pull request just submitted which changes that function, and I will be likely to be doing some more changes around that, especially considering I've just self-assigned myself the feature request "Add a property "with repeats" to jumps (like D.S. al Coda)" (https://musescore.org/en/node/56451) which Jojo had initially started.

Unfortunately my latest pull request will unwind section by section individually (https://github.com/musescore/MuseScore/pull/2172) which means that the trick of putting a DC at end will only work for the current section you put the DC on.

I think it would be better if you make a feature-request on the musescore issue tracker, for others to comment, as I think feature requests belong there, not on this mailing list.  Maybe if you already have a mockup of the button ready you could post a screenshot with the feature request.  Considering that the button "play repeats" is currently binary ("with repeats" or "ignore repeats and play through every measure"), then I'm curious how you think a separate button would work to select the now 3 different ways to playback.  (To me it should be a three-way toggle of sorts...maybe with a different icon for each mode).

Anway, since I'm going to be modifying unwind some more, I could keep in mind how to make it work with a "takeFinalEndingsOnly" boolean argument.  I could simply modify the condition if (isGoto && (flags & Repeat::END)) into if ((takeFinalEndingsOnly || isGoto) && (flags & Repeat::END)) and addition to maybe a few other changes.  But I must warn you to not look at unwind, because it is very convoluted, and I would personally like to clean it up by making it simpler, but I believe it is the way it is as a result of the many corner cases people have discovered over the years.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: skip 1st ending

Jim Newton
OK, I've added such a feature request
https://musescore.org/en/node/73906
Loading...