Overview of the Voice class
Voice represents a group of beats that can be played during a specific bar.website·Indexed 33 days ago
https://alphatab.netAPI reference and type definitions for alphaTab, featuring music notation engraving, audio playback settings, and the alphaTex parser for translating source into an AST. Includes detailed JSON settings for engraving, display, notation, and player behavior, as well as platform-specific canvas interfaces.
Voice represents a group of beats that can be played during a specific bar.MidiFile through an ISynthOutput implementation. It extends AlphaSynthBase and provides a comprehensive set of properties and methods for controlling MIDI playback, volume, and state.class AlphaSynth extends AlphaSynthBaseIUiFacade<TSettings> interface represents the UI abstraction between alphaTab and the corresponding UI framework. It is used to decouple the core music notation logic from the platform-specific UI implementation.interface IUiFacade<TSettings>Track class represents a single track or instrument within a musical score. It primarily consists of a list of staves that contain individual music notation elements.The EngravingSettings class manages the spacing, thickness, and scaling metrics used for engraving music notation in alphaTab. These settings provide fine-grained control over individual music symbols to ensure compliance with the Standard Music Font Layout (SMuFL).
Key concepts:
EngravingSettings converts these values to pixels.class EngravingSettingsIBackingTrackSynthOutput interface is used for managing and playing backing tracks. It extends ISynthOutput, inheriting general audio output capabilities while adding specific controls for backing track duration, loading, and seeking.interface IBackingTrackSynthOutput extends ISynthOutputThe EngravingSettingsJson interface is used to configure detailed spacing, thickness, and scaling metrics for individual music symbols. These settings allow for precise control over visual rendering and ensure compliance with the Standard Music Font Layout (SMuFL).
Key concepts:
EngravingSettingsJson are converted to pixels.interface EngravingSettingsJsonThe EngravingSettings class manages the spacing, thickness, and scaling metrics used to engrave music notation. While general layout is handled via display settings, EngravingSettings provides deep control over individual music symbols to maintain compliance with the Standard Music Font Layout (SMuFL).
In SMuFL, sizes and coordinates are expressed in 'staff space' units (1/4 of the configured font size); however, within the EngravingSettings data structure, these values are converted to pixels.
MidiTickLookup class tracks when MasterBar and Beat objects are played. It organizes data into MasterBarTickLookup objects (defining start/end times for bars) and BeatTickLookup objects (slices of a masterbar separated by voices and beats across all tracks). This structure allows the system to determine which beats are active at a specific MIDI tick, which is essential for rendering the playback cursor and highlighting active beats based on visible tracks.AlphaTexParser class is used to translate alphaTex source strings into an Abstract Syntax Tree (AST). This AST is subsequently used by alphaTex importers, editors, and other related components to process musical notation.// The AlphaTexParser class is used for translating alphaTex source into an ASTMidiFile through an ISynthOutput implementation.class AlphaSynthBase implements IAlphaSynth