powered by
Convert time to number of samples or vice versa in sound files.
ms2samples(value, fs = 300000, tx = 1, inv = FALSE)
Integer. Number of samples or time in ms.
Integer. The sampling frequency in samples per second.
Integer. Indicating the time expansion factor. If the recording is not time expanded tx must be set to 1 (the default).
Logical. If TRUE converts time to number of samples, if FALSE number of samples to time.
Integer. If inv = TRUE returns number of samples, if inv = FALSE returns time in ms.
# NOT RUN { ms2samples(150000, fs = 300000, tx = 1, inv = FALSE) ms2samples(100, fs = 300000, tx = 1, inv = TRUE) # }
Run the code above in your browser using DataLab