Scripting API

Scripting API

PlayOptions

Record struct in Abyss.Core, from Abyss.Core.

How a sound is played: how loud and how high, whether it loops and fades in, and, played in the world, how it falls off with its distance from the listener.

public readonly record struct PlayOptions

Constructors

PlayOptions

public PlayOptions()

How a sound is played: how loud and how high, whether it loops and fades in, and, played in the world, how it falls off with its distance from the listener.

Properties

Volume

public float Volume { get; init; }

How loud, from 0, silent, to 1, the clip as it is.

Pitch

public float Pitch { get; init; }

How fast, and so how high: 1 is the clip as it is, 2 an octave up and twice as fast.

Pan

public float Pan { get; init; }

Where between the speakers, from -1, the left, to 1, the right.

Loop

public bool Loop { get; init; }

Whether it plays again from the start each time it ends, until it is stopped.

FadeIn

public float FadeIn { get; init; }

How many seconds it takes to come up from silence.

SpatialBlend

public float SpatialBlend { get; init; }

Played in the world, how much of a 3D sound it is: 0 heard as a 2D sound is, 1 panned and fallen off by where it is.

MinDistance

public float MinDistance { get; init; }

Played in the world, how near it is heard at its whole volume.

MaxDistance

public float MaxDistance { get; init; }

Played in the world, how far its volume falls to what it ends at.

Rolloff

public Rolloff Rolloff { get; init; }

Played in the world, how its volume falls between the two.

Start

public float Start { get; init; }

How many seconds into its clip it starts.

Bus

public string? Bus { get; init; }

The bus of the game's mix it plays on, by its name as the Audio tab shows it: "SFX". Null for Master; a bus the mix has not plays it on Master, and the log says so.