Using html5 rendering and the api how do I prevent the time signature from appearing? #2549
Replies: 1 comment 1 reply
-
|
Seems it would be better to discuss on how you could solve the performance problems you're facing rather than trying to find solutions to problems only existing because of workarounds. My understanding so far: You are trying to build some custom performance optimization in a recording workflow. Specifically you are recoding new notes and the music sheet grows. To optimize performance you are trying to render the music sheet system-by-system (system==row of music notation). Now you face the problem that alphaTab shows certain notation details like key signatures (and likely other parts) which you try to avoid. What you actually need is a good mechanism which allows you to efficiently "append" new bars to the music sheet as the recording progresses. You likely know and go with the assumption that the old bars remain unchanged, but re-rendering them on every model update is causing quite some performance overhead. In a perfect world you would simply add the new data to the model, tell alphaTab to update, and it would do things efficiently to react on the changes. I have some ideas how alphaTab could maybe serve your need easier and eliminating the need for this workaround due to current performance implications. Let me know if I described your goals correctly. Just for completeness on your question: alphaTab has no option to customize the details like clefs and time signatures shown on staves yet. There is #2445 tracking this. But I think even with the capability of hiding things, it is just the start of further problems. Many features of alphaTab obviously will not work (resizing or changing any other display settings) but also elements like bar numbers would show up wrongly or music notation elements which can span across systems (like ties) can break. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Below is my use case:
I'm working on a midi recording feature for drum notation and have prototype up and running incorporating a metronome.
I'm encountering performance issues with re-rendering so have come up with a work around that may solve the issue but I am unable to find a way in the documentation to hide the time signature when using the api with html5 rendering.
The 'fudge' work around involves only rendering one row of notation:
Recording starts
Loop While Recording
Batch processing of received midi notes every 100ms
Render (if notes received or start of new bar)
After render check if there are more than 1 row of rendered score
if there is then
if first time then copy and append the title, artist, album canvas row to a alphaTabFinished canvas container above the alphaTab canvas container
copy and append the first notation canvas row to a alphaTabFinished canvas container above the alphaTab canvas container
remove the first canvas notation row
increment the starting render bar so we do no re-render previously rendered rows
prevent time signature, tempo, title, subTitle, artist, album, trackname from being rendered from now on
EndLoop
Clear the alphaTabFinished canvas container
Render the full score
Beta Was this translation helpful? Give feedback.
All reactions