Fix state features array
[ardour.git] / libs / ardour / enums.cc
index 8a2ccfe79c63835a570149db3444b7b4681dee8e..6e90bd01f0cb016b31dbd3df08a0e7c58b7fec80 100644 (file)
 #include "pbd/enumwriter.h"
 #include "midi++/types.h"
 
-#include "ardour/audiofilesource.h"
-#include "ardour/audioregion.h"
+#include "evoral/Range.hpp" // shouldn't Evoral have its own enum registration?
+
 #include "ardour/delivery.h"
 #include "ardour/diskstream.h"
+#include "ardour/export_channel.h"
 #include "ardour/export_filename.h"
 #include "ardour/export_format_base.h"
 #include "ardour/export_profile_manager.h"
 #include "ardour/io.h"
 #include "ardour/location.h"
 #include "ardour/midi_model.h"
-#include "ardour/midi_track.h"
 #include "ardour/mute_master.h"
-#include "ardour/panner.h"
-#include "ardour/route_group.h"
+#include "ardour/presentation_info.h"
 #include "ardour/session.h"
+#include "ardour/source.h"
+#include "ardour/tempo.h"
 #include "ardour/track.h"
 #include "ardour/types.h"
 
@@ -42,6 +43,7 @@ using namespace std;
 using namespace PBD;
 using namespace ARDOUR;
 using namespace MIDI;
