Loading local soundFont file #843
|
Am I doing it right. I am trying to open a local sound font file. It looks like is not being applied. |
Answered by
Danielku15
May 4, 2022
Replies: 1 comment 1 reply
|
There are quite some risky and problematic things in your code you likely need to clean:
|
1 reply
Answer selected by
Danielku15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are quite some risky and problematic things in your code you likely need to clean:
afor the link and later for theFileReaderis risky.const bytes = new Uint8Array([0]);is wrong. You are creating here a new byte array with one byte (value=0). You need to access.resultof theFileReaderto get the read array buffer.eintoreadAsArrayBufferthis function needs theBloborFileobject which you want to read as buffer. I recommend building first an example where you are sure you have a properArrayBufferorUint8Arraybefore proceeding with forwarding it to alphaTab. If you have problems there, I recommend StackOverflow to get guidance.