skip to content

Sample

Converts a sound file into a buffer that can be triggered as a sound by an instrument.

class
Sample
extends
Base
tag
<sample-blam>
see

Props

name type default description
src string

The path to the sample sound file. Typically, this would be an mp3.

root string C4

The note the sample represents, if it is tonal. Used for calculating pitch changes.

reverse boolean false

Whether to save a reversed version of the sample as well. Used with instruments’ reverse property, which sets the probability of samples being played in reverse.

Events

type description
blamsource

Fired when the buffer has been created. The buffer itself is passed in the event data.

Examples

Examples that use the Sample element: