NOOP: spacing and indentation
[ardour.git] / libs / ardour / luabindings.cc
index 33283c5c072e5975e2bd1d524865e8888cdeace2..6bacc9b7cacd8ec5fa6d83d06c85ee8e988ab9b7 100644 (file)
@@ -168,6 +168,7 @@ CLASSKEYS(boost::shared_ptr<ARDOUR::AutomationList>);
 CLASSKEYS(boost::shared_ptr<Evoral::ControlList>);
 CLASSKEYS(ARDOUR::LuaOSC::Address);
 CLASSKEYS(ARDOUR::Session);
+CLASSKEYS(ARDOUR::PeakMeter);
 CLASSKEYS(ARDOUR::BufferSet);
 CLASSKEYS(ARDOUR::ChanMapping);
 CLASSKEYS(ARDOUR::FluidSynth);
@@ -180,10 +181,13 @@ CLASSKEYS(PBD::ID);
 CLASSKEYS(ARDOUR::Location);
 CLASSKEYS(ARDOUR::PluginInfo);
 CLASSKEYS(ARDOUR::MonitorProcessor);
+CLASSKEYS(ARDOUR::Plugin::PresetRecord);
+CLASSKEYS(std::vector<ARDOUR::Plugin::PresetRecord>);
 CLASSKEYS(PBD::PropertyChange);
 CLASSKEYS(std::vector<std::string>);
 CLASSKEYS(std::list<boost::shared_ptr<ARDOUR::Route> >);
 CLASSKEYS(std::list<boost::shared_ptr<ARDOUR::Port> >);
+CLASSKEYS(std::vector<boost::shared_ptr<ARDOUR::Processor> >);
 CLASSKEYS(boost::shared_ptr<ARDOUR::PluginInfo>);
 CLASSKEYS(boost::shared_ptr<ARDOUR::Region>);
 CLASSKEYS(boost::weak_ptr<ARDOUR::Route>);
@@ -455,6 +459,16 @@ LuaBindings::common (lua_State* L)
 
                .beginWSPtrClass <PluginInfo> ("PluginInfo")
                .addVoidConstructor ()
+               .addData ("name", &PluginInfo::name, false)
+               .addData ("category", &PluginInfo::category, false)
+               .addData ("creator", &PluginInfo::creator, false)
+               .addData ("path", &PluginInfo::path, false)
+               .addData ("n_inputs", &PluginInfo::n_inputs, false)
+               .addData ("n_outputs", &PluginInfo::n_outputs, false)
+               .addData ("type", &PluginInfo::type, false)
+               .addData ("unique_id", &PluginInfo::unique_id, false)
+               .addFunction ("is_instrument", &PluginInfo::is_instrument)
+               .addFunction ("get_presets", &PluginInfo::get_presets)
                .endClass ()
 
                .beginNamespace ("Route")
@@ -514,6 +528,7 @@ LuaBindings::common (lua_State* L)
                .endClass ()
 
                .deriveClass <Location, PBD::StatefulDestructible> ("Location")
+               .addFunction ("name", &Location::name)
                .addFunction ("locked", &Location::locked)
                .addFunction ("lock", &Location::lock)
                .addFunction ("unlock", &Location::unlock)
@@ -543,6 +558,7 @@ LuaBindings::common (lua_State* L)
                .addFunction ("first_mark_after", &Locations::first_mark_after)
                .addFunction ("first_mark_before", &Locations::first_mark_before)
                .addFunction ("first_mark_at", &Locations::mark_at)
+               .addFunction ("remove", &Locations::remove)
                .addRefFunction ("marks_either_side", &Locations::marks_either_side)
                .addRefFunction ("find_all_between", &Locations::find_all_between)
                .endClass ()
@@ -691,6 +707,8 @@ LuaBindings::common (lua_State* L)
                .addFunction ("soloed", &Route::soloed)
                .addFunction ("amp", &Route::amp)
                .addFunction ("trim", &Route::trim)
+               .addFunction ("peak_meter", (boost::shared_ptr<PeakMeter> (Route::*)())&Route::peak_meter)
+               .addFunction ("set_meter_point", &Route::set_meter_point)
                .endClass ()
 
                .deriveWSPtrClass <Playlist, SessionObject> ("Playlist")
@@ -810,6 +828,8 @@ LuaBindings::common (lua_State* L)
                .addData ("valid", &Plugin::PresetRecord::valid, false)
                .endClass ()
 
+               .beginStdVector <Plugin::PresetRecord> ("PresetVector").endClass ()
+
                .deriveWSPtrClass <Automatable, Evoral::ControlSet> ("Automatable")
                .addFunction ("automation_control", (boost::shared_ptr<AutomationControl>(Automatable::*)(const Evoral::Parameter&, bool))&Automatable::automation_control)
                .endClass ()
@@ -821,6 +841,8 @@ LuaBindings::common (lua_State* L)
                .addStaticFunction ("midi_note_name", &ParameterDescriptor::midi_note_name)
                .endClass ()
 
+               .beginStdVector <boost::shared_ptr<ARDOUR::Processor> > ("ProcessorVector").endClass ()
+
                .deriveWSPtrClass <Processor, SessionObject> ("Processor")
                .addCast<Automatable> ("to_automatable")
                .addCast<PluginInsert> ("to_insert")
@@ -828,6 +850,7 @@ LuaBindings::common (lua_State* L)
                .addCast<IOProcessor> ("to_ioprocessor")
                .addCast<UnknownProcessor> ("to_unknownprocessor")
                .addCast<Amp> ("to_amp")
