Adding/removing music notes dynamically?
I am aware that alpha tab is not a music notation editor nor does it intend to provide such function, but is it possible that I add/change/remove musical notes on the fly, without reloading the whole thing?
Technically it's possible to insert new entries (notes, beats, voices, bars, tracks) the data model. Dynamically changing the data model might be a bit tricky at the beginning if you are not familiar with the details about the data model. There are some constraints on the data model that must not be violated:
- some models have index properties where they are located within the parent.
- some models are links to the next and previous items
- some models cache information (like beat caches the lowest and highest note)
I will try to add some methods to the data model that allows add/remove/edit elements easier.
Any change on the data model requires a full re-layouting and re-rendering.
In theory any bar should be able to be updated indiviually, but I still have outdated layouting algorithms in place that prevent me to so. I constantly try to improve the algorithms to get rid of those constraints to also provide other features like dynamic resizing.
Hi, Danielku15, how does it work, are there some functions supporting editing the score now?