+using namespace Timecode;
 
 namespace ARDOUR {
 
@@ -52,23 +54,29 @@ setup_enum_writer ()
        vector<int> i;
        vector<string> s;
 
-       OverlapType _OverlapType;
        AlignStyle _AlignStyle;
+       AlignChoice _AlignChoice;
        MeterPoint _MeterPoint;
+       MeterType _MeterType;
        TrackMode _TrackMode;
        NoteMode _NoteMode;
        ChannelMode _ChannelMode;
        ColorMode _ColorMode;
        MeterFalloff _MeterFalloff;
        MeterHold _MeterHold;
+       VUMeterStandard _VUMeterStandard;
+       MeterLineUp _MeterLineUp;
        EditMode _EditMode;
        RegionPoint _RegionPoint;
        Placement _Placement;
        MonitorModel _MonitorModel;
-       RemoteModel _RemoteModel;
+       MonitorChoice _MonitorChoice;
+       MonitorState _MonitorState;
+       PFLPosition _PFLPosition;
+       AFLPosition _AFLPosition;
        DenormalModel _DenormalModel;
-       CrossfadeModel _CrossfadeModel;
        LayerModel _LayerModel;
+       InsertMergePolicy _InsertMergePolicy;
        ListenPosition _ListenPosition;
        SampleFormat _SampleFormat;
        CDMarkerFormat _CDMarkerFormat;
@@ -79,21 +87,23 @@ setup_enum_writer ()
        ShuttleUnits _ShuttleUnits;
        Session::RecordState _Session_RecordState;
        SessionEvent::Type _SessionEvent_Type;
+       SessionEvent::Action _SessionEvent_Action;
        TimecodeFormat _Session_TimecodeFormat;
        Session::PullupFormat _Session_PullupFormat;
-       AudioRegion::FadeShape _AudioRegion_FadeShape;
-       Panner::LinkDirection _Panner_LinkDirection;
+       FadeShape _FadeShape;
+       RegionSelectionAfterSplit _RegionSelectionAfterSplit;
        IOChange _IOChange;
        AutomationType _AutomationType;
        AutoState _AutoState;
        AutoStyle _AutoStyle;
        AutoConnectOption _AutoConnectOption;
+       TracksAutoNamingRule _TracksAutoNamingRule;
        Session::StateOfTheState _Session_StateOfTheState;
-       Route::Flag _Route_Flag;
        Source::Flag _Source_Flag;
        Diskstream::Flag _Diskstream_Flag;
        Location::Flags _Location_Flags;
-       Region::PositionLockStyle _Region_PositionLockStyle;
+       PositionLockStyle _PositionLockStyle;
+       TempoSection::Type _TempoSection_Type;
        Track::FreezeState _Track_FreezeState;
        AutomationList::InterpolationStyle _AutomationList_InterpolationStyle;
        AnyTime::Type _AnyTime_Type;
@@ -108,44 +118,69 @@ setup_enum_writer ()
        ExportFormatBase::SampleRate _ExportFormatBase_SampleRate;
        ExportFormatBase::SRCQuality _ExportFormatBase_SRCQuality;
        ExportProfileManager::TimeFormat _ExportProfileManager_TimeFormat;
+       RegionExportChannelFactory::Type _RegionExportChannelFactory_Type;
        Delivery::Role _Delivery_Role;
        IO::Direction _IO_Direction;
        MuteMaster::MutePoint _MuteMaster_MutePoint;
-       MidiModel::DiffCommand::Property _MidiModel_DiffCommand_Property;
+       MidiModel::NoteDiffCommand::Property _MidiModel_NoteDiffCommand_Property;
+       MidiModel::SysExDiffCommand::Property _MidiModel_SysExDiffCommand_Property;
+       MidiModel::PatchChangeDiffCommand::Property _MidiModel_PatchChangeDiffCommand_Property;
        WaveformScale _WaveformScale;
        WaveformShape _WaveformShape;
-       QuantizeType _QuantizeType;
        Session::PostTransportWork _Session_PostTransportWork;
        Session::SlaveState _Session_SlaveState;
        MTC_Status _MIDI_MTC_Status;
+       Evoral::OverlapType _OverlapType;
+        BufferingPreset _BufferingPreset;
+       AutoReturnTarget _AutoReturnTarget;
+       PresentationInfo::Flag _PresentationInfo_Flag;
 
 #define REGISTER(e) enum_writer.register_distinct (typeid(e).name(), i, s); i.clear(); s.clear()
 #define REGISTER_BITS(e) enum_writer.register_bits (typeid(e).name(), i, s); i.clear(); s.clear()
 #define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e)
 #define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e)
 
-       REGISTER_ENUM (NoChange);
-       REGISTER_ENUM (ConfigurationChanged);
-       REGISTER_ENUM (ConnectionsChanged);
-       REGISTER_BITS (_IOChange);
-
-       REGISTER_ENUM (OverlapNone);
-       REGISTER_ENUM (OverlapInternal);
-       REGISTER_ENUM (OverlapStart);
-       REGISTER_ENUM (OverlapEnd);
-       REGISTER_ENUM (OverlapExternal);
-       REGISTER (_OverlapType);
-
+       REGISTER_ENUM (NullAutomation);
        REGISTER_ENUM (GainAutomation);
-       REGISTER_ENUM (PanAutomation);
+       REGISTER_ENUM (PanAzimuthAutomation);
+       REGISTER_ENUM (PanElevationAutomation);
+       REGISTER_ENUM (PanWidthAutomation);
+       REGISTER_ENUM (PanFrontBackAutomation);
+       REGISTER_ENUM (PanLFEAutomation);
        REGISTER_ENUM (PluginAutomation);
+       REGISTER_ENUM (PluginPropertyAutomation);
        REGISTER_ENUM (SoloAutomation);
+       REGISTER_ENUM (SoloIsolateAutomation);
+       REGISTER_ENUM (SoloSafeAutomation);
        REGISTER_ENUM (MuteAutomation);
        REGISTER_ENUM (MidiCCAutomation);
+       REGISTER_ENUM (MidiPgmChangeAutomation);
+       REGISTER_ENUM (MidiPitchBenderAutomation);
+       REGISTER_ENUM (MidiChannelPressureAutomation);
+       REGISTER_ENUM (MidiSystemExclusiveAutomation);
        REGISTER_ENUM (FadeInAutomation);
        REGISTER_ENUM (FadeOutAutomation);
        REGISTER_ENUM (EnvelopeAutomation);
-       REGISTER_BITS (_AutomationType);
+       REGISTER_ENUM (RecEnableAutomation);
+       REGISTER_ENUM (RecSafeAutomation);
+       REGISTER_ENUM (TrimAutomation);
+       REGISTER_ENUM (PhaseAutomation);
+       REGISTER_ENUM (MonitoringAutomation);
+       REGISTER_ENUM (EQGain);
+       REGISTER_ENUM (EQFrequency);
+       REGISTER_ENUM (EQQ);
+       REGISTER_ENUM (EQShape);
+       REGISTER_ENUM (EQHPF);
+       REGISTER_ENUM (EQEnable);
+       REGISTER_ENUM (CompThreshold);
+       REGISTER_ENUM (CompSpeed);
+       REGISTER_ENUM (CompMode);
+       REGISTER_ENUM (CompMakeup);
+       REGISTER_ENUM (CompRedux);
+       REGISTER_ENUM (CompEnable);
+       REGISTER_ENUM (BusSendLevel);
+       REGISTER_ENUM (BusSendEnable);
+       REGISTER (_AutomationType);
 
        REGISTER_ENUM (Off);
        REGISTER_ENUM (Write);
@@ -161,12 +196,34 @@ setup_enum_writer ()
        REGISTER_ENUM (ExistingMaterial);
        REGISTER (_AlignStyle);
 
+       REGISTER_ENUM (UseCaptureTime);
+       REGISTER_ENUM (UseExistingMaterial);
+       REGISTER_ENUM (Automatic);
+       REGISTER (_AlignChoice);
+
        REGISTER_ENUM (MeterInput);
        REGISTER_ENUM (MeterPreFader);
        REGISTER_ENUM (MeterPostFader);
+       REGISTER_ENUM (MeterOutput);
        REGISTER_ENUM (MeterCustom);
        REGISTER (_MeterPoint);
 
+       REGISTER_ENUM (MeterMaxSignal);
+       REGISTER_ENUM (MeterMaxPeak);
+       REGISTER_ENUM (MeterPeak);
+       REGISTER_ENUM (MeterKrms);
+       REGISTER_ENUM (MeterK20);
+       REGISTER_ENUM (MeterK14);
+       REGISTER_ENUM (MeterK12);
+       REGISTER_ENUM (MeterIEC1DIN);
+       REGISTER_ENUM (MeterIEC1NOR);
+       REGISTER_ENUM (MeterIEC2BBC);
+       REGISTER_ENUM (MeterIEC2EBU);
+       REGISTER_ENUM (MeterVU);
+       REGISTER_ENUM (MeterPeak0dB);
+       REGISTER_ENUM (MeterMCP);
+       REGISTER (_MeterType);
+
        REGISTER_ENUM (Normal);
        REGISTER_ENUM (NonLayered);
        REGISTER_ENUM (Destructive);
@@ -189,6 +246,8 @@ setup_enum_writer ()
        REGISTER_ENUM (MeterFalloffOff);
        REGISTER_ENUM (MeterFalloffSlowest);
        REGISTER_ENUM (MeterFalloffSlow);
+       REGISTER_ENUM (MeterFalloffSlowish);
+       REGISTER_ENUM (MeterFalloffModerate);
        REGISTER_ENUM (MeterFalloffMedium);
        REGISTER_ENUM (MeterFalloffFast);
        REGISTER_ENUM (MeterFalloffFaster);
@@ -201,9 +260,28 @@ setup_enum_writer ()
        REGISTER_ENUM (MeterHoldLong);
        REGISTER (_MeterHold);
 
+       REGISTER_ENUM (MeteringVUfrench);
+       REGISTER_ENUM (MeteringVUamerican);
+       REGISTER_ENUM (MeteringVUstandard);
+       REGISTER_ENUM (MeteringVUeight);
+       REGISTER (_VUMeterStandard);
+
+       REGISTER_ENUM (MeteringLineUp24);
+       REGISTER_ENUM (MeteringLineUp20);
+       REGISTER_ENUM (MeteringLineUp18);
+       REGISTER_ENUM (MeteringLineUp15);
+       REGISTER (_MeterLineUp);
+
        REGISTER_ENUM (Slide);
        REGISTER_ENUM (Splice);
+       REGISTER_ENUM (Ripple); // XXX do the old enum values have to stay in order?
+       REGISTER_ENUM (Lock);
        REGISTER (_EditMode);
+       /*
+        * Splice mode is undefined, undocumented, and basically fubar'ed
+        * perhaps someday we will make it work.  but for now, avoid it
+       */
+       enum_writer.add_to_hack_table ("Splice", "Slide");
 
        REGISTER_ENUM (Start);
        REGISTER_ENUM (End);
@@ -219,26 +297,50 @@ setup_enum_writer ()
        REGISTER_ENUM (ExternalMonitoring);
        REGISTER (_MonitorModel);
 
+       REGISTER_ENUM (MonitorInput);
+       REGISTER_ENUM (MonitorDisk);
+       REGISTER_ENUM (MonitorAuto);
+       REGISTER_ENUM (MonitorCue);
+       REGISTER_BITS (_MonitorChoice);
+
+       REGISTER_ENUM (MonitoringInput);
+       REGISTER_ENUM (MonitoringDisk);
+       REGISTER_ENUM (MonitoringSilence);
+       REGISTER_BITS (_MonitorState);
+
+       REGISTER_ENUM (PFLFromBeforeProcessors);
+       REGISTER_ENUM (PFLFromAfterProcessors);
+       REGISTER (_PFLPosition);
+
+       REGISTER_ENUM (AFLFromBeforeProcessors);
+       REGISTER_ENUM (AFLFromAfterProcessors);
+       REGISTER (_AFLPosition);
+
        REGISTER_ENUM (DenormalNone);
        REGISTER_ENUM (DenormalFTZ);
        REGISTER_ENUM (DenormalDAZ);
        REGISTER_ENUM (DenormalFTZDAZ);
        REGISTER (_DenormalModel);
 
-       REGISTER_ENUM (UserOrdered);
-       REGISTER_ENUM (MixerOrdered);
-       REGISTER_ENUM (EditorOrdered);
-       REGISTER (_RemoteModel);
-
-       REGISTER_ENUM (FullCrossfade);
-       REGISTER_ENUM (ShortCrossfade);
-       REGISTER (_CrossfadeModel);
+       /*
+        * EditorOrdered has been deprecated
+        * since the removal of independent
+        * editor / mixer ordering.
+       */
+       enum_writer.add_to_hack_table ("EditorOrdered", "MixerOrdered");
 
        REGISTER_ENUM (LaterHigher);
-       REGISTER_ENUM (MoveAddHigher);
-       REGISTER_ENUM (AddHigher);
+       REGISTER_ENUM (Manual);
        REGISTER (_LayerModel);
 
+       REGISTER_ENUM (InsertMergeReject);
+       REGISTER_ENUM (InsertMergeRelax);
+       REGISTER_ENUM (InsertMergeReplace);
+       REGISTER_ENUM (InsertMergeTruncateExisting);
+       REGISTER_ENUM (InsertMergeTruncateAddition);
+       REGISTER_ENUM (InsertMergeExtend);
+       REGISTER (_InsertMergePolicy);
+
        REGISTER_ENUM (AfterFaderListen);
        REGISTER_ENUM (PreFaderListen);
        REGISTER (_ListenPosition);
@@ -247,6 +349,10 @@ setup_enum_writer ()
        REGISTER_ENUM (AutoConnectMaster);
        REGISTER_BITS (_AutoConnectOption);
 
+       REGISTER_ENUM (UseDefaultNames);
+       REGISTER_ENUM (NameAfterDriver);
+       REGISTER_BITS (_TracksAutoNamingRule);
+
        REGISTER_ENUM (FormatFloat);
        REGISTER_ENUM (FormatInt24);
        REGISTER_ENUM (FormatInt16);
@@ -264,16 +370,21 @@ setup_enum_writer ()
        REGISTER_ENUM (AIFF);
        REGISTER_ENUM (iXML);
        REGISTER_ENUM (RF64);
+       REGISTER_ENUM (RF64_WAV);
+       REGISTER_ENUM (MBWF);
        REGISTER (_HeaderFormat);
 
        REGISTER_ENUM (AudioUnit);
        REGISTER_ENUM (LADSPA);
-       REGISTER_ENUM (VST);
+       REGISTER_ENUM (Windows_VST);
+       REGISTER_ENUM (LXVST);
        REGISTER (_PluginType);
 
        REGISTER_ENUM (MTC);
        REGISTER_ENUM (JACK);
+       REGISTER_ENUM (Engine);
        REGISTER_ENUM (MIDIClock);
+       REGISTER_ENUM (LTC);
        REGISTER (_SyncSource);
 
        REGISTER_ENUM (Sprung);
@@ -290,7 +401,7 @@ setup_enum_writer ()
        REGISTER (_Session_RecordState);
 
        REGISTER_CLASS_ENUM (SessionEvent, SetTransportSpeed);
-       REGISTER_CLASS_ENUM (SessionEvent, SetDiskstreamSpeed);
+       REGISTER_CLASS_ENUM (SessionEvent, SetTrackSpeed);
        REGISTER_CLASS_ENUM (SessionEvent, Locate);
        REGISTER_CLASS_ENUM (SessionEvent, LocateRoll);
        REGISTER_CLASS_ENUM (SessionEvent, LocateRollLocate);
@@ -304,10 +415,23 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (SessionEvent, Audition);
        REGISTER_CLASS_ENUM (SessionEvent, InputConfigurationChange);
        REGISTER_CLASS_ENUM (SessionEvent, SetPlayAudioRange);
+       REGISTER_CLASS_ENUM (SessionEvent, CancelPlayAudioRange);
+       REGISTER_CLASS_ENUM (SessionEvent, RealTimeOperation);
+       REGISTER_CLASS_ENUM (SessionEvent, AdjustPlaybackBuffering);
+       REGISTER_CLASS_ENUM (SessionEvent, AdjustCaptureBuffering);
+       REGISTER_CLASS_ENUM (SessionEvent, SetTimecodeTransmission);
+       REGISTER_CLASS_ENUM (SessionEvent, Skip);
        REGISTER_CLASS_ENUM (SessionEvent, StopOnce);
        REGISTER_CLASS_ENUM (SessionEvent, AutoLoop);
+       REGISTER_CLASS_ENUM (SessionEvent, AutoLoopDeclick);
        REGISTER (_SessionEvent_Type);
 
+       REGISTER_CLASS_ENUM (SessionEvent, Add);
+       REGISTER_CLASS_ENUM (SessionEvent, Remove);
+       REGISTER_CLASS_ENUM (SessionEvent, Replace);
+       REGISTER_CLASS_ENUM (SessionEvent, Clear);
+       REGISTER (_SessionEvent_Action);
+
        REGISTER_CLASS_ENUM (Session, Stopped);
        REGISTER_CLASS_ENUM (Session, Waiting);
        REGISTER_CLASS_ENUM (Session, Running);
@@ -319,9 +443,6 @@ setup_enum_writer ()
        REGISTER (_MIDI_MTC_Status);
 
        REGISTER_CLASS_ENUM (Session, PostTransportStop);
-       REGISTER_CLASS_ENUM (Session, PostTransportDisableRecord);
-       REGISTER_CLASS_ENUM (Session, PostTransportPosition);
-       REGISTER_CLASS_ENUM (Session, PostTransportDidRecord);
        REGISTER_CLASS_ENUM (Session, PostTransportDuration);
        REGISTER_CLASS_ENUM (Session, PostTransportLocate);
        REGISTER_CLASS_ENUM (Session, PostTransportRoll);
@@ -329,7 +450,6 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (Session, PostTransportOverWrite);
        REGISTER_CLASS_ENUM (Session, PostTransportSpeed);
        REGISTER_CLASS_ENUM (Session, PostTransportAudition);
-       REGISTER_CLASS_ENUM (Session, PostTransportScrub);
        REGISTER_CLASS_ENUM (Session, PostTransportReverse);
        REGISTER_CLASS_ENUM (Session, PostTransportInputChange);
        REGISTER_CLASS_ENUM (Session, PostTransportCurveRealloc);
@@ -368,11 +488,6 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (Session, pullup_Minus4Minus1);
        REGISTER (_Session_PullupFormat);
 
-       REGISTER_CLASS_ENUM (Route, Hidden);
-       REGISTER_CLASS_ENUM (Route, MasterOut);
-       REGISTER_CLASS_ENUM (Route, ControlOut);
-       REGISTER_BITS (_Route_Flag);
-
        REGISTER_CLASS_ENUM (Source, Writable);
        REGISTER_CLASS_ENUM (Source, CanRename);
        REGISTER_CLASS_ENUM (Source, Broadcast);
@@ -381,14 +496,25 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (Source, RemoveAtDestroy);
        REGISTER_CLASS_ENUM (Source, NoPeakFile);
        REGISTER_CLASS_ENUM (Source, Destructive);
+       REGISTER_CLASS_ENUM (Source, Empty);
        REGISTER_BITS (_Source_Flag);
 
-       REGISTER_CLASS_ENUM (AudioRegion, Linear);
-       REGISTER_CLASS_ENUM (AudioRegion, Fast);
-       REGISTER_CLASS_ENUM (AudioRegion, Slow);
-       REGISTER_CLASS_ENUM (AudioRegion, LogA);
-       REGISTER_CLASS_ENUM (AudioRegion, LogB);
-       REGISTER (_AudioRegion_FadeShape);
+       REGISTER_ENUM (FadeLinear);
+       REGISTER_ENUM (FadeFast);
+       REGISTER_ENUM (FadeSlow);
+       REGISTER_ENUM (FadeConstantPower);
+       REGISTER_ENUM (FadeSymmetric);
+       REGISTER (_FadeShape);
+
+       REGISTER_ENUM(None);
+       REGISTER_ENUM(NewlyCreatedLeft);
+       REGISTER_ENUM(NewlyCreatedRight);
+       REGISTER_ENUM(NewlyCreatedBoth);
+       REGISTER_ENUM(Existing);
+       REGISTER_ENUM(ExistingNewlyCreatedLeft);
+       REGISTER_ENUM(ExistingNewlyCreatedRight);
+       REGISTER_ENUM(ExistingNewlyCreatedBoth);
+       REGISTER (_RegionSelectionAfterSplit);
 
        REGISTER_CLASS_ENUM (Diskstream, Recordable);
        REGISTER_CLASS_ENUM (Diskstream, Hidden);
@@ -400,18 +526,14 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (Location, IsAutoLoop);
        REGISTER_CLASS_ENUM (Location, IsHidden);
        REGISTER_CLASS_ENUM (Location, IsCDMarker);
-       REGISTER_CLASS_ENUM (Location, IsEnd);
+       REGISTER_CLASS_ENUM (Location, IsSessionRange);
        REGISTER_CLASS_ENUM (Location, IsRangeMarker);
-       REGISTER_CLASS_ENUM (Location, IsStart);
+       REGISTER_CLASS_ENUM (Location, IsSkip);
        REGISTER_BITS (_Location_Flags);
 
-       REGISTER_CLASS_ENUM (Panner, SameDirection);
-       REGISTER_CLASS_ENUM (Panner, OppositeDirection);
-       REGISTER (_Panner_LinkDirection);
-
-       REGISTER_CLASS_ENUM (Region, AudioTime);
-       REGISTER_CLASS_ENUM (Region, MusicTime);
-       REGISTER_BITS (_Region_PositionLockStyle);
+       REGISTER_CLASS_ENUM (TempoSection, Ramp);
+       REGISTER_CLASS_ENUM (TempoSection, Constant);
+       REGISTER (_TempoSection_Type);
 
        REGISTER_CLASS_ENUM (Track, NoFreeze);
        REGISTER_CLASS_ENUM (Track, Frozen);
@@ -454,6 +576,7 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (ExportFormatBase, F_RAW);
        REGISTER_CLASS_ENUM (ExportFormatBase, F_FLAC);
        REGISTER_CLASS_ENUM (ExportFormatBase, F_Ogg);
+       REGISTER_CLASS_ENUM (ExportFormatBase, F_CAF);
        REGISTER (_ExportFormatBase_FormatId);
 
        REGISTER_CLASS_ENUM (ExportFormatBase, E_FileDefault);
@@ -487,6 +610,8 @@ setup_enum_writer ()
        REGISTER (_ExportFormatBase_Quality);
 
        REGISTER_CLASS_ENUM (ExportFormatBase, SR_None);
+       REGISTER_CLASS_ENUM (ExportFormatBase, SR_Session);
+       REGISTER_CLASS_ENUM (ExportFormatBase, SR_8);
        REGISTER_CLASS_ENUM (ExportFormatBase, SR_22_05);
        REGISTER_CLASS_ENUM (ExportFormatBase, SR_44_1);
        REGISTER_CLASS_ENUM (ExportFormatBase, SR_48);
@@ -506,15 +631,19 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (ExportProfileManager, BBT);
        REGISTER_CLASS_ENUM (ExportProfileManager, MinSec);
        REGISTER_CLASS_ENUM (ExportProfileManager, Frames);
-       REGISTER_CLASS_ENUM (ExportProfileManager, Off);
        REGISTER (_ExportProfileManager_TimeFormat);
 
+       REGISTER_CLASS_ENUM (RegionExportChannelFactory, None);
+       REGISTER_CLASS_ENUM (RegionExportChannelFactory, Raw);
+       REGISTER_CLASS_ENUM (RegionExportChannelFactory, Fades);
+       REGISTER_CLASS_ENUM (RegionExportChannelFactory, Processed);
+       REGISTER (_RegionExportChannelFactory_Type);
+
        REGISTER_CLASS_ENUM (Delivery, Insert);
        REGISTER_CLASS_ENUM (Delivery, Send);
        REGISTER_CLASS_ENUM (Delivery, Listen);
        REGISTER_CLASS_ENUM (Delivery, Main);
        REGISTER_CLASS_ENUM (Delivery, Aux);
-       REGISTER_CLASS_ENUM (Delivery, MainListen);
        REGISTER_BITS (_Delivery_Role);
 
        REGISTER_CLASS_ENUM (MuteMaster, PreFader);
@@ -527,12 +656,20 @@ setup_enum_writer ()
        REGISTER_CLASS_ENUM (IO, Output);
        REGISTER (_IO_Direction);
 
-       REGISTER_CLASS_ENUM (MidiModel::DiffCommand, NoteNumber);
-       REGISTER_CLASS_ENUM (MidiModel::DiffCommand, Channel);
-       REGISTER_CLASS_ENUM (MidiModel::DiffCommand, Velocity);
-       REGISTER_CLASS_ENUM (MidiModel::DiffCommand, StartTime);
-       REGISTER_CLASS_ENUM (MidiModel::DiffCommand, Length);
-       REGISTER (_MidiModel_DiffCommand_Property);
+       REGISTER_CLASS_ENUM (MidiModel::NoteDiffCommand, NoteNumber);
+       REGISTER_CLASS_ENUM (MidiModel::NoteDiffCommand, Channel);
+       REGISTER_CLASS_ENUM (MidiModel::NoteDiffCommand, Velocity);
+       REGISTER_CLASS_ENUM (MidiModel::NoteDiffCommand, StartTime);
+       REGISTER_CLASS_ENUM (MidiModel::NoteDiffCommand, Length);
+       REGISTER (_MidiModel_NoteDiffCommand_Property);
+
+       REGISTER_CLASS_ENUM (MidiModel::SysExDiffCommand, Time);
+       REGISTER (_MidiModel_SysExDiffCommand_Property);
+
+       REGISTER_CLASS_ENUM (MidiModel::PatchChangeDiffCommand, Time);
+       REGISTER_CLASS_ENUM (MidiModel::PatchChangeDiffCommand, Program);
+       REGISTER_CLASS_ENUM (MidiModel::PatchChangeDiffCommand, Bank);
+       REGISTER (_MidiModel_PatchChangeDiffCommand_Property);
 
        REGISTER_ENUM(Linear);
        REGISTER_ENUM(Logarithmic);
@@ -542,224 +679,412 @@ setup_enum_writer ()
        REGISTER_ENUM(Rectified);
        REGISTER(_WaveformShape);
 
-       REGISTER_ENUM(Plain);
-       REGISTER_ENUM(Legato);
-       REGISTER_ENUM(Groove);
-       REGISTER(_QuantizeType);
+       REGISTER_ENUM(AudioTime);
+       REGISTER_ENUM(MusicTime);
+       REGISTER(_PositionLockStyle);
+
+       REGISTER_ENUM (Evoral::OverlapNone);
+       REGISTER_ENUM (Evoral::OverlapInternal);
+       REGISTER_ENUM (Evoral::OverlapStart);
+       REGISTER_ENUM (Evoral::OverlapEnd);
+       REGISTER_ENUM (Evoral::OverlapExternal);
+       REGISTER(_OverlapType);
+
+       REGISTER_ENUM (Small);
+       REGISTER_ENUM (Medium);
+       REGISTER_ENUM (Large);
+       REGISTER_ENUM (Custom);
+       REGISTER(_BufferingPreset);
+
+       REGISTER_ENUM (LastLocate);
+       REGISTER_ENUM (RangeSelectionStart);
+       REGISTER_ENUM (Loop);
+       REGISTER_ENUM (RegionSelectionStart);
+       REGISTER_BITS (_AutoReturnTarget);
+
+       REGISTER_CLASS_ENUM (PresentationInfo, AudioTrack);
+       REGISTER_CLASS_ENUM (PresentationInfo, MidiTrack);
+       REGISTER_CLASS_ENUM (PresentationInfo, AudioBus);
+       REGISTER_CLASS_ENUM (PresentationInfo, MidiBus);
+       REGISTER_CLASS_ENUM (PresentationInfo, VCA);
+       REGISTER_CLASS_ENUM (PresentationInfo, MasterOut);
+       REGISTER_CLASS_ENUM (PresentationInfo, MonitorOut);
+       REGISTER_CLASS_ENUM (PresentationInfo, Auditioner);
+       REGISTER_CLASS_ENUM (PresentationInfo, Selected);
+       REGISTER_CLASS_ENUM (PresentationInfo, Hidden);
+       REGISTER_CLASS_ENUM (PresentationInfo, OrderSet);
+       REGISTER_BITS (_PresentationInfo_Flag);
 }
 
 } /* namespace ARDOUR */
 
 /* deserializing types from ardour/types.h */
 
