write.sample | R Documentation |
Write a PTSample
as a "wav", "8svx" or "raw" audio file.
## S4 method for signature 'PTSample,character'
write.sample(sample, filename, what = c("wav", "8svx", "raw"))
sample |
A |
filename |
A |
what |
A |
This method provides a wrapper for the tuneR::writeWave
method
from tuneR::tuneR
. It also provides the means to export audio
to file formats native to the Commodore Amiga. PTSample
s can be
exported as simple (uncompressed) 8svx
files also known as "iff" files). In addition they can be exported as raw data,
where each byte simply represents a signed integer value of the waveform.
Saves the audio to a file, but returns nothing.
Pepijn de Vries
Other sample.operations:
PTSample-class
,
PTSample-method
,
fineTune()
,
loopLength()
,
loopSample()
,
loopStart()
,
loopState()
,
name
,
playSample()
,
read.sample()
,
sampleLength()
,
volume()
,
waveform()
Other io.operations:
read.module()
,
read.sample()
,
write.module()
## Not run:
data("mod.intro")
## Export the second sample of mod.intro as a wav file:
write.sample(PTSample(mod.intro, 2), "snaredrum.wav", "wav")
## Export the second sample of mod.intro as an 8svx file:
write.sample(PTSample(mod.intro, 2), "snaredrum.iff", "8svx")
## Export the second sample of mod.intro as a raw file:
write.sample(PTSample(mod.intro, 2), "snaredrum.raw", "raw")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.