From 039847a29868d335c08fe0a587260dffc71ca5c4 Mon Sep 17 00:00:00 2001 From: Ludvig Gunne Lindström Date: Fri, 17 Jul 2026 11:43:24 +0200 Subject: init --- doc/classes/sample.html | 203 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 doc/classes/sample.html (limited to 'doc/classes/sample.html') diff --git a/doc/classes/sample.html b/doc/classes/sample.html new file mode 100644 index 0000000..313d14d --- /dev/null +++ b/doc/classes/sample.html @@ -0,0 +1,203 @@ + + + + + Melisma modules + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

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 +
+
+ + -- cgit v1.3.1