global


Functions

tostring(pattern_line : renoise.PatternLine)

->string

Serialize a line.

ripairs(table : <T:table>)

->fun(table: [], i?: integer):integer, , <T:table>, i : integer

An iterator like ipairs, but in reverse order.

examples:

t = {"a", "b", "c"}
for k,v in ripairs(t) do print(k, v) end -> "3 c, 2 b, 1 a"

objinfo(object : userdata)

->string[]

Return a string which lists properties and methods of class objects.

oprint(object : userdata)

Dumps properties and methods of class objects (like renoise.app()).

rprint(value : any)

Recursively dumps a table and all its members to the std out (console). This works for standard Lua types and class objects as well.

class(name : string)

->function

Luabind "class" registration. Registers a global class object and returns a closure to optionally set the base class.

See also Luabind class

examples

---@class Animal
-- Construct a new animal with the given name.
---@overload fun(string): Animal
Animal = {}
class 'Animal'
  ---@param name string
  function Animal:__init(name)
    self.name = name
    self.can_fly = nil
  end
  function Animal:show()
    return ("I am a %s (%s) and I %s fly"):format(self.name, type(self),
      (self.can_fly and "can fly" or "can not fly"))
  end

-- Mammal class (inherits Animal functions and members)
---@class Mammal : Animal
-- Construct a new mamal with the given name.
---@overload fun(string): Mammal
Mammal = {}
class 'Mammal' (Animal)
  ---@param name string
  function Mammal:__init(name)
    Animal.__init(self, name)
    self.can_fly = false
  end

-- show() function and base member are available for Mammal too
local mamal = Mammal("Cow")
mamal:show()

type(value : any)

->string

Returns a Renoise class object's type name. For all other types the standard Lua type function is used.

examples:

class "MyClass"; function MyClass:__init() end
print(type(MyClass)) -> "MyClass class"
print(type(MyClass())) -> "MyClass"

rawequal(obj1 : any, obj2 : any)

Also compares object identities of Renoise API class objects. For all other types the standard Lua rawequal function is used.

examples:

print(rawequal(renoise.app(), renoise.app())) --> true
print(rawequal(renoise.song().track[1],
renoise.song().track[1]) --> true
print(rawequal(renoise.song().track[1],
renoise.song().track[2]) --> false