← Back to Docs
  • index.html
  • Clayground
  • Clayground.Sound
  • SampleInstrument
  • Clayground 2026.2
  • SampleInstrument QML Type

    PCM sample playback with loop points, root note, and ADSR. More...

    Import Statement: import Clayground.Sound

    Detailed Description

    Loads a WAV from source and lets you play it at any pitch, with optional loop region, shaped by an ADSR envelope on top of the sample.

    Properties

    Path to a WAV file. Reloaded on change.

    MIDI note number that plays the sample at its native rate. Default: 60 (C4).

    Looping configuration. loopStart / loopEnd are fractions in 0..1 of the sample length.

    ADSR (attack/release only for now) applied on top of sample playback.

    Methods

    See also SynthInstrument and SongPlayer.