Skip to content

Rhythm slashes#389

Merged
cameronwhite merged 7 commits intomasterfrom
feature/rhythm-slashes
Jul 26, 2022
Merged

Rhythm slashes#389
cameronwhite merged 7 commits intomasterfrom
feature/rhythm-slashes

Conversation

@cameronwhite
Copy link
Copy Markdown
Member

Work in progress on implementing rhythm slashes (#16)

@cameronwhite cameronwhite linked an issue Jul 22, 2022 that may be closed by this pull request
cameronwhite added a commit that referenced this pull request Jul 26, 2022
cameronwhite added a commit that referenced this pull request Jul 26, 2022
- Rests weren't being handled when searching for the previous slash to copy notes from

- Also fixed a missing nullptr check introduced by 270b076

#389
This will be used for rhythm slashes, which play the current chord.

The implementation from ScoreUtils::getCurrentPlayers() is reused, with performance improvements to search backward from the current position instead of from the beginning of the score
The idea will be to store rhythm slashes as just a regular staff (e.g. containing notes for all of the chord notes), which hopefully will make many operations like MIDI playback straightforward. However, they'll of course be treated differently for editing and rendering to appear as rhythm slashes

With this change, any rhythm slashes in the v1.7 file result in an extra staff being added to the system, and most of the note properties from rhythm slashes are imported

Some extra bookkeeping is required to update the player changes correctly when rhythm slashes appear / disappear from one system to the next.

#16
The volume for the staff was being read instead, which led to an assertion failure if the staff volume wasn't set.
- Rests weren't being handled when searching for the previous slash to copy notes from

- Also fixed a missing nullptr check introduced by 270b076

#389
@cameronwhite cameronwhite force-pushed the feature/rhythm-slashes branch from 1aeb18d to 4272b61 Compare July 26, 2022 03:07
@cameronwhite cameronwhite merged commit ebd0f83 into master Jul 26, 2022
@cameronwhite cameronwhite deleted the feature/rhythm-slashes branch July 26, 2022 14:28
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.

1 participant