write.instrument | R Documentation |
Write each sound sample of the instrument as a separate .wav or .mp3 file.
write.instrument(inst, dir = tempdir(), fmt = "wav")
inst |
Instrument object. |
dir |
String, directory where files should be written. |
fmt |
String, 'wav' or 'mp3'. |
nothing - writing function.
# Create an instrument
drumset <- instrument(samples=list(kick,snare,hiHat),notes=c('boom','tat','cheet'))
# Write to files (one per element)
write.instrument(drumset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.