Skip to content

Class AuditySample

A playable sample: an AudioClip plus how Audity plays it - source mode, loop region and per-sample trims. Pure authoring data (no runtime behavior of its own): Wave Players reference samples and the compiler bakes each one into the program’s clip table, so the loop and trims travel with the sample wherever it is used. One sample can be shared by any number of players and graphs.

Declaration
[Icon("Packages/com.darkeffekt.audity/Editor/Icons/Assets/AuditySample.png")]
public sealed class AuditySample : ScriptableObject

Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.ScriptableObject

Declaration
public AudioClip clip

Source tier; Auto lets the compiler’s planner decide (short → baked, long → paged, unreadable → streamed).

Declaration
public AuditySourceMode sourceMode
Declaration
public AudityLoopSettings loop
Declaration
[Tooltip("Tail Start: the sample's musical end. Stop jumps here (the tail plays out); a chained section hands off here; audio after it rings under the successor. Unset = clip end.")]
public AudityOutPointSettings outPoint
Declaration
public AudityMusicSettings music
Declaration
public AudityChannelRemapSettings remap

Gain trim in dB, applied per voice on top of the player’s gain.

Declaration
[Range(-60, 12)]
public float gain

Pitch trim in semitones, applied per voice on top of the player’s pitch.

Declaration
[Range(-48, 48)]
public float pitch