Skip to content

Commit 3a369f9

Browse files
committed
docs: Extend guide on media sync editor
1 parent ef83177 commit 3a369f9

4 files changed

Lines changed: 157 additions & 2 deletions

File tree

docs/guides/media-sync-editor.mdx

Lines changed: 157 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,160 @@ title: Media Sync Editor
44

55
This guide is about the Media Sync Editor we provide as part of our [Playground](/docs/playground/playground.mdx).
66

7-
> [!WARNING]
8-
> This guide is still incomplete and is currently being extended.
7+
To use alphaTab together with external media like audio or video backing tracks, it is often needed to somehow synchronize the two parties due to inconsistencies.
8+
It is rather rare that the music sheet and the used backing track 100% align in timing. There might be intros, outros slight time differences which need to be accommodated for.
9+
10+
The Media Sync Editor provides an online editor for exactly this task. You can load your music sheet and your backing track. The editor then offers features to eliminate potential
11+
differences of the two.
12+
13+
Before we go into the details, first an overview on the general features and recommendations.
14+
15+
<img src="/img/guides/media-sync-editor/overview.png" alt="Overview" />
16+
17+
18+
import Tabs from '@theme/Tabs';
19+
import TabItem from '@theme/TabItem';
20+
21+
<Tabs
22+
defaultValue="1"
23+
values={[
24+
{ label: '(1)', value: '1', },
25+
{ label: '(2)', value: '2', },
26+
{ label: '(3)', value: '3', },
27+
{ label: '(4)', value: '4', },
28+
{ label: '(5)', value: '5', },
29+
{ label: '(6)', value: '6', },
30+
{ label: '(7)', value: '7', },
31+
{ label: '(8)', value: '8', },
32+
{ label: '(9)', value: '9', },
33+
]
34+
}>
35+
<TabItem value="1">
36+
**(1) Media Sync Editor**
37+
38+
The Media Sync Editor can be accessed on the bottom right side of the playground. When clicking on the button the editor toggles.
39+
Closing the editor will reset the editor but most relevant information is generally remembered within the playground. Re-Opening
40+
the editor after closing should show again the correct details, but aspects like zoom or undo/redo are reset.
41+
</TabItem>
42+
<TabItem value="2">
43+
**(2) Player Mode**
44+
45+
This area allows to change the player mode within the playground to synchronize the song.
46+
47+
* **Synthesizer** enables again the use of the built-in synthesizer for playback.
48+
* **Audio Track** enables loading of a local audio (or video) file from which the raw audio will be used.
49+
* **YouTube Video** enables loading a YouTube Video.
50+
51+
You can switch between the modes and any sync points are remembered in the playground.
52+
</TabItem>
53+
<TabItem value="3">
54+
**(3) Sync Point Actions**
55+
56+
This menu provides some handy actions for sync points.
57+
58+
</TabItem>
59+
<TabItem value="4">
60+
**(4) Zoom**
61+
62+
To align the song precisely it is often required to zoom deeper into the audio. With this zoom level the time axis
63+
of the editor is stretched or condensed for more precise sync point editing.
64+
65+
</TabItem>
66+
<TabItem value="5">
67+
**(5) Undo**
68+
69+
The editor will remember individual edits done to the sync points. You can undo/redo those changes in case you made a mistake.
70+
71+
</TabItem>
72+
<TabItem value="6">
73+
**(6) Export**
74+
75+
Once you have synced the file, you can use these export actions to download your synced file. You can either export
76+
a Guitar Pro 8 file or generate some custom source code to add to your project for enabling the synchronization as configured.
77+
78+
</TabItem>
79+
<TabItem value="7">
80+
**(7) Waveform**
81+
82+
When you load a local audio or video file, the editor will show a visual waveform in the central space. This is very useful to identify
83+
spots in the audio where sync points should be placed. Unfortunately YouTube doesn't allow access to the raw media. That's why the waveform will be empty in this case.
84+
85+
</TabItem>
86+
<TabItem value="8">
87+
**(8) Masterbar / Measure Sync Points**
88+
89+
These are the main sync points for masterbars (aka. measures). The main synchronization happens on a bar level. Sync points can be active or inactive.
90+
91+
If they are active they have a dark blue arrow-head and show a BPM value beside it. Active sync points can be dragged to the right spot in the audio where the related bar is expected to be played.
92+
To activate or deactivate any sync point doubleclick it and it will be toggled.
93+
94+
Inactive markers are placed automatically according to the time axis and BPM of the song. They are having light blue arrow heads.
95+
96+
If there are repeats or jumps in the song the repeat counter is shown in parenthesis behind the bar number above the arrow head. For the first occurence no repeat number is shown.
97+
98+
</TabItem>
99+
<TabItem value="9">
100+
**(9) Time Signature Sync Points**
101+
102+
While the internals of alphaTab support any dynamic placement of sync points, the editor provides only the option to add additional sync points following the time signature.
103+
104+
e.g. on a 4/4 time signature, you will notice additional three dashed lines marking the individual metronome ticks of the bar. These sync point markers can be activated with a doubleclick like masterbar sync points.
105+
</TabItem>
106+
</Tabs>
107+
108+
109+
## Synchronizing Songs
110+
111+
The more complex the song, the more time is needed for synchronizing it properly. But assuming that your music notation and your audio should generally match the effort of synchronizing can be reduced
112+
drastically if done correctly.
113+
114+
The first two most important steps are applied by the editor when you load an audio file:
115+
116+
1. Create Sync Points according to the audio start and end
117+
2. Create Sync Points for all tempo changes and place them according to the played speed.
118+
119+
If the music notation and audio match, you typically do not need any more sync points than these to get already a decent result. If there are some further inaccuracies they might need correction. Typical problems and solutions are:
120+
121+
---
122+
123+
**Problem:** In live recordings when the band improvises. In this case obviously the music notation might not match if they decide to stretch the solo or repeat a chorus.
124+
125+
**Solution 1:** Best would be to adjust the music sheet to match again the actually played parts.
126+
127+
**Solution 2:** Pick any bar(s) and make them artificially slower/faster to pick up the right spot when the music sheet matches again. e.g. you might use a time signature marker to have the bar mostly shown correct, and then stretch this bar as long as needed until the band continues normally.
128+
129+
---
130+
131+
**Problem:** There are instruction parts where a teacher might explain something inbetween.
132+
133+
**Solution 1:** If you manually control the external media synchronization (via `IExternalMediaHandler`) you could adjust the time reported to alphaTab so that it quasi stops playing and moving the cursor.
134+
135+
**Solution 2:** Add an empty bar in the song for the time of this explanation and then stretch this part accordingly with sync points.
136+
137+
**Solution 3:** Stretch an existing bar by using the time signature markers.
138+
139+
---
140+
141+
**Problem:** The audio is from a cover which is not played accurately and there are slips in tempos. This can be on purpose for artistic purposes (e.g. swing style or improvisation) or accidentally.
142+
143+
**Solution:** First add bar markers before and after the affected bar. Then additionally place time signature markers according to the real playback.
144+
145+
---
146+
147+
Generally it is discouraged to add too many markers (e.g. for every bar). It's unlikely that the tempo changes constantly and needs adjustment. Rather pick a range where you expect the tempo to be roughtly equal,
148+
mark it with two sync points and place them accordingly.
149+
150+
The general recommendation to place markers correctly is:
151+
152+
1. Seek the player to some bars before the spot where the marker should roughly be. This can be done by clicking at the right spot in the music sheet or in the wave form.
153+
2. Start the playback but rather ignore what you see on the cursor and music sheet. Listen closely and watch the playback cursor in the waveform.
154+
3. When the right note/chord is played remember the position on screen.
155+
4. Move the sync point marker to the spot.
156+
5. Repeat the playback again and check if the spot matches. If required zoom in and tweak the precise position a bit.
157+
6. Seek the player back to the previous sync point and let the song play until your new sync point.
158+
7. Check if the cursor and audio now match up.
159+
160+
Repeat this for all markers until things match up. Then continue with any fine-tuning on time signature marker level if required.
161+
162+
> [!TIP]
163+
> You can change the playback speed in the **Settings** panel if songs are too fast.
12.9 KB
Binary file not shown.
508 KB
Binary file not shown.
105 KB
Loading

0 commit comments

Comments
 (0)