Show raw api
{
"functions": [
{
"name": "set",
"desc": "Sets the current loop\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| volume | number | 1 | audio volume |\n\n### Start music silent\n```lua\nLoop.set(\"wind_kick\", { volume = 0.0 })\n```",
"params": [
{
"name": "id",
"desc": "loop identifier",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 35,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "stop",
"desc": "Stops the current loop",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 42,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "skip",
"desc": "Skips the current loop",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 48,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "preload",
"desc": "Loads the music file into cache",
"params": [
{
"name": "id",
"desc": "identifier string",
"lua_type": "string"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 55,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "beats_wait",
"desc": "Sleeps until the specified target",
"params": [
{
"name": "target",
"desc": "beats elapsed",
"lua_type": "number"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 140,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "measures_wait",
"desc": "Sleeps until the specified target",
"params": [
{
"name": "target",
"desc": "measures elapsed",
"lua_type": "number"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 169,
"path": "../../res/data/script/lib/system/loop.lua"
}
}
],
"properties": [
{
"name": "id",
"desc": "Get/Set the loop by identifier (e.g. \"wind\")",
"lua_type": "string",
"source": {
"line": 18,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "volume",
"desc": "Get/Set the loop volume in range [0, 1]",
"lua_type": "number",
"source": {
"line": 64,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "offset",
"desc": "Get/Set the music offset (s)",
"lua_type": "number",
"source": {
"line": 71,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "elapsed",
"desc": "Get/Set the elapsed loop time (s)",
"lua_type": "number",
"source": {
"line": 78,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "chars_count",
"desc": "Get the total character count of the loop",
"lua_type": "number",
"source": {
"line": 85,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "chars_per_beat",
"desc": "Get the amount of characters in a beat",
"lua_type": "number",
"source": {
"line": 92,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "chars_delta",
"desc": "Get the time duration of a character",
"lua_type": "number",
"source": {
"line": 99,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "beats_count",
"desc": "Get the total beat count of the loop",
"lua_type": "number",
"source": {
"line": 106,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "beats_per_measure",
"desc": "Get the amount of beats in a measure",
"lua_type": "number",
"source": {
"line": 113,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "beats_per_minute",
"desc": "Get the amount of beats in a minute",
"lua_type": "number",
"source": {
"line": 120,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "beats_elapsed",
"desc": "Get the amount of currently elapsed beats",
"lua_type": "number",
"source": {
"line": 127,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "beats_delta",
"desc": "Get the time duration of a beat",
"lua_type": "number",
"source": {
"line": 134,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "measures_count",
"desc": "Get the total amount of measures in the loop",
"lua_type": "number",
"source": {
"line": 149,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "measures_elapsed",
"desc": "Get the amount of currently elapsed measures",
"lua_type": "number",
"source": {
"line": 156,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "measures_delta",
"desc": "Get the time duration of a measure",
"lua_type": "number",
"source": {
"line": 163,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "loops_elapsed",
"desc": "Get the amount of currently elapsed loops",
"lua_type": "number",
"source": {
"line": 178,
"path": "../../res/data/script/lib/system/loop.lua"
}
},
{
"name": "loops_delta",
"desc": "Get the duration of a loop",
"lua_type": "number",
"source": {
"line": 185,
"path": "../../res/data/script/lib/system/loop.lua"
}
}
],
"types": [],
"name": "Loop",
"desc": "The music loop interface\n\n```lua\nLoop.id = \"wind\"\nLoop.volume = 0.5\n```",
"source": {
"line": 10,
"path": "../../res/data/script/lib/system/loop.lua"
}
}