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.
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.
| Form | Behavior |
|---|---|
rev | Reverses the score. It is a temporal transformation. |
sample-rev | Reverses sample playback. |
slice | Selects regions. It is not a pitch-preserving time stretch. |
splice | Fits regions by resampling, which can affect pitch. |
hurry | Changes score timing and sample read speed together. |
loop-stretch | Separates time and pitch, within the limits of its optional native engine. |
sample-loop, loop-region | Describe real looping inside a prepared voice, not repeated new score events. |
loop-passage | Repeats 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.
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.
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 indexes configured sample roots and cached metadata, so a composition does not need filenames for every sound.
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.
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.
In Studio, Cmd+P opens Sample Explorer. Structured queries can combine fields such as BPM, duration, kind, and tags:
bpm:120-140 kind:drum
dur:0.1-2 tag:vocalsWith the optional embedding service, a query can also combine these constraints with a learned natural-language description. See learned search.
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
loopsselection inserts as a keywordstemform with:typeand:n, plus:vwhenloopsgroups recordings by family. It is not inserted as rawsplayback of its sound bank. - With the cursor on an existing
stemorpartselector, 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 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