alphaTab.synth.IBackingTrackSynthOutput
A synth output for playing backing tracks.
interface IBackingTrackSynthOutput extends ISynthOutputProperties​
backingTrackDuration​
The total duration of the backing track in milliseconds.
- JavaScript
- C#
- Kotlin
readonly backingTrackDuration: number;double BackingTrackDuration { get; }val backingTrackDuration: DoublemasterVolume​
The volume at which the output should play (0-1)
- JavaScript
- C#
- Kotlin
masterVolume: number;double MasterVolume { get; set; }var masterVolume: DoubleplaybackRate​
The playback rate at which the output should playback.
- JavaScript
- C#
- Kotlin
playbackRate: number;double PlaybackRate { get; set; }var playbackRate: Doubleready​
Fired when the output has been successfully opened and is ready to play samples. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
sampleRate​
Gets the sample rate required by the output. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
readonly sampleRate: number;double SampleRate { get; }val sampleRate: DoublesampleRequest​
Fired when the output needs more samples to be played. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
readonly sampleRequest: IEventEmitter;IEventEmitter SampleRequest { get; }val sampleRequest: IEventEmittersamplesPlayed​
Fired when a certain number of samples have been played. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
readonly samplesPlayed: IEventEmitterOfT<number>;IEventEmitterOfT<double> SamplesPlayed { get; }val samplesPlayed: IEventEmitterOfT<Double>timeUpdate​
An event fired when the playback time changes. The time is in absolute milliseconds.
- JavaScript
- C#
- Kotlin
readonly timeUpdate: IEventEmitterOfT<number>;IEventEmitterOfT<double> TimeUpdate { get; }val timeUpdate: IEventEmitterOfT<Double>Methods​
activate​
Activates the output component. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
activate(): voidvoid Activate()fun activate(): UnitaddSamples​
Called when samples have been synthesized and should be added to the playback buffer. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
addSamples(samples: Float32Array): voidvoid AddSamples(Float32Array samples)fun addSamples(samples: Float32Array): Unit| Parameter | Summary |
|---|---|
samplesAll | (no description) |
destroy​
Requests the output to destroy itself. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
destroy(): voidvoid Destroy()fun destroy(): UnitenumerateOutputDevices​
Loads and lists the available output devices. Will request permissions if needed. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
enumerateOutputDevices(): Promise<ISynthOutputDevice[]>System.Threading.Task<IList<ISynthOutputDevice>> EnumerateOutputDevices()suspend fun enumerateOutputDevices(): alphaTab.collections.List<ISynthOutputDevice>getOutputDevice​
The currently configured output device if changed via setOutputDevice . (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
getOutputDevice(): Promise<ISynthOutputDevice | null>System.Threading.Task<ISynthOutputDevice?> GetOutputDevice()suspend fun getOutputDevice(): ISynthOutputDevice?Returns​
The custom configured output device which was set via setOutputDevice or null
if the default outputDevice is used.
The output device might change dynamically if devices are connected/disconnected (e.g. bluetooth headset).
loadBackingTrack​
Instructs the output to load the given backing track.
- JavaScript
- C#
- Kotlin
loadBackingTrack(backingTrack: BackingTrack): voidvoid LoadBackingTrack(BackingTrack backingTrack)fun loadBackingTrack(backingTrack: BackingTrack): Unit| Parameter | Summary |
|---|---|
backingTrackAll | The backing track to load. |
open​
Called when the output should be opened. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
open(bufferTimeInMilliseconds: number): voidvoid Open(double bufferTimeInMilliseconds)fun open(bufferTimeInMilliseconds: Double): Unit| Parameter | Summary |
|---|---|
bufferTimeInMillisecondsAll | (no description) |
pause​
Called when the output should stop the playback. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
pause(): voidvoid Pause()fun pause(): Unitplay​
Called when the output should start the playback. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
play(): voidvoid Play()fun play(): UnitresetSamples​
Called when the samples in the output buffer should be reset. This is neeed for instance when seeking to another position. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
resetSamples(): voidvoid ResetSamples()fun resetSamples(): UnitseekTo​
Instructs the output to seek to the given time position.
- JavaScript
- C#
- Kotlin
seekTo(time: number): voidvoid SeekTo(double time)fun seekTo(time: Double): Unit| Parameter | Summary |
|---|---|
timeAll | The absolute time in milliseconds. |
setOutputDevice​
Changes the output device which should be used for playing the audio. (Inherited from ISynthOutput )
- JavaScript
- C#
- Kotlin
setOutputDevice(device: ISynthOutputDevice | null): Promise<void>System.Threading.Task<void> SetOutputDevice(ISynthOutputDevice? device)suspend fun setOutputDevice(device: ISynthOutputDevice?): Unit| Parameter | Summary |
|---|---|
deviceAll | The output device to use, or null to switch to the default device. |