Use local MP3 files for audio instead of soundfont/player #1476
-
Hi, I was wondering, if I wanted to replace each track's audio (as well as the full score audio) with my own MP3s, what would be the best way to implement this? I want to experiment with having my own recordings play instead of the player audio, but the codebase is so huge that I don't even know where to start. I couldn't find any other discussions pertaining to this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey there. We have this as a bigger feature on the roadmap but it was not the focus until now. It has been discussed some times in the past: This is likely not a small or easy task but certainly a very interesting and rewarding one. 😁
The most challenging part that cannot be shipped out of the box (easily), is the synchronization between the external audio and the playback cursor relying on the actual audio information. The most promising approaches which alphaTab will try to follow in future is:
For the audio and video engines there is then a need to continuously keep track of the current time position and calculate according to the "markers" linearly the midi tick poision. With this the foundation is set for synchronizing audio and video correctly. A advance service built with alphaTab might do preprocessing for each file on the backend. e.g. via an audio spectrum analysis. Then it could try to make a first best guess for the markers and store them along the file offered via your App/Website. From AI to comparing the spectrums of the alphaTab generated audio vs. video/audio or simply creating them manually everything is likely possible to generate those markers.
For the implementation following aspects might be relevant:
The key parts about the player and UI interaction can all be found in the The reverse parts are similar. When a user clicks on notes we tell the player to seek to a certain tick position. This is happening around the the For a very early hands-on to fiddle around you would likely follow this development path:
I hope this gets you a bit kickstarted to fiddle around. You don't need to care about any rendering bits. Anything of interest should be within the You might also want to check out how Guitar Pro has solved this topic with their "audio track" feature. |
Beta Was this translation helpful? Give feedback.
Hey there.
We have this as a bigger feature on the roadmap but it was not the focus until now. It has been discussed some times in the past:
This is likely not a small or easy task but certainly a very interesting and rewarding one. 😁
The most challenging part that cannot be shipped out of the box (easily), is the synchronization between the external audio and the playback cursor relying on the actual audio information. The most promising approaches which alphaTab will try to follow in future is: