Add tempo-map Lua bindings
authorRobin Gareus <robin@gareus.org>
Fri, 7 Oct 2016 00:38:56 +0000 (02:38 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 7 Oct 2016 00:38:56 +0000 (02:38 +0200)
libs/ardour/luabindings.cc

index 4f2b277699347b71295c377d54a297f0c3a4cc16..fcb57ba8a7be82bb19345962da21756460e64884 100644 (file)
@@ -409,6 +409,10 @@ LuaBindings::common (lua_State* L)
                .beginNamespace ("Timecode")
                .beginClass <Timecode::BBT_Time> ("BBT_TIME")
                .addConstructor <void (*) (uint32_t, uint32_t, uint32_t)> ()
+               .addData ("bars", &Timecode::BBT_Time::bars)
+               .addData ("beats", &Timecode::BBT_Time::beats)
+               .addData ("ticks", &Timecode::BBT_Time::ticks)
+               //.addStaticData ("ticks_per_beat", &Timecode::BBT_Time::ticks_per_beat, false)
                .endClass ()
 
                /* libtimecode enums */
@@ -1315,6 +1319,9 @@ LuaBindings::common (lua_State* L)
                .addFunction ("tempo_section_at_frame", &TempoMap::tempo_section_at_frame)
                .addFunction ("meter_section_at_frame", &TempoMap::meter_section_at_frame)
                .addFunction ("meter_section_at_beat", &TempoMap::meter_section_at_beat)
+               .addFunction ("bbt_at_frame", &TempoMap::bbt_at_frame)
+               .addFunction ("exact_beat_at_frame", &TempoMap::exact_beat_at_frame)
+               .addFunction ("exact_qn_at_frame", &TempoMap::exact_qn_at_frame)
                .endClass ()
 
                .beginClass <MetricSection> ("MetricSection")