+               .addCast<PeakMeter> ("to_peakmeter")
                .addCast<MonitorProcessor> ("to_monitorprocessor")
 #if 0 // those objects are not yet bound
                .addCast<CapturingProcessor> ("to_capturingprocessor")
@@ -864,6 +887,7 @@ LuaBindings::common (lua_State* L)
                .addFunction ("load_preset", &Plugin::load_preset)
                .addFunction ("parameter_is_input", &Plugin::parameter_is_input)
                .addFunction ("get_docs", &Plugin::get_docs)
+               .addFunction ("get_info", &Plugin::get_info)
                .addFunction ("get_parameter_docs", &Plugin::get_parameter_docs)
                .addRefFunction ("get_parameter_descriptor", &Plugin::get_parameter_descriptor)
                .endClass ()
@@ -937,6 +961,12 @@ LuaBindings::common (lua_State* L)
                .addFunction ("gain_control", (boost::shared_ptr<GainControl>(Amp::*)())&Amp::gain_control)
                .endClass ()
 
+               .deriveWSPtrClass <PeakMeter, Processor> ("PeakMeter")
+               .addFunction ("meter_level", &PeakMeter::meter_level)
+               .addFunction ("set_type", &PeakMeter::set_type)
+               .addFunction ("reset_max", &PeakMeter::reset_max)
+               .endClass ()
+
                .deriveWSPtrClass <MonitorProcessor, Processor> ("MonitorProcessor")
                .addFunction ("set_cut_all", &MonitorProcessor::set_cut_all)
                .addFunction ("set_dim_all", &MonitorProcessor::set_dim_all)
@@ -1144,6 +1174,31 @@ LuaBindings::common (lua_State* L)
                .addConst ("SrcBest", ARDOUR::SrcQuality(SrcBest))
                .endNamespace ()
 
+               .beginNamespace ("MeterType")
+               .addConst ("MeterMaxSignal", ARDOUR::MeterType(MeterMaxSignal))
+               .addConst ("MeterMaxPeak", ARDOUR::MeterType(MeterMaxPeak))
+               .addConst ("MeterPeak", ARDOUR::MeterType(MeterPeak))
+               .addConst ("MeterKrms", ARDOUR::MeterType(MeterKrms))
+               .addConst ("MeterK20", ARDOUR::MeterType(MeterK20))
+               .addConst ("MeterK14", ARDOUR::MeterType(MeterK14))
+               .addConst ("MeterIEC1DIN", ARDOUR::MeterType(MeterIEC1DIN))
+               .addConst ("MeterIEC1NOR", ARDOUR::MeterType(MeterIEC1NOR))
+               .addConst ("MeterIEC2BBC", ARDOUR::MeterType(MeterIEC2BBC))
+               .addConst ("MeterIEC2EBU", ARDOUR::MeterType(MeterIEC2EBU))
+               .addConst ("MeterVU", ARDOUR::MeterType(MeterVU))
+               .addConst ("MeterK12", ARDOUR::MeterType(MeterK12))
+               .addConst ("MeterPeak0dB", ARDOUR::MeterType(MeterPeak0dB))
+               .addConst ("MeterMCP", ARDOUR::MeterType(MeterMCP))
+               .endNamespace ()
+
+               .beginNamespace ("MeterPoint")
+               .addConst ("MeterInput", ARDOUR::MeterPoint(MeterInput))
+               .addConst ("MeterPreFader", ARDOUR::MeterPoint(MeterPreFader))
+               .addConst ("MeterPostFader", ARDOUR::MeterPoint(MeterPostFader))
+               .addConst ("MeterOutput", ARDOUR::MeterPoint(MeterOutput))
+               .addConst ("MeterCustom", ARDOUR::MeterPoint(MeterCustom))
+               .endNamespace ()
+
                .beginNamespace ("PortFlags")
                .addConst ("IsInput", ARDOUR::PortFlags(IsInput))
                .addConst ("IsOutput", ARDOUR::PortFlags(IsOutput))
@@ -1329,6 +1384,8 @@ LuaBindings::common (lua_State* L)
                .addFunction ("timecode_drop_frames", &Session::timecode_drop_frames)
                .addFunction ("request_locate", &Session::request_locate)
                .addFunction ("request_stop", &Session::request_stop)
+               .addFunction ("request_play_loop", &Session::request_play_loop)
+               .addFunction ("get_play_loop", &Session::get_play_loop)
                .addFunction ("last_transport_start", &Session::last_transport_start)
                .addFunction ("goto_start", &Session::goto_start)
                .addFunction ("goto_end", &Session::goto_end)
@@ -1344,6 +1401,8 @@ LuaBindings::common (lua_State* L)
                .addFunction ("name", &Session::name)
                .addFunction ("path", &Session::path)
                .addFunction ("record_status", &Session::record_status)
+               .addFunction ("maybe_enable_record", &Session::maybe_enable_record)
+               .addFunction ("disable_record", &Session::disable_record)
                .addFunction ("route_by_id", &Session::route_by_id)
                .addFunction ("route_by_name", &Session::route_by_name)
                .addFunction ("get_remote_nth_stripable", &Session::get_remote_nth_stripable)
@@ -1410,6 +1469,7 @@ LuaBindings::common (lua_State* L)
                .addCFunction ("plugin_automation", ARDOUR::LuaAPI::plugin_automation)
                .addCFunction ("hsla_to_rgba", ARDOUR::LuaAPI::hsla_to_rgba)
                .addFunction ("usleep", Glib::usleep)
+               .addCFunction ("build_filename", ARDOUR::LuaAPI::build_filename)
                .endNamespace () // end LuaAPI
                .endNamespace ();// end ARDOUR
 }