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

Play multiple tempos in a masterbar #815

Closed
1 task done
hd-i opened this issue Apr 7, 2022 · 4 comments · Fixed by #1600
Closed
1 task done

Play multiple tempos in a masterbar #815

hd-i opened this issue Apr 7, 2022 · 4 comments · Fixed by #1600
Assignees
Labels
area-player Related to the audio playback engine. area-rendering Everything related to the rendering platform-all Affects all platforms state-accepted This is a valid topic to work on. type-feature 💡

Comments

@hd-i
Copy link

hd-i commented Apr 7, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

current behavior is read last tempo of a masterbar and set in tempoAutomation.value

Expected Behavior

Each tempo must be applied in a masterbar.
GuitarPro Musicsheet for test : Moonlight Sonata ( Piano ver ) , Masterbar 22

Steps To Reproduce


Link to jsFiddle, CodePen, Project

https://github.com/hd-i/GPFiles

Found in Version

1.2

Platform

Web

Environment

- **OS**: Windows 10
- **Browser**: Firefox,Chrome

Anything else?

No response

@Danielku15
Copy link
Member

I don't really understand this bug report. Can you try to rephrase what is effectively not working in alphaTab or handled wrong? Not talking on code level what alphaTab might do but rather from an application level what is happening.

@hd-i
Copy link
Author

hd-i commented May 12, 2022

I uploaded a musicsheet on github to show this to you.
Please see my uploaded musicsheet and open that with guitarpro and see masterbar 22. on this masterbar , there are 4 tempos ( 48, 45, 42, 40) that guitarpro can handle correctly and it can controls playing speed but alphatab cannot handle all tempos in masterbar 22 and just playing last tempo of this masterbar.
please see my uploaded guitarpro file in this repository :
https://github.com/hd-i/GPFiles

@Danielku15
Copy link
Member

Thanks. I think I understand now. It is indeed not supported to have multiple tempo changes in one masterbar.

@Danielku15 Danielku15 added type-feature 💡 area-rendering Everything related to the rendering state-accepted This is a valid topic to work on. area-player Related to the audio playback engine. and removed type-bug 🕷️ state-needs-discussion 💬 labels May 25, 2022
@Danielku15 Danielku15 added this to Candidate in AlphaTab 1.2.3 May 25, 2022
@Danielku15 Danielku15 removed this from Candidate in AlphaTab 1.2.3 May 25, 2022
@Danielku15 Danielku15 added the platform-all Affects all platforms label May 26, 2024
@Danielku15
Copy link
Member

Merged from #1207

alphaTab currently assumes a single tempo change per master bar but this is not correct. Guitar Pro and many other formats can have multiple tempo changes (and other automations) within a single bar.

We currently already read the automations correctly into the beats. but for tempo automations which are having an impact on master bar level we only treat one change.

Related code places:
https://github.com/CoderLine/alphaTab/blob/develop/src/importer/Gp3To5Importer.ts#L867 (GP3-5 importer)
https://github.com/CoderLine/alphaTab/blob/develop/src/importer/GpifParser.ts#L2328 (Gp6-8 importer)
https://github.com/CoderLine/alphaTab/blob/develop/src/importer/AlphaTexImporter.ts#L1889 (alphaTex importer)
https://github.com/CoderLine/alphaTab/blob/develop/src/model/MasterBar.ts#L111 (data model)
https://github.com/CoderLine/alphaTab/blob/develop/src/midi/MidiFileGenerator.ts#L187 (midi generation)
https://github.com/CoderLine/alphaTab/blob/develop/src/rendering/effects/TempoEffectInfo.ts (rendering)
https://github.com/CoderLine/alphaTab/blob/develop/src/midi/MidiTickLookup.ts#L201 (midi tick)

This change will have significant impact on certain duration calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-player Related to the audio playback engine. area-rendering Everything related to the rendering platform-all Affects all platforms state-accepted This is a valid topic to work on. type-feature 💡
Projects
Status: Done
Status: No status
AlphaTab 1.4
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

2 participants