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:
- path string
Returns:
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.