ms2samples | R Documentation |
Convert time to number of samples or vice versa in sound files.
ms2samples(value, fs = 300000, tx = 1, inv = FALSE)
value |
Integer. Number of samples or time in ms. |
fs |
Integer. The sampling frequency in samples per second. |
tx |
Integer. Indicating the time expansion factor. If the recording is not time expanded tx must be set to 1 (the default). |
inv |
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.
Bruno Silva
ms2samples(150000, fs = 300000, tx = 1, inv = FALSE) ms2samples(100, fs = 300000, tx = 1, inv = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.