instrument: Instrument constructor.

View source: R/class_instrument.R

instrumentR Documentation

Instrument constructor.

Description

Creates a new instance of an 'instrument' object. An instrument is a named list of sound samples (all with the same sampling rate).

Usage

instrument(samples, notes = as.character(1:length(samples)))

Arguments

samples

list of sound samples

notes

string vector, name given to each sample

Value

An object of class 'Instrument'.

Examples

drumset <- instrument(samples=list(kick,snare,hiHat),notes=c('boom','tat','cheet'))

benRenard/sequenceR documentation built on Jan. 11, 2025, 2:33 a.m.