Loop first bar until input is received when recording in PianoRoll #7616
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At least two users in the span of a few days have requested a pre-roll/countdown feature in the discord. This is not that, but it is something similar:
This PR makes it so that when you press the circle record button in the PianoRoll, it will loop the first bar until you press a key. This helps when the user wants to have a "pre-roll" or countdown before you start recording so that you have time to prepare. Or if you are like me and can't figure out what to play until many bars of silence have past, this removes the need to move all the notes back to the start of the clip.
The looping does not happen if the midi clip already has notes in it, or if the loop points are enabled.
I had to add a couple functions to
Song.h
so that I could change the looping status of the playback mid-way through playing, so that I could disable the loop once input is received.Additionally, I changed the name of
m_timeLine
in the PianoRoll code tom_timeLineWidget
, since that more accurately reflects what it is (It's a TimeLineWidget, not a Timeline). On second thought, this may be out of the scope of this PR.