-std::istream& operator>>(std::istream& o, HeaderFormat& var) 
-{ 
+std::istream& operator>>(std::istream& o, HeaderFormat& var)
+{
        std::string s;
        o >> s;
        var = (HeaderFormat) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const HeaderFormat& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const HeaderFormat& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
-std::istream& operator>>(std::istream& o, SampleFormat& var) 
-{ 
+std::istream& operator>>(std::istream& o, SampleFormat& var)
+{
        std::string s;
        o >> s;
        var = (SampleFormat) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const SampleFormat& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const SampleFormat& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, AutoConnectOption& var) 
-{ 
+
+std::istream& operator>>(std::istream& o, AutoConnectOption& var)
+{
        std::string s;
        o >> s;
        var = (AutoConnectOption) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, TracksAutoNamingRule& var)
+{
+       std::string s;
+       o >> s;
+       var = (TracksAutoNamingRule) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const TracksAutoNamingRule& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, MonitorModel& var) 
-{ 
+
+std::istream& operator>>(std::istream& o, MonitorModel& var)
+{
        std::string s;
        o >> s;
        var = (MonitorModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const MonitorModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const MonitorModel& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, VUMeterStandard& var)
+{
+       std::string s;
+       o >> s;
+       var = (VUMeterStandard) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const VUMeterStandard& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, MeterLineUp& var)
+{
+       std::string s;
+       o >> s;
+       var = (MeterLineUp) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const MeterLineUp& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, PFLPosition& var)
+{
+       std::string s;
+       o >> s;
+       var = (PFLPosition) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const PFLPosition& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, RemoteModel& var) 
+
+std::istream& operator>>(std::istream& o, AFLPosition& var)
 {
        std::string s;
        o >> s;
-       var = (RemoteModel) string_2_enum (s, var);
+       var = (AFLPosition) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const RemoteModel& var) 
+std::ostream& operator<<(std::ostream& o, const AFLPosition& var)
 {
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, EditMode& var) 
-{ 
+
+std::istream& operator>>(std::istream& o, EditMode& var)
+{
        std::string s;
        o >> s;
        var = (EditMode) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const EditMode& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const EditMode& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, ListenPosition& var) 
-{ 
+std::istream& operator>>(std::istream& o, ListenPosition& var)
+{
        std::string s;
        o >> s;
        var = (ListenPosition) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const ListenPosition& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const ListenPosition& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, LayerModel& var) 
-{ 
+std::istream& operator>>(std::istream& o, LayerModel& var)
+{
        std::string s;
        o >> s;
        var = (LayerModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const LayerModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const LayerModel& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, CrossfadeModel& var) 
-{ 
+
+std::istream& operator>>(std::istream& o, InsertMergePolicy& var)
+{
        std::string s;
        o >> s;
-       var = (CrossfadeModel) string_2_enum (s, var);
+       var = (InsertMergePolicy) string_2_enum (s, var);
        return o;
 }
-
-std::ostream& operator<<(std::ostream& o, const CrossfadeModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const InsertMergePolicy& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, SyncSource& var) 
-{ 
+
+std::istream& operator>>(std::istream& o, SyncSource& var)
+{
        std::string s;
        o >> s;
        var = (SyncSource) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const SyncSource& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const SyncSource& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, ShuttleBehaviour& var) 
-{ 
+std::istream& operator>>(std::istream& o, ShuttleBehaviour& var)
+{
        std::string s;
        o >> s;
        var = (ShuttleBehaviour) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const ShuttleBehaviour& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const ShuttleBehaviour& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, ShuttleUnits& var) 
-{ 
+std::istream& operator>>(std::istream& o, ShuttleUnits& var)
+{
        std::string s;
        o >> s;
        var = (ShuttleUnits) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const ShuttleUnits& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const ShuttleUnits& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, TimecodeFormat& var) 
-{ 
+std::istream& operator>>(std::istream& o, TimecodeFormat& var)
+{
        std::string s;
        o >> s;
        var = (TimecodeFormat) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const TimecodeFormat& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const TimecodeFormat& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, DenormalModel& var) 
-{ 
+std::istream& operator>>(std::istream& o, DenormalModel& var)
+{
        std::string s;
        o >> s;
        var = (DenormalModel) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const DenormalModel& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const DenormalModel& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, WaveformScale& var) 
-{ 
+std::istream& operator>>(std::istream& o, WaveformScale& var)
+{
        std::string s;
        o >> s;
        var = (WaveformScale) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const WaveformScale& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const WaveformScale& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
-std::istream& operator>>(std::istream& o, WaveformShape& var) 
-{ 
+std::istream& operator>>(std::istream& o, WaveformShape& var)
+{
        std::string s;
        o >> s;
        var = (WaveformShape) string_2_enum (s, var);
        return o;
 }
 
-std::ostream& operator<<(std::ostream& o, const WaveformShape& var) 
-{ 
+std::ostream& operator<<(std::ostream& o, const WaveformShape& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, PositionLockStyle& var)
+{
+       std::string s;
+       o >> s;
+       var = (PositionLockStyle) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const PositionLockStyle& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, Evoral::OverlapType& var)
+{
+       std::string s;
+       o >> s;
+       var = (Evoral::OverlapType) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const Evoral::OverlapType& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, FadeShape& var)
+{
+       std::string s;
+       o >> s;
+       var = (FadeShape) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const FadeShape& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, RegionSelectionAfterSplit& var)
+{
+       std::string s;
+       o >> s;
+       var = (RegionSelectionAfterSplit) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const RegionSelectionAfterSplit& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, ARDOUR::BufferingPreset& var)
+{
+       std::string s;
+       o >> s;
+       var = (ARDOUR::BufferingPreset) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const ARDOUR::BufferingPreset& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}
+
+std::istream& operator>>(std::istream& o, AutoReturnTarget& var)
+{
+       std::string s;
+       o >> s;
+       var = (AutoReturnTarget) string_2_enum (s, var);
+       return o;
+}
+
+std::ostream& operator<<(std::ostream& o, const AutoReturnTarget& var)
+{
        std::string s = enum_2_string (var);
        return o << s;
 }
 
+std::istream& operator>>(std::istream& o, MeterType& var)
+{
+       std::string s;
+       o >> s;
+       var = (MeterType) string_2_enum (s, var);
+       return o;
+}
 
+std::ostream& operator<<(std::ostream& o, const MeterType& var)
+{
+       std::string s = enum_2_string (var);
+       return o << s;
+}