Skip to content

Sample Methods

This content is for v0.7. Switch to the latest version for up-to-date documentation.

Velocity controls how hard a sample is hit.

MethodVelocityDescription
vel(v)CustomSet velocity (0 to infinity)
ghost()0.3Ghost note (quiet)
soft()0.5Soft hit
accent()1.0Accented hit
loud()1.2Loud hit
drums << [bd.loud sd.soft]; // Loud kick, soft snare
drums << [bd.ghost sd.accent]; // Ghost kick, accented snare
drums << [bd.vel(0.7) sd.vel(1.5)]; // Custom velocities
MethodDescription
slice(start, end)Play portion of sample [0-1 range]
reverse()Play sample backwards
pitch(semitones)Pitch shift sample
pan(position)Set stereo position [-1.0 to 1.0]
drums << [bd.pitch(12) sd]; // Kick up one octave
drums << [bd.pitch(-5) sd]; // Kick down a fifth
drums << [bd.pan(-1) sd.pan(1)]; // Kick left, snare right
drums << [bd.reverse()]; // Reverse kick

Methods can be chained for complex transformations:

drums << [bd.loud.pan(-0.3) sd.soft.pitch(2)];
drums << [hh.ghost.pan(-0.5) hh.ghost.pan(0.5)]; // Stereo hats