build_sampled_instrument
Turn pitched sample files into a playable melodic instrument by mapping them across keys, tuning to actual pitch, and adding velocity, note-offs, and release for melodic parts.
Instructions
Builds a playable instrument from pitched sample files (strings, brass, pizzicato, choir, a sampled synth...): each sample covers a stretch of keys and follows the keyboard, tuned from the pitch it actually plays (measured by ear, with cents; sample file names are sometimes an octave off), with velocity response, note-offs and a release. Better than build_drum_kit for melodic parts, which plays each sample on one key at its own pitch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reach | No | Semitones the lowest and highest samples stretch beyond their pitch (past ~6 they sound unnatural) | |
| track | Yes | Track to put it on (created if there's none by that name) | |
| samples | Yes | Pitched samples of one instrument and articulation, e.g. a multisample set from find_samples (cello sustains at several pitches); one sample works too, over a smaller range | |
| low_note | No | Or the lowest note to cover, e.g. 'C2' | |
| high_note | No | And the highest, e.g. 'G5' | |
| release_s | No | Release after note-off (strings ~0.3, pizzicato/plucks ~0.15, pads ~1) | |
| velocity_db | No | Level at the softest velocity: -18 is expressive, 0 ignores velocity |