summaryrefslogtreecommitdiff
path: root/libs/ardour/luabindings.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/luabindings.cc')
-rw-r--r--libs/ardour/luabindings.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc
index 4899757188..46e1d67551 100644
--- a/libs/ardour/luabindings.cc
+++ b/libs/ardour/luabindings.cc
@@ -423,6 +423,20 @@ LuaBindings::common (lua_State* L)
//.addStaticData ("ticks_per_beat", &Timecode::BBT_Time::ticks_per_beat, false)
.endClass ()
+ .beginClass <Timecode::Time> ("Time")
+ .addConstructor <void (*) (double)> ()
+ .addData ("negative", &Timecode::Time::negative)
+ .addData ("hours", &Timecode::Time::hours)
+ .addData ("minutes", &Timecode::Time::minutes)
+ .addData ("seconds", &Timecode::Time::seconds)
+ .addData ("frames", &Timecode::Time::frames)
+ .addData ("subframes", &Timecode::Time::subframes)
+ .addData ("rate", &Timecode::Time::rate)
+ .addData ("drop", &Timecode::Time::drop)
+ .endClass ()
+
+ // TODO add increment, decrement; push it into the class
+
/* libtimecode enums */
.beginNamespace ("TimecodeFormat")
.addConst ("TC23976", Timecode::TimecodeFormat(Timecode::timecode_23976))
@@ -1809,6 +1823,11 @@ LuaBindings::common (lua_State* L)
.addFunction ("route_groups", &Session::route_groups)
.addFunction ("new_route_group", &Session::new_route_group)
.addFunction ("remove_route_group", (void (Session::*)(RouteGroup*))&Session::remove_route_group)
+ .addExtCFunction ("timecode_to_sample_lua", ARDOUR::LuaAPI::timecode_to_sample_lua)
+ .addExtCFunction ("sample_to_timecode_lua", ARDOUR::LuaAPI::sample_to_timecode_lua)
+ .addFunction ("timecode_frames_per_hour", &Session::timecode_frames_per_hour)
+ .addFunction ("timecode_frames_per_second", &Session::timecode_frames_per_second)
+ .addFunction ("timecode_drop_frames", &Session::timecode_drop_frames)
.endClass ()
.beginClass <RegionFactory> ("RegionFactory")
@@ -1853,6 +1872,8 @@ LuaBindings::common (lua_State* L)
.addFunction ("usleep", Glib::usleep)
.addCFunction ("build_filename", ARDOUR::LuaAPI::build_filename)
.addFunction ("new_noteptr", ARDOUR::LuaAPI::new_noteptr)
+ .addCFunction ("sample_to_timecode", ARDOUR::LuaAPI::sample_to_timecode)
+ .addCFunction ("timecode_to_sample", ARDOUR::LuaAPI::timecode_to_sample)
.beginClass <ARDOUR::LuaAPI::Vamp> ("Vamp")
.addConstructor <void (*) (const std::string&, float)> ()