Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player ending before end of music (not playing last notes) #78

Open
Willyb30 opened this issue Sep 12, 2023 · 0 comments
Open

Player ending before end of music (not playing last notes) #78

Willyb30 opened this issue Sep 12, 2023 · 0 comments

Comments

@Willyb30
Copy link

Hello,
I'm trying alphatab js and i'm facing an issue :
The player is not playing the last notes. I've been experiencing that on the demo example found on web gettings started
https://alphatab.net/docs/getting-started/installation-web

the demo is providing 17 notes but only 12 are played before the player stops
After some searches i've found that some notes absolute display time are up to 10560 ans the player is stopping at 6000

Here is the code i used

    <!-- Include alphaTab cdn -->
    <script src="https://cdn.jsdelivr.net/npm/@coderline/alphatab@latest/dist/alphaTab.min.js"></script>

    <!-- Create Element which should contain alphaTab -->
    <div id="alphaTab" data-tex="true">
        \title "Hello alphaTab"
        .
        :4 0.6 1.6 3.6 0.5 2.5 3.5 0.4 2.4 | 3.4 0.3 2.3 0.2 1.2 3.2 0.1 1.1 | 3.1.1
    </div>
    <button onclick="play()">play</button>
</body>


<script>
    const element = document.getElementById('alphaTab');
    const apisettings = {
        <!--file: "https://www.alphatab.net/files/canon.gp", //same issue with the file-->
        player: {
            enablePlayer: true,
            soundFont: 'https://cdn.jsdelivr.net/npm/@coderline/alphatab@latest/dist/soundfont/sonivox.sf2',

        }
    }
    const api = new alphaTab.AlphaTabApi(element, apisettings);

    function play() {
        api.play()
    }

</script>

I've tryied that on mac Chrome 116.0.5845.140 opera 101.0.4843.58 and Chrome PC Win 11 but the issue is the same on both systems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant