XML file loading hangs and no rendering when using playerMode: PlayerMode.EnabledExternalMedi #2462
Replies: 3 comments 1 reply
-
|
From the code directly, I cannot see anything obvious what might cause this. Can you setup a fully working example I can run locally to dig deeper? You could also increase the log level and check if there is anything useful there. Last but not least, if the UI fully hangs, try pausing the execution in the developer tools (or use logging breakpoints) to see if there is some wierd endless loop going on. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the quick reply. I've attached a very minimal version of my project and it's just html, js, css and a musicxml file. It loads a musicxml file (which has been validated) and tries to render it. For some reason nothing renders now (other than the cursor markup) if I select EnabledAutomatic. The EnabledExternalMedia option hangs as per my full blown typescript version. I hope this helps. cheers |
Beta Was this translation helpful? Give feedback.
-
|
I found the two problems in your setup: 1. Tempo is almost 0The MusicXML defines a 0.111 tempo in line 44. This leads to a problem inside alphaTab because the tempo is that small that it is almost 0 causing the audio to not advance. Basically it ends up in a division-by-zero internally when we try to advance the time using this tempo. It's a small bug we should handle, but generally the problem is in your input file. I added #2465 for fixing this problem. 2. Container is not visible / width = 0alphaTab picks up the width of the element you are attaching it to and uses it to size the music sheet. In your code the container has a 0px width and is hidden, which causes alphaTab to never render the sheet. It waits endlessly for the container to become visible and sized. If you fix the tempo in your file, and the container sizing+visibility in your code things will work:
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I'm using typescript and loading an MusicXml file as I want to use drum notation.
The file renders fine if I use the playerMode: PlayerMode.EnabledAutomatic setting.
The issue is that I need to use an external audio handler to control the cursor so use playerMode: PlayerMode.EnabledExternalMedia and then set the handler in scoreLoaded.on. When I try to do this the ui just hangs and no notation is rendered.
In the attached code i've tried placing the loadXML statement before and after the event and media handler code but neither work. When placed after i get a seekTo error on the handler with the time parameter being NaN.
Hoping for some pointers as to what i'm doing wrong or whether this is a bug.
AlphaTab.txt
Beta Was this translation helpful? Give feedback.
All reactions