Feature: Respect AudioContext.outputLatency
Maintainers usually reply within 1 day
@Danielku15 is already working on this.
Since May 14, 2024.
Assessment
This issue has not been assessed yet.
Description
See https://github.com/CoderLine/alphaTab/discussions/1454
AlphaTab currently does not respect the AudioContext.outputLatency describing the timely difference between us passing the audio samples to the context and the actual time it will be heard by the user.
This leads to a shift of the cursor and seen audio.
AlphaTab should correctly expose the time and tick position according to the heard audio on the synthesizer area. Internally it might still need to keep its "synth" timeline. Things to consider:
- It seems the audio latency is not static but can change any time.
- There is a time axis within the midi sequencer, and one on the synth level.
- The sequencer position decides which midi events to play next for audio generation.
- The one on synth level is handling the actual audio position according to the samples played by the output. Here we likely need adjustment
- The synth level audio is also used to determine whether the playback finished (and potentially seek back to the start of the desired playback range - if looping is active).
- When looping and jumping/seeking back to an older position, we need to be careful on just applying the latency wrongly. We might be stopping/seeking too early resulting in a strange cursor jump/positioning.
- Testing might be tricky as I'm not aware of a way to modify the latency.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 297
- Avg merge
- 9h 2m
- Merged PRs (30d)
- 44
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CoderLine/alphaTab
-
ai-authored
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
ai-authored
Difficulty 3/5 1-2 days Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Respect systems layout of MusicXMLPossibly taken @Danielku15 claimed this 20 days ago. Open
CoderLine/alphaTab#2909 · 1 assignee ·
Maintainers usually reply within 1 day
-
Expose Lyrics in public apiPossibly taken @Danielku15 claimed this 20 days ago. Open
CoderLine/alphaTab#2908 · 1 assignee ·
Maintainers usually reply within 1 day
-
Show accentuations on tab-only stavesPossibly taken @Danielku15 claimed this 20 days ago. Open
CoderLine/alphaTab#2906 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in CoderLine/alphaTab
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
grafana/profiles-drilldown#1212 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
grafana/traces-drilldown#980 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openremote/openremote#3487 · 1 comment ·
-
triage:needs-human
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
garrytan/gbrain#7635 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
coollabsio/jean#867 ·
Maintainers usually reply within 1 day