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.
|
Beta Was this translation helpful? Give feedback.
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:
|
Beta Was this translation helpful? Give feedback.
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:
a
for the link and later for theFileReader
is 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.result
of theFileReader
to get the read array buffer.e
intoreadAsArrayBuffer
this function needs theBlob
orFile
object which you want to read as buffer. I recommend building first an example where you are sure you have a properArrayBuffer
orUint8Array
before proceeding with forwarding it to alphaTab. If you have problems there, I recommend StackOverflow to get guidance.