Class sample

Load audio samples.

local msample = require 'melisma.sample'

local smp = msample.load('sample.wav')

print(smp:length())
print(smp:path())

Functions

sample.load(path) Load an audio sample.

Methods

sample:length() Get sample length.
sample:path() Get sample path.


Functions

Methods
sample.load(path)
Load an audio sample.

If necessary, the audio will be resampled to the current sample rate.

Parameters:

Returns:

    sample

Methods

sample:length()
Get sample length.

Returns:

    number The length of the sample in seconds.
sample:path()
Get sample path.

Returns:

    string The path that the sample was loaded from.
generated by LDoc 1.5.0 Last updated 1980-01-01 00:00:00