Samples and sample sets
A Wave Player plays Samples. A Sample is an audio clip plus how it should loop, where its release tail starts, and how loud and high it plays. Group several Samples into a Sample Set and the Wave Player picks one per trigger. This page covers all three, plus runtime banks for streaming content in and out.
Making a Sample
Section titled “Making a Sample”Select one or more AudioClips and choose Assets > Create > Audity > Sample:
Audity creates one Sample per clip, named after the clip and saved beside it.
With nothing selected, the menu makes an empty Sample.
Importing file metadata
Section titled “Importing file metadata”When you create a Sample from a clip, Audity reads useful metadata from the
source audio file. WAV acid and smpl chunks can provide tempo and loop
points. AIFF and AIFC files can provide loop points, and Apple Loops metadata
can provide tempo.
After creation, the Sample inspector offers file settings instead of silently
overwriting your work. Choose Use to take settings into an empty field or
Replace to replace an authored tempo or loop. If the file has no tempo but
its name contains a value such as 120bpm, the inspector suggests that BPM for
you to accept.
The Sample inspector has these sections.
Clip and tier
Section titled “Clip and tier”Assign the Clip, then pick a Source Mode (the tier). Auto is usually right; the inspector shows a readout of what Auto will choose:
- In-Memory - the clip is decoded up front into memory. Enables pitch, loop regions and crossfaded loops, and sample-exact triggering. Best for short, frequent sounds.
- Streamed - the clip plays through its own generator, pulled and resampled for pitch. Whole-clip looping only, one voice. Best for long one-shots and music where you do not need region loops.
- Paged - on-demand paging from a Decompress-On-Load clip, giving full In-Memory features for long clips without holding the whole thing decoded.
- Auto - the compiler chooses per clip: unreadable clips stream, long readable clips page, everything else is In-Memory.
See Performance and limits for the tradeoffs.
Set Mode to Off, Whole Clip, or Region.
- Region exposes Start and End in samples. Region loops are In-Memory only; the compiler rejects an empty region (End at or before Start).
- Any looping mode exposes Crossfade (seconds) and Crossfade Power. A crossfade blends the loop tail into the head so the seam is inaudible. Power warps the curve: 1 is unwarped equal-power, below 1 crosses early then lingers, above 1 holds then crosses late.
Tail Start
Section titled “Tail Start”Enable Tail Start to mark the beginning of the release tail. When a Stop arrives before the voice reaches the marker, the voice crossfade-jumps to the marker so a Stop always lands on the authored tail; a voice already past it just fades. Set Position (samples) and a Crossfade for the jump.
Gain (dB) and Pitch (semitones) trims apply per voice, on top of the Wave Player’s own gain and pitch.
The waveform editor
Section titled “The waveform editor”With a clip assigned, the Sample inspector shows its waveform, and you set loop points and the Tail Start by dragging directly on it.
- Loop start / loop end are flags along the top of the waveform. Drag them horizontally. When the Sample has a BPM they snap to the beat grid; otherwise they snap to the nearest zero crossing so loops do not click. Hold Shift while dragging to bypass snapping. The region outside the loop is dimmed.
- The crossfade grip sits at the bottom of the loop region. Drag it right to set the crossfade length, or up and down to set the curve power (up holds longer before crossing, down crosses earlier). It commits to whichever direction you move first. The crossfade zone draws the actual fade curves and a ghost of the incoming material; if the crossfade is longer than half the loop it turns red to warn you it will be clamped.
- Tail Start is a lavender flag. It follows the same beat-grid or zero-crossing snap as the loop flags and has its own crossfade grip.
- A whole-clip loop shows only the crossfade grip (there is no region to place).
While a Sample auditions, a thin white playhead line sweeps across the waveform so you can see exactly where the loop wraps and where a Stop jumps to the Tail Start.
The Sample Editor window
Section titled “The Sample Editor window”Double-click a Sample asset, or use the expand button on its inspector waveform, to open the dedicated Sample Editor. It shows every channel in its own waveform lane with wheel zoom, drag panning, and a Fit control. The same Sample settings remain available in the side panel, and the audition transport and playhead let you hear and inspect edits without switching windows.
Auditioning a Sample
Section titled “Auditioning a Sample”The Sample inspector has an Audition toggle. It plays the Sample through a throwaway graph (Wave Player into Output) so loop, Tail Start, crossfade, gain and pitch all sound exactly as they will in a real graph. Clicking it again fires the Wave Player’s stop, so you can hear and see the jump to the Tail Start.
Sample Sets
Section titled “Sample Sets”A Sample Set is a group of Samples plus a rule for picking one. It answers “what plays and how is it chosen”; the Wave Player answers “how a shot behaves”.
Every Wave Player has a Sample Set inline, so the drop-one-clip flow needs no extra asset. When you want to reuse a set across graphs, promote it:
- Extract Sample Set on the Wave Player saves its inline set as a shared
Sample Setasset and repoints the player at it. - Assets > Create > Audity > Sample Set From Selection builds a set asset from selected clips or Samples.
A Sample Set has:
- Entries - each a source (a clip, a Sample, or a custom generator) with a Weight (0 to 1; 0 disables the entry). A Sound Graph cannot be an entry; compose graphs with a Sub Graph node instead.
- Selection - how the Wave Player picks per trigger:
- Random - weighted random, avoiding the previous pick.
- Shuffle - a weighted bag: every entry plays once before any repeats.
- Round Robin - array order, wrapping.
- Avoid Repeat - avoid the last N picks (Random and Shuffle; ignored by Round Robin).
Runtime banks
Section titled “Runtime banks”For content you swap in and out at runtime - a weapon’s sounds on equip, a character’s voice set - use a Sample Set interface member as a rebindable key and back it with a bank.
Expose a Sample Set member on the graph (see The interface and parameters) and wire it into the Wave Player’s source. A member left with default content plays that content; a member you bind at runtime plays whatever bank you point it at.
Banks are a residency system: you load a Sample Set into memory once, then bind any number of sources to it for free (a bind is a pointer repoint plus a refcount). Warm banks up front, and a pooled source can rebind per use with no load cost. Two identical sets share one resident bank (identity is a content hash). Runtime banks prepare In-Memory PCM; streaming-only clips and custom generators are skipped with a warning, so route those through compile-time content.
Channel width: a player’s wire width is fixed when the graph compiles. With
compile-time samples, the wire is their width; a rebindable player with no
compile-time content compiles as stereo. A bound bank whose entries are a
different width still plays - a mono entry fills both wire channels, a wider
entry keeps the wire’s channels and drops the extras - and AudityBank.Load
logs a warning for mixed-width sets. If a rebindable player should carry a
surround bank at full width, give it a compile-time sample of that width to set
the wire.
The bank and binding API (AudityBank.Load, AuditySource.BindSource,
AuditySource.Play(key, bank)) is on the Scripting guide.