2016-02-23 09:41:02 -05:00
/*
2019-08-02 22:01:25 -04:00
* Copyright ( C ) 2016 - 2017 Nick Mainsbridge < mainsbridge @ gmail . com >
* Copyright ( C ) 2016 - 2017 Paul Davis < paul @ linuxaudiosystems . com >
* Copyright ( C ) 2016 - 2019 Johannes Mueller < github @ johannes - mueller . org >
* Copyright ( C ) 2016 - 2019 Robin Gareus < robin @ gareus . org >
* Copyright ( C ) 2017 - 2018 Ben Loftis < ben @ harrisonconsoles . com >
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License along
* with this program ; if not , write to the Free Software Foundation , Inc . ,
* 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA .
*/
2016-02-23 09:41:02 -05:00
2016-04-09 19:45:41 -04:00
# include <glibmm.h>
# include "pbd/stateful_diff_command.h"
2016-07-17 11:04:02 -04:00
# include "pbd/openuri.h"
2023-05-18 15:47:27 -04:00
# include "pbd/progress.h"
2017-09-24 12:57:27 -04:00
# include "temporal/bbt_time.h"
2020-09-20 18:34:09 -04:00
# include "temporal/range.h"
2017-09-24 12:57:27 -04:00
2019-10-25 15:13:51 -04:00
# include "evoral/Control.h"
# include "evoral/ControlList.h"
2016-02-23 09:41:02 -05:00
2016-04-10 11:35:02 -04:00
# include "ardour/amp.h"
2017-12-05 10:08:02 -05:00
# include "ardour/async_midi_port.h"
2016-02-23 09:41:02 -05:00
# include "ardour/audioengine.h"
2016-11-19 15:18:15 -05:00
# include "ardour/audioregion.h"
2016-02-23 09:41:02 -05:00
# include "ardour/audiosource.h"
# include "ardour/audio_backend.h"
# include "ardour/audio_buffer.h"
2016-04-10 17:01:44 -04:00
# include "ardour/audio_port.h"
2016-02-23 09:41:02 -05:00
# include "ardour/audio_track.h"
2016-10-02 21:51:53 -04:00
# include "ardour/audioplaylist.h"
2020-02-01 09:57:47 -05:00
# include "ardour/audiorom.h"
2016-02-23 09:41:02 -05:00
# include "ardour/buffer_set.h"
2021-02-26 07:34:24 -05:00
# include "ardour/bundle.h"
2016-02-23 09:41:02 -05:00
# include "ardour/chan_mapping.h"
2018-10-18 19:08:04 -04:00
# include "ardour/convolver.h"
2016-02-23 09:41:02 -05:00
# include "ardour/dB.h"
2017-11-03 14:26:44 -04:00
# include "ardour/delayline.h"
2017-09-27 22:25:50 -04:00
# include "ardour/disk_reader.h"
# include "ardour/disk_writer.h"
2016-02-23 09:41:02 -05:00
# include "ardour/dsp_filter.h"
2017-04-10 19:26:38 -04:00
# include "ardour/file_source.h"
2018-07-30 17:35:25 -04:00
# include "ardour/filesystem_paths.h"
2016-08-23 16:18:04 -04:00
# include "ardour/fluid_synth.h"
2019-08-23 19:35:38 -04:00
# include "ardour/internal_send.h"
# include "ardour/internal_return.h"
2016-04-09 09:42:32 -04:00
# include "ardour/interthread_info.h"
2018-07-17 03:41:33 -04:00
# include "ardour/ltc_file_reader.h"
2016-03-18 17:52:19 -04:00
# include "ardour/lua_api.h"
2016-02-23 09:41:02 -05:00
# include "ardour/luabindings.h"
2016-04-11 16:19:25 -04:00
# include "ardour/luaproc.h"
2016-02-23 09:41:02 -05:00
# include "ardour/meter.h"
2016-10-06 18:23:33 -04:00
# include "ardour/midi_model.h"
2016-02-23 09:41:02 -05:00
# include "ardour/midi_track.h"
2016-10-06 18:23:33 -04:00
# include "ardour/midi_playlist.h"
2016-04-10 17:01:44 -04:00
# include "ardour/midi_port.h"
2016-10-06 18:23:33 -04:00
# include "ardour/midi_region.h"
# include "ardour/midi_source.h"
2022-05-19 14:07:35 -04:00
# include "ardour/mixer_scene.h"
2021-05-11 14:29:56 -04:00
# include "ardour/monitor_control.h"
2022-10-07 12:52:00 -04:00
# include "ardour/monitor_processor.h"
2022-12-12 04:43:59 -05:00
# include "ardour/mute_master.h"
2016-11-09 19:28:21 -05:00
# include "ardour/panner_shell.h"
2016-06-01 09:12:14 -04:00
# include "ardour/phase_control.h"
2016-04-09 09:42:32 -04:00
# include "ardour/playlist.h"
2016-02-23 09:41:02 -05:00
# include "ardour/plugin.h"
# include "ardour/plugin_insert.h"
2020-09-15 09:49:22 -04:00
# include "ardour/plugin_manager.h"
2017-10-30 22:15:43 -04:00
# include "ardour/polarity_processor.h"
2016-04-25 20:21:09 -04:00
# include "ardour/port_manager.h"
2017-12-05 10:08:02 -05:00
# include "ardour/raw_midi_parser.h"
2016-02-23 09:41:02 -05:00
# include "ardour/runtime_functions.h"
# include "ardour/region.h"
# include "ardour/region_factory.h"
2024-03-18 16:30:40 -04:00
# include "ardour/region_fx_plugin.h"
2017-09-27 22:25:50 -04:00
# include "ardour/return.h"
2021-05-12 20:51:17 -04:00
# include "ardour/revision.h"
2016-04-24 20:35:45 -04:00
# include "ardour/route_group.h"
2024-02-17 09:02:25 -05:00
# include "ardour/selection.h"
2017-09-27 22:25:50 -04:00
# include "ardour/send.h"
2016-02-23 09:41:02 -05:00
# include "ardour/session.h"
# include "ardour/session_object.h"
2019-03-19 00:14:54 -04:00
# include "ardour/session_playlists.h"
2016-04-02 17:42:30 -04:00
# include "ardour/sidechain.h"
2022-10-21 13:50:26 -04:00
# include "ardour/simple_export.h"
2016-06-01 09:12:14 -04:00
# include "ardour/solo_isolate_control.h"
# include "ardour/solo_safe_control.h"
2016-05-31 17:35:00 -04:00
# include "ardour/stripable.h"
2024-01-29 08:56:40 -05:00
# include "ardour/surround_return.h"
2023-12-06 21:47:31 -05:00
# include "ardour/surround_send.h"
# include "ardour/surround_pannable.h"
2016-04-09 09:42:32 -04:00
# include "ardour/track.h"
2016-02-23 09:41:02 -05:00
# include "ardour/tempo.h"
2021-02-26 07:34:24 -05:00
# include "ardour/user_bundle.h"
2017-05-30 09:15:30 -04:00
# include "ardour/vca.h"
# include "ardour/vca_manager.h"
2024-01-12 21:03:25 -05:00
# include "ardour/well_known_enum.h"
2016-02-23 09:41:02 -05:00
# include "LuaBridge/LuaBridge.h"
2022-09-26 20:23:50 -04:00
/* for the time being, expose superclock for introspection and testing in debug builds */
# ifndef NDEBUG
# define WITH_SUPERCLOCK_BINDINGS
# endif
2022-01-24 00:21:12 -05:00
/* lambda function to use for Lua metatable methods.
* A generic C + + template won ' t work here because
* operators cannot be used as template parameters .
*/
2022-09-26 20:23:50 -04:00
# define CPPOPERATOR2(RTYPE, TYPE1, TYPE2, OP) \
[ ] ( lua_State * L ) { \
TYPE1 const * const t0 = luabridge : : Userdata : : get < TYPE1 > ( L , 1 , true ) ; \
TYPE2 const * const t1 = luabridge : : Userdata : : get < TYPE2 > ( L , 2 , true ) ; \
if ( ! t0 | | ! t1 ) { \
luaL_error ( L , " argument is nil " ) ; \
return 0 ; \
} \
luabridge : : Stack < RTYPE > : : push ( L , ( ( * t0 ) OP ( * t1 ) ) ) ; \
return 1 ; \
2022-01-24 00:21:12 -05:00
}
2022-09-26 20:23:50 -04:00
# define CPPOPERATOR4(RTYPE, TYPE1, TYPE2A, TYPE2B, OP) \
[ ] ( lua_State * L ) { \
TYPE1 const * const t0 = luabridge : : Userdata : : get < TYPE1 > ( L , 1 , true ) ; \
TYPE2A const * const ta = luabridge : : Userdata : : try_get < TYPE2A > ( L , 2 , true ) ; \
if ( t0 & & ta ) { \
luabridge : : Stack < RTYPE > : : push ( L , ( ( * t0 ) OP ( * ta ) ) ) ; \
return 1 ; \
} \
TYPE2B const * const tb = luabridge : : Userdata : : get < TYPE2B > ( L , 2 , true ) ; \
if ( ! t0 | | ! tb ) { \
luaL_error ( L , " argument is nil " ) ; \
return 0 ; \
} \
luabridge : : Stack < RTYPE > : : push ( L , ( ( * t0 ) OP ( * tb ) ) ) ; \
return 1 ; \
2022-09-26 15:38:25 -04:00
}
2022-01-24 00:21:12 -05:00
# define CPPCOMPERATOR(TYPE, OP) CPPOPERATOR2 (bool, TYPE, TYPE, OP)
2022-09-26 15:38:25 -04:00
# define CPPCOMPERATORALT(TYPE, ALT, OP) CPPOPERATOR4 (bool, TYPE, TYPE, ALT, OP)
2022-01-24 00:21:12 -05:00
2022-09-26 15:38:25 -04:00
# define CPPOPERATOR(TYPE, OP) CPPOPERATOR2 (TYPE, TYPE, TYPE, OP)
# define CPPOPERATORALT(T, TB, OP) CPPOPERATOR4 (T, T, T, TB, OP)
2022-01-24 00:21:12 -05:00
2016-04-11 16:19:25 -04:00
# ifdef PLATFORM_WINDOWS
/* luabridge uses addresses of static functions/variables to identify classes.
*
* Static symbols on windows ( even identical symbols ) are not
* mapped to the same address when mixing . dll + . exe .
* So we need a single point to define those static functions .
* ( normally they ' re header - only in libs / lua / LuaBridge / detail / ClassInfo . h )
*
* Really ! ! A static function with a static variable in a library header
* should never ever be replicated , even if it is a template .
2016-10-04 15:50:37 -04:00
* But then again this is windows . . . what else can go wrong ? !
2016-04-11 16:19:25 -04:00
*/
template < class T >
void const *
luabridge : : ClassInfo < T > : : getStaticKey ( )
{
static char value ;
return & value ;
}
template < class T >
void const *
luabridge : : ClassInfo < T > : : getClassKey ( )
{
static char value ;
return & value ;
}
template < class T >
void const *
luabridge : : ClassInfo < T > : : getConstKey ( )
{
static char value ;
return & value ;
}
void *
luabridge : : getIdentityKey ( )
{
static char value ;
return & value ;
}
/* ...and this is the ugly part of it.
*
2022-05-08 20:20:45 -04:00
* We need to forward declare classes from gtk2_ardour
2016-10-04 15:50:37 -04:00
* AND explicily list classes which are used by gtk2_ardour ' s bindings .
2016-04-11 20:18:20 -04:00
*
2016-10-04 15:50:37 -04:00
* This is required because some of the GUI classes use objects from libardour
* as function parameters or return values and the . exe would re - create
* symbols for libardour objects .
2016-04-11 16:19:25 -04:00
*/
# define CLASSKEYS(CLS) \
template void const * luabridge : : ClassInfo < CLS > : : getStaticKey ( ) ; \
template void const * luabridge : : ClassInfo < CLS > : : getClassKey ( ) ; \
template void const * luabridge : : ClassInfo < CLS > : : getConstKey ( ) ;
# define CLASSINFO(CLS) \
class CLS ; \
template void const * luabridge : : ClassInfo < CLS > : : getStaticKey ( ) ; \
template void const * luabridge : : ClassInfo < CLS > : : getClassKey ( ) ; \
template void const * luabridge : : ClassInfo < CLS > : : getConstKey ( ) ;
2016-10-04 15:50:37 -04:00
CLASSINFO ( ArdourMarker ) ;
2024-04-24 00:08:26 -04:00
CLASSINFO ( AudioRegionView ) ;
2017-02-24 07:44:41 -05:00
CLASSINFO ( AxisView ) ;
2016-04-11 16:19:25 -04:00
CLASSINFO ( MarkerSelection ) ;
CLASSINFO ( PublicEditor ) ;
2016-10-04 15:50:37 -04:00
CLASSINFO ( RegionSelection ) ;
2017-02-23 16:31:50 -05:00
CLASSINFO ( RegionView ) ;
2017-08-07 07:58:56 -04:00
CLASSINFO ( StripableTimeAxisView ) ;
2017-02-24 07:44:41 -05:00
CLASSINFO ( RouteTimeAxisView ) ;
CLASSINFO ( RouteUI ) ;
2017-02-23 16:31:50 -05:00
CLASSINFO ( Selectable ) ;
2016-04-11 16:19:25 -04:00
CLASSINFO ( Selection ) ;
2017-02-24 07:44:41 -05:00
CLASSINFO ( TimeAxisView ) ;
2017-02-23 16:31:50 -05:00
CLASSINFO ( TimeAxisViewItem ) ;
2016-10-04 15:50:37 -04:00
CLASSINFO ( TimeSelection ) ;
CLASSINFO ( TrackSelection ) ;
CLASSINFO ( TrackViewList ) ;
2020-01-06 11:14:10 -05:00
CLASSINFO ( UIConfiguration ) ;
2016-04-11 16:19:25 -04:00
2017-02-23 16:31:50 -05:00
2018-11-16 18:12:43 -05:00
/* this needs to match gtk2_ardour/luasignal.h */
2023-07-05 13:36:25 -04:00
CLASSKEYS ( std : : bitset < 50ul > ) ; // LuaSignal::LAST_SIGNAL
2016-10-04 15:50:37 -04:00
CLASSKEYS ( void ) ;
CLASSKEYS ( float ) ;
2019-12-03 11:55:37 -05:00
CLASSKEYS ( double ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( unsigned char ) ;
2016-04-11 16:19:25 -04:00
CLASSKEYS ( ArdourMarker * ) ;
2017-02-23 16:31:50 -05:00
CLASSKEYS ( Selectable * ) ;
CLASSKEYS ( std : : list < Selectable * > ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( ARDOUR : : AudioEngine ) ;
2016-04-11 20:18:20 -04:00
CLASSKEYS ( ARDOUR : : BufferSet ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( ARDOUR : : ChanCount ) ;
2016-04-11 20:18:20 -04:00
CLASSKEYS ( ARDOUR : : ChanMapping ) ;
2024-02-17 09:02:25 -05:00
CLASSKEYS ( ARDOUR : : CoreSelection ) ;
2016-04-11 20:18:20 -04:00
CLASSKEYS ( ARDOUR : : DSP : : DspShm ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( ARDOUR : : DataType ) ;
CLASSKEYS ( ARDOUR : : FluidSynth ) ;
2020-04-21 09:34:20 -04:00
CLASSKEYS ( ARDOUR : : InternalSend ) ;
2019-09-28 15:02:45 -04:00
CLASSKEYS ( ARDOUR : : Latent ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( ARDOUR : : Location ) ;
CLASSKEYS ( ARDOUR : : LuaAPI : : Vamp ) ;
CLASSKEYS ( ARDOUR : : LuaOSC : : Address ) ;
CLASSKEYS ( ARDOUR : : LuaProc ) ;
2016-07-06 22:44:36 -04:00
CLASSKEYS ( ARDOUR : : LuaTableRef ) ;
2016-10-06 18:23:33 -04:00
CLASSKEYS ( ARDOUR : : MidiModel : : NoteDiffCommand ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( ARDOUR : : MonitorProcessor ) ;
CLASSKEYS ( ARDOUR : : RouteGroup ) ;
CLASSKEYS ( ARDOUR : : ParameterDescriptor ) ;
CLASSKEYS ( ARDOUR : : PeakMeter ) ;
CLASSKEYS ( ARDOUR : : PluginInfo ) ;
CLASSKEYS ( ARDOUR : : Plugin : : PresetRecord ) ;
CLASSKEYS ( ARDOUR : : PortEngine ) ;
CLASSKEYS ( ARDOUR : : PortManager ) ;
2016-08-15 16:16:08 -04:00
CLASSKEYS ( ARDOUR : : PresentationInfo ) ;
2017-08-15 17:51:51 -04:00
CLASSKEYS ( ARDOUR : : RCConfiguration ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( ARDOUR : : Session ) ;
2016-08-15 16:16:08 -04:00
CLASSKEYS ( ARDOUR : : SessionConfiguration ) ;
2022-10-23 00:16:37 -04:00
CLASSKEYS ( ARDOUR : : SimpleExport ) ;
2017-08-18 16:00:24 -04:00
CLASSKEYS ( ARDOUR : : Slavable ) ;
2016-10-15 15:16:57 -04:00
CLASSKEYS ( ARDOUR : : Source ) ;
2022-09-30 20:49:25 -04:00
CLASSKEYS ( ARDOUR : : Track ) ;
2017-05-30 09:15:30 -04:00
CLASSKEYS ( ARDOUR : : VCA ) ;
CLASSKEYS ( ARDOUR : : VCAManager ) ;
2016-10-04 15:50:37 -04:00
2021-12-11 10:31:54 -05:00
CLASSKEYS ( Temporal : : timepos_t )
CLASSKEYS ( Temporal : : timecnt_t )
CLASSKEYS ( Temporal : : superclock_t )
2021-08-13 19:13:36 -04:00
2016-04-11 20:18:20 -04:00
CLASSKEYS ( PBD : : ID ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( PBD : : Configuration ) ;
2016-04-11 20:18:20 -04:00
CLASSKEYS ( PBD : : PropertyChange ) ;
2016-10-11 13:55:35 -04:00
CLASSKEYS ( PBD : : StatefulDestructible ) ;
2016-10-04 15:50:37 -04:00
2017-09-24 12:03:54 -04:00
CLASSKEYS ( Temporal : : Beats ) ;
2017-09-18 12:39:17 -04:00
CLASSKEYS ( Evoral : : Event < samplepos_t > ) ;
2017-04-23 22:10:10 -04:00
CLASSKEYS ( Evoral : : ControlEvent ) ;
2016-10-06 18:23:33 -04:00
2016-10-04 15:50:37 -04:00
2016-04-11 20:18:20 -04:00
CLASSKEYS ( std : : vector < std : : string > ) ;
2019-12-02 20:29:37 -05:00
CLASSKEYS ( std : : vector < uint8_t > ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( std : : vector < float > ) ;
CLASSKEYS ( std : : vector < float * > ) ;
CLASSKEYS ( std : : vector < double > ) ;
2017-03-17 13:12:50 -04:00
CLASSKEYS ( std : : list < int64_t > ) ;
2021-02-12 18:20:30 -05:00
CLASSKEYS ( std : : vector < samplepos_t > ) ;
2016-10-04 15:50:37 -04:00
2017-04-23 22:10:10 -04:00
CLASSKEYS ( std : : list < Evoral : : ControlEvent * > ) ;
2016-10-04 15:50:37 -04:00
CLASSKEYS ( std : : vector < ARDOUR : : Plugin : : PresetRecord > ) ;
2023-02-16 18:33:28 -05:00
CLASSKEYS ( std : : vector < std : : shared_ptr < ARDOUR : : Processor > > ) ;
CLASSKEYS ( std : : vector < std : : shared_ptr < ARDOUR : : Source > > ) ;
CLASSKEYS ( std : : vector < std : : shared_ptr < ARDOUR : : AudioReadable > > ) ;
2021-06-30 13:22:22 -04:00
CLASSKEYS ( std : : vector < Evoral : : Parameter > ) ;
2023-02-16 18:33:28 -05:00
CLASSKEYS ( std : : list < std : : shared_ptr < ARDOUR : : PluginInfo > > ) ; // PluginInfoList
2016-10-04 15:50:37 -04:00
CLASSKEYS ( std : : list < ArdourMarker * > ) ;
2017-02-24 11:52:56 -05:00
CLASSKEYS ( std : : list < TimeAxisView * > ) ;
2020-11-23 18:44:08 -05:00
CLASSKEYS ( std : : list < ARDOUR : : TimelineRange > ) ;
2023-02-16 18:33:28 -05:00
CLASSKEYS ( std : : list < std : : shared_ptr < ARDOUR : : Port > > ) ;
CLASSKEYS ( std : : list < std : : shared_ptr < ARDOUR : : Region > > ) ;
CLASSKEYS ( std : : list < std : : shared_ptr < ARDOUR : : Route > > ) ;
CLASSKEYS ( std : : list < std : : shared_ptr < ARDOUR : : Stripable > > ) ;
CLASSKEYS ( std : : shared_ptr < std : : list < std : : shared_ptr < ARDOUR : : Route > > > ) ;
CLASSKEYS ( std : : shared_ptr < std : : vector < std : : shared_ptr < ARDOUR : : Bundle > > > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : AudioRegion > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : AudioRom > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : AudioSource > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Automatable > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : AutomatableSequence < Temporal : : Beats > > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : AutomationList > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : FileSource > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : MidiModel > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : MidiPlaylist > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : MidiRegion > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : MidiSource > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : PluginInfo > ) ;
2024-03-26 16:08:42 -04:00
CLASSKEYS ( std : : shared_ptr < ARDOUR : : PluginInsert > ) ;
2024-03-18 16:30:40 -04:00
CLASSKEYS ( std : : shared_ptr < ARDOUR : : RegionFxPlugin > ) ;
2023-02-16 18:33:28 -05:00
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Processor > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : AudioReadable > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Region > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : SessionPlaylists > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Track > ) ;
CLASSKEYS ( std : : shared_ptr < Evoral : : ControlList > ) ;
CLASSKEYS ( std : : shared_ptr < Evoral : : Note < Temporal : : Beats > > ) ;
CLASSKEYS ( std : : shared_ptr < Evoral : : Sequence < Temporal : : Beats > > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Playlist > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Bundle > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : Route > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : VCA > ) ;
CLASSKEYS ( std : : weak_ptr < ARDOUR : : Bundle > ) ;
CLASSKEYS ( std : : weak_ptr < ARDOUR : : Route > ) ;
CLASSKEYS ( std : : weak_ptr < ARDOUR : : Track > ) ;
CLASSKEYS ( std : : weak_ptr < ARDOUR : : VCA > ) ;
CLASSKEYS ( std : : shared_ptr < ARDOUR : : RegionList > ) ;
2021-05-08 08:38:43 -04:00
2016-10-03 17:47:50 -04:00
CLASSKEYS ( Vamp : : RealTime ) ;
CLASSKEYS ( Vamp : : PluginBase ) ;
CLASSKEYS ( Vamp : : PluginBase : : ParameterDescriptor ) ;
CLASSKEYS ( Vamp : : Plugin ) ;
CLASSKEYS ( Vamp : : Plugin : : OutputDescriptor ) ;
CLASSKEYS ( Vamp : : Plugin : : Feature ) ;
2016-10-03 18:24:22 -04:00
CLASSKEYS ( Vamp : : Plugin : : OutputList ) ;
CLASSKEYS ( Vamp : : Plugin : : FeatureList ) ;
CLASSKEYS ( Vamp : : Plugin : : FeatureSet ) ;
2016-10-03 17:47:50 -04:00
2016-10-04 15:50:37 -04:00
namespace LuaCairo {
class ImageSurface ;
class PangoLayout ;
}
2017-04-25 09:48:14 -04:00
namespace LuaDialog {
class Message ;
class Dialog ;
2019-09-02 15:20:06 -04:00
class ProgressWindow ;
2017-04-25 09:48:14 -04:00
}
2016-10-04 15:50:37 -04:00
namespace Cairo {
class Context ;
}
CLASSKEYS ( Cairo : : Context ) ;
CLASSKEYS ( LuaCairo : : ImageSurface ) ;
CLASSKEYS ( LuaCairo : : PangoLayout ) ;
2016-04-11 16:19:25 -04:00
2017-04-25 09:48:14 -04:00
CLASSKEYS ( LuaDialog : : Message ) ;
CLASSKEYS ( LuaDialog : : Dialog ) ;
2019-09-02 09:45:48 -04:00
CLASSKEYS ( LuaDialog : : ProgressWindow ) ;
2017-04-25 09:48:14 -04:00
2016-04-11 16:19:25 -04:00
# endif // end windows special case
2016-02-23 09:41:02 -05:00
/* Some notes on Lua bindings for libardour and friends
*
2022-05-08 20:20:45 -04:00
* - Prefer factory methods over Constructors whenever possible .
2016-02-23 09:41:02 -05:00
* Don ' t expose the constructor method unless required .
*
* e . g . Don ' t allow the script to construct a " Track " Object directly
* but do allow to create a " BBT_TIME " object .
*
* - Do not dereference Shared or Weak Pointers . Pass the pointer to Lua .
* - Define Objects as boost : shared_ptr Object whenever possible .
*
2023-02-16 18:33:28 -05:00
* Storing a std : : shared_ptr in a Lua - variable keeps the reference
2016-02-23 09:41:02 -05:00
* until that variable is set to ' nil ' .
* ( if the script were to keep a direct pointer to the object instance , the
* behaviour is undefined if the actual object goes away )
*
* Methods of the actual class are indirectly exposed ,
* boost : : * _ptr get ( ) and : : lock ( ) is implicit when the class is exported
* as LuaBridge ' s " WSPtrClass " .
*/
using namespace ARDOUR ;
2017-08-15 17:51:51 -04:00
/** Access libardour global configuration */
static RCConfiguration * _libardour_config ( ) {
return ARDOUR : : Config ;
}
2023-05-13 20:44:27 -04:00
template < class T >
static int to_ptr ( lua_State * L )
{
int top = lua_gettop ( L ) ;
if ( top ! = 1 ) {
return luaL_argerror ( L , 1 , " invalid number of arguments. " ) ;
}
T o = luabridge : : Stack < T > : : get ( L , 1 ) ;
T * p = new T ( o ) ;
std : : shared_ptr < T > sp ( p ) ;
luabridge : : Stack < std : : shared_ptr < T > > : : push ( L , sp ) ;
return 1 ;
}
2016-02-23 09:41:02 -05:00
void
LuaBindings : : stddef ( lua_State * L )
{
// std::list<std::string>
luabridge : : getGlobalNamespace ( L )
2016-03-21 13:57:20 -04:00
. beginNamespace ( " C " )
2016-02-23 09:41:02 -05:00
. beginStdList < std : : string > ( " StringList " )
. endClass ( )
. beginStdVector < std : : string > ( " StringVector " )
. endClass ( )
2016-10-02 21:51:53 -04:00
. beginStdVector < float > ( " FloatVector " )
. endClass ( )
2019-12-01 15:32:10 -05:00
. beginStdVector < uint8_t > ( " ByteVector " )
. endClass ( )
2016-03-18 15:00:44 -04:00
2024-02-21 19:27:29 -05:00
. beginStdVector < int32_t > ( " IntVector " )
. endClass ( )
2016-10-04 15:31:29 -04:00
. beginStdVector < float * > ( " FloatArrayVector " )
. endClass ( )
2019-12-01 15:32:10 -05:00
. registerArray < uint8_t > ( " ByteArray " )
. registerArray < float > ( " FloatArray " )
. registerArray < int32_t > ( " IntArray " )
2017-09-18 12:39:17 -04:00
// samplepos_t, sampleoffset_t lists e.g. AnalysisFeatureList
2017-03-17 13:12:50 -04:00
. beginStdList < int64_t > ( " Int64List " )
. endClass ( )
2019-12-01 15:32:10 -05:00
// TODO std::set
2016-03-21 13:57:20 -04:00
. endNamespace ( ) ;
2016-02-23 09:41:02 -05:00
}
void
LuaBindings : : common ( lua_State * L )
{
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " PBD " )
2016-07-17 11:04:02 -04:00
. addFunction ( " open_uri " , ( bool ( * ) ( const std : : string & ) ) & PBD : : open_uri )
. addFunction ( " open_uri " , & PBD : : open_folder )
2016-02-23 09:41:02 -05:00
. beginClass < PBD : : ID > ( " ID " )
. addConstructor < void ( * ) ( std : : string ) > ( )
. addFunction ( " to_s " , & PBD : : ID : : to_s ) // TODO special case LUA __tostring ?
. endClass ( )
2016-06-01 09:12:14 -04:00
. beginStdVector < PBD : : ID > ( " IdVector " ) . endClass ( )
2016-04-10 11:35:02 -04:00
. beginClass < XMLNode > ( " XMLNode " )
. addFunction ( " name " , & XMLNode : : name )
. endClass ( )
2023-05-18 15:47:27 -04:00
. beginClass < PBD : : Progress > ( " Progress " )
. endClass ( )
2016-03-20 23:06:05 -04:00
. beginClass < PBD : : Stateful > ( " Stateful " )
2016-05-05 17:44:10 -04:00
. addFunction ( " id " , & PBD : : Stateful : : id )
2016-02-23 09:41:02 -05:00
. addFunction ( " properties " , & PBD : : Stateful : : properties )
2016-04-09 19:45:41 -04:00
. addFunction ( " clear_changes " , & PBD : : Stateful : : clear_changes )
2016-03-20 23:06:05 -04:00
. endClass ( )
. beginWSPtrClass < PBD : : Stateful > ( " StatefulPtr " )
2016-05-05 17:44:10 -04:00
. addFunction ( " id " , & PBD : : Stateful : : id )
2016-03-20 23:06:05 -04:00
. addFunction ( " properties " , & PBD : : Stateful : : properties )
2016-04-09 19:45:41 -04:00
. addFunction ( " clear_changes " , & PBD : : Stateful : : clear_changes )
. endClass ( )
. deriveClass < PBD : : StatefulDestructible , PBD : : Stateful > ( " StatefulDestructible " )
2016-03-20 23:06:05 -04:00
. endClass ( )
2016-08-15 16:16:08 -04:00
. deriveClass < PBD : : Configuration , PBD : : Stateful > ( " Configuration " )
. endClass ( )
2016-03-20 23:06:05 -04:00
. deriveWSPtrClass < PBD : : StatefulDestructible , PBD : : Stateful > ( " StatefulDestructiblePtr " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2023-08-06 15:10:35 -04:00
. deriveClass < PBD : : Command , PBD : : StatefulDestructible > ( " Command " )
. addFunction ( " set_name " , & PBD : : Command : : set_name )
. addFunction ( " name " , & PBD : : Command : : name )
2016-04-09 19:45:41 -04:00
. endClass ( )
/* UndoTransaction::add_command() subscribes to DropReferences()
* and deletes the object .
*
* This object cannot be constructed by lua because lua would manage lifetime
* and delete the object leading to a double free .
*
* use Session : : add_stateful_diff_command ( )
* and Session : : abort_reversible_command ( )
*/
2023-08-06 15:10:35 -04:00
. deriveClass < PBD : : StatefulDiffCommand , PBD : : Command > ( " StatefulDiffCommand " )
2016-04-09 19:45:41 -04:00
. addFunction ( " undo " , & PBD : : StatefulDiffCommand : : undo )
. addFunction ( " empty " , & PBD : : StatefulDiffCommand : : empty )
. endClass ( )
2016-02-23 09:41:02 -05:00
. deriveWSPtrClass < PBD : : Controllable , PBD : : StatefulDestructible > ( " Controllable " )
2022-10-07 12:52:00 -04:00
. addCast < MPControl < gain_t > > ( " to_mpgain " )
. addCast < MPControl < bool > > ( " to_mptoggle " )
. addCast < AutomationControl > ( " to_automationcontrol " )
2016-04-11 08:04:45 -04:00
. addFunction ( " name " , & PBD : : Controllable : : name )
2016-02-23 09:41:02 -05:00
. addFunction ( " get_value " , & PBD : : Controllable : : get_value )
2022-10-17 17:24:41 -04:00
. addStaticFunction ( " registered_controllables " , & PBD : : Controllable : : registered_controllables )
2022-05-19 14:07:35 -04:00
. addStaticFunction ( " dump_registry " , & PBD : : Controllable : : dump_registry )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-07-06 11:44:06 -04:00
. beginClass < PBD : : RingBufferNPT < uint8_t > > ( " RingBuffer8 " )
. addConstructor < void ( * ) ( size_t ) > ( )
. addFunction ( " reset " , & PBD : : RingBufferNPT < uint8_t > : : reset )
. addFunction ( " read " , & PBD : : RingBufferNPT < uint8_t > : : read )
. addFunction ( " write " , & PBD : : RingBufferNPT < uint8_t > : : write )
2016-07-10 09:56:18 -04:00
. addFunction ( " write_one " , & PBD : : RingBufferNPT < uint8_t > : : write_one )
2016-07-06 11:44:06 -04:00
. addFunction ( " write_space " , & PBD : : RingBufferNPT < uint8_t > : : write_space )
. addFunction ( " read_space " , & PBD : : RingBufferNPT < uint8_t > : : read_space )
2016-07-10 09:01:29 -04:00
. addFunction ( " increment_read_ptr " , & PBD : : RingBufferNPT < uint8_t > : : increment_read_ptr )
. addFunction ( " increment_write_ptr " , & PBD : : RingBufferNPT < uint8_t > : : increment_write_ptr )
2016-07-06 11:44:06 -04:00
. endClass ( )
. beginClass < PBD : : RingBufferNPT < float > > ( " RingBufferF " )
. addConstructor < void ( * ) ( size_t ) > ( )
. addFunction ( " reset " , & PBD : : RingBufferNPT < float > : : reset )
. addFunction ( " read " , & PBD : : RingBufferNPT < float > : : read )
. addFunction ( " write " , & PBD : : RingBufferNPT < float > : : write )
2016-07-10 09:56:18 -04:00
. addFunction ( " write_one " , & PBD : : RingBufferNPT < float > : : write_one )
2016-07-06 11:44:06 -04:00
. addFunction ( " write_space " , & PBD : : RingBufferNPT < float > : : write_space )
. addFunction ( " read_space " , & PBD : : RingBufferNPT < float > : : read_space )
2016-07-10 09:01:29 -04:00
. addFunction ( " increment_read_ptr " , & PBD : : RingBufferNPT < float > : : increment_read_ptr )
. addFunction ( " increment_write_ptr " , & PBD : : RingBufferNPT < float > : : increment_write_ptr )
2016-07-06 11:44:06 -04:00
. endClass ( )
. beginClass < PBD : : RingBufferNPT < int > > ( " RingBufferI " )
. addConstructor < void ( * ) ( size_t ) > ( )
. addFunction ( " reset " , & PBD : : RingBufferNPT < int > : : reset )
. addFunction ( " read " , & PBD : : RingBufferNPT < int > : : read )
. addFunction ( " write " , & PBD : : RingBufferNPT < int > : : write )
2016-07-10 09:56:18 -04:00
. addFunction ( " write_one " , & PBD : : RingBufferNPT < int > : : write_one )
2016-07-06 11:44:06 -04:00
. addFunction ( " write_space " , & PBD : : RingBufferNPT < int > : : write_space )
. addFunction ( " read_space " , & PBD : : RingBufferNPT < int > : : read_space )
2016-07-10 09:01:29 -04:00
. addFunction ( " increment_read_ptr " , & PBD : : RingBufferNPT < int > : : increment_read_ptr )
. addFunction ( " increment_write_ptr " , & PBD : : RingBufferNPT < int > : : increment_write_ptr )
2016-07-06 11:44:06 -04:00
. endClass ( )
2016-05-14 17:54:04 -04:00
/* PBD enums */
2016-02-23 09:41:02 -05:00
. beginNamespace ( " GroupControlDisposition " )
. addConst ( " InverseGroup " , PBD : : Controllable : : GroupControlDisposition ( PBD : : Controllable : : InverseGroup ) )
. addConst ( " NoGroup " , PBD : : Controllable : : GroupControlDisposition ( PBD : : Controllable : : NoGroup ) )
. addConst ( " UseGroup " , PBD : : Controllable : : GroupControlDisposition ( PBD : : Controllable : : UseGroup ) )
. endNamespace ( )
2016-03-21 19:22:48 -04:00
. endNamespace ( ) ; // PBD
2016-02-23 09:41:02 -05:00
luabridge : : getGlobalNamespace ( L )
2016-03-21 19:22:48 -04:00
. beginNamespace ( " Timecode " )
2016-08-15 18:20:36 -04:00
2016-12-08 06:44:36 -05:00
. 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
2016-08-15 18:20:36 -04:00
/* libtimecode enums */
. beginNamespace ( " TimecodeFormat " )
. addConst ( " TC23976 " , Timecode : : TimecodeFormat ( Timecode : : timecode_23976 ) )
. addConst ( " TC24 " , Timecode : : TimecodeFormat ( Timecode : : timecode_24 ) )
. addConst ( " TC24976 " , Timecode : : TimecodeFormat ( Timecode : : timecode_24976 ) )
. addConst ( " TC25 " , Timecode : : TimecodeFormat ( Timecode : : timecode_25 ) )
. addConst ( " TC2997 " , Timecode : : TimecodeFormat ( Timecode : : timecode_2997 ) )
. addConst ( " TC2997DF " , Timecode : : TimecodeFormat ( Timecode : : timecode_2997drop ) )
. addConst ( " TC2997000 " , Timecode : : TimecodeFormat ( Timecode : : timecode_2997000 ) )
. addConst ( " TC2997000DF " , Timecode : : TimecodeFormat ( Timecode : : timecode_2997000drop ) )
. addConst ( " TC30 " , Timecode : : TimecodeFormat ( Timecode : : timecode_30 ) )
. addConst ( " TC5994 " , Timecode : : TimecodeFormat ( Timecode : : timecode_5994 ) )
. addConst ( " TC60 " , Timecode : : TimecodeFormat ( Timecode : : timecode_60 ) )
. endNamespace ( )
2021-12-11 10:31:54 -05:00
. endNamespace ( ) ; /* Timecode */
2016-02-23 09:41:02 -05:00
luabridge : : getGlobalNamespace ( L )
2016-03-21 19:22:48 -04:00
2021-12-11 10:31:54 -05:00
. beginNamespace ( " Temporal " )
2022-03-17 16:14:41 -04:00
. addFunction ( " superclock_ticks_per_second " , Temporal : : superclock_ticks_per_second )
2021-12-11 11:43:12 -05:00
. addConst ( " ticks_per_beat " , Temporal : : ticks_per_beat )
2021-12-11 10:31:54 -05:00
2022-01-24 00:21:12 -05:00
. beginClass < Temporal : : ratio_t > ( " ratio " )
. addConstructor < void ( * ) ( int64_t , int64_t ) > ( )
. addFunction ( " is_unity " , & Temporal : : ratio_t : : is_unity )
. addFunction ( " is_zero " , & Temporal : : ratio_t : : is_zero )
. endClass ( )
2021-12-11 10:31:54 -05:00
. beginClass < Temporal : : Beats > ( " Beats " )
2021-12-11 11:43:12 -05:00
. addConstructor < void ( * ) ( int32_t , int32_t ) > ( )
2022-09-26 20:23:50 -04:00
. addOperator ( " __add " , CPPOPERATOR ( Temporal : : Beats , + ) )
. addOperator ( " __sub " , CPPOPERATOR ( Temporal : : Beats , - ) )
. addOperator ( " __mul " , CPPOPERATOR ( Temporal : : Beats , * ) )
. addOperator ( " __div " , CPPOPERATOR ( Temporal : : Beats , / ) )
. addOperator ( " __mod " , CPPOPERATOR ( Temporal : : Beats , % ) )
. addOperator ( " __lt " , CPPCOMPERATOR ( Temporal : : Beats , < ) )
. addOperator ( " __le " , CPPCOMPERATOR ( Temporal : : Beats , < = ) )
. addOperator ( " __eq " , CPPCOMPERATOR ( Temporal : : Beats , = = ) )
2021-12-11 11:43:12 -05:00
. addStaticFunction ( " from_double " , & Temporal : : Beats : : from_double )
. addStaticFunction ( " beats " , & Temporal : : Beats : : beats )
2022-09-26 20:23:50 -04:00
. addStaticFunction ( " ticks " , & Temporal : : Beats : : ticks )
2023-09-10 16:23:57 -04:00
. addFunction ( " get_beats " , & Temporal : : Beats : : get_beats )
. addFunction ( " get_ticks " , & Temporal : : Beats : : get_ticks )
. addFunction ( " to_ticks " , ( int64_t ( Temporal : : Beats : : * ) ( ) const ) & Temporal : : Beats : : to_ticks )
2022-09-26 20:23:50 -04:00
. addFunction ( " diff " , & Temporal : : Beats : : diff )
. addFunction ( " prev_beat " , & Temporal : : Beats : : prev_beat )
. addFunction ( " next_beat " , & Temporal : : Beats : : next_beat )
. addFunction ( " round_to_beat " , & Temporal : : Beats : : round_to_beat )
. addFunction ( " round_up_to_beat " , & Temporal : : Beats : : round_up_to_beat )
. addFunction ( " round_down_to_beat " , & Temporal : : Beats : : round_down_to_beat )
2022-09-27 13:57:09 -04:00
. addFunction ( " str " , & Temporal : : Beats : : str )
2022-09-26 20:23:50 -04:00
. addMetamethod ( " __tostring " , & Temporal : : Beats : : str )
2021-12-11 10:31:54 -05:00
. endClass ( )
. beginClass < Temporal : : timepos_t > ( " timepos_t " )
2022-01-24 00:21:12 -05:00
. addConstructor < void ( * ) ( Temporal : : samplepos_t ) > ( )
2022-09-26 15:38:25 -04:00
. addOperator ( " __add " , CPPOPERATORALT ( Temporal : : timepos_t , Temporal : : timecnt_t , + ) )
2022-09-27 13:57:09 -04:00
. addOperator ( " __sub " , CPPOPERATORALT ( Temporal : : timepos_t , Temporal : : timecnt_t , . earlier ) )
2022-01-24 00:50:52 -05:00
//.addOperator ("__mod", CPPOPERATOR2(Temporal::timepos_t, Temporal::timepos_t, Temporal::timecnt_t, %))
2022-09-26 15:38:25 -04:00
. addOperator ( " __lt " , CPPCOMPERATORALT ( Temporal : : timepos_t , Temporal : : timecnt_t , < ) )
. addOperator ( " __le " , CPPCOMPERATORALT ( Temporal : : timepos_t , Temporal : : timecnt_t , < = ) )
2022-01-24 00:21:12 -05:00
. addOperator ( " __eq " , CPPCOMPERATOR ( Temporal : : timepos_t , = = ) )
2021-12-11 10:31:54 -05:00
. addStaticFunction ( " zero " , & Temporal : : timepos_t : : zero )
2022-09-27 13:57:09 -04:00
. addStaticFunction ( " max " , & Temporal : : timepos_t : : max )
. addStaticFunction ( " smallest_step " , & Temporal : : timepos_t : : smallest_step )
2021-12-11 10:31:54 -05:00
. addStaticFunction ( " from_ticks " , & Temporal : : timepos_t : : from_ticks )
2022-09-26 20:23:50 -04:00
# ifdef WITH_SUPERCLOCK_BINDINGS
. addStaticFunction ( " from_superclock " , & Temporal : : timepos_t : : from_superclock )
. addFunction ( " is_superclock " , & Temporal : : timepos_t : : is_superclock )
. addFunction ( " superclocks " , & Temporal : : timepos_t : : superclocks )
# endif
2022-01-24 00:21:12 -05:00
. addFunction ( " is_positive " , & Temporal : : timepos_t : : is_positive )
. addFunction ( " is_negative " , & Temporal : : timepos_t : : is_negative )
. addFunction ( " is_zero " , & Temporal : : timepos_t : : is_zero )
2021-12-11 10:31:54 -05:00
. addFunction ( " is_beats " , & Temporal : : timepos_t : : is_beats )
2022-01-24 00:21:12 -05:00
. addFunction ( " samples " , & Temporal : : timepos_t : : samples )
2022-09-27 13:57:09 -04:00
. addFunction ( " time_domain " , & Temporal : : timepos_t : : time_domain )
2022-01-24 00:21:12 -05:00
. addFunction ( " ticks " , & Temporal : : timepos_t : : ticks )
. addFunction ( " beats " , & Temporal : : timepos_t : : beats )
. addFunction ( " str " , & Temporal : : timepos_t : : str )
2022-05-27 14:46:58 -04:00
. addFunction ( " scale " , & Temporal : : timepos_t : : scale )
2022-09-27 13:57:09 -04:00
. addFunction ( " distance " , & Temporal : : timepos_t : : distance )
2022-09-26 15:38:25 -04:00
. addFunction ( " increment " , & Temporal : : timepos_t : : increment )
. addFunction ( " decrement " , & Temporal : : timepos_t : : decrement )
2022-01-24 00:21:12 -05:00
. addMetamethod ( " __tostring " , & Temporal : : timepos_t : : str )
2021-12-11 10:31:54 -05:00
. endClass ( )
. beginClass < timecnt_t > ( " timecnt_t " )
2022-01-24 00:21:12 -05:00
. addConstructor < void ( * ) ( Temporal : : samplepos_t ) > ( )
. addOperator ( " __add " , CPPOPERATOR ( Temporal : : timecnt_t , + ) )
. addOperator ( " __sub " , CPPOPERATOR ( Temporal : : timecnt_t , - ) )
2022-01-24 00:51:28 -05:00
. addOperator ( " __mod " , CPPOPERATOR ( Temporal : : timecnt_t , % ) )
2022-01-24 00:21:12 -05:00
. addOperator ( " __lt " , CPPCOMPERATOR ( Temporal : : timecnt_t , < ) )
. addOperator ( " __le " , CPPCOMPERATOR ( Temporal : : timecnt_t , < = ) )
. addOperator ( " __eq " , CPPCOMPERATOR ( Temporal : : timecnt_t , = = ) )
. addStaticFunction ( " zero " , & Temporal : : timecnt_t : : zero )
2022-09-27 13:57:09 -04:00
. addStaticFunction ( " max " , ( Temporal : : timecnt_t const & ( * ) ( ) ) & Temporal : : timecnt_t : : max )
2022-09-26 15:38:25 -04:00
. addStaticFunction ( " from_samples " , static_cast < Temporal : : timecnt_t ( * ) ( Temporal : : samplepos_t ) > ( & Temporal : : timecnt_t : : from_samples ) )
. addStaticFunction ( " from_ticks " , static_cast < Temporal : : timecnt_t ( * ) ( int64_t ) > ( & Temporal : : timecnt_t : : from_ticks ) )
2022-09-26 20:23:50 -04:00
# ifdef WITH_SUPERCLOCK_BINDINGS
2022-09-28 12:47:55 -04:00
. addStaticFunction ( " from_superclock " , static_cast < Temporal : : timecnt_t ( * ) ( superclock_t ) > ( & Temporal : : timecnt_t : : from_superclock ) )
2022-09-26 20:23:50 -04:00
. addFunction ( " superclocks " , & Temporal : : timecnt_t : : superclocks )
# endif
2022-01-24 00:21:12 -05:00
. addFunction ( " magnitude " , & Temporal : : timecnt_t : : magnitude )
. addFunction ( " position " , & Temporal : : timecnt_t : : position )
. addFunction ( " set_position " , & Temporal : : timecnt_t : : set_position )
. addFunction ( " is_positive " , & Temporal : : timecnt_t : : is_positive )
. addFunction ( " is_negative " , & Temporal : : timecnt_t : : is_negative )
. addFunction ( " is_zero " , & Temporal : : timecnt_t : : is_zero )
. addFunction ( " abs " , & Temporal : : timecnt_t : : abs )
. addFunction ( " time_domain " , & Temporal : : timecnt_t : : time_domain )
. addFunction ( " set_time_domain " , & Temporal : : timecnt_t : : set_time_domain )
. addFunction ( " samples " , & Temporal : : timecnt_t : : samples )
2022-09-27 13:57:09 -04:00
. addFunction ( " scale " , & Temporal : : timecnt_t : : scale )
2022-01-24 00:21:12 -05:00
. addFunction ( " beats " , & Temporal : : timecnt_t : : beats )
. addFunction ( " ticks " , & Temporal : : timecnt_t : : ticks )
. addFunction ( " str " , & Temporal : : timecnt_t : : str )
2022-05-27 14:46:58 -04:00
. addFunction ( " scale " , & Temporal : : timecnt_t : : scale )
2022-09-26 15:38:25 -04:00
. addFunction ( " decrement " , & Temporal : : timecnt_t : : decrement )
2022-01-24 00:21:12 -05:00
. addMetamethod ( " __tostring " , & Temporal : : timecnt_t : : str )
2021-12-11 10:31:54 -05:00
. endClass ( )
. beginClass < Temporal : : BBT_Time > ( " BBT_TIME " )
2023-02-15 20:19:42 -05:00
. addConstructor < void ( * ) ( int32_t , int32_t , int32_t ) > ( )
2021-12-11 10:31:54 -05:00
. addData ( " bars " , & Temporal : : BBT_Time : : bars )
. addData ( " beats " , & Temporal : : BBT_Time : : beats )
. addData ( " ticks " , & Temporal : : BBT_Time : : ticks )
2022-09-26 20:23:50 -04:00
. addOperator ( " __lt " , CPPCOMPERATOR ( Temporal : : BBT_Time , < ) )
. addOperator ( " __le " , CPPCOMPERATOR ( Temporal : : BBT_Time , < = ) )
. addOperator ( " __eq " , CPPCOMPERATOR ( Temporal : : BBT_Time , = = ) )
2022-09-27 13:57:09 -04:00
. addFunction ( " str " , & Temporal : : BBT_Time : : str )
2022-09-26 20:23:50 -04:00
. addMetamethod ( " __tostring " , & Temporal : : BBT_Time : : str )
2021-12-11 10:31:54 -05:00
// .addStaticData ("ticks_per_beat", &Temporal::ticks_per_beat, false)
. endClass ( )
2023-02-15 20:19:42 -05:00
. deriveClass < Temporal : : BBT_Argument , Temporal : : BBT_Time > ( " BBT_Argument " )
. addConstructor < void ( * ) ( int32_t , int32_t , int32_t ) > ( )
. endClass ( )
2022-09-28 12:47:55 -04:00
. beginClass < Temporal : : BBT_Offset > ( " BBT_Offset " )
. addConstructor < void ( * ) ( uint32_t , uint32_t , uint32_t ) > ( )
. addData ( " bars " , & Temporal : : BBT_Offset : : bars )
. addData ( " beats " , & Temporal : : BBT_Offset : : beats )
. addData ( " ticks " , & Temporal : : BBT_Offset : : ticks )
. addOperator ( " __lt " , CPPCOMPERATOR ( Temporal : : BBT_Offset , < ) )
. addOperator ( " __le " , CPPCOMPERATOR ( Temporal : : BBT_Offset , < = ) )
. addOperator ( " __eq " , CPPCOMPERATOR ( Temporal : : BBT_Offset , = = ) )
. addOperator ( " __add " , CPPOPERATOR ( Temporal : : BBT_Offset , + ) )
. addOperator ( " __sub " , CPPOPERATOR ( Temporal : : BBT_Offset , - ) )
#if 0
. addOperator ( " __mul " , CPPOPERATOR2 ( Temporal : : BBT_Offset , Temporal : : BBT_Offset , int , * ) )
. addOperator ( " __div " , CPPOPERATOR2 ( Temporal : : BBT_Offset , Temporal : : BBT_Offset , int , / ) )
# endif
. addFunction ( " str " , & Temporal : : BBT_Time : : str )
. addMetamethod ( " __tostring " , & Temporal : : BBT_Offset : : str ) // XXX
. endClass ( )
2021-12-11 10:31:54 -05:00
. beginClass < Temporal : : Tempo > ( " Tempo " )
2021-12-11 11:43:12 -05:00
. addConstructor < void ( * ) ( double , double , int ) > ( )
2021-12-11 10:31:54 -05:00
. addFunction ( " note_type " , & Temporal : : Tempo : : note_type )
. addFunction ( " note_types_per_minute " , ( double ( Temporal : : Tempo : : * ) ( ) const ) & Temporal : : Tempo : : note_types_per_minute )
. addFunction ( " quarter_notes_per_minute " , & Temporal : : Tempo : : quarter_notes_per_minute )
. addFunction ( " samples_per_quarter_note " , & Temporal : : Tempo : : samples_per_quarter_note )
. addFunction ( " samples_per_note_type " , & Temporal : : Tempo : : samples_per_note_type )
2022-09-26 20:23:50 -04:00
# ifdef WITH_SUPERCLOCK_BINDINGS
. addFunction ( " superclocks_per_note_type " , ( superclock_t ( Temporal : : Tempo : : * ) ( ) const ) & Temporal : : Tempo : : superclocks_per_note_type )
# endif
2021-12-11 10:31:54 -05:00
. endClass ( )
. beginClass < Temporal : : Meter > ( " Meter " )
. addConstructor < void ( * ) ( double , double ) > ( )
. addFunction ( " divisions_per_bar " , & Temporal : : Meter : : divisions_per_bar )
. addFunction ( " note_value " , & Temporal : : Meter : : note_value )
. endClass ( )
. beginClass < Temporal : : Point > ( " Point " )
. addFunction ( " sclock " , & Temporal : : Point : : sclock )
. addFunction ( " beats " , & Temporal : : Point : : beats )
. addFunction ( " sample " , & Temporal : : Point : : sample )
. addFunction ( " bbt " , & Temporal : : Point : : bbt )
. addFunction ( " time " , & Temporal : : Point : : time )
. endClass ( )
2022-09-26 20:23:50 -04:00
/* FIXME, direct access to parent class Temporal::Tempo fails here,
* even thought it is access via UserdataPtr at the same address */
2021-12-11 10:31:54 -05:00
. deriveClass < Temporal : : TempoPoint , Temporal : : Tempo > ( " TempoPoint " )
2022-09-26 20:23:50 -04:00
. addCast < Temporal : : Tempo > ( " to_tempo " )
2021-12-11 10:31:54 -05:00
. addCast < Temporal : : Point > ( " to_point " )
2022-09-26 20:23:50 -04:00
. addFunction ( " quarters_at_sample " , & Temporal : : TempoPoint : : quarters_at_sample )
. addFunction ( " time " , & Temporal : : TempoPoint : : time )
2021-12-11 10:31:54 -05:00
. endClass ( )
. deriveClass < Temporal : : MeterPoint , Temporal : : Meter > ( " MeterPoint " )
. addCast < Temporal : : Point > ( " to_point " )
. endClass ( )
2023-07-11 17:01:09 -04:00
. beginClass < Temporal : : TempoMetric > ( " TempoMetric " )
. addFunction ( " tempo " , & Temporal : : TempoMetric : : tempo )
. addFunction ( " meter " , & Temporal : : TempoMetric : : meter )
. addFunction ( " sample_at " , & Temporal : : TempoMetric : : sample_at )
. addFunction ( " quarters_at " , & Temporal : : TempoMetric : : quarters_at )
. addFunction ( " note_type " , & Temporal : : TempoMetric : : note_type )
. addFunction ( " note_value " , & Temporal : : TempoMetric : : note_value )
. addFunction ( " divisions_per_bar " , & Temporal : : TempoMetric : : divisions_per_bar )
. endClass ( )
. deriveClass < Temporal : : TempoMapPoint , Temporal : : Point > ( " TempoMapPoint " )
. addCast < Temporal : : TempoMetric > ( " to_tempometric " )
. addFunction ( " time " , & Temporal : : TempoMapPoint : : time )
. endClass ( )
2023-07-14 17:48:05 -04:00
. beginStdVector < Temporal : : TempoMapPoint > ( " TempoMapPoints " )
2023-07-11 17:01:09 -04:00
. endClass ( )
2021-12-11 10:31:54 -05:00
. beginWSPtrClass < Temporal : : TempoMap > ( " TempoMap " )
2022-09-26 20:23:50 -04:00
/* we cannot use ::fetch or ::use because LuaBridge cannot overload
* shared_ptr < const T > and shared_ptr < T > in the same class .
*/
. addStaticFunction ( " read " , & Temporal : : TempoMap : : read )
2021-12-11 12:30:29 -05:00
. addStaticFunction ( " write_copy " , & Temporal : : TempoMap : : write_copy )
2021-12-11 10:31:54 -05:00
. addStaticFunction ( " update " , & Temporal : : TempoMap : : update )
. addStaticFunction ( " abort_update " , & Temporal : : TempoMap : : abort_update )
. addFunction ( " set_tempo " , ( Temporal : : TempoPoint & ( Temporal : : TempoMap : : * ) ( Temporal : : Tempo const & , Temporal : : timepos_t const & ) ) & Temporal : : TempoMap : : set_tempo )
. addFunction ( " set_meter " , ( Temporal : : MeterPoint & ( Temporal : : TempoMap : : * ) ( Temporal : : Meter const & , Temporal : : timepos_t const & ) ) & Temporal : : TempoMap : : set_meter )
2022-09-28 12:47:55 -04:00
. addFunction ( " set_ramped " , & Temporal : : TempoMap : : set_ramped )
. addFunction ( " set_continuing " , & Temporal : : TempoMap : : set_continuing )
. addFunction ( " tempo_at " , ( Temporal : : TempoPoint const & ( Temporal : : TempoMap : : * ) ( Temporal : : timepos_t const & ) const ) & Temporal : : TempoMap : : tempo_at )
2023-02-10 18:06:08 -05:00
. addFunction ( " tempo_at_bbt " , ( Temporal : : TempoPoint const & ( Temporal : : TempoMap : : * ) ( Temporal : : BBT_Argument const & ) const ) & Temporal : : TempoMap : : tempo_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " tempo_at_beats " , ( Temporal : : TempoPoint const & ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & ) const ) & Temporal : : TempoMap : : tempo_at )
. addFunction ( " meter_at " , ( Temporal : : MeterPoint const & ( Temporal : : TempoMap : : * ) ( Temporal : : timepos_t const & ) const ) & Temporal : : TempoMap : : meter_at )
2023-02-10 18:06:08 -05:00
. addFunction ( " meter_at_bbt " , ( Temporal : : MeterPoint const & ( Temporal : : TempoMap : : * ) ( Temporal : : BBT_Argument const & ) const ) & Temporal : : TempoMap : : meter_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " meter_at_beats " , ( Temporal : : MeterPoint const & ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & ) const ) & Temporal : : TempoMap : : meter_at )
2023-02-12 14:02:22 -05:00
. addFunction ( " bbt_at " , ( Temporal : : BBT_Argument ( Temporal : : TempoMap : : * ) ( Temporal : : timepos_t const & ) const ) & Temporal : : TempoMap : : bbt_at )
. addFunction ( " bbt_at_beats " , ( Temporal : : BBT_Argument ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & ) const ) & Temporal : : TempoMap : : bbt_at )
2022-09-28 12:47:55 -04:00
# ifdef WITH_SUPERCLOCK_BINDINGS
. addFunction ( " tempo_at_sc " , ( Temporal : : TempoPoint const & ( Temporal : : TempoMap : : * ) ( superclock_t ) const ) & Temporal : : TempoMap : : tempo_at )
. addFunction ( " meter_at_sc " , ( Temporal : : MeterPoint const & ( Temporal : : TempoMap : : * ) ( superclock_t ) const ) & Temporal : : TempoMap : : meter_at )
. addFunction ( " superclock_at " , ( superclock_t ( Temporal : : TempoMap : : * ) ( Temporal : : timepos_t const & ) const ) & Temporal : : TempoMap : : superclock_at )
2023-02-10 18:06:08 -05:00
. addFunction ( " superclock_at_bbt " , ( superclock_t ( Temporal : : TempoMap : : * ) ( Temporal : : BBT_Argument const & ) const ) & Temporal : : TempoMap : : superclock_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " superclock_at_beats " , ( superclock_t ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & ) const ) & Temporal : : TempoMap : : superclock_at )
# endif
2021-12-11 10:31:54 -05:00
. addFunction ( " quarters_at " , ( Temporal : : Beats ( Temporal : : TempoMap : : * ) ( Temporal : : timepos_t const & ) const ) & Temporal : : TempoMap : : quarters_at )
2023-02-10 18:06:08 -05:00
. addFunction ( " quarters_at_bbt " , ( Temporal : : Beats ( Temporal : : TempoMap : : * ) ( Temporal : : BBT_Argument const & ) const ) & Temporal : : TempoMap : : quarters_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " quarters_at_sample " , & Temporal : : TempoMap : : quarters_at_sample )
2021-12-11 10:31:54 -05:00
. addFunction ( " sample_at " , ( samplepos_t ( Temporal : : TempoMap : : * ) ( Temporal : : timepos_t const & ) const ) & Temporal : : TempoMap : : sample_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " sample_at_bbt " , ( samplepos_t ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & ) const ) & Temporal : : TempoMap : : sample_at )
2022-09-26 20:23:50 -04:00
. addFunction ( " sample_at_beats " , ( samplepos_t ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & ) const ) & Temporal : : TempoMap : : sample_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " bbt_duration_at " , & Temporal : : TempoMap : : bbt_duration_at )
. addFunction ( " bbtwalk_to_quarters " , ( Temporal : : Beats ( Temporal : : TempoMap : : * ) ( Temporal : : Beats const & , Temporal : : BBT_Offset const & ) const ) & Temporal : : TempoMap : : bbtwalk_to_quarters )
2023-02-10 18:06:08 -05:00
. addFunction ( " bbtwalk_to_quarters_bbt " , ( Temporal : : Beats ( Temporal : : TempoMap : : * ) ( Temporal : : BBT_Argument const & , Temporal : : BBT_Offset const & ) const ) & Temporal : : TempoMap : : bbtwalk_to_quarters )
2022-09-28 12:47:55 -04:00
. addFunction ( " convert_duration " , & Temporal : : TempoMap : : convert_duration )
. addFunction ( " bbt_walk " , & Temporal : : TempoMap : : bbt_walk )
2023-07-11 17:01:09 -04:00
# ifdef WITH_SUPERCLOCK_BINDINGS
2023-07-14 17:48:05 -04:00
. addRefFunction ( " grid " , & Temporal : : TempoMap : : grid )
2023-07-11 17:01:09 -04:00
# endif
2022-09-28 12:47:55 -04:00
2022-09-26 20:23:50 -04:00
. addFunction ( " quarters_per_minute_at " , & Temporal : : TempoMap : : quarters_per_minute_at )
2022-09-28 12:47:55 -04:00
. addFunction ( " round_to_bar " , & Temporal : : TempoMap : : round_to_bar )
. addRefFunction ( " midi_clock_beat_at_or_after " , & Temporal : : TempoMap : : midi_clock_beat_at_or_after )
2021-12-11 10:31:54 -05:00
. endClass ( )
/* libtemporal enums */
. beginNamespace ( " TimeDomain " )
. addConst ( " AudioTime " , Temporal : : AudioTime )
. addConst ( " BeatTime " , Temporal : : BeatTime )
. endNamespace ( )
. beginNamespace ( " Tempo " )
. beginNamespace ( " Type " )
. addConst ( " Ramp " , Temporal : : Tempo : : Type ( Temporal : : Tempo : : Ramped ) )
. addConst ( " Constant " , Temporal : : Tempo : : Type ( Temporal : : Tempo : : Constant ) )
. endNamespace ( )
. endNamespace ( )
. endNamespace ( ) /* end of Temporal namespace */
2016-03-21 19:22:48 -04:00
. beginNamespace ( " Evoral " )
2017-09-18 12:39:17 -04:00
. beginClass < Evoral : : Event < samplepos_t > > ( " Event " )
. addFunction ( " clear " , & Evoral : : Event < samplepos_t > : : clear )
. addFunction ( " size " , & Evoral : : Event < samplepos_t > : : size )
. addFunction ( " set_buffer " , & Evoral : : Event < samplepos_t > : : set_buffer )
. addFunction ( " buffer " , ( uint8_t * ( Evoral : : Event < samplepos_t > : : * ) ( ) ) & Evoral : : Event < samplepos_t > : : buffer )
. addFunction ( " time " , ( samplepos_t ( Evoral : : Event < samplepos_t > : : * ) ( ) ) & Evoral : : Event < samplepos_t > : : time )
2016-10-06 18:23:33 -04:00
. endClass ( )
2016-03-21 19:22:48 -04:00
. beginClass < Evoral : : Parameter > ( " Parameter " )
. addConstructor < void ( * ) ( uint32_t , uint8_t , uint32_t ) > ( )
. addFunction ( " type " , & Evoral : : Parameter : : type )
. addFunction ( " channel " , & Evoral : : Parameter : : channel )
. addFunction ( " id " , & Evoral : : Parameter : : id )
. endClass ( )
2017-04-23 22:10:10 -04:00
. beginClass < Evoral : : ControlEvent > ( " ControlEvent " )
. addData ( " when " , & Evoral : : ControlEvent : : when )
. addData ( " value " , & Evoral : : ControlEvent : : value )
. endClass ( )
2016-03-21 19:22:48 -04:00
. beginWSPtrClass < Evoral : : ControlList > ( " ControlList " )
2021-02-21 13:10:52 -05:00
. addCast < AutomationList > ( " to_automationlist " )
2016-03-21 19:22:48 -04:00
. addFunction ( " add " , & Evoral : : ControlList : : add )
2017-12-31 12:14:55 -05:00
. addFunction ( " editor_add " , & Evoral : : ControlList : : editor_add )
2016-04-10 11:35:02 -04:00
. addFunction ( " thin " , & Evoral : : ControlList : : thin )
. addFunction ( " eval " , & Evoral : : ControlList : : eval )
. addRefFunction ( " rt_safe_eval " , & Evoral : : ControlList : : rt_safe_eval )
. addFunction ( " interpolation " , & Evoral : : ControlList : : interpolation )
. addFunction ( " set_interpolation " , & Evoral : : ControlList : : set_interpolation )
. addFunction ( " truncate_end " , & Evoral : : ControlList : : truncate_end )
. addFunction ( " truncate_start " , & Evoral : : ControlList : : truncate_start )
2021-12-11 10:31:54 -05:00
. addFunction ( " clear " , ( void ( Evoral : : ControlList : : * ) ( Temporal : : timepos_t const & , timepos_t const & ) ) & Evoral : : ControlList : : clear )
2017-04-23 22:10:10 -04:00
. addFunction ( " clear_list " , ( void ( Evoral : : ControlList : : * ) ( ) ) & Evoral : : ControlList : : clear )
2016-04-10 11:35:02 -04:00
. addFunction ( " in_write_pass " , & Evoral : : ControlList : : in_write_pass )
2017-04-23 22:10:10 -04:00
. addFunction ( " events " , & Evoral : : ControlList : : events )
2020-09-13 17:56:36 -04:00
. addFunction ( " size " , & Evoral : : ControlList : : size )
2016-03-21 19:22:48 -04:00
. endClass ( )
. beginWSPtrClass < Evoral : : ControlSet > ( " ControlSet " )
. endClass ( )
. beginWSPtrClass < Evoral : : Control > ( " Control " )
2023-02-16 18:33:28 -05:00
. addFunction ( " list " , ( std : : shared_ptr < Evoral : : ControlList > ( Evoral : : Control : : * ) ( ) ) & Evoral : : Control : : list )
2016-03-21 19:22:48 -04:00
. endClass ( )
. beginClass < Evoral : : ParameterDescriptor > ( " ParameterDescriptor " )
. addVoidConstructor ( )
. addData ( " lower " , & Evoral : : ParameterDescriptor : : lower )
. addData ( " upper " , & Evoral : : ParameterDescriptor : : upper )
. addData ( " normal " , & Evoral : : ParameterDescriptor : : normal )
. addData ( " toggled " , & Evoral : : ParameterDescriptor : : toggled )
2017-06-19 03:52:11 -04:00
. addData ( " logarithmic " , & Evoral : : ParameterDescriptor : : logarithmic )
2021-10-04 10:56:39 -04:00
. addData ( " rangesteps " , & Evoral : : ParameterDescriptor : : rangesteps )
2016-03-21 19:22:48 -04:00
. endClass ( )
2020-09-20 18:34:09 -04:00
. beginClass < Temporal : : Range > ( " Range " )
2021-12-11 10:31:54 -05:00
. addConstructor < void ( * ) ( Temporal : : timepos_t , Temporal : : timepos_t ) > ( )
2020-09-20 18:34:09 -04:00
. addFunction ( " start " , & Temporal : : Range : : start )
/* "end is a reserved Lua word */
. addFunction ( " _end " , & Temporal : : Range : : end )
2016-04-09 09:42:32 -04:00
. endClass ( )
2017-09-24 12:03:54 -04:00
. deriveWSPtrClass < Evoral : : Sequence < Temporal : : Beats > , Evoral : : ControlSet > ( " Sequence " )
2016-10-06 18:23:33 -04:00
. endClass ( )
2017-09-24 12:03:54 -04:00
. beginWSPtrClass < Evoral : : Note < Temporal : : Beats > > ( " NotePtr " )
. addFunction ( " time " , & Evoral : : Note < Temporal : : Beats > : : time )
. addFunction ( " note " , & Evoral : : Note < Temporal : : Beats > : : note )
. addFunction ( " velocity " , & Evoral : : Note < Temporal : : Beats > : : velocity )
. addFunction ( " off_velocity " , & Evoral : : Note < Temporal : : Beats > : : off_velocity )
. addFunction ( " length " , & Evoral : : Note < Temporal : : Beats > : : length )
. addFunction ( " channel " , & Evoral : : Note < Temporal : : Beats > : : channel )
2016-10-06 18:23:33 -04:00
. endClass ( )
2016-04-10 11:35:02 -04:00
/* libevoral enums */
. beginNamespace ( " InterpolationStyle " )
. addConst ( " Discrete " , Evoral : : ControlList : : InterpolationStyle ( Evoral : : ControlList : : Discrete ) )
. addConst ( " Linear " , Evoral : : ControlList : : InterpolationStyle ( Evoral : : ControlList : : Linear ) )
. addConst ( " Curved " , Evoral : : ControlList : : InterpolationStyle ( Evoral : : ControlList : : Curved ) )
2024-02-27 11:05:10 -05:00
. addConst ( " Logarithmic " , Evoral : : ControlList : : InterpolationStyle ( Evoral : : ControlList : : Logarithmic ) )
. addConst ( " Exponential " , Evoral : : ControlList : : InterpolationStyle ( Evoral : : ControlList : : Exponential ) )
2016-04-10 11:35:02 -04:00
. endNamespace ( )
2020-09-19 16:04:03 -04:00
. beginNamespace ( " EventType " )
. addConst ( " NO_EVENT " , Evoral : : EventType ( Evoral : : NO_EVENT ) )
. addConst ( " MIDI_EVENT " , Evoral : : EventType ( Evoral : : MIDI_EVENT ) )
. addConst ( " LIVE_MIDI_EVENT " , Evoral : : EventType ( Evoral : : LIVE_MIDI_EVENT ) )
. endNamespace ( )
2016-11-19 15:18:15 -05:00
. endNamespace ( ) ; // Evoral
2016-03-21 19:22:48 -04:00
2016-11-19 15:18:15 -05:00
luabridge : : getGlobalNamespace ( L )
2016-10-02 21:51:53 -04:00
. beginNamespace ( " Vamp " )
. beginClass < Vamp : : RealTime > ( " RealTime " )
. addConstructor < void ( * ) ( int , int ) > ( )
2016-10-03 12:10:39 -04:00
. addData ( " sec " , & Vamp : : RealTime : : sec , false )
. addData ( " nsec " , & Vamp : : RealTime : : nsec , false )
2016-10-02 21:51:53 -04:00
. addFunction ( " usec " , & Vamp : : RealTime : : usec )
. addFunction ( " msec " , & Vamp : : RealTime : : msec )
. addFunction ( " toString " , & Vamp : : RealTime : : toString )
2016-10-03 12:10:39 -04:00
. addStaticFunction ( " realTime2Frame " , & Vamp : : RealTime : : realTime2Frame )
. addStaticFunction ( " frame2RealTime " , & Vamp : : RealTime : : frame2RealTime )
2016-10-02 21:51:53 -04:00
. endClass ( )
. beginClass < Vamp : : PluginBase > ( " PluginBase " )
. addFunction ( " getIdentifier " , & Vamp : : PluginBase : : getIdentifier )
. addFunction ( " getName " , & Vamp : : PluginBase : : getName )
. addFunction ( " getDescription " , & Vamp : : PluginBase : : getDescription )
. addFunction ( " getMaker " , & Vamp : : PluginBase : : getMaker )
. addFunction ( " getCopyright " , & Vamp : : PluginBase : : getCopyright )
. addFunction ( " getPluginVersion " , & Vamp : : PluginBase : : getPluginVersion )
. addFunction ( " getParameterDescriptors " , & Vamp : : PluginBase : : getParameterDescriptors )
. addFunction ( " getParameter " , & Vamp : : PluginBase : : getParameter )
. addFunction ( " setParameter " , & Vamp : : PluginBase : : setParameter )
. addFunction ( " getPrograms " , & Vamp : : PluginBase : : getPrograms )
. addFunction ( " getCurrentProgram " , & Vamp : : PluginBase : : getCurrentProgram )
. addFunction ( " selectProgram " , & Vamp : : PluginBase : : selectProgram )
. addFunction ( " getType " , & Vamp : : PluginBase : : getType )
. endClass ( )
. beginNamespace ( " PluginBase " )
. beginClass < Vamp : : PluginBase : : ParameterDescriptor > ( " ParameterDescriptor " )
. addData ( " identifier " , & Vamp : : PluginBase : : ParameterDescriptor : : identifier )
. addData ( " name " , & Vamp : : PluginBase : : ParameterDescriptor : : name )
. addData ( " description " , & Vamp : : PluginBase : : ParameterDescriptor : : description )
. addData ( " unit " , & Vamp : : PluginBase : : ParameterDescriptor : : unit )
. addData ( " minValue " , & Vamp : : PluginBase : : ParameterDescriptor : : minValue )
. addData ( " maxValue " , & Vamp : : PluginBase : : ParameterDescriptor : : maxValue )
. addData ( " defaultValue " , & Vamp : : PluginBase : : ParameterDescriptor : : defaultValue )
. addData ( " isQuantized " , & Vamp : : PluginBase : : ParameterDescriptor : : isQuantized )
. addData ( " quantizeStep " , & Vamp : : PluginBase : : ParameterDescriptor : : quantizeStep )
. addData ( " valueNames " , & Vamp : : PluginBase : : ParameterDescriptor : : valueNames )
. endClass ( )
. beginStdVector < Vamp : : PluginBase : : ParameterDescriptor > ( " ParameterList " )
. endClass ( )
. endNamespace ( ) // Vamp::PluginBase
. deriveClass < Vamp : : Plugin , Vamp : : PluginBase > ( " Plugin " )
2016-10-04 15:31:29 -04:00
//.addFunction ("process", &Vamp::Plugin::process) // unusable due to float*const* -> LuaAPI::Vamp::process
2016-10-06 11:49:16 -04:00
. addFunction ( " initialise " , & Vamp : : Plugin : : initialise )
. addFunction ( " reset " , & Vamp : : Plugin : : reset )
. addFunction ( " getInputDomain " , & Vamp : : Plugin : : getInputDomain )
. addFunction ( " getPreferredBlockSize " , & Vamp : : Plugin : : getPreferredBlockSize )
. addFunction ( " getPreferredStepSize " , & Vamp : : Plugin : : getPreferredStepSize )
. addFunction ( " getMinChannelCount " , & Vamp : : Plugin : : getMinChannelCount )
. addFunction ( " getMaxChannelCount " , & Vamp : : Plugin : : getMaxChannelCount )
. addFunction ( " getOutputDescriptors " , & Vamp : : Plugin : : getOutputDescriptors )
2016-10-02 21:51:53 -04:00
. addFunction ( " getRemainingFeatures " , & Vamp : : Plugin : : getRemainingFeatures )
2016-10-06 11:49:16 -04:00
. addFunction ( " getType " , & Vamp : : Plugin : : getType )
2016-10-02 21:51:53 -04:00
. endClass ( )
. beginNamespace ( " Plugin " )
. beginClass < Vamp : : Plugin : : OutputDescriptor > ( " OutputDescriptor " )
. addData ( " identifier " , & Vamp : : Plugin : : OutputDescriptor : : identifier )
. addData ( " description " , & Vamp : : Plugin : : OutputDescriptor : : description )
. addData ( " unit " , & Vamp : : Plugin : : OutputDescriptor : : unit )
. addData ( " hasFixedBinCount " , & Vamp : : Plugin : : OutputDescriptor : : hasFixedBinCount )
. addData ( " binCount " , & Vamp : : Plugin : : OutputDescriptor : : binCount )
. addData ( " binNames " , & Vamp : : Plugin : : OutputDescriptor : : binNames )
. addData ( " hasKnownExtents " , & Vamp : : Plugin : : OutputDescriptor : : hasKnownExtents )
. addData ( " minValue " , & Vamp : : Plugin : : OutputDescriptor : : minValue )
. addData ( " maxValue " , & Vamp : : Plugin : : OutputDescriptor : : maxValue )
. addData ( " isQuantized " , & Vamp : : Plugin : : OutputDescriptor : : isQuantized )
. addData ( " quantizeStep " , & Vamp : : Plugin : : OutputDescriptor : : quantizeStep )
. addData ( " sampleType " , & Vamp : : Plugin : : OutputDescriptor : : sampleType )
. addData ( " sampleRate " , & Vamp : : Plugin : : OutputDescriptor : : sampleRate )
. addData ( " hasDuration " , & Vamp : : Plugin : : OutputDescriptor : : hasDuration )
. endClass ( )
2016-10-06 11:49:16 -04:00
/* Vamp::Plugin enums */
. beginNamespace ( " InputDomain " )
. addConst ( " TimeDomain " , Vamp : : Plugin : : InputDomain ( Vamp : : Plugin : : TimeDomain ) )
. addConst ( " FrequencyDomain " , Vamp : : Plugin : : InputDomain ( Vamp : : Plugin : : FrequencyDomain ) )
. endNamespace ( )
2016-10-02 21:51:53 -04:00
/* Vamp::Plugin::OutputDescriptor enum */
2016-10-06 11:49:16 -04:00
. beginNamespace ( " OutputDescriptor " )
2016-10-02 21:51:53 -04:00
. beginNamespace ( " SampleType " )
. addConst ( " OneSamplePerStep " , Vamp : : Plugin : : OutputDescriptor : : SampleType ( Vamp : : Plugin : : OutputDescriptor : : OneSamplePerStep ) )
. addConst ( " FixedSampleRate " , Vamp : : Plugin : : OutputDescriptor : : SampleType ( Vamp : : Plugin : : OutputDescriptor : : FixedSampleRate ) )
. addConst ( " VariableSampleRate " , Vamp : : Plugin : : OutputDescriptor : : SampleType ( Vamp : : Plugin : : OutputDescriptor : : VariableSampleRate ) )
. endNamespace ( )
. endNamespace ( ) /* Vamp::Plugin::OutputDescriptor */
. beginClass < Vamp : : Plugin : : Feature > ( " Feature " )
. addData ( " hasTimestamp " , & Vamp : : Plugin : : Feature : : hasTimestamp , false )
. addData ( " timestamp " , & Vamp : : Plugin : : Feature : : timestamp , false )
. addData ( " hasDuration " , & Vamp : : Plugin : : Feature : : hasDuration , false )
. addData ( " duration " , & Vamp : : Plugin : : Feature : : duration , false )
. addData ( " values " , & Vamp : : Plugin : : Feature : : values , false )
. addData ( " label " , & Vamp : : Plugin : : Feature : : label , false )
. endClass ( )
. beginStdVector < Vamp : : Plugin : : OutputDescriptor > ( " OutputList " )
. endClass ( )
. beginStdVector < Vamp : : Plugin : : Feature > ( " FeatureList " )
. endClass ( )
. beginStdMap < int , Vamp : : Plugin : : FeatureList > ( " FeatureSet " )
. endClass ( )
. endNamespace ( ) // Vamp::Plugin
2016-11-19 15:18:15 -05:00
. endNamespace ( ) ; // Vamp
2016-10-02 21:51:53 -04:00
2016-11-19 15:18:15 -05:00
luabridge : : getGlobalNamespace ( L )
2016-02-23 09:41:02 -05:00
. beginNamespace ( " ARDOUR " )
2016-04-09 09:42:32 -04:00
2021-05-12 20:51:17 -04:00
. addConst ( " revision " , ARDOUR : : revision )
2016-04-09 09:42:32 -04:00
. beginClass < InterThreadInfo > ( " InterThreadInfo " )
. addVoidConstructor ( )
. addData ( " done " , const_cast < bool InterThreadInfo : : * > ( & InterThreadInfo : : done ) )
2016-04-19 13:07:09 -04:00
#if 0 // currently unused, lua is single-threaded, no custom UIs.
. addData ( " cancel " , ( bool InterThreadInfo : : * ) & InterThreadInfo : : cancel )
# endif
2016-04-09 09:42:32 -04:00
. addData ( " progress " , const_cast < float InterThreadInfo : : * > ( & InterThreadInfo : : progress ) )
. endClass ( )
2020-09-20 18:34:09 -04:00
. beginClass < TimelineRange > ( " TimelineRange " )
2021-12-11 10:31:54 -05:00
. addConstructor < void ( * ) ( Temporal : : timepos_t , Temporal : : timepos_t , uint32_t ) > ( )
2020-09-20 18:34:09 -04:00
. addFunction ( " length " , & TimelineRange : : length )
. addFunction ( " equal " , & TimelineRange : : equal )
. addFunction ( " start " , & TimelineRange : : start )
. addFunction ( " _end " , & TimelineRange : : end ) // XXX "end" is a lua reserved word
. addData ( " id " , & TimelineRange : : id )
2016-04-09 09:42:32 -04:00
. endClass ( )
2016-02-23 09:41:02 -05:00
. beginWSPtrClass < PluginInfo > ( " PluginInfo " )
2017-01-21 14:08:12 -05:00
. addNilPtrConstructor ( )
2016-08-26 13:04:07 -04:00
. 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 )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-03-18 17:52:19 -04:00
. beginNamespace ( " Route " )
. beginClass < Route : : ProcessorStreams > ( " ProcessorStreams " )
. addVoidConstructor ( )
. endClass ( )
. endNamespace ( )
2016-03-25 20:03:46 -04:00
. beginClass < ChanMapping > ( " ChanMapping " )
. addVoidConstructor ( )
2016-03-29 13:12:29 -04:00
. addFunction ( " get " , static_cast < uint32_t ( ChanMapping : : * ) ( DataType , uint32_t ) const > ( & ChanMapping : : get ) )
2016-03-25 20:03:46 -04:00
. addFunction ( " set " , & ChanMapping : : set )
2016-07-07 09:36:13 -04:00
. addFunction ( " count " , & ChanMapping : : count )
. addFunction ( " n_total " , & ChanMapping : : n_total )
. addFunction ( " is_monotonic " , & ChanMapping : : is_monotonic )
2016-05-04 19:28:17 -04:00
. addConst ( " Invalid " , 4294967295U ) // UINT32_MAX
2016-03-25 20:03:46 -04:00
. endClass ( )
2016-02-23 09:41:02 -05:00
. beginNamespace ( " Properties " )
// templated class definitions
. beginClass < PBD : : PropertyDescriptor < bool > > ( " BoolProperty " ) . endClass ( )
. beginClass < PBD : : PropertyDescriptor < float > > ( " FloatProperty " ) . endClass ( )
2022-09-27 13:57:09 -04:00
. beginClass < PBD : : PropertyDescriptor < std : : string > > ( " StringProperty " ) . endClass ( )
. beginClass < PBD : : PropertyDescriptor < samplepos_t > > ( " SamplePosProperty " ) . endClass ( )
. beginClass < PBD : : PropertyDescriptor < timepos_t > > ( " TimePosProperty " ) . endClass ( )
. beginClass < PBD : : PropertyDescriptor < timecnt_t > > ( " TimeCntProperty " ) . endClass ( )
2016-02-23 09:41:02 -05:00
// actual references (TODO: also expose GQuark for std::set)
// ardour/region.h
. addConst ( " Start " , & ARDOUR : : Properties : : start )
. addConst ( " Length " , & ARDOUR : : Properties : : length )
2022-09-27 13:57:09 -04:00
. addConst ( " Layer " , & ARDOUR : : Properties : : layer )
. addConst ( " Muted " , & ARDOUR : : Properties : : muted )
. addConst ( " Opaque " , & ARDOUR : : Properties : : opaque )
2016-02-23 09:41:02 -05:00
. endNamespace ( )
. beginClass < PBD : : PropertyChange > ( " PropertyChange " )
// TODO add special handling (std::set<PropertyID>), PropertyID is a GQuark.
2020-10-26 10:52:17 -04:00
// -> direct map to lua table beginStdSet()
2016-02-23 09:41:02 -05:00
//
// expand templated PropertyDescriptor<T>
. addFunction ( " containsBool " , & PBD : : PropertyChange : : contains < bool > )
. addFunction ( " containsFloat " , & PBD : : PropertyChange : : contains < float > )
2022-09-27 13:57:09 -04:00
. addFunction ( " containsString " , & PBD : : PropertyChange : : contains < std : : string > )
2019-06-15 19:14:17 -04:00
. addFunction ( " containsSamplePos " , & PBD : : PropertyChange : : contains < samplepos_t > )
2022-09-27 13:57:09 -04:00
. addFunction ( " containsTimePos " , & PBD : : PropertyChange : : contains < timepos_t > )
. addFunction ( " containsTimeCnt " , & PBD : : PropertyChange : : contains < timecnt_t > )
2016-02-23 09:41:02 -05:00
. endClass ( )
. beginClass < PBD : : PropertyList > ( " PropertyList " )
// is-a std::map<PropertyID, PropertyBase*>
. endClass ( )
. deriveClass < PBD : : OwnedPropertyList , PBD : : PropertyList > ( " OwnedPropertyList " )
. endClass ( )
2017-04-23 22:10:10 -04:00
. deriveWSPtrClass < AutomationList , Evoral : : ControlList > ( " AutomationList " )
2016-04-10 11:35:02 -04:00
. addCast < PBD : : Stateful > ( " to_stateful " )
. addCast < PBD : : StatefulDestructible > ( " to_statefuldestructible " )
2017-04-23 22:10:10 -04:00
. addCast < Evoral : : ControlList > ( " list " ) // deprecated
2016-04-10 11:35:02 -04:00
. addFunction ( " get_state " , & AutomationList : : get_state )
. addFunction ( " memento_command " , & AutomationList : : memento_command )
. addFunction ( " touching " , & AutomationList : : touching )
. addFunction ( " writing " , & AutomationList : : writing )
. addFunction ( " touch_enabled " , & AutomationList : : touch_enabled )
. endClass ( )
2016-03-20 23:06:05 -04:00
. deriveClass < Location , PBD : : StatefulDestructible > ( " Location " )
2016-09-07 16:56:56 -04:00
. addFunction ( " name " , & Location : : name )
2016-03-20 23:06:05 -04:00
. addFunction ( " locked " , & Location : : locked )
. addFunction ( " lock " , & Location : : lock )
2016-08-06 16:12:39 -04:00
. addFunction ( " unlock " , & Location : : unlock )
2016-03-20 23:06:05 -04:00
. addFunction ( " start " , & Location : : start )
2016-04-09 09:42:32 -04:00
. addFunction ( " _end " , & Location : : end ) // XXX "end" is a lua reserved word
2016-03-20 23:06:05 -04:00
. addFunction ( " length " , & Location : : length )
. addFunction ( " set_start " , & Location : : set_start )
. addFunction ( " set_end " , & Location : : set_end )
2020-01-30 19:45:07 -05:00
. addFunction ( " set " , & Location : : set )
2016-03-20 23:06:05 -04:00
. addFunction ( " set_length " , & Location : : set )
2018-01-15 11:25:53 -05:00
. addFunction ( " set_name " , & Location : : set_name )
2016-03-20 23:06:05 -04:00
. addFunction ( " move_to " , & Location : : move_to )
2016-08-06 16:12:39 -04:00
. addFunction ( " matches " , & Location : : matches )
. addFunction ( " flags " , & Location : : flags )
. addFunction ( " is_auto_punch " , & Location : : is_auto_punch )
. addFunction ( " is_auto_loop " , & Location : : is_auto_loop )
. addFunction ( " is_mark " , & Location : : is_mark )
. addFunction ( " is_hidden " , & Location : : is_hidden )
. addFunction ( " is_cd_marker " , & Location : : is_cd_marker )
2022-10-21 07:06:22 -04:00
. addFunction ( " is_cue_marker " , & Location : : is_cue_marker )
2016-08-06 16:12:39 -04:00
. addFunction ( " is_session_range " , & Location : : is_session_range )
. addFunction ( " is_range_marker " , & Location : : is_range_marker )
2016-03-20 23:06:05 -04:00
. endClass ( )
2016-04-12 12:13:03 -04:00
. deriveClass < Locations , PBD : : StatefulDestructible > ( " Locations " )
2016-08-06 16:12:39 -04:00
. addFunction ( " list " , static_cast < Locations : : LocationList ( Locations : : * ) ( ) > ( & Locations : : list ) )
2016-04-09 09:42:32 -04:00
. addFunction ( " auto_loop_location " , & Locations : : auto_loop_location )
. addFunction ( " auto_punch_location " , & Locations : : auto_punch_location )
. addFunction ( " session_range_location " , & Locations : : session_range_location )
. addFunction ( " first_mark_after " , & Locations : : first_mark_after )
2016-05-14 17:54:04 -04:00
. addFunction ( " first_mark_before " , & Locations : : first_mark_before )
. addFunction ( " first_mark_at " , & Locations : : mark_at )
2017-10-29 13:32:49 -04:00
. addFunction ( " mark_at " , & Locations : : mark_at )
2021-03-06 15:16:40 -05:00
. addFunction ( " range_starts_at " , & Locations : : range_starts_at )
. addFunction ( " add_range " , & Locations : : add_range )
2016-09-04 09:29:41 -04:00
. addFunction ( " remove " , & Locations : : remove )
2016-05-14 17:54:04 -04:00
. addRefFunction ( " marks_either_side " , & Locations : : marks_either_side )
. addRefFunction ( " find_all_between " , & Locations : : find_all_between )
2023-08-11 20:30:43 -04:00
. addRefFunction ( " next_section " , & Locations : : next_section )
2016-04-09 09:42:32 -04:00
. endClass ( )
2017-03-29 21:40:02 -04:00
. beginWSPtrClass < SessionObject > ( " SessionObjectPtr " )
2016-04-11 08:04:45 -04:00
/* SessionObject is-a PBD::StatefulDestructible,
* but multiple inheritance is not covered by luabridge ,
* we need explicit casts */
2016-04-09 19:45:41 -04:00
. addCast < PBD : : Stateful > ( " to_stateful " )
. addCast < PBD : : StatefulDestructible > ( " to_statefuldestructible " )
2016-02-23 09:41:02 -05:00
. addFunction ( " name " , & SessionObject : : name )
. endClass ( )
2017-03-29 21:40:02 -04:00
. beginClass < SessionObject > ( " SessionObject " )
. addFunction ( " name " , & SessionObject : : name )
. addCast < PBD : : Stateful > ( " to_stateful " )
. endClass ( )
2016-04-10 14:56:45 -04:00
. beginWSPtrClass < Port > ( " Port " )
2016-05-29 14:36:16 -04:00
. addCast < MidiPort > ( " to_midiport " )
2017-12-05 10:08:02 -05:00
. addCast < AsyncMIDIPort > ( " to_asyncmidiport " )
2016-05-29 14:36:16 -04:00
. addCast < AudioPort > ( " to_audioport " )
2016-04-10 14:56:45 -04:00
. addFunction ( " name " , & Port : : name )
. addFunction ( " pretty_name " , & Port : : pretty_name )
2020-04-07 07:27:49 -04:00
. addFunction ( " flags " , & Port : : flags )
2016-04-10 14:56:45 -04:00
. addFunction ( " receives_input " , & Port : : receives_input )
. addFunction ( " sends_output " , & Port : : sends_output )
. addFunction ( " connected " , & Port : : connected )
. addFunction ( " disconnect_all " , & Port : : disconnect_all )
2016-11-09 19:28:21 -05:00
. addFunction ( " connected_to " , ( bool ( Port : : * ) ( std : : string const & ) const ) & Port : : connected_to )
. addFunction ( " connect " , ( int ( Port : : * ) ( std : : string const & ) ) & Port : : connect )
. addFunction ( " disconnect " , ( int ( Port : : * ) ( std : : string const & ) ) & Port : : disconnect )
2017-09-27 22:25:50 -04:00
. addFunction ( " physically_connected " , & Port : : physically_connected )
. addFunction ( " private_latency_range " , & Port : : private_latency_range )
. addFunction ( " public_latency_range " , & Port : : public_latency_range )
. addRefFunction ( " get_connected_latency_range " , & Port : : get_connected_latency_range )
2016-05-29 14:36:16 -04:00
//.addStaticFunction ("port_offset", &Port::port_offset) // static
2016-04-10 14:56:45 -04:00
. endClass ( )
2016-04-10 17:01:44 -04:00
. deriveWSPtrClass < AudioPort , Port > ( " AudioPort " )
. endClass ( )
. deriveWSPtrClass < MidiPort , Port > ( " MidiPort " )
2017-12-05 10:08:02 -05:00
. addCast < AsyncMIDIPort > ( " to_asyncmidiport " )
2016-04-10 17:01:44 -04:00
. addFunction ( " input_active " , & MidiPort : : input_active )
. addFunction ( " set_input_active " , & MidiPort : : set_input_active )
2016-05-29 14:36:16 -04:00
. addFunction ( " get_midi_buffer " , & MidiPort : : get_midi_buffer ) // DSP only
2016-04-10 17:01:44 -04:00
. endClass ( )
2017-12-05 10:08:02 -05:00
. deriveWSPtrClass < AsyncMIDIPort , MidiPort > ( " AsyncMIDIPort " )
. addFunction ( " write " , & AsyncMIDIPort : : write )
. endClass ( )
2016-04-10 14:56:45 -04:00
. beginWSPtrClass < PortSet > ( " PortSet " )
. addFunction ( " num_ports " , ( size_t ( PortSet : : * ) ( DataType ) const ) & PortSet : : num_ports )
. addFunction ( " add " , & PortSet : : add )
. addFunction ( " remove " , & PortSet : : remove )
2023-02-16 18:33:28 -05:00
. addFunction ( " port " , ( std : : shared_ptr < Port > ( PortSet : : * ) ( DataType , size_t ) const ) & PortSet : : port )
2016-04-10 14:56:45 -04:00
. addFunction ( " contains " , & PortSet : : contains )
. addFunction ( " clear " , & PortSet : : clear )
. addFunction ( " empty " , & PortSet : : empty )
. endClass ( )
2016-04-02 17:42:30 -04:00
. deriveWSPtrClass < IO , SessionObject > ( " IO " )
. addFunction ( " active " , & IO : : active )
. addFunction ( " add_port " , & IO : : add_port )
. addFunction ( " remove_port " , & IO : : remove_port )
. addFunction ( " connect " , & IO : : connect )
2023-02-16 18:33:28 -05:00
. addFunction ( " disconnect " , ( int ( IO : : * ) ( std : : shared_ptr < Port > , std : : string , void * ) ) & IO : : disconnect )
2016-11-09 19:28:21 -05:00
. addFunction ( " disconnect_all " , ( int ( IO : : * ) ( void * ) ) & IO : : disconnect )
2016-04-02 17:42:30 -04:00
. addFunction ( " physically_connected " , & IO : : physically_connected )
2016-04-10 14:56:45 -04:00
. addFunction ( " has_port " , & IO : : has_port )
. addFunction ( " nth " , & IO : : nth )
. addFunction ( " audio " , & IO : : audio )
. addFunction ( " midi " , & IO : : midi )
. addFunction ( " port_by_name " , & IO : : nth )
. addFunction ( " n_ports " , & IO : : n_ports )
2017-09-18 20:10:38 -04:00
. addFunction ( " latency " , & IO : : latency )
2017-09-27 22:25:50 -04:00
. addFunction ( " public_latency " , & IO : : latency )
2016-04-02 17:42:30 -04:00
. endClass ( )
2016-11-09 19:28:21 -05:00
. deriveWSPtrClass < PannerShell , SessionObject > ( " PannerShell " )
. addFunction ( " bypassed " , & PannerShell : : bypassed )
. addFunction ( " set_bypassed " , & PannerShell : : set_bypassed )
. endClass ( )
2017-03-29 21:40:02 -04:00
. deriveClass < RouteGroup , SessionObject > ( " RouteGroup " )
2016-12-05 15:53:41 -05:00
. addFunction ( " is_active " , & RouteGroup : : is_active )
. addFunction ( " is_relative " , & RouteGroup : : is_relative )
. addFunction ( " is_hidden " , & RouteGroup : : is_hidden )
. addFunction ( " is_gain " , & RouteGroup : : is_gain )
. addFunction ( " is_mute " , & RouteGroup : : is_mute )
. addFunction ( " is_solo " , & RouteGroup : : is_solo )
. addFunction ( " is_recenable " , & RouteGroup : : is_recenable )
. addFunction ( " is_select " , & RouteGroup : : is_select )
. addFunction ( " is_route_active " , & RouteGroup : : is_route_active )
. addFunction ( " is_color " , & RouteGroup : : is_color )
. addFunction ( " is_monitoring " , & RouteGroup : : is_monitoring )
. addFunction ( " group_master_number " , & RouteGroup : : group_master_number )
. addFunction ( " empty " , & RouteGroup : : empty )
. addFunction ( " size " , & RouteGroup : : size )
. addFunction ( " set_active " , & RouteGroup : : set_active )
. addFunction ( " set_relative " , & RouteGroup : : set_relative )
. addFunction ( " set_hidden " , & RouteGroup : : set_hidden )
. addFunction ( " set_gain " , & RouteGroup : : set_gain )
. addFunction ( " set_mute " , & RouteGroup : : set_mute )
. addFunction ( " set_solo " , & RouteGroup : : set_solo )
. addFunction ( " set_recenable " , & RouteGroup : : set_recenable )
. addFunction ( " set_select " , & RouteGroup : : set_select )
. addFunction ( " set_route_active " , & RouteGroup : : set_route_active )
. addFunction ( " set_color " , & RouteGroup : : set_color )
. addFunction ( " set_monitoring " , & RouteGroup : : set_monitoring )
. addFunction ( " add " , & RouteGroup : : add )
. addFunction ( " remove " , & RouteGroup : : remove )
. addFunction ( " clear " , & RouteGroup : : clear )
2017-05-03 11:47:16 -04:00
. addFunction ( " set_rgba " , & RouteGroup : : set_rgba )
. addFunction ( " rgba " , & RouteGroup : : rgba )
2016-12-05 15:53:41 -05:00
. addFunction ( " has_subgroup " , & RouteGroup : : has_subgroup )
. addFunction ( " make_subgroup " , & RouteGroup : : make_subgroup )
. addFunction ( " destroy_subgroup " , & RouteGroup : : destroy_subgroup )
. addFunction ( " route_list " , & RouteGroup : : route_list )
2016-04-23 18:25:34 -04:00
. endClass ( )
2016-08-15 10:37:44 -04:00
. deriveClass < PresentationInfo , PBD : : Stateful > ( " PresentationInfo " )
. addFunction ( " color " , & PresentationInfo : : color )
. addFunction ( " set_color " , & PresentationInfo : : set_color )
. addFunction ( " order " , & PresentationInfo : : order )
2017-06-16 22:35:48 -04:00
. addFunction ( " special " , & PresentationInfo : : special )
. addFunction ( " flags " , & PresentationInfo : : flags )
2016-11-09 19:28:21 -05:00
. addConst ( " max_order " , ARDOUR : : PresentationInfo : : max_order )
2016-08-15 10:37:44 -04:00
. endClass ( )
2017-08-18 16:00:24 -04:00
. beginWSPtrClass < Slavable > ( " Slavable " )
. addFunction ( " assign " , & Slavable : : assign )
. addFunction ( " unassign " , & Slavable : : unassign )
2017-10-19 20:18:16 -04:00
. addFunction ( " masters " , & Slavable : : masters )
. addFunction ( " assigned_to " , & Slavable : : assigned_to )
2017-08-18 16:00:24 -04:00
. endClass ( )
2016-05-31 17:35:00 -04:00
. deriveWSPtrClass < Stripable , SessionObject > ( " Stripable " )
. addCast < Route > ( " to_route " )
2017-05-30 09:15:30 -04:00
. addCast < VCA > ( " to_vca " )
2017-10-19 18:40:37 -04:00
. addCast < Slavable > ( " to_slavable " )
. addCast < Automatable > ( " to_automatable " )
2016-05-31 17:35:00 -04:00
. addFunction ( " is_auditioner " , & Stripable : : is_auditioner )
2017-07-25 13:00:50 -04:00
. addFunction ( " is_private_route " , & Stripable : : is_private_route )
2016-05-31 17:35:00 -04:00
. addFunction ( " is_master " , & Stripable : : is_master )
. addFunction ( " is_monitor " , & Stripable : : is_monitor )
2023-11-26 22:18:36 -05:00
. addFunction ( " is_surround_master " , & Stripable : : is_surround_master )
2016-05-31 17:35:00 -04:00
. addFunction ( " is_hidden " , & Stripable : : is_hidden )
. addFunction ( " is_selected " , & Stripable : : is_selected )
2016-06-01 09:12:14 -04:00
. addFunction ( " gain_control " , & Stripable : : gain_control )
. addFunction ( " solo_control " , & Stripable : : solo_control )
. addFunction ( " solo_isolate_control " , & Stripable : : solo_isolate_control )
. addFunction ( " solo_safe_control " , & Stripable : : solo_safe_control )
. addFunction ( " mute_control " , & Stripable : : mute_control )
. addFunction ( " phase_control " , & Stripable : : phase_control )
. addFunction ( " trim_control " , & Stripable : : trim_control )
. addFunction ( " rec_enable_control " , & Stripable : : rec_enable_control )
. addFunction ( " rec_safe_control " , & Stripable : : rec_safe_control )
2024-01-12 21:03:25 -05:00
. addFunction ( " mapped_control " , & Stripable : : mapped_control )
. addFunction ( " mapped_output " , & Stripable : : mapped_output )
2016-08-19 09:40:07 -04:00
. addFunction ( " pan_azimuth_control " , & Stripable : : pan_azimuth_control )
. addFunction ( " pan_elevation_control " , & Stripable : : pan_elevation_control )
. addFunction ( " pan_width_control " , & Stripable : : pan_width_control )
. addFunction ( " pan_frontback_control " , & Stripable : : pan_frontback_control )
. addFunction ( " pan_lfe_control " , & Stripable : : pan_lfe_control )
2018-10-10 16:32:08 -04:00
. addFunction ( " send_level_controllable " , & Stripable : : send_level_controllable )
. addFunction ( " send_enable_controllable " , & Stripable : : send_enable_controllable )
2019-12-16 12:29:32 -05:00
. addFunction ( " send_pan_azimuth_controllable " , & Stripable : : send_pan_azimuth_controllable )
. addFunction ( " send_pan_azimuth_enable_controllable " , & Stripable : : send_pan_azimuth_enable_controllable )
2016-08-19 09:40:07 -04:00
. addFunction ( " send_name " , & Stripable : : send_name )
. addFunction ( " monitor_control " , & Stripable : : monitor_control )
2018-10-10 16:32:08 -04:00
. addFunction ( " master_send_enable_controllable " , & Stripable : : master_send_enable_controllable )
2018-10-10 16:15:28 -04:00
. addFunction ( " eq_band_cnt " , & Stripable : : eq_band_cnt )
2016-08-19 09:40:07 -04:00
. addFunction ( " eq_band_name " , & Stripable : : eq_band_name )
2016-08-15 10:37:44 -04:00
. addFunction ( " set_presentation_order " , & Stripable : : set_presentation_order )
. addFunction ( " presentation_info_ptr " , & Stripable : : presentation_info_ptr )
2019-02-27 10:43:52 -05:00
. addFunction ( " slaved_to " , & Stripable : : slaved_to )
. addFunction ( " slaved " , & Stripable : : slaved )
2016-08-15 10:37:44 -04:00
2016-05-31 17:35:00 -04:00
. endClass ( )
2017-05-30 09:15:30 -04:00
. deriveWSPtrClass < VCA , Stripable > ( " VCA " )
. addFunction ( " full_name " , & VCA : : full_name )
. addFunction ( " number " , & VCA : : number )
. addFunction ( " gain_control " , & VCA : : gain_control )
. addFunction ( " solo_control " , & VCA : : solo_control )
. addFunction ( " mute_control " , & VCA : : mute_control )
. endClass ( )
2016-05-31 17:35:00 -04:00
. deriveWSPtrClass < Route , Stripable > ( " Route " )
2016-04-09 09:42:32 -04:00
. addCast < Track > ( " to_track " )
2016-02-23 09:41:02 -05:00
. addFunction ( " set_name " , & Route : : set_name )
. addFunction ( " comment " , & Route : : comment )
. addFunction ( " active " , & Route : : active )
2019-07-06 12:09:07 -04:00
. addFunction ( " data_type " , & Route : : data_type )
2016-02-23 09:41:02 -05:00
. addFunction ( " set_active " , & Route : : set_active )
. addFunction ( " nth_plugin " , & Route : : nth_plugin )
2016-05-23 15:55:49 -04:00
. addFunction ( " nth_processor " , & Route : : nth_processor )
. addFunction ( " nth_send " , & Route : : nth_send )
2020-04-21 09:34:20 -04:00
. addFunction ( " add_foldback_send " , & Route : : add_foldback_send )
2016-03-18 17:52:19 -04:00
. addFunction ( " add_processor_by_index " , & Route : : add_processor_by_index )
2016-03-19 11:39:24 -04:00
. addFunction ( " remove_processor " , & Route : : remove_processor )
2017-02-15 12:12:28 -05:00
. addFunction ( " remove_processors " , & Route : : remove_processors )
2016-03-19 11:39:24 -04:00
. addFunction ( " replace_processor " , & Route : : replace_processor )
2017-02-15 12:12:28 -05:00
. addFunction ( " reorder_processors " , & Route : : reorder_processors )
2016-11-09 19:28:21 -05:00
. addFunction ( " the_instrument " , & Route : : the_instrument )
2016-03-19 11:39:24 -04:00
. addFunction ( " n_inputs " , & Route : : n_inputs )
. addFunction ( " n_outputs " , & Route : : n_outputs )
2016-11-09 19:28:21 -05:00
. addFunction ( " input " , & Route : : input )
. addFunction ( " output " , & Route : : output )
. addFunction ( " panner_shell " , & Route : : panner_shell )
2016-03-19 11:39:24 -04:00
. addFunction ( " set_comment " , & Route : : set_comment )
2016-03-25 14:13:16 -04:00
. addFunction ( " strict_io " , & Route : : strict_io )
. addFunction ( " set_strict_io " , & Route : : set_strict_io )
2016-03-27 15:33:40 -04:00
. addFunction ( " reset_plugin_insert " , & Route : : reset_plugin_insert )
. addFunction ( " customize_plugin_insert " , & Route : : customize_plugin_insert )
2016-04-02 21:11:18 -04:00
. addFunction ( " add_sidechain " , & Route : : add_sidechain )
2021-05-11 14:29:56 -04:00
. addFunction ( " add_aux_send " , & Route : : add_aux_send )
2016-04-02 21:11:18 -04:00
. addFunction ( " remove_sidechain " , & Route : : remove_sidechain )
2016-04-09 09:42:32 -04:00
. addFunction ( " main_outs " , & Route : : main_outs )
. addFunction ( " muted " , & Route : : muted )
. addFunction ( " soloed " , & Route : : soloed )
2016-04-10 11:35:02 -04:00
. addFunction ( " amp " , & Route : : amp )
. addFunction ( " trim " , & Route : : trim )
2023-02-16 18:33:28 -05:00
. addFunction ( " peak_meter " , ( std : : shared_ptr < PeakMeter > ( Route : : * ) ( ) ) & Route : : peak_meter )
2016-09-05 19:26:36 -04:00
. addFunction ( " set_meter_point " , & Route : : set_meter_point )
2017-09-18 20:10:38 -04:00
. addFunction ( " signal_latency " , & Route : : signal_latency )
2017-09-27 22:25:50 -04:00
. addFunction ( " playback_latency " , & Route : : playback_latency )
2021-05-11 14:29:56 -04:00
. addFunction ( " monitoring_state " , & Route : : monitoring_state )
. addFunction ( " monitoring_control " , & Route : : monitoring_control )
2023-12-06 21:47:31 -05:00
. addFunction ( " surround_send " , & Route : : surround_send )
. addFunction ( " surround_return " , & Route : : surround_return )
2016-04-09 09:42:32 -04:00
. endClass ( )
. deriveWSPtrClass < Playlist , SessionObject > ( " Playlist " )
2016-10-02 21:51:53 -04:00
. addCast < AudioPlaylist > ( " to_audioplaylist " )
2016-10-06 18:23:33 -04:00
. addCast < MidiPlaylist > ( " to_midiplaylist " )
2021-01-23 17:44:31 -05:00
. addFunction ( " set_name " , & Playlist : : set_name )
2016-04-09 09:42:32 -04:00
. addFunction ( " region_by_id " , & Playlist : : region_by_id )
. addFunction ( " data_type " , & Playlist : : data_type )
. addFunction ( " n_regions " , & Playlist : : n_regions )
2017-09-18 12:39:17 -04:00
//.addFunction ("get_extent", &Playlist::get_extent) // pair<samplepos_t, samplepos_t>
2016-06-08 09:20:20 -04:00
. addFunction ( " region_list " , & Playlist : : region_list )
2016-04-09 09:42:32 -04:00
. addFunction ( " add_region " , & Playlist : : add_region )
. addFunction ( " remove_region " , & Playlist : : remove_region )
. addFunction ( " regions_at " , & Playlist : : regions_at )
. addFunction ( " top_region_at " , & Playlist : : top_region_at )
. addFunction ( " top_unmuted_region_at " , & Playlist : : top_unmuted_region_at )
2017-03-17 13:12:50 -04:00
. addFunction ( " find_next_transient " , & Playlist : : find_next_transient )
2016-04-09 09:42:32 -04:00
. addFunction ( " find_next_region " , & Playlist : : find_next_region )
. addFunction ( " find_next_region_boundary " , & Playlist : : find_next_region_boundary )
. addFunction ( " count_regions_at " , & Playlist : : count_regions_at )
2016-04-10 11:35:02 -04:00
. addFunction ( " regions_touched " , & Playlist : : regions_touched )
2016-04-09 09:42:32 -04:00
. addFunction ( " regions_with_start_within " , & Playlist : : regions_with_start_within )
. addFunction ( " regions_with_end_within " , & Playlist : : regions_with_end_within )
. addFunction ( " raise_region " , & Playlist : : raise_region )
. addFunction ( " lower_region " , & Playlist : : lower_region )
. addFunction ( " raise_region_to_top " , & Playlist : : raise_region_to_top )
. addFunction ( " lower_region_to_bottom " , & Playlist : : lower_region_to_bottom )
2023-02-16 18:33:28 -05:00
. addFunction ( " duplicate " , ( void ( Playlist : : * ) ( std : : shared_ptr < Region > , Temporal : : timepos_t & , timecnt_t const & , float ) ) & Playlist : : duplicate )
2016-04-09 09:42:32 -04:00
. addFunction ( " duplicate_until " , & Playlist : : duplicate_until )
. addFunction ( " duplicate_range " , & Playlist : : duplicate_range )
. addFunction ( " combine " , & Playlist : : combine )
. addFunction ( " uncombine " , & Playlist : : uncombine )
2019-03-19 16:50:43 -04:00
. addFunction ( " used " , & Playlist : : used )
. addFunction ( " hidden " , & Playlist : : hidden )
. addFunction ( " empty " , & Playlist : : empty )
. addFunction ( " shared " , & Playlist : : shared )
2016-04-09 09:42:32 -04:00
. addFunction ( " split_region " , & Playlist : : split_region )
2019-03-19 00:14:54 -04:00
. addFunction ( " get_orig_track_id " , & Playlist : : get_orig_track_id )
2018-10-26 07:38:28 -04:00
//.addFunction ("split", &Playlist::split) // XXX needs MusicSample
2023-06-09 21:29:01 -04:00
. addFunction ( " cut " , ( std : : shared_ptr < Playlist > ( Playlist : : * ) ( std : : list < TimelineRange > & ) ) & Playlist : : cut )
2016-04-09 09:42:32 -04:00
#if 0
. addFunction ( " copy " , & Playlist : : copy )
. addFunction ( " paste " , & Playlist : : paste )
# endif
2016-02-23 09:41:02 -05:00
. endClass ( )
2021-02-26 07:34:24 -05:00
. beginWSPtrClass < Bundle > ( " Bundle " )
. addCast < UserBundle > ( " to_userbundle " )
. addFunction ( " name " , & Bundle : : name )
. addFunction ( " n_total " , & Bundle : : n_total )
. addFunction ( " nchannels " , & Bundle : : nchannels )
. addFunction ( " channel_name " , & Bundle : : channel_name )
. addFunction ( " ports_are_inputs " , & Bundle : : ports_are_inputs )
. addFunction ( " ports_are_outputs " , & Bundle : : ports_are_outputs )
. endClass ( )
. deriveWSPtrClass < UserBundle , Bundle > ( " UserBundle " )
. endClass ( )
2016-10-02 21:51:53 -04:00
. deriveWSPtrClass < AudioPlaylist , Playlist > ( " AudioPlaylist " )
. addFunction ( " read " , & AudioPlaylist : : read )
. endClass ( )
2016-10-06 18:23:33 -04:00
. deriveWSPtrClass < MidiPlaylist , Playlist > ( " MidiPlaylist " )
. addFunction ( " set_note_mode " , & MidiPlaylist : : set_note_mode )
. endClass ( )
2019-03-19 00:14:54 -04:00
. beginWSPtrClass < SessionPlaylists > ( " SessionPlaylists " )
. addFunction ( " by_name " , & SessionPlaylists : : by_name )
. addFunction ( " by_id " , & SessionPlaylists : : by_id )
. addFunction ( " source_use_count " , & SessionPlaylists : : source_use_count )
. addFunction ( " region_use_count " , & SessionPlaylists : : region_use_count )
. addFunction ( " playlists_for_track " , & SessionPlaylists : : playlists_for_track )
. addFunction ( " get_used " , & SessionPlaylists : : get_used )
. addFunction ( " get_unused " , & SessionPlaylists : : get_unused )
. addFunction ( " n_playlists " , & SessionPlaylists : : n_playlists )
. endClass ( )
2016-02-23 09:41:02 -05:00
. deriveWSPtrClass < Track , Route > ( " Track " )
2022-09-30 15:20:29 -04:00
. addNilPtrConstructor ( )
2016-04-09 09:42:32 -04:00
. addCast < AudioTrack > ( " to_audio_track " )
. addCast < MidiTrack > ( " to_midi_track " )
2016-02-23 09:41:02 -05:00
. addFunction ( " set_name " , & Track : : set_name )
. addFunction ( " can_record " , & Track : : can_record )
2016-04-09 09:42:32 -04:00
. addFunction ( " bounceable " , & Track : : bounceable )
2016-04-12 18:52:17 -04:00
. addFunction ( " bounce " , & Track : : bounce )
2016-04-09 09:42:32 -04:00
. addFunction ( " bounce_range " , & Track : : bounce_range )
. addFunction ( " playlist " , & Track : : playlist )
2019-07-06 12:09:07 -04:00
. addFunction ( " use_playlist " , & Track : : use_playlist )
. addFunction ( " use_copy_playlist " , & Track : : use_copy_playlist )
. addFunction ( " use_new_playlist " , & Track : : use_new_playlist )
. addFunction ( " find_and_use_playlist " , & Track : : find_and_use_playlist )
2016-02-23 09:41:02 -05:00
. endClass ( )
. deriveWSPtrClass < AudioTrack , Track > ( " AudioTrack " )
. endClass ( )
. deriveWSPtrClass < MidiTrack , Track > ( " MidiTrack " )
2020-06-15 22:22:23 -04:00
. addFunction ( " write_immediate_event " , & MidiTrack : : write_immediate_event )
2021-12-30 13:00:14 -05:00
. addFunction ( " set_input_active " , & MidiTrack : : set_input_active )
2021-12-30 12:55:05 -05:00
. addFunction ( " input_active " , & MidiTrack : : input_active )
2022-09-09 22:27:52 -04:00
. addFunction ( " set_capture_channel_mode " , & MidiTrack : : set_capture_channel_mode )
. addFunction ( " set_playback_channel_mode " , & MidiTrack : : set_playback_channel_mode )
. addFunction ( " set_playback_channel_mask " , & MidiTrack : : set_playback_channel_mask )
. addFunction ( " set_capture_channel_mask " , & MidiTrack : : set_capture_channel_mask )
. addFunction ( " get_playback_channel_mode " , & MidiTrack : : get_playback_channel_mode )
. addFunction ( " get_capture_channel_mode " , & MidiTrack : : get_capture_channel_mode )
. addFunction ( " get_playback_channel_mask " , & MidiTrack : : get_capture_channel_mode )
. addFunction ( " get_capture_channel_mask " , & MidiTrack : : get_capture_channel_mask )
2016-02-23 09:41:02 -05:00
. endClass ( )
2020-09-20 18:34:09 -04:00
. beginWSPtrClass < AudioReadable > ( " Readable " )
. addFunction ( " read " , & AudioReadable : : read )
. addFunction ( " readable_length " , & AudioReadable : : readable_length_samples )
. addFunction ( " n_channels " , & AudioReadable : : n_channels )
. addStaticFunction ( " load " , & AudioReadable : : load )
2016-10-02 21:51:53 -04:00
. endClass ( )
2020-09-20 18:34:09 -04:00
. deriveWSPtrClass < AudioRom , AudioReadable > ( " AudioRom " )
2020-02-01 09:57:47 -05:00
. addStaticFunction ( " new_rom " , & AudioRom : : new_rom )
. endClass ( )
2016-02-23 09:41:02 -05:00
. deriveWSPtrClass < Region , SessionObject > ( " Region " )
2016-10-06 18:23:33 -04:00
. addCast < MidiRegion > ( " to_midiregion " )
2016-11-19 15:18:15 -05:00
. addCast < AudioRegion > ( " to_audioregion " )
2019-08-23 19:35:04 -04:00
2020-03-10 18:54:31 -04:00
. addFunction ( " playlist " , & Region : : playlist )
2019-08-23 19:35:04 -04:00
. addFunction ( " set_name " , & Region : : set_name )
2016-03-19 08:13:08 -04:00
/* properties */
2020-11-30 12:59:08 -05:00
. addFunction ( " position " , & Region : : position )
. addFunction ( " start " , & Region : : start )
. addFunction ( " length " , & Region : : length )
2016-03-19 08:13:08 -04:00
. addFunction ( " layer " , & Region : : layer )
. addFunction ( " data_type " , & Region : : data_type )
. addFunction ( " stretch " , & Region : : stretch )
. addFunction ( " shift " , & Region : : shift )
2016-03-21 13:57:20 -04:00
. addRefFunction ( " sync_offset " , & Region : : sync_offset )
2016-03-19 08:13:08 -04:00
. addFunction ( " sync_position " , & Region : : sync_position )
. addFunction ( " hidden " , & Region : : hidden )
. addFunction ( " muted " , & Region : : muted )
. addFunction ( " opaque " , & Region : : opaque )
. addFunction ( " locked " , & Region : : locked )
. addFunction ( " position_locked " , & Region : : position_locked )
. addFunction ( " video_locked " , & Region : : video_locked )
. addFunction ( " automatic " , & Region : : automatic )
. addFunction ( " whole_file " , & Region : : whole_file )
. addFunction ( " captured " , & Region : : captured )
. addFunction ( " can_move " , & Region : : can_move )
. addFunction ( " sync_marked " , & Region : : sync_marked )
. addFunction ( " external " , & Region : : external )
. addFunction ( " import " , & Region : : import )
2021-12-11 10:31:54 -05:00
. addFunction ( " covers " , ( bool ( Region : : * ) ( Temporal : : timepos_t const & ) const ) & Region : : covers )
2016-03-19 08:13:08 -04:00
. addFunction ( " at_natural_position " , & Region : : at_natural_position )
. addFunction ( " is_compound " , & Region : : is_compound )
2021-02-12 18:20:30 -05:00
. addFunction ( " captured_xruns " , & Region : : captured_xruns )
2017-03-17 13:12:50 -04:00
. addFunction ( " has_transients " , & Region : : has_transients )
. addFunction ( " transients " , ( AnalysisFeatureList ( Region : : * ) ( ) ) & Region : : transients )
2024-03-07 06:14:34 -05:00
. addFunction ( " load_plugin " , & Region : : load_plugin )
. addFunction ( " add_plugin " , & Region : : add_plugin )
. addFunction ( " remove_plugin " , & Region : : add_plugin )
. addFunction ( " nth_plugin " , & Region : : nth_plugin )
2016-03-19 08:13:08 -04:00
/* editing operations */
. addFunction ( " set_length " , & Region : : set_length )
. addFunction ( " set_start " , & Region : : set_start )
. addFunction ( " set_position " , & Region : : set_position )
. addFunction ( " set_initial_position " , & Region : : set_initial_position )
. addFunction ( " nudge_position " , & Region : : nudge_position )
. addFunction ( " move_to_natural_position " , & Region : : move_to_natural_position )
. addFunction ( " move_start " , & Region : : move_start )
2016-10-15 15:16:57 -04:00
. addFunction ( " master_sources " , & Region : : master_sources )
. addFunction ( " master_source_names " , & Region : : master_source_names )
2016-03-19 08:13:08 -04:00
. addFunction ( " trim_front " , & Region : : trim_front )
. addFunction ( " trim_end " , & Region : : trim_end )
. addFunction ( " trim_to " , & Region : : trim_to )
. addFunction ( " cut_front " , & Region : : cut_front )
. addFunction ( " cut_end " , & Region : : cut_end )
. addFunction ( " raise " , & Region : : raise )
. addFunction ( " lower " , & Region : : lower )
. addFunction ( " raise_to_top " , & Region : : raise_to_top )
. addFunction ( " lower_to_bottom " , & Region : : lower_to_bottom )
. addFunction ( " set_sync_position " , & Region : : set_sync_position )
. addFunction ( " clear_sync_position " , & Region : : clear_sync_position )
. addFunction ( " set_hidden " , & Region : : set_hidden )
. addFunction ( " set_muted " , & Region : : set_muted )
. addFunction ( " set_opaque " , & Region : : set_opaque )
. addFunction ( " set_locked " , & Region : : set_locked )
. addFunction ( " set_video_locked " , & Region : : set_video_locked )
. addFunction ( " set_position_locked " , & Region : : set_position_locked )
2016-10-15 15:16:57 -04:00
. addFunction ( " source " , & Region : : source )
2023-02-16 18:33:28 -05:00
. addFunction ( " control " , static_cast < std : : shared_ptr < Evoral : : Control > ( Region : : * ) ( const Evoral : : Parameter & , bool ) > ( & Region : : control ) )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-10-06 18:23:33 -04:00
. deriveWSPtrClass < MidiRegion , Region > ( " MidiRegion " )
. addFunction ( " do_export " , & MidiRegion : : do_export )
. addFunction ( " midi_source " , & MidiRegion : : midi_source )
2023-02-16 18:33:28 -05:00
. addFunction ( " model " , ( std : : shared_ptr < MidiModel > ( MidiRegion : : * ) ( ) ) & MidiRegion : : model )
2016-10-06 18:23:33 -04:00
. endClass ( )
2016-11-19 15:18:15 -05:00
. deriveWSPtrClass < AudioRegion , Region > ( " AudioRegion " )
2020-09-20 18:34:09 -04:00
. addCast < AudioReadable > ( " to_readable " )
. addFunction ( " n_channels " , & AudioRegion : : n_channels )
2016-11-19 15:18:15 -05:00
. addFunction ( " audio_source " , & AudioRegion : : audio_source )
. addFunction ( " set_scale_amplitude " , & AudioRegion : : set_scale_amplitude )
. addFunction ( " scale_amplitude " , & AudioRegion : : scale_amplitude )
2016-12-28 16:17:30 -05:00
. addFunction ( " maximum_amplitude " , & AudioRegion : : maximum_amplitude )
. addFunction ( " rms " , & AudioRegion : : rms )
2021-05-04 12:18:04 -04:00
. addFunction ( " envelope " , & AudioRegion : : envelope )
. addFunction ( " envelope_active " , & AudioRegion : : envelope_active )
2020-03-10 17:43:21 -04:00
. addFunction ( " fade_in_active " , & AudioRegion : : fade_in_active )
. addFunction ( " fade_out_active " , & AudioRegion : : fade_out_active )
2021-05-04 12:18:04 -04:00
. addFunction ( " set_envelope_active " , & AudioRegion : : set_envelope_active )
2020-03-10 17:43:21 -04:00
. addFunction ( " set_fade_in_active " , & AudioRegion : : set_fade_in_active )
. addFunction ( " set_fade_in_shape " , & AudioRegion : : set_fade_in_shape )
. addFunction ( " set_fade_in_length " , & AudioRegion : : set_fade_in_length )
. addFunction ( " set_fade_out_active " , & AudioRegion : : set_fade_out_active )
. addFunction ( " set_fade_out_shape " , & AudioRegion : : set_fade_out_shape )
. addFunction ( " set_fade_out_length " , & AudioRegion : : set_fade_out_length )
2017-08-23 13:37:45 -04:00
. addRefFunction ( " separate_by_channel " , & AudioRegion : : separate_by_channel )
2016-11-19 15:18:15 -05:00
. endClass ( )
2016-10-15 15:16:57 -04:00
. deriveWSPtrClass < Source , SessionObject > ( " Source " )
. addCast < AudioSource > ( " to_audiosource " )
. addCast < MidiSource > ( " to_midisource " )
2017-04-10 19:26:38 -04:00
. addCast < FileSource > ( " to_filesource " )
2016-10-15 15:16:57 -04:00
. addFunction ( " timestamp " , & Source : : timestamp )
. addFunction ( " empty " , & Source : : empty )
. addFunction ( " length " , & Source : : length )
. addFunction ( " natural_position " , & Source : : natural_position )
. addFunction ( " writable " , & Source : : writable )
. addFunction ( " has_been_analysed " , & Source : : has_been_analysed )
. addFunction ( " can_be_analysed " , & Source : : can_be_analysed )
2018-11-15 10:33:54 -05:00
. addFunction ( " timeline_position " , & Source : : natural_position ) /* duplicate */
2016-10-15 15:16:57 -04:00
. addFunction ( " use_count " , & Source : : use_count )
. addFunction ( " used " , & Source : : used )
. addFunction ( " ancestor_name " , & Source : : ancestor_name )
2021-02-12 18:20:30 -05:00
. addFunction ( " captured_xruns " , & Source : : captured_xruns )
2016-02-23 09:41:02 -05:00
. endClass ( )
2017-04-10 19:26:38 -04:00
. deriveWSPtrClass < FileSource , Source > ( " FileSource " )
. addFunction ( " path " , & FileSource : : path )
. addFunction ( " within_session " , & FileSource : : within_session )
. addFunction ( " channel " , & FileSource : : channel )
. addFunction ( " origin " , & FileSource : : origin )
. addFunction ( " take_id " , & FileSource : : take_id )
. addFunction ( " gain " , & FileSource : : gain )
. endClass ( )
2016-10-06 18:23:33 -04:00
. deriveWSPtrClass < MidiSource , Source > ( " MidiSource " )
. addFunction ( " empty " , & MidiSource : : empty )
. addFunction ( " length " , & MidiSource : : length )
. addFunction ( " model " , & MidiSource : : model )
. endClass ( )
2016-10-15 15:16:57 -04:00
. deriveWSPtrClass < AudioSource , Source > ( " AudioSource " )
2020-09-20 18:34:09 -04:00
. addCast < AudioReadable > ( " to_readable " )
. addFunction ( " readable_length " , & AudioSource : : readable_length_samples )
2016-10-15 15:16:57 -04:00
. addFunction ( " n_channels " , & AudioSource : : n_channels )
. addFunction ( " empty " , & Source : : empty )
. addFunction ( " length " , & Source : : length )
. addFunction ( " read " , & AudioSource : : read )
. addFunction ( " sample_rate " , & AudioSource : : sample_rate )
. addFunction ( " captured_for " , & AudioSource : : captured_for )
. endClass ( )
2019-09-28 15:02:45 -04:00
. beginWSPtrClass < Latent > ( " Latent " )
. addFunction ( " effective_latency " , & Latent : : effective_latency )
. addFunction ( " user_latency " , & Latent : : user_latency )
. addFunction ( " unset_user_latency " , & Latent : : unset_user_latency )
. addFunction ( " set_user_latency " , & Latent : : set_user_latency )
. endClass ( )
2024-02-17 09:02:25 -05:00
. deriveClass < CoreSelection , PBD : : Stateful > ( " Route " )
. addFunction ( " first_selected_stripable " , & CoreSelection : : first_selected_stripable )
. addFunction ( " select_next_stripable " , & CoreSelection : : select_next_stripable )
. addFunction ( " select_prev_stripable " , & CoreSelection : : select_prev_stripable )
. addFunction ( " clear_stripables " , & CoreSelection : : clear_stripables )
. endClass ( )
2019-09-28 15:02:45 -04:00
. beginClass < Latent > ( " PDC " )
/* cannot reuse "Latent"; weak/shared-ptr refs cannot have static member functions */
. addStaticFunction ( " zero_latency " , & Latent : : zero_latency )
. addStaticFunction ( " force_zero_latency " , & Latent : : force_zero_latency )
. endClass ( )
2022-10-21 13:50:26 -04:00
. beginClass < SimpleExport > ( " SimpleExport " )
. addFunction ( " run_export " , & SimpleExport : : run_export )
. addFunction ( " set_name " , & SimpleExport : : set_name )
. addFunction ( " set_folder " , & SimpleExport : : set_folder )
. addFunction ( " set_range " , & SimpleExport : : set_range )
. addFunction ( " set_preset " , & SimpleExport : : set_preset )
. addFunction ( " check_outputs " , & SimpleExport : : check_outputs )
. endClass ( )
2016-10-06 18:23:33 -04:00
. deriveWSPtrClass < Automatable , Evoral : : ControlSet > ( " Automatable " )
2017-08-18 16:00:24 -04:00
. addCast < Slavable > ( " to_slavable " )
2023-02-16 18:33:28 -05:00
. addFunction ( " automation_control " , ( std : : shared_ptr < AutomationControl > ( Automatable : : * ) ( const Evoral : : Parameter & , bool ) ) & Automatable : : automation_control )
2021-06-30 13:22:22 -04:00
. addFunction ( " all_automatable_params " , & Automatable : : all_automatable_params )
2016-10-06 18:23:33 -04:00
. endClass ( )
2017-09-24 12:03:54 -04:00
. deriveWSPtrClass < AutomatableSequence < Temporal : : Beats > , Automatable > ( " AutomatableSequence " )
. addCast < Evoral : : Sequence < Temporal : : Beats > > ( " to_sequence " )
2016-10-06 18:23:33 -04:00
. endClass ( )
2017-09-24 12:03:54 -04:00
. deriveWSPtrClass < MidiModel , AutomatableSequence < Temporal : : Beats > > ( " MidiModel " )
2023-08-06 15:10:35 -04:00
. addFunction ( " apply_command " , ( void ( MidiModel : : * ) ( Session * , PBD : : Command * ) ) & MidiModel : : apply_diff_command_as_commit ) /* deprecated: left here in case any extant scripts use apply_command */
. addFunction ( " apply_diff_command_as_commit " , ( void ( MidiModel : : * ) ( Session * , PBD : : Command * ) ) & MidiModel : : apply_diff_command_as_commit )
2016-10-07 14:01:04 -04:00
. addFunction ( " new_note_diff_command " , & MidiModel : : new_note_diff_command )
2016-10-06 18:23:33 -04:00
. endClass ( )
. beginNamespace ( " MidiModel " )
2023-08-06 15:10:35 -04:00
. deriveClass < ARDOUR : : MidiModel : : DiffCommand , PBD : : Command > ( " DiffCommand " )
2016-10-06 18:23:33 -04:00
. endClass ( )
. deriveClass < ARDOUR : : MidiModel : : NoteDiffCommand , ARDOUR : : MidiModel : : DiffCommand > ( " NoteDiffCommand " )
. addFunction ( " add " , & ARDOUR : : MidiModel : : NoteDiffCommand : : add )
. addFunction ( " remove " , & ARDOUR : : MidiModel : : NoteDiffCommand : : remove )
. endClass ( )
. endNamespace ( ) /* ARDOUR::MidiModel */
2016-03-19 11:39:24 -04:00
. beginClass < Plugin : : PresetRecord > ( " PresetRecord " )
2016-05-06 10:02:24 -04:00
. addVoidConstructor ( )
2016-03-19 11:39:24 -04:00
. addData ( " uri " , & Plugin : : PresetRecord : : uri , false )
. addData ( " label " , & Plugin : : PresetRecord : : label , false )
. addData ( " user " , & Plugin : : PresetRecord : : user , false )
. addData ( " valid " , & Plugin : : PresetRecord : : valid , false )
. endClass ( )
2016-08-26 13:04:07 -04:00
. beginStdVector < Plugin : : PresetRecord > ( " PresetVector " ) . endClass ( )
2023-02-16 18:33:28 -05:00
. beginStdList < std : : shared_ptr < ARDOUR : : PluginInfo > > ( " PluginInfoList " ) . endClass ( )
2016-08-26 13:04:07 -04:00
2016-02-23 09:41:02 -05:00
. deriveClass < ParameterDescriptor , Evoral : : ParameterDescriptor > ( " ParameterDescriptor " )
. addVoidConstructor ( )
. addData ( " label " , & ParameterDescriptor : : label )
2021-01-03 11:24:21 -05:00
. addData ( " print_fmt " , & ParameterDescriptor : : print_fmt )
. addData ( " step " , & ParameterDescriptor : : step )
. addData ( " smallstep " , & ParameterDescriptor : : smallstep )
. addData ( " largestep " , & ParameterDescriptor : : largestep )
. addData ( " integer_step " , & ParameterDescriptor : : integer_step )
. addData ( " sr_dependent " , & ParameterDescriptor : : sr_dependent )
. addData ( " enumeration " , & ParameterDescriptor : : enumeration )
. addData ( " inline_ctrl " , & ParameterDescriptor : : inline_ctrl )
. addData ( " display_priority " , & ParameterDescriptor : : display_priority )
2016-07-12 17:00:15 -04:00
. addStaticFunction ( " midi_note_name " , & ParameterDescriptor : : midi_note_name )
2016-02-23 09:41:02 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
. beginStdVector < std : : shared_ptr < ARDOUR : : Processor > > ( " ProcessorVector " ) . endClass ( )
2016-08-25 21:21:05 -04:00
2016-04-11 08:04:45 -04:00
. deriveWSPtrClass < Processor , SessionObject > ( " Processor " )
. addCast < Automatable > ( " to_automatable " )
2019-09-28 15:02:45 -04:00
. addCast < Latent > ( " to_latent " )
2017-02-22 09:24:33 -05:00
. addCast < PluginInsert > ( " to_insert " ) // deprecated
. addCast < PluginInsert > ( " to_plugininsert " )
2016-04-02 17:42:30 -04:00
. addCast < SideChain > ( " to_sidechain " )
. addCast < IOProcessor > ( " to_ioprocessor " )
2016-05-23 15:55:49 -04:00
. addCast < UnknownProcessor > ( " to_unknownprocessor " )
. addCast < Amp > ( " to_amp " )
2017-09-27 22:25:50 -04:00
. addCast < DiskIOProcessor > ( " to_diskioprocessor " )
. addCast < DiskReader > ( " to_diskreader " )
. addCast < DiskWriter > ( " to_diskwriter " )
2016-09-05 19:26:36 -04:00
. addCast < PeakMeter > ( " to_peakmeter " )
2016-05-23 15:55:49 -04:00
. addCast < MonitorProcessor > ( " to_monitorprocessor " )
2017-09-27 22:25:50 -04:00
. addCast < Send > ( " to_send " )
2023-12-06 21:47:31 -05:00
. addCast < SurroundSend > ( " to_surroundsend " )
2020-04-21 09:34:20 -04:00
. addCast < InternalSend > ( " to_internalsend " )
2017-10-30 22:15:43 -04:00
. addCast < PolarityProcessor > ( " to_polarityprocessor " )
2017-11-03 14:26:44 -04:00
. addCast < DelayLine > ( " to_delayline " )
2016-08-19 15:31:38 -04:00
#if 0 // those objects are not yet bound
2016-05-23 15:55:49 -04:00
. addCast < CapturingProcessor > ( " to_capturingprocessor " )
# endif
2016-10-10 11:03:31 -04:00
. addCast < PeakMeter > ( " to_meter " )
2016-02-23 09:41:02 -05:00
. addFunction ( " display_name " , & Processor : : display_name )
2017-02-22 09:24:33 -05:00
. addFunction ( " display_to_user " , & Processor : : display_to_user )
2016-02-23 09:41:02 -05:00
. addFunction ( " active " , & Processor : : active )
. addFunction ( " activate " , & Processor : : activate )
. addFunction ( " deactivate " , & Processor : : deactivate )
2017-09-27 22:25:50 -04:00
. addFunction ( " input_latency " , & Processor : : input_latency )
. addFunction ( " output_latency " , & Processor : : output_latency )
. addFunction ( " capture_offset " , & Processor : : capture_offset )
. addFunction ( " playback_offset " , & Processor : : playback_offset )
. addFunction ( " output_streams " , & Processor : : output_streams )
. addFunction ( " input_streams " , & Processor : : input_streams )
. addFunction ( " signal_latency " , & Processor : : signal_latency )
. endClass ( )
. deriveWSPtrClass < DiskIOProcessor , Processor > ( " DiskIOProcessor " )
. endClass ( )
. deriveWSPtrClass < DiskReader , DiskIOProcessor > ( " DiskReader " )
. endClass ( )
. deriveWSPtrClass < DiskWriter , DiskIOProcessor > ( " DiskWriter " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-04-02 17:42:30 -04:00
. deriveWSPtrClass < IOProcessor , Processor > ( " IOProcessor " )
. addFunction ( " natural_input_streams " , & IOProcessor : : natural_input_streams )
. addFunction ( " natural_output_streams " , & IOProcessor : : natural_output_streams )
2023-02-16 18:33:28 -05:00
. addFunction ( " input " , ( std : : shared_ptr < IO > ( IOProcessor : : * ) ( ) ) & IOProcessor : : input )
. addFunction ( " output " , ( std : : shared_ptr < IO > ( IOProcessor : : * ) ( ) ) & IOProcessor : : output )
2016-04-02 17:42:30 -04:00
. endClass ( )
. deriveWSPtrClass < SideChain , IOProcessor > ( " SideChain " )
. endClass ( )
2016-04-09 09:42:32 -04:00
. deriveWSPtrClass < Delivery , IOProcessor > ( " Delivery " )
2016-11-09 19:28:21 -05:00
. addFunction ( " panner_shell " , & Route : : panner_shell )
. endClass ( )
2017-09-27 22:25:50 -04:00
. deriveWSPtrClass < Send , Delivery > ( " Send " )
2020-04-21 09:34:20 -04:00
. addCast < InternalSend > ( " to_internalsend " )
2017-09-27 22:25:50 -04:00
. addFunction ( " get_delay_in " , & Send : : get_delay_in )
. addFunction ( " get_delay_out " , & Send : : get_delay_out )
2020-04-21 09:34:20 -04:00
. addFunction ( " gain_control " , & Send : : gain_control )
. addFunction ( " is_foldback " , & Send : : is_foldback )
2021-05-11 14:29:56 -04:00
. addFunction ( " set_remove_on_disconnect " , & Send : : set_remove_on_disconnect )
2017-09-27 22:25:50 -04:00
. endClass ( )
. deriveWSPtrClass < InternalSend , Send > ( " InternalSend " )
2020-04-21 09:34:20 -04:00
. addFunction ( " set_name " , & InternalSend : : set_name )
. addFunction ( " display_name " , & InternalSend : : display_name )
. addFunction ( " source_route " , & InternalSend : : source_route )
. addFunction ( " target_route " , & InternalSend : : target_route )
. addFunction ( " allow_feedback " , & InternalSend : : allow_feedback )
. addFunction ( " set_allow_feedback " , & InternalSend : : set_allow_feedback )
. addFunction ( " feeds " , & InternalSend : : feeds )
2017-09-27 22:25:50 -04:00
. endClass ( )
2023-12-06 21:47:31 -05:00
. deriveWSPtrClass < SurroundPannable , Automatable > ( " SurroundPannable " )
2024-02-21 19:27:29 -05:00
. addData ( " pan_pos_x " , & SurroundPannable : : pan_pos_x )
. addData ( " pan_pos_y " , & SurroundPannable : : pan_pos_y )
. addData ( " pan_pos_z " , & SurroundPannable : : pan_pos_z )
. addData ( " pan_size " , & SurroundPannable : : pan_size )
. addData ( " pan_snap " , & SurroundPannable : : pan_snap )
. addData ( " binaural_render_mode " , & SurroundPannable : : binaural_render_mode )
2024-02-24 20:38:08 -05:00
. addData ( " sur_elevation_enable " , & SurroundPannable : : sur_elevation_enable )
. addData ( " sur_zones " , & SurroundPannable : : sur_zones )
. addData ( " sur_ramp " , & SurroundPannable : : sur_ramp )
2023-12-06 21:47:31 -05:00
. 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 )
2024-02-21 19:27:29 -05:00
. addFunction ( " n_pannables " , & SurroundSend : : n_pannables )
2023-12-06 21:47:31 -05:00
. addFunction ( " pannable " , & SurroundSend : : pannable )
. endClass ( )
. deriveWSPtrClass < SurroundReturn , Processor > ( " SurroundReturn " )
2024-02-21 19:27:29 -05:00
. addFunction ( " set_bed_mix " , & SurroundReturn : : set_bed_mix )
2024-03-04 10:53:33 -05:00
. addFunction ( " set_sync_and_align " , & SurroundReturn : : set_sync_and_align )
2024-03-11 18:55:26 -04:00
. addFunction ( " set_ffoa " , & SurroundReturn : : set_ffoa )
. addFunction ( " set_with_all_metadata " , & SurroundReturn : : set_with_all_metadata )
2024-02-24 13:46:54 -05:00
. addFunction ( " have_au_renderer " , & SurroundReturn : : have_au_renderer )
. addFunction ( " load_au_preset " , & SurroundReturn : : load_au_preset )
. addFunction ( " set_au_param " , & SurroundReturn : : set_au_param )
. addFunction ( " integrated_loudness " , & SurroundReturn : : integrated_loudness )
. addFunction ( " max_momentary " , & SurroundReturn : : max_momentary )
. addFunction ( " momentary " , & SurroundReturn : : momentary )
. addFunction ( " max_dbtp " , & SurroundReturn : : max_dbtp )
2024-02-26 15:37:32 -05:00
. addFunction ( " n_channels " , & SurroundReturn : : n_channels )
. addFunction ( " total_n_channels " , & SurroundReturn : : total_n_channels )
2024-02-24 13:46:54 -05:00
. addFunction ( " output_format_controllable " , & SurroundReturn : : output_format_controllable )
2023-12-06 21:47:31 -05:00
. endClass ( )
2017-09-27 22:25:50 -04:00
. deriveWSPtrClass < Return , IOProcessor > ( " Return " )
. endClass ( )
. deriveWSPtrClass < InternalReturn , Return > ( " InternalReturn " )
. endClass ( )
2022-05-19 14:07:35 -04:00
. beginWSPtrClass < MixerScene > ( " MixerScene " )
2022-10-17 00:44:29 -04:00
. addFunction ( " apply " , ( bool ( MixerScene : : * ) ( ) const ) & MixerScene : : apply )
2022-10-17 17:12:50 -04:00
. addFunction ( " apply_to " , ( bool ( MixerScene : : * ) ( PBD : : ControllableSet const & , AutomationTypeSet const & ) const ) & MixerScene : : apply )
2022-05-19 14:07:35 -04:00
. addFunction ( " snapshot " , & MixerScene : : snapshot )
. addFunction ( " clear " , & MixerScene : : clear )
. addFunction ( " empty " , & MixerScene : : empty )
. addFunction ( " name " , & MixerScene : : name )
. addFunction ( " set_name " , & MixerScene : : set_name )
. endClass ( )
2020-10-09 19:26:04 -04:00
. endNamespace ( ) ; // end ARDOUR
/* take a breath */
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
2017-09-27 22:25:50 -04:00
2016-11-09 19:28:21 -05:00
. beginNamespace ( " Plugin " )
. beginClass < Plugin : : IOPortDescription > ( " IOPortDescription " )
. addData ( " name " , & Plugin : : IOPortDescription : : name )
. addData ( " is_sidechain " , & Plugin : : IOPortDescription : : is_sidechain )
. addData ( " group_name " , & Plugin : : IOPortDescription : : group_name )
. addData ( " group_channel " , & Plugin : : IOPortDescription : : group_channel )
2016-04-09 09:42:32 -04:00
. endClass ( )
2016-11-09 19:28:21 -05:00
. endNamespace ( )
2016-04-09 09:42:32 -04:00
2016-03-25 20:03:46 -04:00
. deriveWSPtrClass < Plugin , PBD : : StatefulDestructible > ( " Plugin " )
2016-10-10 11:03:31 -04:00
. addCast < LuaProc > ( " to_luaproc " )
. addFunction ( " unique_id " , & Plugin : : unique_id )
2016-02-23 09:41:02 -05:00
. addFunction ( " label " , & Plugin : : label )
. addFunction ( " name " , & Plugin : : name )
. addFunction ( " maker " , & Plugin : : maker )
. addFunction ( " parameter_count " , & Plugin : : parameter_count )
2017-04-25 07:59:43 -04:00
. addFunction ( " parameter_label " , & Plugin : : parameter_label )
2016-03-21 13:57:20 -04:00
. addRefFunction ( " nth_parameter " , & Plugin : : nth_parameter )
2016-03-19 11:39:24 -04:00
. addFunction ( " preset_by_label " , & Plugin : : preset_by_label )
. addFunction ( " preset_by_uri " , & Plugin : : preset_by_uri )
2022-09-21 08:47:48 -04:00
. addFunction ( " save_preset " , & Plugin : : save_preset )
2016-03-19 11:39:24 -04:00
. addFunction ( " load_preset " , & Plugin : : load_preset )
2021-05-27 10:54:48 -04:00
. addFunction ( " last_preset " , & Plugin : : last_preset )
2022-09-21 12:21:17 -04:00
. addFunction ( " remove_preset " , & Plugin : : remove_preset )
2016-02-23 09:41:02 -05:00
. addFunction ( " parameter_is_input " , & Plugin : : parameter_is_input )
2017-04-25 07:59:43 -04:00
. addFunction ( " parameter_is_output " , & Plugin : : parameter_is_output )
. addFunction ( " parameter_is_control " , & Plugin : : parameter_is_control )
. addFunction ( " parameter_is_audio " , & Plugin : : parameter_is_audio )
2016-02-23 09:41:02 -05:00
. addFunction ( " get_docs " , & Plugin : : get_docs )
2016-08-26 13:04:07 -04:00
. addFunction ( " get_info " , & Plugin : : get_info )
2016-02-23 09:41:02 -05:00
. addFunction ( " get_parameter_docs " , & Plugin : : get_parameter_docs )
2016-11-09 19:28:21 -05:00
. addFunction ( " describe_io_port " , & Plugin : : describe_io_port )
2023-08-06 15:58:13 -04:00
. addFunction ( " get_parameter " , & Plugin : : get_parameter )
. addFunction ( " default_value " , & Plugin : : default_value )
2016-02-23 09:41:02 -05:00
. addRefFunction ( " get_parameter_descriptor " , & Plugin : : get_parameter_descriptor )
. endClass ( )
2016-10-10 11:03:31 -04:00
. deriveWSPtrClass < LuaProc , Plugin > ( " LuaProc " )
. addFunction ( " shmem " , & LuaProc : : instance_shm )
. addFunction ( " table " , & LuaProc : : instance_ref )
. endClass ( )
2016-02-23 09:41:02 -05:00
. deriveWSPtrClass < PluginInsert , Processor > ( " PluginInsert " )
. addFunction ( " plugin " , & PluginInsert : : plugin )
. addFunction ( " activate " , & PluginInsert : : activate )
. addFunction ( " deactivate " , & PluginInsert : : deactivate )
2018-08-01 10:55:58 -04:00
. addFunction ( " enable " , & PluginInsert : : enable )
2018-08-01 11:03:23 -04:00
. addFunction ( " enabled " , & PluginInsert : : enabled )
2016-03-25 14:13:16 -04:00
. addFunction ( " strict_io_configured " , & PluginInsert : : strict_io_configured )
2020-06-15 22:22:23 -04:00
. addFunction ( " write_immediate_event " , & PluginInsert : : write_immediate_event )
2021-02-04 19:52:27 -05:00
. addFunction ( " thru_map " , & PluginInsert : : thru_map )
2016-03-30 09:22:19 -04:00
. addFunction ( " input_map " , ( ARDOUR : : ChanMapping ( PluginInsert : : * ) ( uint32_t ) const ) & PluginInsert : : input_map )
. addFunction ( " output_map " , ( ARDOUR : : ChanMapping ( PluginInsert : : * ) ( uint32_t ) const ) & PluginInsert : : output_map )
2021-02-04 19:52:27 -05:00
. addFunction ( " set_thru_map " , & PluginInsert : : set_thru_map )
2016-03-25 20:03:46 -04:00
. addFunction ( " set_input_map " , & PluginInsert : : set_input_map )
. addFunction ( " set_output_map " , & PluginInsert : : set_output_map )
2016-11-09 19:28:21 -05:00
. addFunction ( " natural_output_streams " , & PluginInsert : : natural_output_streams )
. addFunction ( " natural_input_streams " , & PluginInsert : : natural_input_streams )
2016-12-05 18:22:24 -05:00
. addFunction ( " reset_parameters_to_default " , & PluginInsert : : reset_parameters_to_default )
2018-03-16 10:33:56 -04:00
. addFunction ( " has_sidechain " , & PluginInsert : : has_sidechain )
2021-05-11 14:29:56 -04:00
. addFunction ( " sidechain_input " , & PluginInsert : : sidechain_input )
2018-03-16 10:33:56 -04:00
. addFunction ( " is_instrument " , & PluginInsert : : is_instrument )
. addFunction ( " type " , & PluginInsert : : type )
. addFunction ( " signal_latency " , & PluginInsert : : signal_latency )
. addFunction ( " get_count " , & PluginInsert : : get_count )
2018-07-31 16:24:15 -04:00
. addFunction ( " is_channelstrip " , & PluginInsert : : is_channelstrip )
2023-08-06 15:58:13 -04:00
. addFunction ( " control_output " , & PluginInsert : : control_output )
2018-09-25 11:47:22 -04:00
. addFunction ( " clear_stats " , & PluginInsert : : clear_stats )
. addRefFunction ( " get_stats " , & PluginInsert : : get_stats )
2016-02-23 09:41:02 -05:00
. endClass ( )
2024-03-18 16:30:40 -04:00
. deriveWSPtrClass < RegionFxPlugin , SessionObject > ( " RegionFxPlugin " )
. addFunction ( " plugin " , & RegionFxPlugin : : plugin )
. addFunction ( " signal_latency " , & RegionFxPlugin : : signal_latency )
. addFunction ( " get_count " , & RegionFxPlugin : : get_count )
. addFunction ( " type " , & RegionFxPlugin : : type )
. addFunction ( " reset_parameters_to_default " , & RegionFxPlugin : : reset_parameters_to_default )
. endClass ( )
2022-10-07 12:52:00 -04:00
. deriveWSPtrClass < MPControl < gain_t > , PBD : : Controllable > ( " MPGainControl " )
. addFunction ( " set_value " , & MPControl < gain_t > : : set_value )
. addFunction ( " get_value " , & MPControl < gain_t > : : get_value )
. addFunction ( " get_user_string " , & MPControl < gain_t > : : get_user_string )
. addFunction ( " lower " , & MPControl < gain_t > : : lower )
. addFunction ( " upper " , & MPControl < gain_t > : : upper )
. addFunction ( " normal " , & MPControl < gain_t > : : normal )
. endClass ( )
. deriveWSPtrClass < MPControl < bool > , PBD : : Controllable > ( " MPToggleControl " )
. addFunction ( " set_value " , & MPControl < bool > : : set_value )
. addFunction ( " get_value " , & MPControl < bool > : : get_value )
. addFunction ( " get_user_string " , & MPControl < bool > : : get_user_string )
. addFunction ( " lower " , & MPControl < bool > : : lower )
. addFunction ( " upper " , & MPControl < bool > : : upper )
. addFunction ( " normal " , & MPControl < bool > : : normal )
. endClass ( )
2017-08-16 19:13:28 -04:00
. deriveWSPtrClass < ReadOnlyControl , PBD : : StatefulDestructible > ( " ReadOnlyControl " )
. addFunction ( " get_parameter " , & ReadOnlyControl : : get_parameter )
. addFunction ( " describe_parameter " , & ReadOnlyControl : : describe_parameter )
. addFunction ( " desc " , & ReadOnlyControl : : desc )
. endClass ( )
2016-04-11 08:04:45 -04:00
. deriveWSPtrClass < AutomationControl , PBD : : Controllable > ( " AutomationControl " )
2016-04-10 11:35:02 -04:00
. addCast < Evoral : : Control > ( " to_ctrl " )
2017-05-30 09:15:30 -04:00
. addCast < SlavableAutomationControl > ( " to_slavable " )
2016-02-23 09:41:02 -05:00
. addFunction ( " automation_state " , & AutomationControl : : automation_state )
2016-04-10 11:35:02 -04:00
. addFunction ( " set_automation_state " , & AutomationControl : : set_automation_state )
2016-02-23 09:41:02 -05:00
. addFunction ( " start_touch " , & AutomationControl : : start_touch )
. addFunction ( " stop_touch " , & AutomationControl : : stop_touch )
. addFunction ( " get_value " , & AutomationControl : : get_value )
. addFunction ( " set_value " , & AutomationControl : : set_value )
. addFunction ( " writable " , & AutomationControl : : writable )
2016-04-10 11:35:02 -04:00
. addFunction ( " alist " , & AutomationControl : : alist )
2019-12-13 17:05:15 -05:00
. addFunction ( " desc " , & AutomationControl : : desc )
. addFunction ( " lower " , & AutomationControl : : lower )
. addFunction ( " upper " , & AutomationControl : : upper )
. addFunction ( " normal " , & AutomationControl : : normal )
. addFunction ( " toggled " , & AutomationControl : : toggled )
2016-04-10 11:35:02 -04:00
. endClass ( )
2017-08-16 19:13:28 -04:00
. deriveWSPtrClass < SlavableAutomationControl , AutomationControl > ( " SlavableAutomationControl " )
2016-06-01 09:12:14 -04:00
. addFunction ( " add_master " , & SlavableAutomationControl : : add_master )
. addFunction ( " remove_master " , & SlavableAutomationControl : : remove_master )
. addFunction ( " clear_masters " , & SlavableAutomationControl : : clear_masters )
. addFunction ( " slaved_to " , & SlavableAutomationControl : : slaved_to )
. addFunction ( " slaved " , & SlavableAutomationControl : : slaved )
. addFunction ( " get_masters_value " , & SlavableAutomationControl : : get_masters_value )
. addFunction ( " get_boolean_masters " , & SlavableAutomationControl : : get_boolean_masters )
//.addFunction ("masters", &SlavableAutomationControl::masters) // not implemented
. endClass ( )
. deriveWSPtrClass < PhaseControl , AutomationControl > ( " PhaseControl " )
. addFunction ( " set_phase_invert " , ( void ( PhaseControl : : * ) ( uint32_t , bool ) ) & PhaseControl : : set_phase_invert )
. addFunction ( " inverted " , & PhaseControl : : inverted )
. endClass ( )
. deriveWSPtrClass < GainControl , SlavableAutomationControl > ( " GainControl " )
. endClass ( )
2021-05-11 14:29:56 -04:00
. deriveWSPtrClass < MonitorControl , SlavableAutomationControl > ( " MonitorControl " )
. addFunction ( " monitoring_choice " , & MonitorControl : : monitoring_choice )
. endClass ( )
2016-06-01 09:12:14 -04:00
. deriveWSPtrClass < SoloControl , SlavableAutomationControl > ( " SoloControl " )
. addFunction ( " can_solo " , & SoloControl : : can_solo )
. addFunction ( " soloed " , & SoloControl : : soloed )
. addFunction ( " self_soloed " , & SoloControl : : self_soloed )
. endClass ( )
. deriveWSPtrClass < MuteControl , SlavableAutomationControl > ( " MuteControl " )
. addFunction ( " muted " , & MuteControl : : muted )
. addFunction ( " muted_by_self " , & MuteControl : : muted_by_self )
2022-12-12 04:43:59 -05:00
. addFunction ( " mute_points " , & MuteControl : : mute_points )
. addFunction ( " set_mute_points " , & MuteControl : : set_mute_points )
2016-06-01 09:12:14 -04:00
. endClass ( )
. deriveWSPtrClass < SoloIsolateControl , SlavableAutomationControl > ( " SoloIsolateControl " )
. addFunction ( " solo_isolated " , & SoloIsolateControl : : solo_isolated )
. addFunction ( " self_solo_isolated " , & SoloIsolateControl : : self_solo_isolated )
. endClass ( )
. deriveWSPtrClass < SoloSafeControl , SlavableAutomationControl > ( " SoloSafeControl " )
. addFunction ( " solo_safe " , & SoloSafeControl : : solo_safe )
2016-04-10 11:35:02 -04:00
. endClass ( )
. deriveWSPtrClass < Amp , Processor > ( " Amp " )
2023-02-16 18:33:28 -05:00
. addFunction ( " gain_control " , ( std : : shared_ptr < GainControl > ( Amp : : * ) ( ) ) & Amp : : gain_control )
2020-02-26 09:22:47 -05:00
. addStaticFunction ( " apply_gain " , static_cast < gain_t ( * ) ( AudioBuffer & , samplecnt_t , samplecnt_t , gain_t , gain_t , sampleoffset_t ) > ( & Amp : : apply_gain ) )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-09-05 19:26:36 -04:00
. deriveWSPtrClass < PeakMeter , Processor > ( " PeakMeter " )
. addFunction ( " meter_level " , & PeakMeter : : meter_level )
2019-06-09 11:47:21 -04:00
. addFunction ( " set_meter_type " , & PeakMeter : : set_meter_type )
. addFunction ( " meter_type " , & PeakMeter : : meter_type )
2016-09-05 19:26:36 -04:00
. addFunction ( " reset_max " , & PeakMeter : : reset_max )
. endClass ( )
2016-08-19 15:31:38 -04:00
. deriveWSPtrClass < MonitorProcessor , Processor > ( " MonitorProcessor " )
. addFunction ( " set_cut_all " , & MonitorProcessor : : set_cut_all )
. addFunction ( " set_dim_all " , & MonitorProcessor : : set_dim_all )
. addFunction ( " set_polarity " , & MonitorProcessor : : set_polarity )
. addFunction ( " set_cut " , & MonitorProcessor : : set_cut )
. addFunction ( " set_dim " , & MonitorProcessor : : set_dim )
. addFunction ( " set_solo " , & MonitorProcessor : : set_solo )
. addFunction ( " set_mono " , & MonitorProcessor : : set_mono )
. addFunction ( " dim_level " , & MonitorProcessor : : dim_level )
. addFunction ( " solo_boost_level " , & MonitorProcessor : : solo_boost_level )
. addFunction ( " dimmed " , & MonitorProcessor : : dimmed )
. addFunction ( " soloed " , & MonitorProcessor : : soloed )
. addFunction ( " inverted " , & MonitorProcessor : : inverted )
. addFunction ( " cut " , & MonitorProcessor : : cut )
. addFunction ( " cut_all " , & MonitorProcessor : : cut_all )
. addFunction ( " dim_all " , & MonitorProcessor : : dim_all )
. addFunction ( " mono " , & MonitorProcessor : : mono )
. addFunction ( " monitor_active " , & MonitorProcessor : : monitor_active )
. addFunction ( " channel_cut_control " , & MonitorProcessor : : channel_cut_control )
. addFunction ( " channel_dim_control " , & MonitorProcessor : : channel_dim_control )
. addFunction ( " channel_polarity_control " , & MonitorProcessor : : channel_polarity_control )
. addFunction ( " channel_solo_control " , & MonitorProcessor : : channel_solo_control )
. addFunction ( " dim_control " , & MonitorProcessor : : dim_control )
. addFunction ( " cut_control " , & MonitorProcessor : : cut_control )
. addFunction ( " mono_control " , & MonitorProcessor : : mono_control )
. addFunction ( " dim_level_control " , & MonitorProcessor : : dim_level_control )
. addFunction ( " solo_boost_control " , & MonitorProcessor : : solo_boost_control )
. endClass ( )
2016-05-23 15:55:49 -04:00
. deriveWSPtrClass < UnknownProcessor , Processor > ( " UnknownProcessor " )
. endClass ( )
2017-10-30 22:15:43 -04:00
. deriveWSPtrClass < PolarityProcessor , Processor > ( " PolarityProcessor " )
. endClass ( )
2017-11-03 14:26:44 -04:00
. deriveWSPtrClass < DelayLine , Processor > ( " DelayLine " )
. addFunction ( " delay " , & DelayLine : : delay )
. endClass ( )
2024-03-18 19:02:53 -04:00
. deriveWSPtrClass < PlugInsertBase : : PluginControl , AutomationControl > ( " PluginControl " )
. endClass ( )
. deriveWSPtrClass < PlugInsertBase : : PluginPropertyControl , AutomationControl > ( " PluginPropertyControl " )
. endClass ( )
. deriveWSPtrClass < PluginInsert : : PIControl , PlugInsertBase : : PluginControl > ( " PIControl " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2017-12-05 10:08:02 -05:00
. beginClass < RawMidiParser > ( " RawMidiParser " )
. addVoidConstructor ( )
. addFunction ( " reset " , & RawMidiParser : : reset )
. addFunction ( " process_byte " , & RawMidiParser : : process_byte )
. addFunction ( " buffer_size " , & RawMidiParser : : buffer_size )
. addFunction ( " midi_buffer " , & RawMidiParser : : midi_buffer )
. endClass ( )
2016-02-23 09:41:02 -05:00
. deriveWSPtrClass < AudioSource , Source > ( " AudioSource " )
2020-09-20 18:34:09 -04:00
. addFunction ( " readable_length " , & AudioSource : : readable_length_samples )
2016-02-23 09:41:02 -05:00
. addFunction ( " n_channels " , & AudioSource : : n_channels )
. endClass ( )
2023-02-16 18:33:28 -05:00
// <std::list<std::shared_ptr <AudioTrack> >
. beginStdList < std : : shared_ptr < AudioTrack > > ( " AudioTrackList " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2020-11-20 12:29:42 -05:00
. beginStdList < TimelineRange > ( " TimelineRangeList " )
. endClass ( )
2023-02-16 18:33:28 -05:00
// std::list<std::shared_ptr <MidiTrack> >
. beginStdList < std : : shared_ptr < MidiTrack > > ( " MidiTrackList " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// RouteList == std::list<std::shared_ptr<Route> >
. beginConstStdList < std : : shared_ptr < Route > > ( " RouteList " )
2016-03-20 23:06:05 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// StripableList == std::list<std::shared_ptr<Stripable> >
. beginConstStdList < std : : shared_ptr < Stripable > > ( " StripableList " )
2017-05-30 09:15:30 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// VCAList == std::list<std::shared_ptr<VCA> >
. beginConstStdList < std : : shared_ptr < VCA > > ( " VCAList " )
2017-05-30 09:15:30 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// VCAVector == std::vector<std::shared_ptr<VCA> >
. beginConstStdVector < std : : shared_ptr < VCA > > ( " VCAVector " )
2017-10-19 20:18:16 -04:00
. endClass ( )
2023-04-12 14:47:02 -04:00
// std::shared_ptr<RouteList const>
. beginPtrConstStdList < std : : shared_ptr < Route > > ( " ConstRouteListPtr " )
. addVoidPtrConstructor < std : : list < std : : shared_ptr < Route > > const > ( )
. endClass ( )
2023-02-16 18:33:28 -05:00
// std::shared_ptr<RouteList>
. beginPtrStdList < std : : shared_ptr < Route > > ( " RouteListPtr " )
. addVoidPtrConstructor < std : : list < std : : shared_ptr < Route > > > ( )
2023-05-13 20:44:27 -04:00
. addStaticCFunction ( " from_routelist " , & to_ptr < ARDOUR : : RouteList > )
2016-02-23 09:41:02 -05:00
. endClass ( )
2023-04-12 14:47:02 -04:00
// std::shared_ptr<BundleList const>
. beginPtrConstStdVector < std : : shared_ptr < Bundle > > ( " ConstBundleListPtr " )
. addVoidPtrConstructor < std : : vector < std : : shared_ptr < Bundle > > const > ( )
. endClass ( )
2023-02-16 18:33:28 -05:00
// std::shared_ptr<BundleList>
. beginPtrStdVector < std : : shared_ptr < Bundle > > ( " BundleListPtr " )
. addVoidPtrConstructor < std : : vector < std : : shared_ptr < Bundle > > > ( )
2021-02-26 07:34:24 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::list<std::weak_ptr <Route> > WeakRouteList
. beginConstStdList < std : : weak_ptr < Route > > ( " WeakRouteList " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2017-03-29 21:40:02 -04:00
// RouteGroupList == std::list<RouteGroup*>
. beginConstStdCPtrList < RouteGroup > ( " RouteGroupList " )
2016-12-05 15:53:41 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::vector<std::shared_ptr<Source> > Region::SourceList
. beginStdVector < std : : shared_ptr < Source > > ( " SourceList " )
2016-10-15 15:16:57 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::vector<std::shared_ptr<AudioReadable> >
. beginStdVector < std : : shared_ptr < AudioReadable > > ( " ReadableList " )
2020-01-31 10:49:48 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// from SessionPlaylists: std::vector<std::shared_ptr<Playlist > >
. beginStdVector < std : : shared_ptr < Playlist > > ( " PlaylistList " )
2019-03-19 00:14:54 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// std::list< std::weak_ptr <AudioSource> >
. beginConstStdList < std : : weak_ptr < AudioSource > > ( " WeakAudioSourceList " )
2016-02-23 09:41:02 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::vector<std::shared_ptr<Region> > RegionVector
. beginStdVector < std : : shared_ptr < Region > > ( " RegionVector " )
2017-08-23 13:37:45 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::set <std::shared_ptr<PBD::Controllable> > PBD::ControllableSet;
. beginStdSet < std : : shared_ptr < PBD : : Controllable > > ( " ControllableSet " )
2022-10-17 17:24:41 -04:00
. endClass ( )
2022-10-17 17:12:50 -04:00
// typedef std::set <enum AutomationType> AutomationTypeSet;
. beginStdSet < AutomationType > ( " AutomationTypeSet " )
. endClass ( )
2021-02-12 18:20:30 -05:00
// typedef std::vector<samplepos_t> XrunPositions
. beginStdVector < samplepos_t > ( " XrunPositions " )
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::list<std::shared_ptr<Region> > RegionList
. beginConstStdList < std : : shared_ptr < Region > > ( " RegionList " )
2016-04-09 09:42:32 -04:00
. endClass ( )
2023-02-16 18:33:28 -05:00
// std::shared_ptr <std::list<std::shared_ptr<Region> > >
. beginPtrStdList < std : : shared_ptr < Region > > ( " RegionListPtr " )
. addVoidPtrConstructor < std : : list < std : : shared_ptr < Region > > > ( )
2023-05-13 20:44:27 -04:00
. addStaticCFunction ( " from_regionlist " , & to_ptr < ARDOUR : : RegionList > )
2016-04-09 09:42:32 -04:00
. endClass ( )
2017-08-06 19:56:36 -04:00
// RegionFactory::RegionMap
2023-02-16 18:33:28 -05:00
. beginStdMap < PBD : : ID , std : : shared_ptr < Region > > ( " RegionMap " )
2017-08-06 19:56:36 -04:00
. endClass ( )
2020-10-26 10:52:17 -04:00
// typedef std::map<std::string, DPM> PortManager::AudioPortMeters;
. beginStdMap < std : : string , PortManager : : DPM > ( " AudioPortMeters " )
. endClass ( )
// typedef std::map<std::string, MPM> PortManager::MIDIPortMeters;
. beginStdMap < std : : string , PortManager : : MPM > ( " MIDIPortMeters " )
. endClass ( )
2023-02-16 18:33:28 -05:00
// typedef std::list<std::shared_ptr<Processor> > ProcessorList
. beginStdList < std : : shared_ptr < Processor > > ( " ProcessorList " )
2017-02-15 12:12:28 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
//std::list<std::shared_ptr<Port> > PortList
. beginConstStdList < std : : shared_ptr < Port > > ( " PortList " )
2016-04-25 20:21:09 -04:00
. endClass ( )
2019-05-17 06:08:13 -04:00
. beginConstStdCPtrList < Location > ( " LocationList " )
2016-04-09 09:42:32 -04:00
. endClass ( )
2021-06-30 13:22:22 -04:00
. beginConstStdVector < Evoral : : Parameter > ( " ParameterList " )
. endClass ( )
2023-02-16 18:33:28 -05:00
. beginStdList < std : : shared_ptr < AutomationControl > > ( " ControlList " )
2017-02-16 21:37:51 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
. beginPtrStdList < std : : shared_ptr < AutomationControl > > ( " ControlListPtr " )
. addVoidPtrConstructor < std : : list < std : : shared_ptr < AutomationControl > > > ( )
2017-02-16 21:37:51 -05:00
. endClass ( )
2023-02-16 18:33:28 -05:00
. beginStdList < std : : shared_ptr < Evoral : : Note < Temporal : : Beats > > > ( " NotePtrList " )
2017-03-18 13:37:19 -04:00
. endClass ( )
2019-05-17 06:08:13 -04:00
. beginConstStdCPtrList < Evoral : : ControlEvent > ( " EventList " )
2017-04-23 22:10:10 -04:00
. endClass ( )
2016-02-23 09:41:02 -05:00
#if 0 // depends on Evoal:: Note, Beats see note_fixer.h
2020-10-09 19:26:04 -04:00
// typedef Evoral::Note<Temporal::Beats> Note
2023-02-16 18:33:28 -05:00
// std::set< std::weak_ptr<Note> >
. beginStdSet < std : : weak_ptr < Note > > ( " WeakNoteSet " )
2016-02-23 09:41:02 -05:00
. endClass ( )
# endif
2023-02-16 18:33:28 -05:00
// std::list<std::weak_ptr<Source> >
. beginConstStdList < std : : weak_ptr < Source > > ( " WeakSourceList " )
2016-02-23 09:41:02 -05:00
. endClass ( )
. beginClass < ChanCount > ( " ChanCount " )
2016-03-27 15:33:40 -04:00
. addConstructor < void ( * ) ( DataType , uint32_t ) > ( )
2016-03-27 16:39:03 -04:00
. addFunction ( " get " , & ChanCount : : get )
. addFunction ( " set " , & ChanCount : : set )
2020-02-26 09:22:47 -05:00
. addFunction ( " set_audio " , & ChanCount : : set_audio )
. addFunction ( " set_midi " , & ChanCount : : set_midi )
2016-02-23 09:41:02 -05:00
. addFunction ( " n_audio " , & ChanCount : : n_audio )
2016-03-27 16:39:03 -04:00
. addFunction ( " n_midi " , & ChanCount : : n_midi )
. addFunction ( " n_total " , & ChanCount : : n_total )
. addFunction ( " reset " , & ChanCount : : reset )
2016-02-23 09:41:02 -05:00
. endClass ( )
. beginClass < DataType > ( " DataType " )
. addConstructor < void ( * ) ( std : : string ) > ( )
2022-05-08 20:20:45 -04:00
. addStaticCFunction ( " null " , & LuaAPI : : datatype_ctor_null ) // "nil" is a lua reserved word
2016-04-02 17:41:33 -04:00
. addStaticCFunction ( " audio " , & LuaAPI : : datatype_ctor_audio )
. addStaticCFunction ( " midi " , & LuaAPI : : datatype_ctor_midi )
2016-04-09 19:45:41 -04:00
. addFunction ( " to_string " , & DataType : : to_string ) // TODO Lua __tostring
2016-04-09 09:42:32 -04:00
// TODO add uint32_t cast, add operator== !=
2016-02-23 09:41:02 -05:00
. endClass ( )
/* libardour enums */
2016-03-19 11:39:24 -04:00
. beginNamespace ( " PluginType " )
2020-09-15 09:49:22 -04:00
. addFunction ( " name " , & PluginManager : : plugin_type_name )
2016-03-19 11:39:24 -04:00
. addConst ( " AudioUnit " , ARDOUR : : PluginType ( AudioUnit ) )
. addConst ( " LADSPA " , ARDOUR : : PluginType ( LADSPA ) )
. addConst ( " LV2 " , ARDOUR : : PluginType ( LV2 ) )
. addConst ( " Windows_VST " , ARDOUR : : PluginType ( Windows_VST ) )
. addConst ( " LXVST " , ARDOUR : : PluginType ( LXVST ) )
2018-08-16 18:59:46 -04:00
. addConst ( " MacVST " , ARDOUR : : PluginType ( MacVST ) )
2016-03-19 11:39:24 -04:00
. addConst ( " Lua " , ARDOUR : : PluginType ( Lua ) )
2019-11-02 23:09:57 -04:00
. addConst ( " VST3 " , ARDOUR : : PluginType ( VST3 ) )
2016-03-19 11:39:24 -04:00
. endNamespace ( )
2016-06-01 09:12:14 -04:00
. beginNamespace ( " PresentationInfo " )
. beginNamespace ( " Flag " )
. addConst ( " AudioTrack " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : AudioTrack ) )
. addConst ( " MidiTrack " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : MidiTrack ) )
. addConst ( " AudioBus " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : AudioBus ) )
. addConst ( " MidiBus " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : MidiBus ) )
. addConst ( " VCA " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : VCA ) )
. addConst ( " MasterOut " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : MasterOut ) )
. addConst ( " MonitorOut " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : MonitorOut ) )
. addConst ( " Auditioner " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : Auditioner ) )
. addConst ( " Hidden " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : Hidden ) )
2016-06-05 15:11:43 -04:00
. addConst ( " GroupOrderSet " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : OrderSet ) )
2021-11-18 11:03:10 -05:00
. addConst ( " TriggerTrack " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : TriggerTrack ) )
2016-06-01 09:12:14 -04:00
. addConst ( " StatusMask " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : StatusMask ) )
2021-11-18 11:03:10 -05:00
. addConst ( " TypeMask " , ARDOUR : : PresentationInfo : : Flag ( PresentationInfo : : TypeMask ) )
2016-06-01 09:12:14 -04:00
. endNamespace ( )
. endNamespace ( )
2016-02-23 09:41:02 -05:00
. beginNamespace ( " AutoState " )
. addConst ( " Off " , ARDOUR : : AutoState ( Off ) )
. addConst ( " Write " , ARDOUR : : AutoState ( Write ) )
. addConst ( " Touch " , ARDOUR : : AutoState ( Touch ) )
. addConst ( " Play " , ARDOUR : : AutoState ( Play ) )
2017-07-25 10:09:47 -04:00
. addConst ( " Latch " , ARDOUR : : AutoState ( Latch ) )
2016-02-23 09:41:02 -05:00
. endNamespace ( )
. beginNamespace ( " AutomationType " )
2016-06-01 09:12:14 -04:00
. addConst ( " GainAutomation " , ARDOUR : : AutomationType ( GainAutomation ) )
2019-12-14 09:04:08 -05:00
. addConst ( " BusSendLevel " , ARDOUR : : AutomationType ( BusSendLevel ) )
2024-03-21 09:23:43 -04:00
. addConst ( " SurroundSendLevel " , ARDOUR : : AutomationType ( SurroundSendLevel ) )
2022-10-10 20:38:47 -04:00
. addConst ( " InsertReturnLevel " , ARDOUR : : AutomationType ( InsertReturnLevel ) )
2016-02-23 09:41:02 -05:00
. addConst ( " PluginAutomation " , ARDOUR : : AutomationType ( PluginAutomation ) )
2016-06-01 09:12:14 -04:00
. addConst ( " SoloAutomation " , ARDOUR : : AutomationType ( SoloAutomation ) )
. addConst ( " SoloIsolateAutomation " , ARDOUR : : AutomationType ( SoloIsolateAutomation ) )
. addConst ( " SoloSafeAutomation " , ARDOUR : : AutomationType ( SoloSafeAutomation ) )
. addConst ( " MuteAutomation " , ARDOUR : : AutomationType ( MuteAutomation ) )
. addConst ( " RecEnableAutomation " , ARDOUR : : AutomationType ( RecEnableAutomation ) )
. addConst ( " RecSafeAutomation " , ARDOUR : : AutomationType ( RecSafeAutomation ) )
. addConst ( " TrimAutomation " , ARDOUR : : AutomationType ( TrimAutomation ) )
. addConst ( " PhaseAutomation " , ARDOUR : : AutomationType ( PhaseAutomation ) )
2016-12-07 05:30:40 -05:00
. addConst ( " MidiCCAutomation " , ARDOUR : : AutomationType ( MidiCCAutomation ) )
. addConst ( " MidiPgmChangeAutomation " , ARDOUR : : AutomationType ( MidiPgmChangeAutomation ) )
. addConst ( " MidiPitchBenderAutomation " , ARDOUR : : AutomationType ( MidiPitchBenderAutomation ) )
. addConst ( " MidiChannelPressureAutomation " , ARDOUR : : AutomationType ( MidiChannelPressureAutomation ) )
. addConst ( " MidiNotePressureAutomation " , ARDOUR : : AutomationType ( MidiNotePressureAutomation ) )
. addConst ( " MidiSystemExclusiveAutomation " , ARDOUR : : AutomationType ( MidiSystemExclusiveAutomation ) )
2016-02-23 09:41:02 -05:00
. endNamespace ( )
. beginNamespace ( " SrcQuality " )
. addConst ( " SrcBest " , ARDOUR : : SrcQuality ( SrcBest ) )
. endNamespace ( )
2023-06-05 20:11:09 -04:00
. beginNamespace ( " SectionOperation " )
. addConst ( " CopyPaste " , ARDOUR : : SectionOperation ( CopyPasteSection ) )
. addConst ( " CutPaste " , ARDOUR : : SectionOperation ( CutPasteSection ) )
. addConst ( " Insert " , ARDOUR : : SectionOperation ( InsertSection ) )
. addConst ( " Delete " , ARDOUR : : SectionOperation ( DeleteSection ) )
. endNamespace ( )
2016-09-05 19:26:36 -04:00
. 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 ( )
2016-12-05 15:53:41 -05:00
. beginNamespace ( " Placement " )
. addConst ( " PreFader " , ARDOUR : : Placement ( PreFader ) )
. addConst ( " PostFader " , ARDOUR : : Placement ( PostFader ) )
. endNamespace ( )
2017-02-14 08:45:21 -05:00
. beginNamespace ( " MonitorChoice " )
. addConst ( " MonitorAuto " , ARDOUR : : MonitorChoice ( MonitorAuto ) )
. addConst ( " MonitorInput " , ARDOUR : : MonitorChoice ( MonitorInput ) )
. addConst ( " MonitorDisk " , ARDOUR : : MonitorChoice ( MonitorDisk ) )
. addConst ( " MonitorCue " , ARDOUR : : MonitorChoice ( MonitorCue ) )
. endNamespace ( )
2021-05-11 14:29:56 -04:00
. beginNamespace ( " MonitorState " )
. addConst ( " MonitoringSilence " , ARDOUR : : MonitorState ( MonitoringSilence ) )
. addConst ( " MonitoringInput " , ARDOUR : : MonitorState ( MonitoringInput ) )
. addConst ( " MonitoringDisk " , ARDOUR : : MonitorState ( MonitoringDisk ) )
. addConst ( " MonitoringCue " , ARDOUR : : MonitorState ( MonitoringCue ) )
. endNamespace ( )
2022-12-12 04:43:59 -05:00
. beginNamespace ( " MutePoint " )
. addConst ( " PreFader " , ARDOUR : : MuteMaster : : MutePoint ( MuteMaster : : PreFader ) )
. addConst ( " PostFader " , ARDOUR : : MuteMaster : : MutePoint ( MuteMaster : : PostFader ) )
. addConst ( " Listen " , ARDOUR : : MuteMaster : : MutePoint ( MuteMaster : : Listen ) )
. addConst ( " Main " , ARDOUR : : MuteMaster : : MutePoint ( MuteMaster : : Main ) )
. endNamespace ( )
2016-10-06 18:23:33 -04:00
. beginNamespace ( " NoteMode " )
. addConst ( " Sustained " , ARDOUR : : NoteMode ( Sustained ) )
. addConst ( " Percussive " , ARDOUR : : NoteMode ( Percussive ) )
. endNamespace ( )
2022-09-09 22:27:52 -04:00
. beginNamespace ( " ChannelMode " )
. addConst ( " AllChannels " , ARDOUR : : ChannelMode ( AllChannels ) )
. addConst ( " FilterChannels " , ARDOUR : : ChannelMode ( FilterChannels ) )
. addConst ( " ForceChannel " , ARDOUR : : ChannelMode ( ForceChannel ) )
. endNamespace ( )
2016-04-26 08:35:47 -04:00
. beginNamespace ( " PortFlags " )
. addConst ( " IsInput " , ARDOUR : : PortFlags ( IsInput ) )
. addConst ( " IsOutput " , ARDOUR : : PortFlags ( IsOutput ) )
. addConst ( " IsPhysical " , ARDOUR : : PortFlags ( IsPhysical ) )
. addConst ( " CanMonitor " , ARDOUR : : PortFlags ( CanMonitor ) )
. addConst ( " IsTerminal " , ARDOUR : : PortFlags ( IsTerminal ) )
. endNamespace ( )
2016-12-08 07:21:00 -05:00
. beginNamespace ( " MidiPortFlags " )
. addConst ( " MidiPortMusic " , ARDOUR : : MidiPortFlags ( MidiPortMusic ) )
. addConst ( " MidiPortControl " , ARDOUR : : MidiPortFlags ( MidiPortControl ) )
. addConst ( " MidiPortSelection " , ARDOUR : : MidiPortFlags ( MidiPortSelection ) )
. addConst ( " MidiPortVirtual " , ARDOUR : : MidiPortFlags ( MidiPortVirtual ) )
. endNamespace ( )
2016-02-23 09:41:02 -05:00
. beginNamespace ( " PlaylistDisposition " )
. addConst ( " CopyPlaylist " , ARDOUR : : PlaylistDisposition ( CopyPlaylist ) )
. addConst ( " NewPlaylist " , ARDOUR : : PlaylistDisposition ( NewPlaylist ) )
. addConst ( " SharePlaylist " , ARDOUR : : PlaylistDisposition ( SharePlaylist ) )
2016-04-09 09:42:32 -04:00
. endNamespace ( )
2017-01-21 14:08:12 -05:00
. beginNamespace ( " MidiTrackNameSource " )
. addConst ( " SMFTrackNumber " , ARDOUR : : MidiTrackNameSource ( SMFTrackNumber ) )
. addConst ( " SMFTrackName " , ARDOUR : : MidiTrackNameSource ( SMFTrackName ) )
. addConst ( " SMFInstrumentName " , ARDOUR : : MidiTrackNameSource ( SMFInstrumentName ) )
. endNamespace ( )
. beginNamespace ( " MidiTempoMapDisposition " )
2017-08-16 19:13:28 -04:00
. addConst ( " SMFTempoIgnore " , ARDOUR : : MidiTempoMapDisposition ( SMFTempoIgnore ) )
. addConst ( " SMFTempoUse " , ARDOUR : : MidiTempoMapDisposition ( SMFTempoUse ) )
2017-01-21 14:08:12 -05:00
. endNamespace ( )
2019-08-23 20:54:25 -04:00
. beginNamespace ( " RegionEquivalence " )
. addConst ( " Exact " , ARDOUR : : RegionEquivalence ( Exact ) )
. addConst ( " Enclosed " , ARDOUR : : RegionEquivalence ( Enclosed ) )
. addConst ( " Overlap " , ARDOUR : : RegionEquivalence ( Overlap ) )
. addConst ( " LayerTime " , ARDOUR : : RegionEquivalence ( LayerTime ) )
. endNamespace ( )
2016-04-09 09:42:32 -04:00
. beginNamespace ( " RegionPoint " )
. addConst ( " Start " , ARDOUR : : RegionPoint ( Start ) )
. addConst ( " End " , ARDOUR : : RegionPoint ( End ) )
. addConst ( " SyncPoint " , ARDOUR : : RegionPoint ( SyncPoint ) )
2016-04-23 18:25:34 -04:00
. endNamespace ( )
. beginNamespace ( " TrackMode " )
. addConst ( " Normal " , ARDOUR : : TrackMode ( Start ) )
. addConst ( " NonLayered " , ARDOUR : : TrackMode ( NonLayered ) )
. endNamespace ( )
2016-08-15 18:20:36 -04:00
2022-10-02 08:32:43 -04:00
. beginNamespace ( " RecordMode " )
. addConst ( " RecLayered " , ARDOUR : : RecordMode ( RecLayered ) )
. addConst ( " RecNonLayered " , ARDOUR : : RecordMode ( RecNonLayered ) )
. addConst ( " RecSoundOnSound " , ARDOUR : : RecordMode ( RecSoundOnSound ) )
. endNamespace ( )
2019-08-23 20:54:25 -04:00
. beginNamespace ( " TransportRequestSource " )
. addConst ( " TRS_Engine " , ARDOUR : : TransportRequestSource ( TRS_Engine ) )
. addConst ( " TRS_UI " , ARDOUR : : TransportRequestSource ( TRS_UI ) )
. endNamespace ( )
2020-01-30 19:45:07 -05:00
. beginNamespace ( " LocateTransportDisposition " )
. addConst ( " MustRoll " , ARDOUR : : LocateTransportDisposition ( MustRoll ) )
. addConst ( " MustStop " , ARDOUR : : LocateTransportDisposition ( MustStop ) )
. addConst ( " RollIfAppropriate " , ARDOUR : : LocateTransportDisposition ( RollIfAppropriate ) )
. endNamespace ( )
2022-09-07 23:34:05 -04:00
. beginNamespace ( " CueBehavior " )
. addConst ( " FollowCues " , ARDOUR : : CueBehavior ( FollowCues ) )
. addConst ( " ImplicitlyIgnoreCues " , ARDOUR : : CueBehavior ( ImplicitlyIgnoreCues ) )
. endNamespace ( )
2024-01-12 21:03:25 -05:00
. beginNamespace ( " WellKnownCtrl " )
. addConst ( " EQ_Enable " , ARDOUR : : WellKnownCtrl ( EQ_Enable ) )
2024-01-15 09:28:30 -05:00
. addConst ( " EQ_BandGain " , ARDOUR : : WellKnownCtrl ( EQ_BandGain ) )
. addConst ( " EQ_BandFreq " , ARDOUR : : WellKnownCtrl ( EQ_BandFreq ) )
. addConst ( " EQ_BandQ " , ARDOUR : : WellKnownCtrl ( EQ_BandQ ) )
. addConst ( " EQ_BandShape " , ARDOUR : : WellKnownCtrl ( EQ_BandShape ) )
2024-01-12 21:03:25 -05:00
. addConst ( " HPF_Enable " , ARDOUR : : WellKnownCtrl ( HPF_Enable ) )
. addConst ( " HPF_Freq " , ARDOUR : : WellKnownCtrl ( HPF_Freq ) )
. addConst ( " HPF_Slope " , ARDOUR : : WellKnownCtrl ( HPF_Slope ) )
. addConst ( " LPF_Enable " , ARDOUR : : WellKnownCtrl ( LPF_Enable ) )
. addConst ( " LPF_Freq " , ARDOUR : : WellKnownCtrl ( LPF_Freq ) )
. addConst ( " LPF_Slope " , ARDOUR : : WellKnownCtrl ( LPF_Slope ) )
. addConst ( " TapeDrive_Drive " , ARDOUR : : WellKnownCtrl ( TapeDrive_Drive ) )
. addConst ( " TapeDrive_Mode " , ARDOUR : : WellKnownCtrl ( TapeDrive_Mode ) )
. addConst ( " Comp_Enable " , ARDOUR : : WellKnownCtrl ( Comp_Enable ) )
. addConst ( " Comp_Mode " , ARDOUR : : WellKnownCtrl ( Comp_Mode ) )
. addConst ( " Comp_Threshold " , ARDOUR : : WellKnownCtrl ( Comp_Threshold ) )
. addConst ( " Comp_Makeup " , ARDOUR : : WellKnownCtrl ( Comp_Makeup ) )
. addConst ( " Comp_Ratio " , ARDOUR : : WellKnownCtrl ( Comp_Ratio ) )
. addConst ( " Comp_Attack " , ARDOUR : : WellKnownCtrl ( Comp_Attack ) )
. addConst ( " Comp_Release " , ARDOUR : : WellKnownCtrl ( Comp_Release ) )
. addConst ( " Comp_KeyFilterFreq " , ARDOUR : : WellKnownCtrl ( Comp_KeyFilterFreq ) )
. addConst ( " Gate_Enable " , ARDOUR : : WellKnownCtrl ( Gate_Enable ) )
. addConst ( " Gate_Mode " , ARDOUR : : WellKnownCtrl ( Gate_Mode ) )
. addConst ( " Gate_Threshold " , ARDOUR : : WellKnownCtrl ( Gate_Threshold ) )
. addConst ( " Gate_Ratio " , ARDOUR : : WellKnownCtrl ( Gate_Ratio ) )
. addConst ( " Gate_Knee " , ARDOUR : : WellKnownCtrl ( Gate_Knee ) )
. addConst ( " Gate_Depth " , ARDOUR : : WellKnownCtrl ( Gate_Depth ) )
. addConst ( " Gate_Hysteresis " , ARDOUR : : WellKnownCtrl ( Gate_Hysteresis ) )
. addConst ( " Gate_Hold " , ARDOUR : : WellKnownCtrl ( Gate_Hold ) )
. addConst ( " Gate_Attack " , ARDOUR : : WellKnownCtrl ( Gate_Attack ) )
. addConst ( " Gate_Release " , ARDOUR : : WellKnownCtrl ( Gate_Release ) )
. addConst ( " Gate_KeyListen " , ARDOUR : : WellKnownCtrl ( Gate_KeyListen ) )
. addConst ( " Gate_KeyFilterEnable " , ARDOUR : : WellKnownCtrl ( Gate_KeyFilterEnable ) )
. addConst ( " Gate_KeyFilterFreq " , ARDOUR : : WellKnownCtrl ( Gate_KeyFilterFreq ) )
. addConst ( " Master_Limiter_Enable " , ARDOUR : : WellKnownCtrl ( Master_Limiter_Enable ) )
. endNamespace ( )
. beginNamespace ( " WellKnownData " )
. addConst ( " TapeDrive_Saturation " , ARDOUR : : WellKnownData ( TapeDrive_Saturation ) )
. addConst ( " Master_PhaseCorrelationMin " , ARDOUR : : WellKnownData ( Master_PhaseCorrelationMin ) )
. addConst ( " Master_PhaseCorrelationMax " , ARDOUR : : WellKnownData ( Master_PhaseCorrelationMax ) )
. addConst ( " Master_KMeter " , ARDOUR : : WellKnownData ( Master_KMeter ) )
. addConst ( " Master_LimiterRedux " , ARDOUR : : WellKnownData ( Master_LimiterRedux ) )
. addConst ( " Comp_Meter " , ARDOUR : : WellKnownData ( Comp_Meter ) )
. addConst ( " Comp_Redux " , ARDOUR : : WellKnownData ( Comp_Redux ) )
. addConst ( " Gate_Meter " , ARDOUR : : WellKnownData ( Gate_Meter ) )
. addConst ( " Gate_Redux " , ARDOUR : : WellKnownData ( Gate_Redux ) )
. endNamespace ( )
2016-08-15 18:20:36 -04:00
. beginNamespace ( " SampleFormat " )
. addConst ( " Float " , ARDOUR : : SampleFormat ( FormatFloat ) )
. addConst ( " Int24 " , ARDOUR : : SampleFormat ( FormatInt24 ) )
. addConst ( " Int16 " , ARDOUR : : SampleFormat ( FormatInt16 ) )
. endNamespace ( )
. beginNamespace ( " HeaderFormat " )
. addConst ( " BWF " , ARDOUR : : HeaderFormat ( BWF ) )
. addConst ( " WAVE " , ARDOUR : : HeaderFormat ( WAVE ) )
. addConst ( " WAVE64 " , ARDOUR : : HeaderFormat ( WAVE64 ) )
. addConst ( " CAF " , ARDOUR : : HeaderFormat ( CAF ) )
. addConst ( " AIFF " , ARDOUR : : HeaderFormat ( AIFF ) )
. addConst ( " iXML " , ARDOUR : : HeaderFormat ( iXML ) )
. addConst ( " RF64 " , ARDOUR : : HeaderFormat ( RF64 ) )
. addConst ( " RF64_WAV " , ARDOUR : : HeaderFormat ( RF64_WAV ) )
. addConst ( " MBWF " , ARDOUR : : HeaderFormat ( MBWF ) )
2018-11-07 13:21:39 -05:00
. addConst ( " FLAC " , ARDOUR : : HeaderFormat ( FLAC ) )
2016-08-15 18:20:36 -04:00
. endNamespace ( )
. beginNamespace ( " InsertMergePolicy " )
. addConst ( " Reject " , ARDOUR : : InsertMergePolicy ( InsertMergeReject ) )
. addConst ( " Relax " , ARDOUR : : InsertMergePolicy ( InsertMergeRelax ) )
. addConst ( " Replace " , ARDOUR : : InsertMergePolicy ( InsertMergeReplace ) )
. addConst ( " TruncateExisting " , ARDOUR : : InsertMergePolicy ( InsertMergeTruncateExisting ) )
. addConst ( " TruncateAddition " , ARDOUR : : InsertMergePolicy ( InsertMergeTruncateAddition ) )
. addConst ( " Extend " , ARDOUR : : InsertMergePolicy ( InsertMergeExtend ) )
. endNamespace ( )
2017-08-16 19:13:28 -04:00
. beginNamespace ( " AFLPosition " )
. addConst ( " AFLFromBeforeProcessors " , ARDOUR : : AFLPosition ( AFLFromBeforeProcessors ) )
. addConst ( " AFLFromAfterProcessors " , ARDOUR : : AFLPosition ( AFLFromAfterProcessors ) )
. endNamespace ( )
. beginNamespace ( " PFLPosition " )
. addConst ( " PFLFromBeforeProcessors " , ARDOUR : : PFLPosition ( PFLFromBeforeProcessors ) )
. addConst ( " PFLFromAfterProcessors " , ARDOUR : : PFLPosition ( PFLFromAfterProcessors ) )
. endNamespace ( )
. beginNamespace ( " AutoReturnTarget " )
. addConst ( " LastLocate " , ARDOUR : : AutoReturnTarget ( LastLocate ) )
. addConst ( " RangeSelectionStart " , ARDOUR : : AutoReturnTarget ( RangeSelectionStart ) )
. addConst ( " Loop " , ARDOUR : : AutoReturnTarget ( Loop ) )
. addConst ( " RegionSelectionStart " , ARDOUR : : AutoReturnTarget ( RegionSelectionStart ) )
. endNamespace ( )
. beginNamespace ( " FadeShape " )
. addConst ( " FadeLinear " , ARDOUR : : FadeShape ( FadeLinear ) )
. addConst ( " FadeFast " , ARDOUR : : FadeShape ( FadeFast ) )
. addConst ( " FadeSlow " , ARDOUR : : FadeShape ( FadeSlow ) )
. addConst ( " FadeConstantPower " , ARDOUR : : FadeShape ( FadeConstantPower ) )
. addConst ( " FadeSymmetric " , ARDOUR : : FadeShape ( FadeSymmetric ) )
. endNamespace ( )
2020-05-17 18:28:01 -04:00
. beginNamespace ( " LoopFadeChoice " )
. addConst ( " NoLoopFade " , ARDOUR : : LoopFadeChoice ( NoLoopFade ) )
. addConst ( " EndLoopFade " , ARDOUR : : LoopFadeChoice ( EndLoopFade ) )
. addConst ( " BothLoopFade " , ARDOUR : : LoopFadeChoice ( BothLoopFade ) )
. addConst ( " XFadeLoop " , ARDOUR : : LoopFadeChoice ( XFadeLoop ) )
. endNamespace ( )
2017-08-16 19:13:28 -04:00
. beginNamespace ( " DenormalModel " )
. addConst ( " DenormalNone " , ARDOUR : : DenormalModel ( DenormalNone ) )
. addConst ( " DenormalFTZ " , ARDOUR : : DenormalModel ( DenormalFTZ ) )
. addConst ( " DenormalDAZ " , ARDOUR : : DenormalModel ( DenormalDAZ ) )
. addConst ( " DenormalFTZDAZ " , ARDOUR : : DenormalModel ( DenormalFTZDAZ ) )
. endNamespace ( )
. beginNamespace ( " BufferingPreset " )
. addConst ( " Small " , ARDOUR : : BufferingPreset ( Small ) )
. addConst ( " Medium " , ARDOUR : : BufferingPreset ( Medium ) )
. addConst ( " Large " , ARDOUR : : BufferingPreset ( Large ) )
. addConst ( " Custom " , ARDOUR : : BufferingPreset ( Custom ) )
. endNamespace ( )
. beginNamespace ( " EditMode " )
. addConst ( " Slide " , ARDOUR : : EditMode ( Slide ) )
. addConst ( " Ripple " , ARDOUR : : EditMode ( Ripple ) )
. addConst ( " Lock " , ARDOUR : : EditMode ( Lock ) )
. endNamespace ( )
2022-03-14 20:24:40 -04:00
. beginNamespace ( " RippleMode " )
2022-09-07 23:34:05 -04:00
. addConst ( " RippleSelected " , ARDOUR : : RippleMode ( RippleSelected ) )
. addConst ( " RippleAll " , ARDOUR : : RippleMode ( RippleAll ) )
. addConst ( " RippleInterview " , ARDOUR : : RippleMode ( RippleInterview ) )
2022-03-14 20:24:40 -04:00
. endNamespace ( )
2017-08-16 19:13:28 -04:00
. beginNamespace ( " AutoConnectOption " )
. addConst ( " ManualConnect " , ARDOUR : : AutoConnectOption ( ManualConnect ) )
. addConst ( " AutoConnectPhysical " , ARDOUR : : AutoConnectOption ( AutoConnectPhysical ) )
. addConst ( " AutoConnectMaster " , ARDOUR : : AutoConnectOption ( AutoConnectMaster ) )
. endNamespace ( )
. beginNamespace ( " LayerModel " )
. addConst ( " LaterHigher " , ARDOUR : : LayerModel ( LaterHigher ) )
. addConst ( " Manual " , ARDOUR : : LayerModel ( Manual ) )
. endNamespace ( )
. beginNamespace ( " ListenPosition " )
. addConst ( " AfterFaderListen " , ARDOUR : : ListenPosition ( AfterFaderListen ) )
. addConst ( " PreFaderListen " , ARDOUR : : ListenPosition ( PreFaderListen ) )
. endNamespace ( )
. beginNamespace ( " MonitorModel " )
. addConst ( " HardwareMonitoring " , ARDOUR : : MonitorModel ( HardwareMonitoring ) )
. addConst ( " SoftwareMonitoring " , ARDOUR : : MonitorModel ( SoftwareMonitoring ) )
. addConst ( " ExternalMonitoring " , ARDOUR : : MonitorModel ( ExternalMonitoring ) )
. endNamespace ( )
2023-09-11 10:41:58 -04:00
. beginNamespace ( " SnapTarget " )
. addConst ( " SnapTargetGrid " , ARDOUR : : SnapTarget ( SnapTargetGrid ) )
. addConst ( " SnapTargetOther " , ARDOUR : : SnapTarget ( SnapTargetOther ) )
. addConst ( " SnapTargetBoth " , ARDOUR : : SnapTarget ( SnapTargetBoth ) )
2017-08-16 19:13:28 -04:00
. beginNamespace ( " RegionSelectionAfterSplit " )
. addConst ( " None " , ARDOUR : : RegionSelectionAfterSplit ( None ) )
. addConst ( " NewlyCreatedLeft " , ARDOUR : : RegionSelectionAfterSplit ( NewlyCreatedLeft ) )
. addConst ( " NewlyCreatedRight " , ARDOUR : : RegionSelectionAfterSplit ( NewlyCreatedRight ) )
. addConst ( " NewlyCreatedBoth " , ARDOUR : : RegionSelectionAfterSplit ( NewlyCreatedBoth ) )
. addConst ( " Existing " , ARDOUR : : RegionSelectionAfterSplit ( Existing ) )
. addConst ( " ExistingNewlyCreatedLeft " , ARDOUR : : RegionSelectionAfterSplit ( ExistingNewlyCreatedLeft ) )
. addConst ( " ExistingNewlyCreatedRight " , ARDOUR : : RegionSelectionAfterSplit ( ExistingNewlyCreatedRight ) )
. addConst ( " ExistingNewlyCreatedBoth " , ARDOUR : : RegionSelectionAfterSplit ( ExistingNewlyCreatedBoth ) )
. endNamespace ( )
2019-02-07 14:29:59 -05:00
. beginNamespace ( " RangeSelectionAfterSplit " )
. addConst ( " ClearSel " , ARDOUR : : RangeSelectionAfterSplit ( ClearSel ) )
. addConst ( " PreserveSel " , ARDOUR : : RangeSelectionAfterSplit ( PreserveSel ) )
. addConst ( " ForceSel " , ARDOUR : : RangeSelectionAfterSplit ( ForceSel ) )
. endNamespace ( )
2023-06-22 19:35:19 -04:00
. beginNamespace ( " TimeSelectionAfterSectionPaste " )
. addConst ( " SectionSelectNoop " , ARDOUR : : TimeSelectionAfterSectionPaste ( SectionSelectNoop ) )
. addConst ( " SectionSelectClear " , ARDOUR : : TimeSelectionAfterSectionPaste ( SectionSelectClear ) )
. addConst ( " SectionSelectRetain " , ARDOUR : : TimeSelectionAfterSectionPaste ( SectionSelectRetain ) )
. addConst ( " SectionSelectRetainAndMovePlayhead " , ARDOUR : : TimeSelectionAfterSectionPaste ( SectionSelectRetainAndMovePlayhead ) )
. endNamespace ( )
2020-05-22 18:58:28 -04:00
. beginNamespace ( " ScreenSaverMode " )
. addConst ( " InhibitNever " , ARDOUR : : ScreenSaverMode ( InhibitNever ) )
. addConst ( " InhibitWhileRecording " , ARDOUR : : ScreenSaverMode ( InhibitWhileRecording ) )
. addConst ( " InhibitAlways " , ARDOUR : : ScreenSaverMode ( InhibitAlways ) )
. endNamespace ( )
2023-01-20 15:46:11 -05:00
. beginNamespace ( " AppleNSGLViewMode " )
2023-02-04 16:34:12 -05:00
. addConst ( " NSGLHiRes " , ARDOUR : : AppleNSGLViewMode ( NSGLHiRes ) )
. addConst ( " NSGLLoRes " , ARDOUR : : AppleNSGLViewMode ( NSGLLoRes ) )
2023-01-20 15:46:11 -05:00
. addConst ( " NSGLDisable " , ARDOUR : : AppleNSGLViewMode ( NSGLDisable ) )
. endNamespace ( )
2022-10-08 12:43:33 -04:00
. beginNamespace ( " PluginGUIBehavior " )
. addConst ( " PluginGUIHide " , ARDOUR : : PluginGUIBehavior ( PluginGUIHide ) )
. addConst ( " PluginGUIDestroyAny " , ARDOUR : : PluginGUIBehavior ( PluginGUIDestroyAny ) )
. addConst ( " PluginGUIDestroyVST " , ARDOUR : : PluginGUIBehavior ( PluginGUIDestroyVST ) )
. endNamespace ( )
2020-05-22 18:58:28 -04:00
. beginNamespace ( " ClockDeltaMode " )
. addConst ( " NoDelta " , ARDOUR : : ClockDeltaMode ( NoDelta ) )
. addConst ( " DeltaEditPoint " , ARDOUR : : ClockDeltaMode ( DeltaEditPoint ) )
. addConst ( " DeltaOriginMarker " , ARDOUR : : ClockDeltaMode ( DeltaOriginMarker ) )
. endNamespace ( )
. beginNamespace ( " WaveformScale " )
. addConst ( " Linear " , ARDOUR : : WaveformScale ( Linear ) )
. addConst ( " Logarithmic " , ARDOUR : : WaveformScale ( Logarithmic ) )
. endNamespace ( )
2020-05-23 23:34:36 -04:00
. beginNamespace ( " WaveformShape " )
. addConst ( " Traditional " , ARDOUR : : WaveformShape ( Traditional ) )
. addConst ( " Rectified " , ARDOUR : : WaveformShape ( Rectified ) )
. endNamespace ( )
2020-05-22 18:58:28 -04:00
. beginNamespace ( " MeterLineUp " )
. addConst ( " MeteringLineUp24 " , ARDOUR : : MeterLineUp ( MeteringLineUp24 ) )
. addConst ( " MeteringLineUp20 " , ARDOUR : : MeterLineUp ( MeteringLineUp20 ) )
. addConst ( " MeteringLineUp18 " , ARDOUR : : MeterLineUp ( MeteringLineUp18 ) )
. addConst ( " MeteringLineUp15 " , ARDOUR : : MeterLineUp ( MeteringLineUp15 ) )
. endNamespace ( )
2021-07-01 21:11:06 -04:00
. beginNamespace ( " InputMeterLayout " )
. addConst ( " LayoutVertical " , ARDOUR : : InputMeterLayout ( LayoutVertical ) )
. addConst ( " LayoutHorizontal " , ARDOUR : : InputMeterLayout ( LayoutHorizontal ) )
. addConst ( " LayoutAutomatic " , ARDOUR : : InputMeterLayout ( LayoutAutomatic ) )
. addConst ( " MeteringLineUp15 " , ARDOUR : : MeterLineUp ( MeteringLineUp15 ) )
. endNamespace ( )
2020-05-22 18:58:28 -04:00
. beginNamespace ( " VUMeterStandard " )
. addConst ( " MeteringVUfrench " , ARDOUR : : VUMeterStandard ( MeteringVUfrench ) )
. addConst ( " MeteringVUamerican " , ARDOUR : : VUMeterStandard ( MeteringVUamerican ) )
. addConst ( " MeteringVUstandard " , ARDOUR : : VUMeterStandard ( MeteringVUstandard ) )
. addConst ( " MeteringVUeight " , ARDOUR : : VUMeterStandard ( MeteringVUeight ) )
. endNamespace ( )
2017-08-16 19:13:28 -04:00
. beginNamespace ( " ShuttleUnits " )
. addConst ( " Percentage " , ARDOUR : : ShuttleUnits ( Percentage ) )
. addConst ( " Semitones " , ARDOUR : : ShuttleUnits ( Semitones ) )
. endNamespace ( )
. beginNamespace ( " SyncSource " )
. addConst ( " Engine " , ARDOUR : : SyncSource ( Engine ) )
. addConst ( " MTC " , ARDOUR : : SyncSource ( MTC ) )
. addConst ( " MIDIClock " , ARDOUR : : SyncSource ( MIDIClock ) )
. addConst ( " LTC " , ARDOUR : : SyncSource ( LTC ) )
. endNamespace ( )
. beginNamespace ( " TracksAutoNamingRule " )
. addConst ( " UseDefaultNames " , ARDOUR : : TracksAutoNamingRule ( UseDefaultNames ) )
. addConst ( " NameAfterDriver " , ARDOUR : : TracksAutoNamingRule ( NameAfterDriver ) )
. endNamespace ( )
2016-05-14 17:54:04 -04:00
. endNamespace ( ) ; // end ARDOUR
2016-02-23 09:41:02 -05:00
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
2018-07-30 17:35:25 -04:00
. addFunction ( " user_config_directory " , & ARDOUR : : user_config_directory )
. addFunction ( " user_cache_directory " , & ARDOUR : : user_cache_directory )
. endNamespace ( ) ; // end ARDOUR
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
2016-02-23 09:41:02 -05:00
. beginClass < AudioBackendInfo > ( " AudioBackendInfo " )
. addData ( " name " , & AudioBackendInfo : : name )
. endClass ( )
2017-02-23 16:31:50 -05:00
. beginConstStdVector < const AudioBackendInfo * > ( " BackendVector " ) . endClass ( )
2016-02-23 09:41:02 -05:00
. beginClass < AudioBackend : : DeviceStatus > ( " DeviceStatus " )
. addData ( " name " , & AudioBackend : : DeviceStatus : : name )
. addData ( " available " , & AudioBackend : : DeviceStatus : : available )
. endClass ( )
. beginStdVector < AudioBackend : : DeviceStatus > ( " DeviceStatusVector " ) . endClass ( )
. beginWSPtrClass < AudioBackend > ( " AudioBackend " )
. addFunction ( " info " , & AudioBackend : : info )
. addFunction ( " sample_rate " , & AudioBackend : : sample_rate )
. addFunction ( " buffer_size " , & AudioBackend : : buffer_size )
. addFunction ( " period_size " , & AudioBackend : : period_size )
. addFunction ( " input_channels " , & AudioBackend : : input_channels )
. addFunction ( " output_channels " , & AudioBackend : : output_channels )
. addFunction ( " dsp_load " , & AudioBackend : : dsp_load )
. addFunction ( " set_sample_rate " , & AudioBackend : : set_sample_rate )
. addFunction ( " set_buffer_size " , & AudioBackend : : set_buffer_size )
. addFunction ( " set_peridod_size " , & AudioBackend : : set_peridod_size )
. addFunction ( " enumerate_drivers " , & AudioBackend : : enumerate_drivers )
. addFunction ( " driver_name " , & AudioBackend : : driver_name )
. addFunction ( " set_driver " , & AudioBackend : : set_driver )
. addFunction ( " use_separate_input_and_output_devices " , & AudioBackend : : use_separate_input_and_output_devices )
. addFunction ( " enumerate_devices " , & AudioBackend : : enumerate_devices )
. addFunction ( " enumerate_input_devices " , & AudioBackend : : enumerate_input_devices )
. addFunction ( " enumerate_output_devices " , & AudioBackend : : enumerate_output_devices )
. addFunction ( " device_name " , & AudioBackend : : device_name )
. addFunction ( " input_device_name " , & AudioBackend : : input_device_name )
. addFunction ( " output_device_name " , & AudioBackend : : output_device_name )
. addFunction ( " set_device_name " , & AudioBackend : : set_device_name )
. addFunction ( " set_input_device_name " , & AudioBackend : : set_input_device_name )
. addFunction ( " set_output_device_name " , & AudioBackend : : set_output_device_name )
. endClass ( )
2019-08-23 20:54:25 -04:00
. beginClass < PortEngine > ( " PortEngine " )
. endClass ( )
2017-09-27 22:25:50 -04:00
. beginClass < LatencyRange > ( " LatencyRange " )
. addVoidConstructor ( )
. addData ( " min " , & LatencyRange : : min )
. addData ( " max " , & LatencyRange : : max )
2016-05-29 14:36:16 -04:00
. endClass ( )
2016-04-25 20:21:09 -04:00
. beginClass < PortManager > ( " PortManager " )
. addFunction ( " port_engine " , & PortManager : : port_engine )
. addFunction ( " connected " , & PortManager : : connected )
2016-04-26 08:35:47 -04:00
. addFunction ( " connect " , & PortManager : : connect )
. addFunction ( " physically_connected " , & PortManager : : physically_connected )
. addFunction ( " disconnect " , ( int ( PortManager : : * ) ( const std : : string & , const std : : string & ) ) & PortManager : : disconnect )
2023-02-16 18:33:28 -05:00
. addFunction ( " disconnect_port " , ( int ( PortManager : : * ) ( std : : shared_ptr < Port > ) ) & PortManager : : disconnect )
2016-04-26 08:35:47 -04:00
. addFunction ( " get_port_by_name " , & PortManager : : get_port_by_name )
. addFunction ( " get_pretty_name_by_name " , & PortManager : : get_pretty_name_by_name )
. addFunction ( " port_is_physical " , & PortManager : : port_is_physical )
. addFunction ( " get_physical_outputs " , & PortManager : : get_physical_outputs )
. addFunction ( " get_physical_inputs " , & PortManager : : get_physical_inputs )
. addFunction ( " n_physical_outputs " , & PortManager : : n_physical_outputs )
. addFunction ( " n_physical_inputs " , & PortManager : : n_physical_inputs )
2020-10-26 10:52:17 -04:00
. addFunction ( " reset_input_meters " , & PortManager : : reset_input_meters )
2016-04-26 08:35:47 -04:00
. addRefFunction ( " get_connections " , & PortManager : : get_connections )
2016-04-25 20:21:09 -04:00
. addRefFunction ( " get_ports " , ( int ( PortManager : : * ) ( DataType , PortManager : : PortList & ) ) & PortManager : : get_ports )
2016-04-26 08:35:47 -04:00
. addRefFunction ( " get_backend_ports " , ( int ( PortManager : : * ) ( const std : : string & , DataType , PortFlags , std : : vector < std : : string > & ) ) & PortManager : : get_ports )
2016-04-25 20:21:09 -04:00
. endClass ( )
. deriveClass < AudioEngine , PortManager > ( " AudioEngine " )
2016-02-23 09:41:02 -05:00
. addFunction ( " available_backends " , & AudioEngine : : available_backends )
. addFunction ( " current_backend_name " , & AudioEngine : : current_backend_name )
. addFunction ( " set_backend " , & AudioEngine : : set_backend )
. addFunction ( " setup_required " , & AudioEngine : : setup_required )
. addFunction ( " start " , & AudioEngine : : start )
. addFunction ( " stop " , & AudioEngine : : stop )
. addFunction ( " get_dsp_load " , & AudioEngine : : get_dsp_load )
. addFunction ( " set_device_name " , & AudioEngine : : set_device_name )
. addFunction ( " set_sample_rate " , & AudioEngine : : set_sample_rate )
. addFunction ( " set_buffer_size " , & AudioEngine : : set_buffer_size )
. addFunction ( " get_last_backend_error " , & AudioEngine : : get_last_backend_error )
2020-03-28 09:56:20 -04:00
. addFunction ( " freewheeling " , & AudioEngine : : freewheeling )
. addFunction ( " running " , & AudioEngine : : running )
. addFunction ( " processed_samples " , & AudioEngine : : processed_samples )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-08-15 16:16:08 -04:00
2017-05-30 09:15:30 -04:00
. deriveClass < VCAManager , PBD : : StatefulDestructible > ( " VCAManager " )
. addFunction ( " create_vca " , & VCAManager : : create_vca )
. addFunction ( " remove_vca " , & VCAManager : : remove_vca )
. addFunction ( " vca_by_number " , & VCAManager : : vca_by_number )
2017-08-18 16:00:24 -04:00
. addFunction ( " vca_by_name " , & VCAManager : : vca_by_name )
2017-05-30 09:15:30 -04:00
. addFunction ( " vcas " , & VCAManager : : vcas )
2017-08-17 17:50:34 -04:00
. addFunction ( " n_vcas " , & VCAManager : : n_vcas )
2017-05-30 09:15:30 -04:00
. endClass ( )
2017-08-15 17:51:51 -04:00
. deriveClass < RCConfiguration , PBD : : Configuration > ( " RCConfiguration " )
# undef CONFIG_VARIABLE
# undef CONFIG_VARIABLE_SPECIAL
# define CONFIG_VARIABLE(Type,var,name,value) \
. addFunction ( " get_ " # var , & RCConfiguration : : get_ # # var ) \
. addFunction ( " set_ " # var , & RCConfiguration : : set_ # # var ) \
. addProperty ( # var , & RCConfiguration : : get_ # # var , & RCConfiguration : : set_ # # var )
# define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
. addFunction ( " get_ " # var , & RCConfiguration : : get_ # # var ) \
. addFunction ( " set_ " # var , & RCConfiguration : : set_ # # var ) \
. addProperty ( # var , & RCConfiguration : : get_ # # var , & RCConfiguration : : set_ # # var )
# include "ardour/rc_configuration_vars.h"
# undef CONFIG_VARIABLE
# undef CONFIG_VARIABLE_SPECIAL
. endClass ( )
2016-08-15 16:16:08 -04:00
. deriveClass < SessionConfiguration , PBD : : Configuration > ( " SessionConfiguration " )
# undef CONFIG_VARIABLE
# undef CONFIG_VARIABLE_SPECIAL
# define CONFIG_VARIABLE(Type,var,name,value) \
. addFunction ( " get_ " # var , & SessionConfiguration : : get_ # # var ) \
. addFunction ( " set_ " # var , & SessionConfiguration : : set_ # # var ) \
. addProperty ( # var , & SessionConfiguration : : get_ # # var , & SessionConfiguration : : set_ # # var )
# define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
. addFunction ( " get_ " # var , & SessionConfiguration : : get_ # # var ) \
. addFunction ( " set_ " # var , & SessionConfiguration : : set_ # # var ) \
. addProperty ( # var , & SessionConfiguration : : get_ # # var , & SessionConfiguration : : set_ # # var )
# include "ardour/session_configuration_vars.h"
# undef CONFIG_VARIABLE
# undef CONFIG_VARIABLE_SPECIAL
. endClass ( )
2017-08-15 17:51:51 -04:00
// we could use addProperty ()
. addFunction ( " config " , & _libardour_config )
2016-02-23 09:41:02 -05:00
. endNamespace ( ) ;
// basic representation of Session
// functions which can be used from realtime and non-realtime contexts
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
. beginClass < Session > ( " Session " )
2016-02-23 09:41:21 -05:00
. addFunction ( " scripts_changed " , & Session : : scripts_changed ) // used internally
2020-07-22 08:57:15 -04:00
. addFunction ( " engine_speed " , & Session : : engine_speed )
. addFunction ( " actual_speed " , & Session : : actual_speed )
. addFunction ( " transport_speed " , & Session : : transport_speed )
. addFunction ( " transport_stopped " , & Session : : transport_stopped )
. addFunction ( " transport_stopped_or_stopping " , & Session : : transport_stopped_or_stopping )
. addFunction ( " transport_state_rolling " , & Session : : transport_state_rolling )
2016-02-23 09:41:02 -05:00
. addFunction ( " transport_rolling " , & Session : : transport_rolling )
2020-07-22 08:57:15 -04:00
. addFunction ( " transport_will_roll_forwards " , & Session : : transport_will_roll_forwards )
2016-02-23 09:41:02 -05:00
. addFunction ( " request_transport_speed " , & Session : : request_transport_speed )
2017-10-29 13:32:49 -04:00
. addFunction ( " transport_sample " , & Session : : transport_sample )
2017-09-18 12:39:17 -04:00
. addFunction ( " sample_rate " , & Session : : sample_rate )
. addFunction ( " nominal_sample_rate " , & Session : : nominal_sample_rate )
2016-12-08 06:26:41 -05:00
. addFunction ( " samples_per_timecode_frame " , & Session : : samples_per_timecode_frame )
2016-02-23 09:41:02 -05:00
. 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 )
. addFunction ( " request_locate " , & Session : : request_locate )
2021-05-07 14:34:25 -04:00
. addFunction ( " request_roll " , & Session : : request_roll )
2016-02-23 09:41:02 -05:00
. addFunction ( " request_stop " , & Session : : request_stop )
2016-09-10 17:28:00 -04:00
. addFunction ( " request_play_loop " , & Session : : request_play_loop )
2020-03-24 13:47:39 -04:00
. addFunction ( " request_bounded_roll " , & Session : : request_bounded_roll )
2023-06-17 20:41:49 -04:00
. addFunction ( " preroll_samples " , & Session : : preroll_samples )
. addFunction ( " request_preroll_record_trim " , & Session : : request_preroll_record_trim )
. addFunction ( " request_count_in_record " , & Session : : request_count_in_record )
2016-09-10 17:28:00 -04:00
. addFunction ( " get_play_loop " , & Session : : get_play_loop )
2019-07-17 23:22:17 -04:00
. addFunction ( " get_xrun_count " , & Session : : get_xrun_count )
. addFunction ( " reset_xrun_count " , & Session : : reset_xrun_count )
2016-02-23 09:41:02 -05:00
. addFunction ( " last_transport_start " , & Session : : last_transport_start )
. addFunction ( " goto_start " , & Session : : goto_start )
. addFunction ( " goto_end " , & Session : : goto_end )
2019-06-15 19:14:17 -04:00
. addFunction ( " current_start_sample " , & Session : : current_start_sample )
. addFunction ( " current_end_sample " , & Session : : current_end_sample )
2016-02-23 09:41:02 -05:00
. addFunction ( " actively_recording " , & Session : : actively_recording )
2016-04-23 18:25:34 -04:00
. addFunction ( " new_audio_track " , & Session : : new_audio_track )
. addFunction ( " new_audio_route " , & Session : : new_audio_route )
2021-12-03 07:34:42 -05:00
. addFunction ( " new_midi_track " , & Session : : new_midi_track )
2016-04-23 18:25:34 -04:00
. addFunction ( " new_midi_route " , & Session : : new_midi_route )
2017-08-15 17:17:08 -04:00
. addFunction ( " add_master_bus " , & Session : : add_master_bus )
2016-02-23 09:41:02 -05:00
. addFunction ( " get_routes " , & Session : : get_routes )
. addFunction ( " get_tracks " , & Session : : get_tracks )
2017-06-16 22:35:48 -04:00
. addFunction ( " get_stripables " , ( StripableList ( Session : : * ) ( ) const ) & Session : : get_stripables )
2018-08-02 15:02:31 -04:00
. addFunction ( " get_routelist " , & Session : : get_routelist )
2019-08-07 11:27:01 -04:00
. addFunction ( " plot_process_graph " , & Session : : plot_process_graph )
2018-08-02 15:02:31 -04:00
2021-02-26 07:34:24 -05:00
. addFunction ( " bundles " , & Session : : bundles )
2022-10-17 00:44:29 -04:00
. addFunction ( " apply_nth_mixer_scene " , ( bool ( Session : : * ) ( size_t ) ) & Session : : apply_nth_mixer_scene )
. addFunction ( " apply_nth_mixer_scene_to " , ( bool ( Session : : * ) ( size_t , RouteList const & ) ) & Session : : apply_nth_mixer_scene )
2022-05-19 14:07:35 -04:00
. addFunction ( " store_nth_mixer_scene " , & Session : : store_nth_mixer_scene )
. addFunction ( " nth_mixer_scene_valid " , & Session : : nth_mixer_scene_valid )
. addFunction ( " nth_mixer_scene " , & Session : : nth_mixer_scene )
2016-02-23 09:41:02 -05:00
. addFunction ( " name " , & Session : : name )
. addFunction ( " path " , & Session : : path )
. addFunction ( " record_status " , & Session : : record_status )
2016-09-03 10:32:35 -04:00
. addFunction ( " maybe_enable_record " , & Session : : maybe_enable_record )
. addFunction ( " disable_record " , & Session : : disable_record )
2016-02-23 09:41:02 -05:00
. addFunction ( " route_by_id " , & Session : : route_by_id )
. addFunction ( " route_by_name " , & Session : : route_by_name )
2017-10-19 20:18:16 -04:00
. addFunction ( " stripable_by_id " , & Session : : stripable_by_id )
2016-05-31 17:35:00 -04:00
. addFunction ( " get_remote_nth_stripable " , & Session : : get_remote_nth_stripable )
. addFunction ( " get_remote_nth_route " , & Session : : get_remote_nth_route )
. addFunction ( " route_by_selected_count " , & Session : : route_by_selected_count )
2016-02-23 09:41:02 -05:00
. addFunction ( " source_by_id " , & Session : : source_by_id )
. addFunction ( " controllable_by_id " , & Session : : controllable_by_id )
. addFunction ( " processor_by_id " , & Session : : processor_by_id )
. addFunction ( " snap_name " , & Session : : snap_name )
2016-04-24 08:39:58 -04:00
. addFunction ( " monitor_out " , & Session : : monitor_out )
. addFunction ( " master_out " , & Session : : master_out )
2024-02-21 19:27:29 -05:00
. addFunction ( " master_volume " , & Session : : master_volume )
. addFunction ( " surround_master " , & Session : : surround_master )
2023-02-16 18:33:28 -05:00
. addFunction ( " add_internal_send " , ( void ( Session : : * ) ( std : : shared_ptr < Route > , std : : shared_ptr < Processor > , std : : shared_ptr < Route > ) ) & Session : : add_internal_send )
2017-02-19 18:17:42 -05:00
. addFunction ( " add_internal_sends " , & Session : : add_internal_sends )
2016-04-09 09:42:32 -04:00
. addFunction ( " locations " , & Session : : locations )
2017-02-16 21:37:51 -05:00
. addFunction ( " soloing " , & Session : : soloing )
. addFunction ( " listening " , & Session : : listening )
. addFunction ( " solo_isolated " , & Session : : solo_isolated )
. addFunction ( " cancel_all_solo " , & Session : : cancel_all_solo )
. addFunction ( " clear_all_solo_state " , & Session : : clear_all_solo_state )
. addFunction ( " set_controls " , & Session : : set_controls )
. addFunction ( " set_control " , & Session : : set_control )
. addFunction ( " set_exclusive_input_active " , & Session : : set_exclusive_input_active )
2016-04-09 19:45:41 -04:00
. addFunction ( " begin_reversible_command " , ( void ( Session : : * ) ( const std : : string & ) ) & Session : : begin_reversible_command )
. addFunction ( " commit_reversible_command " , & Session : : commit_reversible_command )
. addFunction ( " abort_reversible_command " , & Session : : abort_reversible_command )
2021-03-10 07:51:35 -05:00
. addFunction ( " collected_undo_commands " , & Session : : collected_undo_commands )
. addFunction ( " abort_empty_reversible_command " , & Session : : abort_empty_reversible_command )
2016-04-10 11:35:02 -04:00
. addFunction ( " add_command " , & Session : : add_command )
2016-04-09 19:45:41 -04:00
. addFunction ( " add_stateful_diff_command " , & Session : : add_stateful_diff_command )
2019-03-19 00:14:54 -04:00
. addFunction ( " playlists " , & Session : : playlists )
2016-04-25 20:21:09 -04:00
. addFunction ( " engine " , ( AudioEngine & ( Session : : * ) ( ) ) & Session : : engine )
2016-05-14 17:54:04 -04:00
. addFunction ( " get_block_size " , & Session : : get_block_size )
. addFunction ( " worst_output_latency " , & Session : : worst_output_latency )
. addFunction ( " worst_input_latency " , & Session : : worst_input_latency )
2017-09-27 22:25:50 -04:00
. addFunction ( " worst_route_latency " , & Session : : worst_route_latency )
2021-09-08 15:45:16 -04:00
. addFunction ( " io_latency " , & Session : : io_latency )
2017-09-27 22:25:50 -04:00
. addFunction ( " worst_latency_preroll " , & Session : : worst_latency_preroll )
2021-09-08 15:45:16 -04:00
. addFunction ( " worst_latency_preroll_buffer_size_ceil " , & Session : : worst_latency_preroll_buffer_size_ceil )
2016-08-15 16:16:08 -04:00
. addFunction ( " cfg " , & Session : : cfg )
2016-12-05 15:53:41 -05:00
. addFunction ( " route_groups " , & Session : : route_groups )
. addFunction ( " new_route_group " , & Session : : new_route_group )
2019-02-06 10:54:13 -05:00
. addFunction ( " session_range_is_free " , & Session : : session_range_is_free )
. addFunction ( " set_session_range_is_free " , & Session : : set_session_range_is_free )
2024-03-11 17:07:07 -04:00
. addFunction ( " set_session_extents " , & Session : : set_session_extents )
. addFunction ( " maybe_update_session_range " , & Session : : maybe_update_session_range )
2023-05-13 20:44:27 -04:00
. addFunction ( " remove_route " , & Session : : remove_route )
. addFunction ( " remove_routes " , & Session : : remove_routes )
2016-12-05 15:53:41 -05:00
. addFunction ( " remove_route_group " , ( void ( Session : : * ) ( RouteGroup * ) ) & Session : : remove_route_group )
2023-01-22 21:57:53 -05:00
. addFunction ( " cut_copy_section " , & Session : : cut_copy_section )
2017-08-17 17:50:34 -04:00
. addFunction ( " vca_manager " , & Session : : vca_manager_ptr )
2016-12-08 06:44:36 -05:00
. addExtCFunction ( " timecode_to_sample_lua " , ARDOUR : : LuaAPI : : timecode_to_sample_lua )
. addExtCFunction ( " sample_to_timecode_lua " , ARDOUR : : LuaAPI : : sample_to_timecode_lua )
2022-10-21 13:50:26 -04:00
. addExtCFunction ( " simple_export " , & ARDOUR : : LuaAPI : : simple_export )
2016-02-23 09:41:02 -05:00
. endClass ( )
. beginClass < RegionFactory > ( " RegionFactory " )
. addStaticFunction ( " region_by_id " , & RegionFactory : : region_by_id )
2017-08-06 19:56:36 -04:00
. addStaticFunction ( " regions " , & RegionFactory : : regions )
2023-02-16 18:33:28 -05:00
. addStaticFunction ( " clone_region " , static_cast < std : : shared_ptr < Region > ( * ) ( std : : shared_ptr < Region > , bool , bool ) > ( & RegionFactory : : create ) )
2016-02-23 09:41:02 -05:00
. endClass ( )
2016-05-14 17:54:04 -04:00
/* session enums (rt-safe, common) */
2016-02-23 09:41:02 -05:00
. beginNamespace ( " Session " )
. beginNamespace ( " RecordState " )
. addConst ( " Disabled " , ARDOUR : : Session : : RecordState ( Session : : Disabled ) )
. addConst ( " Enabled " , ARDOUR : : Session : : RecordState ( Session : : Enabled ) )
. addConst ( " Recording " , ARDOUR : : Session : : RecordState ( Session : : Recording ) )
. endNamespace ( )
2016-05-14 17:54:04 -04:00
. endNamespace ( ) // end Session enums
/* ardour enums (rt-safe, common) */
. beginNamespace ( " LocationFlags " )
. addConst ( " IsMark " , ARDOUR : : Location : : Flags ( Location : : IsMark ) )
. addConst ( " IsAutoPunch " , ARDOUR : : Location : : Flags ( Location : : IsAutoPunch ) )
. addConst ( " IsAutoLoop " , ARDOUR : : Location : : Flags ( Location : : IsAutoLoop ) )
. addConst ( " IsHidden " , ARDOUR : : Location : : Flags ( Location : : IsHidden ) )
. addConst ( " IsCDMarker " , ARDOUR : : Location : : Flags ( Location : : IsCDMarker ) )
2022-01-04 17:23:43 -05:00
. addConst ( " IsCueMarker " , ARDOUR : : Location : : Flags ( Location : : IsCueMarker ) )
2023-08-11 09:35:12 -04:00
. addConst ( " IsSection " , ARDOUR : : Location : : Flags ( Location : : IsSection ) )
2016-05-14 17:54:04 -04:00
. addConst ( " IsRangeMarker " , ARDOUR : : Location : : Flags ( Location : : IsRangeMarker ) )
. addConst ( " IsSessionRange " , ARDOUR : : Location : : Flags ( Location : : IsSessionRange ) )
. addConst ( " IsSkip " , ARDOUR : : Location : : Flags ( Location : : IsSkip ) )
. addConst ( " IsSkipping " , ARDOUR : : Location : : Flags ( Location : : IsSkipping ) )
. endNamespace ( )
2016-02-23 09:41:02 -05:00
2016-03-18 17:52:19 -04:00
. beginNamespace ( " LuaAPI " )
2016-04-09 09:42:32 -04:00
. addFunction ( " nil_proc " , ARDOUR : : LuaAPI : : nil_processor )
2016-03-18 17:52:19 -04:00
. addFunction ( " new_luaproc " , ARDOUR : : LuaAPI : : new_luaproc )
2021-05-11 14:29:56 -04:00
. addFunction ( " new_send " , ARDOUR : : LuaAPI : : new_send )
2021-01-25 16:27:27 -05:00
. addFunction ( " new_luaproc_with_time_domain " , ARDOUR : : LuaAPI : : new_luaproc_with_time_domain )
2018-05-31 10:01:35 -04:00
. addFunction ( " list_plugins " , ARDOUR : : LuaAPI : : list_plugins )
2021-05-14 16:08:44 -04:00
. addFunction ( " dump_untagged_plugins " , ARDOUR : : LuaAPI : : dump_untagged_plugins )
2016-03-20 16:16:18 -04:00
. addFunction ( " new_plugin_info " , ARDOUR : : LuaAPI : : new_plugin_info )
2016-03-19 11:39:24 -04:00
. addFunction ( " new_plugin " , ARDOUR : : LuaAPI : : new_plugin )
2021-01-25 16:27:27 -05:00
. addFunction ( " new_plugin_with_time_domain " , ARDOUR : : LuaAPI : : new_plugin_with_time_domain )
2016-03-19 11:39:24 -04:00
. addFunction ( " set_processor_param " , ARDOUR : : LuaAPI : : set_processor_param )
. addFunction ( " set_plugin_insert_param " , ARDOUR : : LuaAPI : : set_plugin_insert_param )
2024-03-24 16:52:56 -04:00
. addFunction ( " set_plugin_insert_property " , ARDOUR : : LuaAPI : : set_plugin_insert_property )
2024-03-24 18:05:07 -04:00
. addCFunction ( " get_plugin_insert_property " , ARDOUR : : LuaAPI : : get_plugin_insert_property )
2017-01-31 11:35:37 -05:00
. addFunction ( " reset_processor_to_default " , ARDOUR : : LuaAPI : : reset_processor_to_default )
2024-02-21 13:38:51 -05:00
. addFunction ( " set_automation_data " , ARDOUR : : LuaAPI : : set_automation_data )
2016-09-16 16:35:27 -04:00
. addRefFunction ( " get_processor_param " , ARDOUR : : LuaAPI : : get_processor_param )
. addRefFunction ( " get_plugin_insert_param " , ARDOUR : : LuaAPI : : get_plugin_insert_param )
2021-05-27 10:54:48 -04:00
. addCFunction ( " desc_scale_points " , ARDOUR : : LuaAPI : : desc_scale_points )
2016-04-10 11:35:02 -04:00
. addCFunction ( " plugin_automation " , ARDOUR : : LuaAPI : : plugin_automation )
2016-07-02 17:35:00 -04:00
. addCFunction ( " hsla_to_rgba " , ARDOUR : : LuaAPI : : hsla_to_rgba )
2017-02-18 10:11:18 -05:00
. addCFunction ( " color_to_rgba " , ARDOUR : : LuaAPI : : color_to_rgba )
2018-08-14 17:49:43 -04:00
. addFunction ( " ascii_dtostr " , ARDOUR : : LuaAPI : : ascii_dtostr )
2016-04-09 19:45:41 -04:00
. addFunction ( " usleep " , Glib : : usleep )
2019-08-11 19:00:42 -04:00
. addFunction ( " file_test " , Glib : : file_test )
. addFunction ( " file_get_contents " , Glib : : file_get_contents )
2020-11-30 16:15:26 -05:00
. addFunction ( " path_get_basename " , Glib : : path_get_basename )
2017-02-21 10:13:25 -05:00
. addFunction ( " monotonic_time " , : : g_get_monotonic_time )
2016-09-12 06:02:07 -04:00
. addCFunction ( " build_filename " , ARDOUR : : LuaAPI : : build_filename )
2016-10-06 18:23:33 -04:00
. addFunction ( " new_noteptr " , ARDOUR : : LuaAPI : : new_noteptr )
2017-03-18 13:37:19 -04:00
. addFunction ( " note_list " , ARDOUR : : LuaAPI : : note_list )
2016-12-08 06:44:36 -05:00
. addCFunction ( " sample_to_timecode " , ARDOUR : : LuaAPI : : sample_to_timecode )
. addCFunction ( " timecode_to_sample " , ARDOUR : : LuaAPI : : timecode_to_sample )
2020-11-04 13:08:59 -05:00
. addFunction ( " wait_for_process_callback " , ARDOUR : : LuaAPI : : wait_for_process_callback )
2021-02-11 04:03:23 -05:00
. addFunction ( " segfault " , ARDOUR : : LuaAPI : : segfault )
2022-12-06 18:27:12 -05:00
. addFunction ( " env " , ARDOUR : : LuaAPI : : env )
2016-10-02 21:51:53 -04:00
2019-08-11 19:00:42 -04:00
. beginNamespace ( " FileTest " )
. addConst ( " IsRegular " , Glib : : FILE_TEST_IS_REGULAR )
. addConst ( " IsSymlink " , Glib : : FILE_TEST_IS_SYMLINK )
. addConst ( " IsDir " , Glib : : FILE_TEST_IS_DIR )
. addConst ( " IsExecutable " , Glib : : FILE_TEST_IS_EXECUTABLE )
. addConst ( " Exists " , Glib : : FILE_TEST_EXISTS )
. endNamespace ( ) // end LuaAPI
2016-10-02 21:51:53 -04:00
. beginClass < ARDOUR : : LuaAPI : : Vamp > ( " Vamp " )
. addConstructor < void ( * ) ( const std : : string & , float ) > ( )
2016-10-05 07:23:39 -04:00
. addStaticFunction ( " list_plugins " , & ARDOUR : : LuaAPI : : Vamp : : list_plugins )
2016-10-02 21:51:53 -04:00
. addFunction ( " plugin " , & ARDOUR : : LuaAPI : : Vamp : : plugin )
. addFunction ( " analyze " , & ARDOUR : : LuaAPI : : Vamp : : analyze )
. addFunction ( " reset " , & ARDOUR : : LuaAPI : : Vamp : : reset )
. addFunction ( " initialize " , & ARDOUR : : LuaAPI : : Vamp : : initialize )
2016-10-04 15:31:29 -04:00
. addFunction ( " process " , & ARDOUR : : LuaAPI : : Vamp : : process )
2016-10-02 21:51:53 -04:00
. endClass ( )
2020-01-13 02:34:37 -05:00
. beginClass < ARDOUR : : LuaAPI : : Rubberband > ( " Rubberband " )
2023-02-16 18:33:28 -05:00
. addConstructor < void ( * ) ( std : : shared_ptr < AudioRegion > , bool ) > ( )
2020-01-13 02:34:37 -05:00
. addFunction ( " set_strech_and_pitch " , & ARDOUR : : LuaAPI : : Rubberband : : set_strech_and_pitch )
. addFunction ( " set_mapping " , & ARDOUR : : LuaAPI : : Rubberband : : set_mapping )
. addFunction ( " process " , & ARDOUR : : LuaAPI : : Rubberband : : process )
2020-09-20 18:34:09 -04:00
. addFunction ( " readable_length " , & ARDOUR : : LuaAPI : : Rubberband : : readable_length_samples )
2020-01-13 02:34:37 -05:00
. addFunction ( " n_channels " , & ARDOUR : : LuaAPI : : Rubberband : : n_channels )
. addFunction ( " readable " , & ARDOUR : : LuaAPI : : Rubberband : : readable )
. endClass ( )
2016-05-14 17:54:04 -04:00
. endNamespace ( ) // end LuaAPI
. endNamespace ( ) ; // end ARDOUR
2016-11-19 15:18:15 -05:00
// DSP functions
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
. beginNamespace ( " DSP " )
. addFunction ( " compute_peak " , ARDOUR : : compute_peak )
. addFunction ( " find_peaks " , ARDOUR : : find_peaks )
. addFunction ( " apply_gain_to_buffer " , ARDOUR : : apply_gain_to_buffer )
. addFunction ( " mix_buffers_no_gain " , ARDOUR : : mix_buffers_no_gain )
. addFunction ( " mix_buffers_with_gain " , ARDOUR : : mix_buffers_with_gain )
. addFunction ( " copy_vector " , ARDOUR : : copy_vector )
. addFunction ( " dB_to_coefficient " , & dB_to_coefficient )
. addFunction ( " fast_coefficient_to_dB " , & fast_coefficient_to_dB )
. addFunction ( " accurate_coefficient_to_dB " , & accurate_coefficient_to_dB )
. addFunction ( " memset " , & DSP : : memset )
. addFunction ( " mmult " , & DSP : : mmult )
. addFunction ( " log_meter " , & DSP : : log_meter )
. addFunction ( " log_meter_coeff " , & DSP : : log_meter_coeff )
. addFunction ( " process_map " , & DSP : : process_map )
. addRefFunction ( " peaks " , & DSP : : peaks )
. beginClass < DSP : : LowPass > ( " LowPass " )
. addConstructor < void ( * ) ( double , float ) > ( )
. addFunction ( " proc " , & DSP : : LowPass : : proc )
. addFunction ( " ctrl " , & DSP : : LowPass : : ctrl )
. addFunction ( " set_cutoff " , & DSP : : LowPass : : set_cutoff )
. addFunction ( " reset " , & DSP : : LowPass : : reset )
. endClass ( )
. beginClass < DSP : : Biquad > ( " Biquad " )
. addConstructor < void ( * ) ( double ) > ( )
. addFunction ( " run " , & DSP : : Biquad : : run )
. addFunction ( " compute " , & DSP : : Biquad : : compute )
2022-04-02 13:10:08 -04:00
. addFunction ( " configure " , ( void ( DSP : : Biquad : : * ) ( DSP : : Biquad const & ) ) & DSP : : Biquad : : configure )
2022-11-01 09:51:07 -04:00
. addFunction ( " set_coefficients " , ( void ( DSP : : Biquad : : * ) ( double , double , double , double , double ) ) & DSP : : Biquad : : configure )
2016-11-19 15:18:15 -05:00
. addFunction ( " reset " , & DSP : : Biquad : : reset )
. addFunction ( " dB_at_freq " , & DSP : : Biquad : : dB_at_freq )
. endClass ( )
. beginClass < DSP : : FFTSpectrum > ( " FFTSpectrum " )
. addConstructor < void ( * ) ( uint32_t , double ) > ( )
. addFunction ( " set_data_hann " , & DSP : : FFTSpectrum : : set_data_hann )
. addFunction ( " execute " , & DSP : : FFTSpectrum : : execute )
. addFunction ( " power_at_bin " , & DSP : : FFTSpectrum : : power_at_bin )
. addFunction ( " freq_at_bin " , & DSP : : FFTSpectrum : : freq_at_bin )
. endClass ( )
2017-11-11 16:47:47 -05:00
. beginClass < DSP : : Generator > ( " Generator " )
. addVoidConstructor ( )
. addFunction ( " run " , & DSP : : Generator : : run )
. addFunction ( " set_type " , & DSP : : Generator : : set_type )
. endClass ( )
2016-11-19 15:18:15 -05:00
2018-07-17 03:41:33 -04:00
. beginClass < ARDOUR : : LTCReader > ( " LTCReader " )
. addConstructor < void ( * ) ( int , LTC_TV_STANDARD ) > ( )
. addFunction ( " write " , & ARDOUR : : LTCReader : : write )
. addRefFunction ( " read " , & ARDOUR : : LTCReader : : read )
. endClass ( )
2020-02-02 14:54:58 -05:00
. beginClass < DSP : : Convolution > ( " Convolution " )
. addConstructor < void ( * ) ( Session & , uint32_t , uint32_t ) > ( )
. addFunction ( " add_impdata " , & ARDOUR : : DSP : : Convolution : : add_impdata )
2022-09-29 17:26:50 -04:00
. addFunction ( " clear_impdata " , & ARDOUR : : DSP : : Convolution : : clear_impdata )
2020-02-02 14:54:58 -05:00
. addFunction ( " run " , & ARDOUR : : DSP : : Convolution : : run )
2022-09-29 17:26:50 -04:00
. addFunction ( " run_mono_buffered " , & ARDOUR : : DSP : : Convolution : : run_mono_buffered )
. addFunction ( " run_mono_no_latency " , & ARDOUR : : DSP : : Convolution : : run_mono_no_latency )
2020-02-02 14:54:58 -05:00
. addFunction ( " restart " , & ARDOUR : : DSP : : Convolution : : restart )
. addFunction ( " ready " , & ARDOUR : : DSP : : Convolution : : ready )
. addFunction ( " latency " , & ARDOUR : : DSP : : Convolution : : latency )
. addFunction ( " n_inputs " , & ARDOUR : : DSP : : Convolution : : n_inputs )
. addFunction ( " n_outputs " , & ARDOUR : : DSP : : Convolution : : n_outputs )
. endClass ( )
2018-12-23 20:29:24 -05:00
. beginClass < DSP : : Convolver : : IRSettings > ( " IRSettings " )
. addVoidConstructor ( )
. addData ( " gain " , & DSP : : Convolver : : IRSettings : : gain )
. addData ( " pre_delay " , & DSP : : Convolver : : IRSettings : : pre_delay )
. addFunction ( " get_channel_gain " , & ARDOUR : : DSP : : Convolver : : IRSettings : : get_channel_gain )
. addFunction ( " set_channel_gain " , & ARDOUR : : DSP : : Convolver : : IRSettings : : set_channel_gain )
. addFunction ( " get_channel_delay " , & ARDOUR : : DSP : : Convolver : : IRSettings : : get_channel_delay )
. addFunction ( " set_channel_delay " , & ARDOUR : : DSP : : Convolver : : IRSettings : : set_channel_delay )
. endClass ( )
2020-02-02 14:54:58 -05:00
. deriveClass < DSP : : Convolver , DSP : : Convolution > ( " Convolver " )
2018-12-23 20:29:24 -05:00
. addConstructor < void ( * ) ( Session & , std : : string const & , DSP : : Convolver : : IRChannelConfig , DSP : : Convolver : : IRSettings ) > ( )
2021-03-29 19:22:50 -04:00
. addFunction ( " run_stereo_buffered " , & ARDOUR : : DSP : : Convolver : : run_stereo_buffered )
. addFunction ( " run_stereo_no_latency " , & ARDOUR : : DSP : : Convolver : : run_stereo_no_latency )
2018-10-18 19:08:04 -04:00
. endClass ( )
2016-11-19 15:18:15 -05:00
/* DSP enums */
. beginNamespace ( " BiquadType " )
. addConst ( " LowPass " , ARDOUR : : DSP : : Biquad : : LowPass )
. addConst ( " HighPass " , ARDOUR : : DSP : : Biquad : : HighPass )
. addConst ( " BandPassSkirt " , ARDOUR : : DSP : : Biquad : : BandPassSkirt )
. addConst ( " BandPass0dB " , ARDOUR : : DSP : : Biquad : : BandPass0dB )
. addConst ( " Notch " , ARDOUR : : DSP : : Biquad : : Notch )
. addConst ( " AllPass " , ARDOUR : : DSP : : Biquad : : AllPass )
. addConst ( " Peaking " , ARDOUR : : DSP : : Biquad : : Peaking )
. addConst ( " LowShelf " , ARDOUR : : DSP : : Biquad : : LowShelf )
. addConst ( " HighShelf " , ARDOUR : : DSP : : Biquad : : HighShelf )
2022-10-31 15:49:42 -04:00
. addConst ( " MatchedLowPass " , ARDOUR : : DSP : : Biquad : : MatchedLowPass )
. addConst ( " MatchedHighPass " , ARDOUR : : DSP : : Biquad : : MatchedHighPass )
. addConst ( " MatchedBandPass0dB " , ARDOUR : : DSP : : Biquad : : MatchedBandPass0dB )
. addConst ( " MatchedPeaking " , ARDOUR : : DSP : : Biquad : : MatchedPeaking )
2016-11-19 15:18:15 -05:00
. endNamespace ( )
2017-11-11 16:47:47 -05:00
. beginNamespace ( " NoiseType " )
. addConst ( " UniformWhiteNoise " , ARDOUR : : DSP : : Generator : : UniformWhiteNoise )
. addConst ( " GaussianWhiteNoise " , ARDOUR : : DSP : : Generator : : GaussianWhiteNoise )
. addConst ( " PinkNoise " , ARDOUR : : DSP : : Generator : : PinkNoise )
. endNamespace ( )
2018-07-17 03:41:33 -04:00
. beginNamespace ( " LTC_TV_STANDARD " )
. addConst ( " LTC_TV_525_60 " , LTC_TV_525_60 )
. addConst ( " LTC_TV_625_50 " , LTC_TV_625_50 )
. addConst ( " LTC_TV_1125_60 " , LTC_TV_1125_60 )
. addConst ( " LTC_TV_FILM_24 " , LTC_TV_FILM_24 )
. endNamespace ( )
2018-10-18 19:08:04 -04:00
. beginNamespace ( " IRChannelConfig " )
. addConst ( " Mono " , DSP : : Convolver : : Mono )
. addConst ( " MonoToStereo " , DSP : : Convolver : : MonoToStereo )
. addConst ( " Stereo " , DSP : : Convolver : : Stereo )
. endNamespace ( )
2016-11-19 15:18:15 -05:00
. beginClass < DSP : : DspShm > ( " DspShm " )
. addConstructor < void ( * ) ( size_t ) > ( )
. addFunction ( " allocate " , & DSP : : DspShm : : allocate )
. addFunction ( " clear " , & DSP : : DspShm : : clear )
. addFunction ( " to_float " , & DSP : : DspShm : : to_float )
. addFunction ( " to_int " , & DSP : : DspShm : : to_int )
. addFunction ( " atomic_set_int " , & DSP : : DspShm : : atomic_set_int )
. addFunction ( " atomic_get_int " , & DSP : : DspShm : : atomic_get_int )
. endClass ( )
. endNamespace ( ) // DSP
. endNamespace ( ) ; // end ARDOUR
2016-02-23 09:41:02 -05:00
}
void
LuaBindings : : dsp ( lua_State * L )
{
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
. beginClass < AudioBuffer > ( " AudioBuffer " )
2016-04-13 21:08:02 -04:00
. addEqualCheck ( )
2017-09-18 12:39:17 -04:00
. addFunction ( " data " , ( Sample * ( AudioBuffer : : * ) ( samplecnt_t ) ) & AudioBuffer : : data )
2016-02-23 09:41:02 -05:00
. addFunction ( " silence " , & AudioBuffer : : silence )
. addFunction ( " apply_gain " , & AudioBuffer : : apply_gain )
2016-04-05 22:58:32 -04:00
. addFunction ( " check_silence " , & AudioBuffer : : check_silence )
2018-10-26 07:38:28 -04:00
. addFunction ( " read_from " , ( void ( AudioBuffer : : * ) ( const Sample * , samplecnt_t , samplecnt_t , samplecnt_t ) ) & AudioBuffer : : read_from )
2016-02-23 09:41:02 -05:00
. endClass ( )
. beginClass < MidiBuffer > ( " MidiBuffer " )
2016-04-13 21:08:02 -04:00
. addEqualCheck ( )
2016-02-23 09:41:02 -05:00
. addFunction ( " silence " , & MidiBuffer : : silence )
2016-07-10 21:04:29 -04:00
. addFunction ( " size " , & MidiBuffer : : size )
. addFunction ( " empty " , & MidiBuffer : : empty )
. addFunction ( " resize " , & MidiBuffer : : resize )
. addFunction ( " copy " , ( void ( MidiBuffer : : * ) ( MidiBuffer const * const ) ) & MidiBuffer : : copy )
2017-09-18 12:39:17 -04:00
. addFunction ( " push_event " , ( bool ( MidiBuffer : : * ) ( const Evoral : : Event < samplepos_t > & ) ) & MidiBuffer : : push_back )
2020-09-20 13:14:20 -04:00
. addFunction ( " push_back " , ( bool ( MidiBuffer : : * ) ( samplepos_t , Evoral : : EventType , size_t , const uint8_t * ) ) & MidiBuffer : : push_back )
2016-02-23 09:41:02 -05:00
// TODO iterators..
2017-09-18 12:39:17 -04:00
. addExtCFunction ( " table " , & luabridge : : CFunc : : listToTable < const Evoral : : Event < samplepos_t > , MidiBuffer > )
2016-02-23 09:41:02 -05:00
. endClass ( )
. beginClass < BufferSet > ( " BufferSet " )
2016-04-13 21:08:02 -04:00
. addEqualCheck ( )
2016-02-23 09:41:02 -05:00
. addFunction ( " get_audio " , static_cast < AudioBuffer & ( BufferSet : : * ) ( size_t ) > ( & BufferSet : : get_audio ) )
2016-07-10 08:45:58 -04:00
. addFunction ( " get_midi " , static_cast < MidiBuffer & ( BufferSet : : * ) ( size_t ) > ( & BufferSet : : get_midi ) )
2016-02-23 09:41:02 -05:00
. addFunction ( " count " , static_cast < const ChanCount & ( BufferSet : : * ) ( ) const > ( & BufferSet : : count ) )
2020-02-26 09:22:47 -05:00
. addFunction ( " available " , static_cast < const ChanCount & ( BufferSet : : * ) ( ) const > ( & BufferSet : : available ) )
2016-02-23 09:41:02 -05:00
. endClass ( )
. endNamespace ( ) ;
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " Evoral " )
2017-09-18 12:39:17 -04:00
. deriveClass < Evoral : : Event < samplepos_t > , Evoral : : Event < samplepos_t > > ( " Event " )
2016-02-23 09:41:02 -05:00
// add Ctor?
2017-09-18 12:39:17 -04:00
. addFunction ( " type " , & Evoral : : Event < samplepos_t > : : type )
. addFunction ( " channel " , & Evoral : : Event < samplepos_t > : : channel )
. addFunction ( " set_type " , & Evoral : : Event < samplepos_t > : : set_type )
. addFunction ( " set_channel " , & Evoral : : Event < samplepos_t > : : set_channel )
2016-02-23 09:41:02 -05:00
. endClass ( )
. endNamespace ( ) ;
2022-05-08 20:20:45 -04:00
// dsp related session functions
2016-02-23 09:41:02 -05:00
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
. beginClass < Session > ( " Session " )
. addFunction ( " get_scratch_buffers " , & Session : : get_scratch_buffers )
. addFunction ( " get_silent_buffers " , & Session : : get_silent_buffers )
. endClass ( )
. endNamespace ( ) ;
luabridge : : getGlobalNamespace ( L )
2016-08-23 16:18:04 -04:00
. beginNamespace ( " ARDOUR " )
. beginClass < FluidSynth > ( " FluidSynth " )
. addConstructor < void ( * ) ( float , int ) > ( )
. addFunction ( " load_sf2 " , & FluidSynth : : load_sf2 )
. addFunction ( " synth " , & FluidSynth : : synth )
. addFunction ( " midi_event " , & FluidSynth : : midi_event )
. addFunction ( " panic " , & FluidSynth : : panic )
. addFunction ( " select_program " , & FluidSynth : : select_program )
. addFunction ( " program_count " , & FluidSynth : : program_count )
. addFunction ( " program_name " , & FluidSynth : : program_name )
. endClass ( )
. endNamespace ( ) ;
luabridge : : getGlobalNamespace ( L )
2016-02-23 09:41:02 -05:00
. beginNamespace ( " ARDOUR " )
2016-07-06 22:44:36 -04:00
. beginClass < LuaTableRef > ( " LuaTableRef " )
. addCFunction ( " get " , & LuaTableRef : : get )
. addCFunction ( " set " , & LuaTableRef : : set )
. endClass ( )
2016-03-18 15:00:44 -04:00
. endNamespace ( ) ; // ARDOUR
2016-02-23 09:41:02 -05:00
}
void
LuaBindings : : session ( lua_State * L )
{
// non-realtime session functions
luabridge : : getGlobalNamespace ( L )
. beginNamespace ( " ARDOUR " )
. beginClass < Session > ( " Session " )
. addFunction ( " save_state " , & Session : : save_state )
2021-03-27 14:44:00 -04:00
. addFunction ( " rename " , & Session : : rename )
2016-02-23 09:41:02 -05:00
. addFunction ( " set_dirty " , & Session : : set_dirty )
. addFunction ( " unknown_processors " , & Session : : unknown_processors )
2017-01-07 19:23:01 -05:00
. addFunction ( " export_track_state " , & Session : : export_track_state )
2024-02-17 09:02:25 -05:00
. addFunction ( " selection " , & Session : : selection )
2016-02-23 09:41:02 -05:00
2016-08-22 09:41:08 -04:00
. addFunction < RouteList ( Session : : * ) ( uint32_t , PresentationInfo : : order_t , const std : : string & , const std : : string & , PlaylistDisposition ) > ( " new_route_from_template " , & Session : : new_route_from_template )
2016-02-23 09:41:02 -05:00
// TODO session_add_audio_track session_add_midi_track session_add_mixed_track
//.addFunction ("new_midi_track", &Session::new_midi_track)
. endClass ( )
. endNamespace ( ) ; // ARDOUR
}
2024-04-24 00:02:13 -04:00
void
ARDOUR : : Session : : luabindings_session_rt ( lua_State * L )
{
/* declaration need to be in this file due to Windows CLASSKEYS */
luabridge : : getGlobalNamespace ( L )
2024-05-15 11:33:59 -04:00
. beginNamespace ( " ARDOUR " )
2024-04-24 00:02:13 -04:00
. beginClass < Session > ( " Session " )
/* thse are private to Session */
. addFunction ( " rt_set_controls " , & Session : : rt_set_controls )
. addFunction ( " rt_clear_all_solo_state " , & Session : : rt_clear_all_solo_state )
. endClass ( )
. endNamespace ( ) ;
}
2016-03-19 07:47:37 -04:00
void
LuaBindings : : osc ( lua_State * L )
{
luabridge : : getGlobalNamespace ( L )
2016-03-26 09:54:45 -04:00
. beginNamespace ( " ARDOUR " )
2016-03-24 16:36:07 -04:00
. beginNamespace ( " LuaOSC " )
. beginClass < LuaOSC : : Address > ( " Address " )
2016-03-19 07:47:37 -04:00
. addConstructor < void ( * ) ( std : : string ) > ( )
2016-03-24 16:36:07 -04:00
. addCFunction ( " send " , & LuaOSC : : Address : : send )
2016-03-19 07:47:37 -04:00
. endClass ( )
2016-03-26 09:54:45 -04:00
. endNamespace ( )
2016-03-19 07:47:37 -04:00
. endNamespace ( ) ;
}
2016-02-23 09:41:02 -05:00
void
LuaBindings : : set_session ( lua_State * L , Session * s )
{
/* LuaBridge uses unique keys to identify classes/c-types.
*
* Those keys are " generated " by using the memory - address of a static
* variable , templated for every Class .
* ( see libs / lua / LuaBridge / detail / ClassInfo . h )
*
* When linking the final executable there must be exactly one static
* function ( static variable ) for every templated class .
* This works fine on OSX and Linux . . .
*
* Windows ( mingw and MSVC ) however expand the template differently for libardour
* AND gtk2_ardour . We end up with two identical static functions
* at different addresses ! !
*
* The Solution : have gtk2_ardour never include LuaBridge headers directly
* and always go via libardour function calls for classes that are registered
* in libardour . ( calling lua itself is fine , calling c - functions in the GUI
* which expand the template is not )
*
* ( the actual cause : even static symbols in a . dll have no fixed address
* and are mapped when loading the dll . static functions in . exe do have a fixed
* address )
*
* libardour :
* 0000000000000000 I __imp__ZZN9luabridge9ClassInfoIN6ARDOUR7SessionEE11getClassKeyEvE5value
* 0000000000000000 I __nm__ZZN9luabridge9ClassInfoIN6ARDOUR7SessionEE11getClassKeyEvE5value
* 0000000000000000 T _ZN9luabridge9ClassInfoIN6ARDOUR7SessionEE11getClassKeyEv
*
* ardour . exe
* 000000000104f 560 d . data $ _ZZN9luabridge9ClassInfoIN6ARDOUR7SessionEE11getClassKeyEvE5value
* 000000000104f 560 D _ZZN9luabridge9ClassInfoIN6ARDOUR7SessionEE11getClassKeyEvE5value
* 0000000000e9 baf0 T _ZN9luabridge9ClassInfoIN6ARDOUR7SessionEE11getClassKeyEv
*
*
*/
luabridge : : push < Session * > ( L , s ) ;
lua_setglobal ( L , " Session " ) ;
if ( s ) {
// call lua function.
luabridge : : LuaRef cb_ses = luabridge : : getGlobal ( L , " new_session " ) ;
if ( cb_ses . type ( ) = = LUA_TFUNCTION ) { cb_ses ( s - > name ( ) ) ; } // TODO args
}
}