Skip to content

Commit fba076f

Browse files
authored
docs: Improve search and reference doc structure (#159)
1 parent dec2936 commit fba076f

166 files changed

Lines changed: 1641 additions & 1999 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/guides/audio-export.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ The audio exporter follows an asynchronous pull pattern:
3434
To export the audio you follow tree main steps:
3535

3636
1. You start a new exporter with [`await api.exportAudio(...)`](/docs/reference/api/exportaudio.mdx).
37-
2. You call [`exporter.render(<milliseconds>)`](/docs/reference/types/synth/iaudioexporter/render.mdx) to produce a chunk of audio which you can then process further. (repeated until end is reached).
38-
3. You cleanup the exporter via [`exporter.destroy()`](/docs/reference/types/synth/iaudioexporter/destroy.mdx). The exporter also implements `Disposable` (`IDisposable` for C#, `AutoCloseable` for `Kotlin`) which allows easy cleanup via language features if supported.
37+
2. You call [`exporter.render(<milliseconds>)`](/docs/reference/types/synth/iaudioexporter#render) to produce a chunk of audio which you can then process further. (repeated until end is reached).
38+
3. You cleanup the exporter via [`exporter.destroy()`](/docs/reference/types/synth/iaudioexporter#destroy). The exporter also implements `Disposable` (`IDisposable` for C#, `AutoCloseable` for `Kotlin`) which allows easy cleanup via language features if supported.
3939

4040
> [!WARNING]
4141
> The raw audio samples for a whole song can consume quite a huge amount of memory: A calculation example:
@@ -52,14 +52,14 @@ To export the audio you follow tree main steps:
5252

5353
The [`AudioExportOptions`](/docs/reference/types/synth/audioexportoptions/index.mdx) allow customizing various aspects of the audio exported:
5454

55-
* [`soundFonts`](/docs/reference/types/synth/audioexportoptions/soundfonts.mdx) can be used to customize the soundfonts used during export.
56-
* [`sampleRate`](/docs/reference/types/synth/audioexportoptions/samplerate.mdx) can be used to customize the sample rate of the exported audio.
57-
* [`useSyncPoints`](/docs/reference/types/synth/audioexportoptions/usesyncpoints.mdx) controls whether the sync points of the currently loaded song are appled during audio generation.
58-
* [`masterVolume`](/docs/reference/types/synth/audioexportoptions/mastervolume.mdx) controls the master volume of the generated audio.
59-
* [`metronomeVolume`](/docs/reference/types/synth/audioexportoptions/metronomevolume.mdx) controls the volume of the metronome ticks. (keep in mind that the use of `useSyncPoints` changes the audio duration, the metronome is aligned with the music notes, not with the synthesized audio)
60-
* [`playbackRange`](/docs/reference/types/synth/audioexportoptions/playbackrange.mdx) controls the audio range which is exported.
61-
* [`trackVolume`](/docs/reference/types/synth/audioexportoptions/trackvolume.mdx) controls the volume of every track (percentage-wise to the already configured absolute volume)
62-
* [`trackTranspositionPitches`](/docs/reference/types/synth/audioexportoptions/tracktranspositionpitches.mdx) controls an additional transposition pitch for the tracks.
55+
* [`soundFonts`](/docs/reference/types/synth/audioexportoptions#soundfonts) can be used to customize the soundfonts used during export.
56+
* [`sampleRate`](/docs/reference/types/synth/audioexportoptions#samplerate) can be used to customize the sample rate of the exported audio.
57+
* [`useSyncPoints`](/docs/reference/types/synth/audioexportoptions#usesyncpoints) controls whether the sync points of the currently loaded song are appled during audio generation.
58+
* [`masterVolume`](/docs/reference/types/synth/audioexportoptions#mastervolume) controls the master volume of the generated audio.
59+
* [`metronomeVolume`](/docs/reference/types/synth/audioexportoptions#metronomevolume) controls the volume of the metronome ticks. (keep in mind that the use of `useSyncPoints` changes the audio duration, the metronome is aligned with the music notes, not with the synthesized audio)
60+
* [`playbackRange`](/docs/reference/types/synth/audioexportoptions#playbackrange) controls the audio range which is exported.
61+
* [`trackVolume`](/docs/reference/types/synth/audioexportoptions#trackvolume) controls the volume of every track (percentage-wise to the already configured absolute volume)
62+
* [`trackTranspositionPitches`](/docs/reference/types/synth/audioexportoptions#tracktranspositionpitches) controls an additional transposition pitch for the tracks.
6363

6464
## Example
6565

docs/guides/formatting-templates.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import {FormattingTemplateSample} from '@site/src/components/FormattingTemplateS
3131

3232
The most important parts to know:
3333

34-
* The [`style`](/docs/reference/types/model/score/style) on [`alphaTab.model.Score`](/docs/reference/types/model/score) is used to adjust the style of the visual elements.
35-
* The [`headerAndFooter`](/docs/reference/types/model/scorestyle/headerandfooter) on [`alphaTab.model.ScoreStyle`](/docs/reference/types/model/scorestyle/) is used to adjust the text, visibility and alignment of the header and footer elements.
36-
* The [`colors`](/docs/reference/types/model/elementstyle/colors) on `alphaTab.model.ScoreStyle` is used to adjust the color of the header and footer elements (and others).
34+
* The [`style`](/docs/reference/types/model/score#style) on [`alphaTab.model.Score`](/docs/reference/types/model/score) is used to adjust the style of the visual elements.
35+
* The [`headerAndFooter`](/docs/reference/types/model/scorestyle#headerandfooter) on [`alphaTab.model.ScoreStyle`](/docs/reference/types/model/scorestyle/) is used to adjust the text, visibility and alignment of the header and footer elements.
36+
* The [`colors`](/docs/reference/types/model/elementstyle#colors) on `alphaTab.model.ScoreStyle` is used to adjust the color of the header and footer elements (and others).
3737
* The [`alphaTab.model.ScoreSubElement`](/docs/reference/types/model/scoresubelement) defines the possible list of elements to be styled (not all are song info related)
3838

3939
The `template` is a string which can have following placeholders which are then replaced with the respective info of the song:

docs/reference/_apiTable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ import { Signature } from "@site/src/components/Signature";
410410
</a>
411411
</td>
412412
<td>
413-
The currently configured output device if changed via <Signature style="inline" js={[["identifier","setOutputDevice"]]} />.
413+
The currently configured output device if changed via <Signature style="inline" js={[["identifier","setOutputDevice"]]}>setOutputDevice</Signature> .
414414
</td>
415415
</tr>
416416
<tr>

docs/reference/_settingsTable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import { Signature } from "@site/src/components/Signature";
3737
</a>
3838
</td>
3939
<td>
40-
Whether in the <Signature style="inline" js={[["identifier","BoundsLookup"]]} /> also the position and area of each individual note is provided.
40+
Whether in the <Signature style="inline" js={[["identifier","BoundsLookup"]]}>BoundsLookup</Signature> also the position and area of each individual note is provided.
4141
</td>
4242
</tr>
4343
<tr>

docs/reference/api/activebeatschanged.mdx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ sidebar_custom_props:
99
import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'
1010

1111
<SinceBadge since="1.2.3" />
12-
13-
### Description
14-
This event is fired when the currently active beats across all tracks change. Unlike the <Signature style="inline" js={[["identifier","playedBeatChanged","/docs/reference/types/alphatabapibase/playedbeatchanged"]]} /> event this event contains the beats of all tracks and voices independent of them being rendered.
12+
This event is fired when the currently active beats across all tracks change. Unlike the <Signature style="inline" js={[["identifier","playedBeatChanged","/docs/reference/types/alphatabapibase#playedbeatchanged"]]}>playedBeatChanged</Signature> event this event contains the beats of all tracks and voices independent of them being rendered.
1513

1614
<Signature style="block"
1715
js={[["keyword","readonly"],["whitespace"," "],["identifier","activeBeatsChanged"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","ActiveBeatsChangedEventArgs","/docs/reference/types/synth/activebeatschangedeventargs"],["token",">"],["token",";"]]}
@@ -31,28 +29,28 @@ This event is fired when the currently active beats across all tracks change. Un
3129
]}
3230
>
3331
<TabItem value="javascript">
34-
```js
35-
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
36-
api.activeBeatsChanged.on(args => {
37-
updateHighlights(args.activeBeats);
38-
});
32+
```js
33+
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
34+
api.activeBeatsChanged.on(args => {
35+
updateHighlights(args.activeBeats);
36+
});
3937
```
4038
</TabItem>
4139
<TabItem value="csharp">
42-
```cs
43-
var api = new AlphaTabApi<MyControl>(...);
44-
api.ActiveBeatsChanged.On(args =>
45-
{
46-
UpdateHighlights(args.ActiveBeats);
47-
});
40+
```cs
41+
var api = new AlphaTabApi<MyControl>(...);
42+
api.ActiveBeatsChanged.On(args =>
43+
{
44+
UpdateHighlights(args.ActiveBeats);
45+
});
4846
```
4947
</TabItem>
5048
<TabItem value="android">
51-
```kotlin
52-
val api = AlphaTabApi<MyControl>(...)
53-
api.activeBeatsChanged.on { args ->
54-
updateHighlights(args.activeBeats)
55-
}
49+
```kotlin
50+
val api = AlphaTabApi<MyControl>(...)
51+
api.activeBeatsChanged.on { args ->
52+
updateHighlights(args.activeBeats)
53+
}
5654
```
5755
</TabItem>
5856
</Tabs>

docs/reference/api/actualplayermode.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature, Prop
1010

1111
<SinceBadge since="1.6.0" />
1212
<PropertyDescription />
13-
14-
### Description
1513
The actual player mode which is currently active. Allows determining whether a backing track or the synthesizer is active in case automatic detection is enabled.
1614

1715
<Signature style="block"

docs/reference/api/beatmousedown.mdx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ sidebar_custom_props:
99
import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'
1010

1111
<SinceBadge since="0.9.7" />
12-
13-
### Description
1412
This event is fired whenever a the user presses the mouse button on a beat.
1513

1614
<Signature style="block"
@@ -31,28 +29,28 @@ This event is fired whenever a the user presses the mouse button on a beat.
3129
]}
3230
>
3331
<TabItem value="javascript">
34-
```js
35-
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
36-
api.beatMouseDown.on((beat) => {
37-
startSelectionOnBeat(beat);
38-
});
32+
```js
33+
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
34+
api.beatMouseDown.on((beat) => {
35+
startSelectionOnBeat(beat);
36+
});
3937
```
4038
</TabItem>
4139
<TabItem value="csharp">
42-
```cs
43-
var api = new AlphaTabApi<MyControl>(...);
44-
api.BeatMouseDown.On(beat =>
45-
{
46-
StartSelectionOnBeat(args);
47-
});
40+
```cs
41+
var api = new AlphaTabApi<MyControl>(...);
42+
api.BeatMouseDown.On(beat =>
43+
{
44+
StartSelectionOnBeat(args);
45+
});
4846
```
4947
</TabItem>
5048
<TabItem value="android">
51-
```kotlin
52-
val api = AlphaTabApi<MyControl>(...)
53-
api.beatMouseDown.on { beat ->
54-
startSelectionOnBeat(args)
55-
}
49+
```kotlin
50+
val api = AlphaTabApi<MyControl>(...)
51+
api.beatMouseDown.on { beat ->
52+
startSelectionOnBeat(args)
53+
}
5654
```
5755
</TabItem>
5856
</Tabs>

docs/reference/api/beatmousemove.mdx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ sidebar_custom_props:
99
import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'
1010

1111
<SinceBadge since="0.9.7" />
12-
13-
### Description
1412
This event is fired whenever the user moves the mouse over a beat after the user already pressed the button on a beat.
1513

1614
<Signature style="block"
@@ -31,28 +29,28 @@ This event is fired whenever the user moves the mouse over a beat after the user
3129
]}
3230
>
3331
<TabItem value="javascript">
34-
```js
35-
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
36-
api.beatMouseMove.on((beat) => {
37-
expandSelectionToBeat(beat);
38-
});
32+
```js
33+
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
34+
api.beatMouseMove.on((beat) => {
35+
expandSelectionToBeat(beat);
36+
});
3937
```
4038
</TabItem>
4139
<TabItem value="csharp">
42-
```cs
43-
var api = new AlphaTabApi<MyControl>(...);
44-
api.BeatMouseMove.On(beat =>
45-
{
46-
ExpandSelectionToBeat(beat);
47-
});
40+
```cs
41+
var api = new AlphaTabApi<MyControl>(...);
42+
api.BeatMouseMove.On(beat =>
43+
{
44+
ExpandSelectionToBeat(beat);
45+
});
4846
```
4947
</TabItem>
5048
<TabItem value="android">
51-
```kotlin
52-
val api = AlphaTabApi<MyControl>(...)
53-
api.beatMouseMove.on { beat ->
54-
expandSelectionToBeat(beat)
55-
}
49+
```kotlin
50+
val api = AlphaTabApi<MyControl>(...)
51+
api.beatMouseMove.on { beat ->
52+
expandSelectionToBeat(beat)
53+
}
5654
```
5755
</TabItem>
5856
</Tabs>

docs/reference/api/beatmouseup.mdx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ sidebar_custom_props:
99
import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'
1010

1111
<SinceBadge since="0.9.7" />
12-
13-
### Description
14-
This event is fired whenever the user releases the mouse after a mouse press on a beat. This event is fired regardless of whether the mouse was released on a beat.
12+
This event is fired whenever the user releases the mouse after a mouse press on a beat. This event is fired regardless of whether the mouse was released on a beat.
1513
The parameter is null if the mouse was released somewhere beside the beat.
1614

1715
<Signature style="block"
@@ -32,28 +30,28 @@ The parameter is null if the mouse was released somewhere beside the beat.
3230
]}
3331
>
3432
<TabItem value="javascript">
35-
```js
36-
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
37-
api.beatMouseUp.on((beat) => {
38-
hideSelection(beat);
39-
});
33+
```js
34+
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
35+
api.beatMouseUp.on((beat) => {
36+
hideSelection(beat);
37+
});
4038
```
4139
</TabItem>
4240
<TabItem value="csharp">
43-
```cs
44-
var api = new AlphaTabApi<MyControl>(...);
45-
api.BeatMouseUp.On(beat =>
46-
{
47-
HideSelection(beat);
48-
});
41+
```cs
42+
var api = new AlphaTabApi<MyControl>(...);
43+
api.BeatMouseUp.On(beat =>
44+
{
45+
HideSelection(beat);
46+
});
4947
```
5048
</TabItem>
5149
<TabItem value="android">
52-
```kotlin
53-
val api = AlphaTabApi<MyControl>(...)
54-
api.beatMouseUp.on { beat ->
55-
hideSelection(beat)
56-
}
50+
```kotlin
51+
val api = AlphaTabApi<MyControl>(...)
52+
api.beatMouseUp.on { beat ->
53+
hideSelection(beat)
54+
}
5755
```
5856
</TabItem>
5957
</Tabs>

docs/reference/api/boundslookup.mdx

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,29 @@ import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature, Prop
1010

1111
<SinceBadge since="1.5.0" />
1212
<PropertyDescription />
13-
14-
### Description
15-
The tick cache allowing lookup of midi ticks to beats. In older versions of alphaTab you can access the `boundsLookup` via <Signature style="inline" js={[["identifier","boundsLookup","/docs/reference/types/rendering/iscorerenderer/boundslookup"]]} /> on <Signature style="inline" js={[["identifier","renderer","/docs/reference/types/alphatabapibase/renderer"]]} />.
16-
17-
After the rendering completed alphaTab exposes via this lookup the location of the individual
18-
notation elements. The lookup provides fast access to the bars and beats at a given location.
19-
If the <Signature style="inline" js={[["identifier","CoreSettings.includeNoteBounds","/docs/reference/settings/core/includenotebounds"]]} /> option was activated also the location of the individual notes can be obtained.
20-
21-
The property contains a `BoundsLookup` instance which follows a hierarchical structure that represents
22-
the tree of rendered elements.
23-
24-
The hierarchy is: `staffSystems > bars(1) > bars(2) > beats > notes`
25-
26-
* `staffSystems` - Represent the bounds of the individual systems ("rows") where staves are contained.
27-
* `bars(1)` - Represent the bounds of all bars for a particular master bar across all tracks.
28-
* `bars(2)` - Represent the bounds of an individual bar of a track. The bounds on y-axis span the region of the staff and notes might exceed this bounds.
29-
* `beats` - Represent the bounds of the individual beats within a track. The bounds on y-axis are equal to the bar bounds.
30-
* `notes` - Represent the bounds of the individual note heads/numbers within a track.
31-
32-
Each bounds hierarchy have a `visualBounds` and `realBounds`.
33-
34-
* `visualBounds` - Represent the area covering all visually visible elements
35-
* `realBounds` - Represents the actual bounds of the elements in this beat including whitespace areas.
36-
* `noteHeadBounds` (only on `notes` level) - Represents the area of the note heads or number based on the staff
37-
13+
The tick cache allowing lookup of midi ticks to beats. In older versions of alphaTab you can access the `boundsLookup` via <Signature style="inline" js={[["identifier","boundsLookup","/docs/reference/types/rendering/iscorerenderer#boundslookup"]]}>boundsLookup</Signature> on <Signature style="inline" js={[["identifier","renderer","/docs/reference/types/alphatabapibase#renderer"]]}>renderer</Signature> .
14+
15+
After the rendering completed alphaTab exposes via this lookup the location of the individual
16+
notation elements. The lookup provides fast access to the bars and beats at a given location.
17+
If the <Signature style="inline" js={[["identifier","CoreSettings.includeNoteBounds","/docs/reference/settings/core/includenotebounds"]]}>CoreSettings.includeNoteBounds</Signature> option was activated also the location of the individual notes can be obtained.
18+
19+
The property contains a `BoundsLookup` instance which follows a hierarchical structure that represents
20+
the tree of rendered elements.
21+
22+
The hierarchy is: `staffSystems > bars(1) > bars(2) > beats > notes`
23+
24+
* `staffSystems` - Represent the bounds of the individual systems ("rows") where staves are contained.
25+
* `bars(1)` - Represent the bounds of all bars for a particular master bar across all tracks.
26+
* `bars(2)` - Represent the bounds of an individual bar of a track. The bounds on y-axis span the region of the staff and notes might exceed this bounds.
27+
* `beats` - Represent the bounds of the individual beats within a track. The bounds on y-axis are equal to the bar bounds.
28+
* `notes` - Represent the bounds of the individual note heads/numbers within a track.
29+
30+
Each bounds hierarchy have a `visualBounds` and `realBounds`.
31+
32+
* `visualBounds` - Represent the area covering all visually visible elements
33+
* `realBounds` - Represents the actual bounds of the elements in this beat including whitespace areas.
34+
* `noteHeadBounds` (only on `notes` level) - Represents the area of the note heads or number based on the staff
35+
3836
You can check out the individual sizes and regions.
3937

4038
<Signature style="block"

0 commit comments

Comments
 (0)