Skip to content
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

fix #33126: Pedal playback of connected/overlapping pedal segments #1320

Merged
merged 1 commit into from Oct 13, 2014

Conversation

CombatCube
Copy link
Contributor

The previous implementation was simply adding the Pedal-On and Pedal-Off events at the PedalSegment endpoints. This was problematic, as overlapping pedal segments would cause their Pedal-Off event to occur after the following segment's Pedal-On event. However, we encourage the use of overlapping segments to create a continuous Pedal line.

The solution here is to keep track of the pedal changes within a channel, and correct overlaps when they occur. When a Pedal-On event is added to a channel's list, it checks that the preceding Pedal-Off event occurs at a preceding tick. If it's not, it moves the Pedal-Off event one tick behind the Pedal-On event. This allows a single pedal segment to be active for all the notes it contains, and a series of overlapping pedal segments to stop and start at the overlapping points.

After all the pedal changes are evaluated, the events are added to the main MIDI events list channel by channel.

…egment ends does not continue pedal playback
@CombatCube CombatCube changed the title 33126 pedal playback fix #33126: Pedal playback of connected/overlapping pedal segments Sep 19, 2014
wschweer added a commit that referenced this pull request Oct 13, 2014
fix #33126: Pedal playback of connected/overlapping pedal segments
@wschweer wschweer merged commit 96117d7 into musescore:master Oct 13, 2014
@lasconic
Copy link
Contributor

lasconic commented Nov 3, 2014

If you are still interested by this issue. There is an open bug about Pedal not exported to MIDI files.
http://musescore.org/en/node/38041

@MarcSabatella
Copy link
Contributor

I have submitted a PR that other issue - #1430.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants