From 4b1fdc48219ec4a7d52df0cd0dd3216e9ea084be Mon Sep 17 00:00:00 2001 From: Javier Serrano Polo Date: Thu, 9 Jun 2016 23:53:45 +0200 Subject: [PATCH] Dropped VstParameterProperties Added information related to VstTimeInfo --- include/aeffectx.h | 50 +++++++++++++++++++--------- plugins/vst_base/RemoteVstPlugin.cpp | 38 --------------------- plugins/vst_base/communication.h | 4 +-- 3 files changed, 36 insertions(+), 56 deletions(-) diff --git a/include/aeffectx.h b/include/aeffectx.h index 358f49b14..703b56e4c 100644 --- a/include/aeffectx.h +++ b/include/aeffectx.h @@ -103,7 +103,6 @@ const int effEditIdle = 19; const int effEditTop = 20; const int effProcessEvents = 25; const int effGetEffectName = 45; -const int effGetParameterProperties = 47; // missing const int effGetVendorString = 47; const int effGetProductString = 48; const int effGetVendorVersion = 49; @@ -114,16 +113,35 @@ const int kEffectMagic = CCONST( 'V', 's', 't', 'P' ); const int kVstLangEnglish = 1; const int kVstMidiType = 1; +const int kVstTransportChanged = 1; const int kVstTransportPlaying = 1 << 1; const int kVstTransportCycleActive = 1 << 2; -const int kVstTransportChanged = 1; +const int kVstTransportRecording = 1 << 3; // currently unused +const int kVstPpqPosValid = 1 << 9; +const int kVstTempoValid = 1 << 10; +const int kVstBarsValid = 1 << 11; +const int kVstCyclePosValid = 1 << 12; +const int kVstTimeSigValid = 1 << 13; +const int kVstSmpteValid = 1 << 14; // currently unused +const int kVstClockValid = 1 << 15; // currently unused + +// currently unused +const int kVstSmpte24fps = 0; +const int kVstSmpte25fps = 1; +const int kVstSmpte2997fps = 2; +const int kVstSmpte30fps = 3; +const int kVstSmpte2997dfps = 4; +const int kVstSmpte30dfps = 5; +const int kVstSmpteFilm16mm = 6; // very likely +const int kVstSmpteFilm35mm = 7; // very likely +const int kVstSmpte239fps = 10; +const int kVstSmpte249fps = 11; +const int kVstSmpte599fps = 12; +const int kVstSmpte60fps = 13; -class RemoteVstPlugin; - - class VstMidiEvent { public: @@ -207,7 +225,7 @@ public: // Zeroes 2c-2f 30-33 34-37 38-3b char empty3[4 + 4 + 4]; // 1.0f 3c-3f - float unkown_float; + float unknown_float; // An object? pointer 40-43 void *ptr3; // Zeroes 44-47 @@ -235,22 +253,24 @@ public: double nanoSeconds; // 18 double ppqPos; - // 20? + // 20 double tempo; // 28 double barStartPos; - // 30? + // 30 double cycleStartPos; - // 38? + // 38 double cycleEndPos; - // 40? + // 40 int32_t timeSigNumerator; - // 44? + // 44 int32_t timeSigDenominator; - - int32_t smpteOffset; - int32_t smpteFrameRate; - int32_t samplesToNextClock; + // 48 unused + int32_t smpteOffset; + // 4c unused + int32_t smpteFrameRate; + // 50? unused, where does this come from? + int32_t samplesToNextClock; // 54 int32_t flags; diff --git a/plugins/vst_base/RemoteVstPlugin.cpp b/plugins/vst_base/RemoteVstPlugin.cpp index 7dfd7f3a2..c92a1b959 100644 --- a/plugins/vst_base/RemoteVstPlugin.cpp +++ b/plugins/vst_base/RemoteVstPlugin.cpp @@ -192,9 +192,6 @@ public: // read parameter-dump and set it for plugin void setParameterDump( const message & _m ); - // post properties of specified parameter - void getParameterProperties( const int _idx ); - // save settings chunk of plugin into file void saveChunkToFile( const std::string & _file ); @@ -503,10 +500,6 @@ bool RemoteVstPlugin::processMessage( const message & _m ) setParameterDump( _m ); break; - case IdVstGetParameterProperties: - getParameterProperties( _m.getInt() ); - break; - case IdSaveSettingsToFile: saveChunkToFile( _m.getString() ); sendMessage( IdSaveSettingsToFile ); @@ -984,37 +977,6 @@ void RemoteVstPlugin::setParameterDump( const message & _m ) -void RemoteVstPlugin::getParameterProperties( const int _idx ) -{ - VstParameterProperties p; - pluginDispatch( effGetParameterProperties, _idx, 0, &p ); - message m( IdVstParameterProperties ); - m.addString( p.label ); - m.addString( p.shortLabel ); - m.addString( -#if kVstVersion > 2 - p.categoryLabel -#else - "" -#endif - ); - m.addFloat( p.minInteger ); - m.addFloat( p.maxInteger ); - m.addFloat( ( p.flags & kVstParameterUsesFloatStep ) ? - p.stepFloat : p.stepInteger ); - m.addInt( -#if kVstVersion > 2 - p.category -#else - 0 -#endif - ); - sendMessage( m ); -} - - - - void RemoteVstPlugin::saveChunkToFile( const std::string & _file ) { if( m_plugin->flags & 32 ) diff --git a/plugins/vst_base/communication.h b/plugins/vst_base/communication.h index 6786b1189..ca674bcb4 100644 --- a/plugins/vst_base/communication.h +++ b/plugins/vst_base/communication.h @@ -63,7 +63,6 @@ enum VstRemoteMessageIDs IdVstGetParameterCount, IdVstGetParameterDump, IdVstSetParameterDump, - IdVstGetParameterProperties, IdVstProgramNames, IdVstCurrentProgram, IdVstCurrentProgramName, @@ -84,8 +83,7 @@ enum VstRemoteMessageIDs IdVstPluginUniqueID, IdVstSetParameter, IdVstParameterCount, - IdVstParameterDump, - IdVstParameterProperties + IdVstParameterDump } ;