Reference

Samples and slicing

Sample-playback forms for reversing, slicing, resampling, looping, and stretching recordings, and Studio's Sample Explorer and Samples tab for finding them.

Mora keeps operations on score time separate from operations on the sound a sample produces. This reference lists the sample-playback forms and what distinguishes them, then describes how Studio’s two sample browsers, the modal Sample Explorer and the persistent Samples tab, find and insert sounds.

Score time and sample playback

Temporal transformations act on score time. Audio-file parameters act on the resulting sound. For example, rev reverses a score, while sample-rev reverses sample playback.

chop, striate, slice, splice, scrub, begin, end, speed, sample-rev, and loop-at address different sample-playback tasks. Score reversal, resampling, and stretching are distinct operations.

Distinctions between forms

FormBehavior
revReverses the score. It is a temporal transformation.
sample-revReverses sample playback.
sliceSelects regions. It is not a pitch-preserving time stretch.
spliceFits regions by resampling, which can affect pitch.
hurryChanges score timing and sample read speed together.
loop-stretchSeparates time and pitch, within the limits of its optional native engine.
sample-loop, loop-regionDescribe real looping inside a prepared voice, not repeated new score events.
loop-passageRepeats and re-queries a fixed source-time window of the score. It does not loop an audio-file region inside an already-playing voice.

loop-stretch and its limits are described in the optional live-stretch engine. loop-passage is covered with the other score-level forms in arrangement and transitions.

Sample variants

In mini notation, :N after a sound selects a sample variant, not a pitch, as in "hh:0 hh:1 hh:2 hh:3". See mini notation.

Before slicing or looping

Slicing and looping need a long sample to work on. Mora does not distribute commercial sample collections; stems and sample libraries describes working with your own library.

Slice and region forms on this page are timed in score cycles. A stem’s :p slice notation is timed differently: by default one cycle of it lasts one source slice of the selected recording, while part slice notation uses ordinary Mora cycles.

Constructing a description does not prepare its native resources. Preparing audio explains prepare-audio.

Sample Explorer

Sample Explorer indexes configured sample roots and cached metadata, so a composition does not need filenames for every sound.

Sample Explorer and the Samples tab

Studio has two sample browsers (keys are shown with macOS modifiers):

  • Sample Explorer is a modal overlay opened with Cmd+P. It is described on this page.
  • Samples is a persistent tab of the inspector pane, opened with F6 or Cmd+Option+P. It shows original filenames, tags and the complete tag inventory, a waveform, explicit native preview, and PHALAR recommendations against the playing mix. See Samples inspector.

Indexing

The Explorer’s sources can be aligned with the sounds loaded by SuperDirt. WAV, AIFF, and FLAC headers supply basic metadata; optional external analysis adds derived features.

Searching

In Studio, Cmd+P opens Sample Explorer. Structured queries can combine fields such as BPM, duration, kind, and tags:

Text
bpm:120-140 kind:drum
dur:0.1-2 tag:vocals

With the optional embedding service, a query can also combine these constraints with a learned natural-language description. See learned search.

Inserting a result

Insertion is context-aware: an atom inside a sound pattern is different from a complete top-level (s ...) form.

  • An ordinary indexed sample, such as a one-shot, inserts as a bare name inside (s ...) or a mini-notation string, and as a complete (s "name") form elsewhere.
  • A registered loop from the current loops selection inserts as a keyword stem form with :type and :n, plus :v when loops groups recordings by family. It is not inserted as raw s playback of its sound bank.
  • With the cursor on an existing stem or part selector, the chosen source changes that call in place and keeps its slices, matching, filters, and routing.

Insertion never evaluates the code. A source that is not eligible at the cursor is refused rather than substituted. Samples inspector lists the exact rules.

Auditioning

Auditioning is a separate action that uses its own audio socket and configured output orbit. Search results do not play automatically.

In the Samples tab, Space or Preview native plays the selected recording at its native tempo and key. It is not a matched audition against the playing mix.

Source references

Repository-relative paths in the Mora source where these mechanisms are implemented.

  • src/mini/sample-loop.lisp
  • src/samples/
  • src/samples-studio/insertion.lisp
  • src/samples-studio/sample-browser.lisp

Documentation

Search the documentation

Results update as you type. Use the up and down arrow keys to choose a result and Enter to open it.