13
0

Vapor: add Lua bindings

This commit is contained in:
Robin Gareus 2023-12-07 03:47:31 +01:00
parent b84cd4fb5a
commit 6172de3144
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 31 additions and 0 deletions

View File

@ -97,6 +97,8 @@
#include "ardour/solo_isolate_control.h"
#include "ardour/solo_safe_control.h"
#include "ardour/stripable.h"
#include "ardour/surround_send.h"
#include "ardour/surround_pannable.h"
#include "ardour/track.h"
#include "ardour/tempo.h"
#include "ardour/user_bundle.h"
@ -1474,6 +1476,8 @@ LuaBindings::common (lua_State* L)
.addFunction ("playback_latency", &Route::playback_latency)
.addFunction ("monitoring_state", &Route::monitoring_state)
.addFunction ("monitoring_control", &Route::monitoring_control)
.addFunction ("surround_send", &Route::surround_send)
.addFunction ("surround_return", &Route::surround_return)
.endClass ()
.deriveWSPtrClass <Playlist, SessionObject> ("Playlist")
@ -1828,6 +1832,7 @@ LuaBindings::common (lua_State* L)
.addCast<PeakMeter> ("to_peakmeter")
.addCast<MonitorProcessor> ("to_monitorprocessor")
.addCast<Send> ("to_send")
.addCast<SurroundSend> ("to_surroundsend")
.addCast<InternalSend> ("to_internalsend")
.addCast<PolarityProcessor> ("to_polarityprocessor")
.addCast<DelayLine> ("to_delayline")
@ -1891,6 +1896,25 @@ LuaBindings::common (lua_State* L)
.addFunction ("feeds", &InternalSend::feeds)
.endClass ()
.deriveWSPtrClass <SurroundPannable, Automatable> ("SurroundPannable")
.addData ("name", &SurroundPannable::pan_pos_x)
.addData ("name", &SurroundPannable::pan_pos_y)
.addData ("name", &SurroundPannable::pan_pos_z)
.addData ("name", &SurroundPannable::pan_size)
.addData ("name", &SurroundPannable::pan_snap)
.endClass ()
.deriveWSPtrClass <SurroundSend, Processor> ("SurroundSend")
.addFunction ("get_delay_in", &SurroundSend::get_delay_in)
.addFunction ("get_delay_out", &SurroundSend::get_delay_out)
.addFunction ("gain_control", &SurroundSend::gain_control)
.addFunction ("n_pannables", &SurroundSend::gain_control)
.addFunction ("pannable", &SurroundSend::pannable)
.endClass ()
.deriveWSPtrClass <SurroundReturn, Processor> ("SurroundReturn")
.endClass ()
.deriveWSPtrClass <Return, IOProcessor> ("Return")
.endClass ()

View File

@ -31,6 +31,13 @@ function factory () return function ()
proc:capture_offset(), proc:playback_offset(),
proc:to_send():get_delay_in(), proc:to_send():get_delay_out()
))
elseif all_procs and not proc:to_surroundsend():isnil () then
print (string.format (" * %-27s L: %4d in: %4d out: %4d capt: %4d play %4d DLY-SRC: %4d DLY-DST: %4d",
string.sub (proc:name(), 0, 27) , proc:signal_latency(),
proc:input_latency(), proc:output_latency(),
proc:capture_offset(), proc:playback_offset(),
proc:to_surroundsend():get_delay_in(), proc:to_surroundsend():get_delay_out()
))
elseif all_procs or not proc:to_diskioprocessor():isnil () then
print (string.format (" * %-27s L: %4d in: %4d out: %4d capt: %4d play %4d",
string.sub (proc:name(), 0, 27) , proc:signal_latency(),