Page tree
Skip to end of metadata
Go to start of metadata

ms2samples(ms)

Description

Function to convert a duration in milliseconds to the equivalent number of samples. The conversion takes into account the sample rate at which the plug-in runs.

Available in: Processor.

Arguments

msThe duration in milliseconds.number

Return Values

Returns the number of samples that is the equivalent of the specified duration in milliseconds.

Example

-- print the duration in number of samples
function onNote(event)
    print(ms2samples(1000), "samples")
end
See Also: samples2ms, ms2beat, beat2ms

1 Comment