diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index 9c77a32081..ae5373c98c 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -4606,6 +4606,22 @@ save yourself some time, copy this for undocumented things: + + GetBPMsAndTimes, GetStops, GetDelays, GetLabels, GetWarps, GetCombos, GetTimeSignatures, GetTickcounts, GetFakes, GetScrolls, and GetSpeeds all have two different modes.
+ If the metric TimingData:GetReturnsNumbers is false (the default), they return tables of strings. The strings are numbers separated by '='.
+ If the metric TimingData:GetReturnsNumbers is true, they return tables of tables, and the inner tables contain numbers as described for each function.
+ The first form is kept around and is the default for compatibility with older themes. The advantage of the second form is that you no longer need to have a bit of code in your theme to transform the string into a table of numbers before you can use it.
+ Example:
+ local bpmsand= timing_data:GetBPMsAndTimes()
+ for i, s in ipairs(bpmsand) do
+ local sand= split("=", s)
+ bpmsand[i]= {tonumber(sand[1]), tonumber(sand[2])}
+ end
+ -- do something that looks at all the bpms and times.
+ Becomes:
+ local bpmsand= timing_data:GetBPMsAndTimes()
+ -- do something that looks at all the bpms and times.
+
Returns the minimum and maximum BPM of the song in a table (in that order).