snd.read {rPraat} | R Documentation |
snd.read
Description
Loads sound file (.wav or .mp3) using tuneR package.
Usage
snd.read(
fileNameSound,
fileType = "auto",
from = 1,
to = Inf,
units = "samples"
)
Arguments
fileNameSound |
Sound file name (.wav or .mp3) |
fileType |
|
from |
Where to start reading in |
to |
Where to stop reading in |
units |
Units of |
Value
Sound object with normalized amplitude (PCM / 2^(nbits-1) - 1) resulting to the range of [-1; +1]. In fact, the minimum value can be one quantization step lower (e.g. PCM 16bit: -32768).
t
... vector of discrete time instances (seconds)
sig
... signal matrix (nrow(snd$sig)
= number of samples, ncol(snd$sig)
= number of channels, i.e., $sig[, 1]
... 1st channel)
fs
... sample rate (Hz)
nChannels
... number of signal channels (ncol(snd$sig)
), 1 == mono, 2 == stereo
nBits
... number of bits ped one sample
nSamples
... number of samples (nrow(snd$sig)
)
duration
... duration of signal (seconds), snd$duration == snd$nSamples/snd$fs
See Also
snd.write
, snd.plot
, snd.cut
, snd.getPointIndexNearestTime
Examples
## Not run:
snd <- snd.read("demo/H.wav")
snd.plot(snd)
## End(Not run)