Replies: 2 comments
-
Would be a valuable addition that is supported already by quite some music notation software (e..g MuseScore and Soundslice).
I would say the easiest way to implement the feature would be to rewrite the data model after loading. This way for the rest of alphaTab it looks almost like it is simply a score without repeats. The Having it on a different layer would likely need quite some rework in almost all components. At many places there is the assumption of having one BarRenderer for one Bar and we assume a strong relation about next/previous bars in the model also be like this in the display. (e.g. when finding the render location for inter-connected notes through slurs). Beside that a lot of components providing visual locations by a given bar/note would need to be transformed into arrays. And that's just the start.
With the approach above, it would be up to the developer using the feature to correctly specify the bars according to the folder or unfolded version.
Cosidering a stepwise approach of such a feature it might be easiest to provide a new component in alphaTab for doing the unfolding and then provide some concrete example how it would be used to provide a folding/unfolding feature for end-users. This will show us already what complexities might be involved and potentially can or cannot be solved in alphaTab itself. I think at some point we could move some more features into alphaTab so that it holds a folded and unfolded version of the score (when the feature is activated) and do certain back&forth mappings on the public API surface. |
Beta Was this translation helpful? Give feedback.
-
Do you mean modifying the model in place or generating an unfolded version to be stored in parallel? Should a regeneration be done initially, after first render, or the first time the unfold setting is changed?
Or perhaps it could be developed on a different branch. Is a rough starting point to have a second |
Beta Was this translation helpful? Give feedback.
-
Making this thread for discussing this feature. Idea from in #671 (comment). In short: A setting that "unfolds" all repeats and alternate endings, thereby making the sheet look exactly like it is played.
To start off, I propose this setting can be called
settings.display.unfoldRepeats
, and be a boolean, default false.There are many concerns and interactions to discuss:
Let the developer handle it.display.startBar
anddisplay.barCount
: Should unfolding allow showing only (parts of) specific laps in a repeat (for example only one variant of the alternate endings)? In that case a different start offset calculation might be needed.Beta Was this translation helpful? Give feedback.
All reactions