-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit eb5092f
Showing
13 changed files
with
1,918 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}] | ||
|
||
indent_style = tab | ||
indent_size = 4 | ||
tab_width = 4 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
//************************************************************************************************ | ||
// | ||
// PreSonus Plug-In Extensions | ||
// Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | ||
// | ||
// Filename : ipslcontextinfo.h | ||
// Created by : PreSonus Software Ltd., 08/2013, last updated 05/2019 | ||
// Description : Context Information Interface | ||
// | ||
//************************************************************************************************ | ||
/* | ||
DISCLAIMER: | ||
PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | ||
provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | ||
PreSonus is not affiliated with the owner of the underlying technology in any way. | ||
*/ | ||
//************************************************************************************************ | ||
|
||
#ifndef _ipslcontextinfo_h | ||
#define _ipslcontextinfo_h | ||
|
||
#include "pluginterfaces/vst/vsttypes.h" | ||
#include "pluginterfaces/base/falignpush.h" | ||
|
||
namespace Presonus { | ||
|
||
/** @defgroup contextInfo Context Information */ | ||
|
||
//************************************************************************************************ | ||
// IContextInfoProvider | ||
/** Callback interface to access context information from the host. | ||
Implemented by the host as extension of Steinberg::Vst::IComponentHandler. | ||
The host might not be able to report all available attributes at all times. Please check the | ||
return value of getContextInfoValue() and getContextInfoString(). It's not required to implement | ||
IContextInfoHandler on the plug-in side, but we recommend to do so. The host will then call | ||
notifyContextInfoChange() during initialization to inform the plug-in about the initial state of | ||
the available attributes. | ||
Usage Example: | ||
@code{.cpp} | ||
IComponentHandler* handler; | ||
FUnknownPtr<IContextInfoProvider> contextInfoProvider (handler); | ||
void PLUGIN_API MyEditController::notifyContextInfoChange () | ||
{ | ||
int32 channelIndex = 0; | ||
contextInfoProvider->getContextInfoValue (channelIndex, ContextInfo::kIndex); | ||
TChar channelName[128] = {0}; | ||
contextInfoProvider->getContextInfoString (channelName, 128, ContextInfo::kName); | ||
} | ||
@endcode | ||
@ingroup contextInfo */ | ||
//************************************************************************************************ | ||
|
||
struct IContextInfoProvider: Steinberg::FUnknown | ||
{ | ||
/** Get context information by identifier. */ | ||
virtual Steinberg::tresult PLUGIN_API getContextInfoValue (Steinberg::int32& value, Steinberg::FIDString id) = 0; | ||
|
||
/** Get context information by identifier. */ | ||
virtual Steinberg::tresult PLUGIN_API getContextInfoString (Steinberg::Vst::TChar* string, Steinberg::int32 maxCharCount, Steinberg::FIDString id) = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (IContextInfoProvider, 0x483e61ea, 0x17994494, 0x8199a35a, 0xebb35e3c) | ||
|
||
//************************************************************************************************ | ||
// IContextInfoProvider2 | ||
/** Extension to IContextInfoProvider enabling the plug-in to modify host context information. | ||
Values like volume or pan support both, numeric and string representation for get and set. | ||
@ingroup contextInfo */ | ||
//************************************************************************************************ | ||
|
||
struct IContextInfoProvider2: IContextInfoProvider | ||
{ | ||
using IContextInfoProvider::getContextInfoValue; | ||
|
||
/** Get context information by identifier (floating-point). */ | ||
virtual Steinberg::tresult PLUGIN_API getContextInfoValue (double& value, Steinberg::FIDString id) = 0; | ||
|
||
/** Set context information by identifier (floating-point). */ | ||
virtual Steinberg::tresult PLUGIN_API setContextInfoValue (Steinberg::FIDString id, double value) = 0; | ||
|
||
/** Set context information by identifier (integer). */ | ||
virtual Steinberg::tresult PLUGIN_API setContextInfoValue (Steinberg::FIDString id, Steinberg::int32 value) = 0; | ||
|
||
/** Set context information by identifier (string). */ | ||
virtual Steinberg::tresult PLUGIN_API setContextInfoString (Steinberg::FIDString id, Steinberg::Vst::TChar* string) = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (IContextInfoProvider2, 0x61e45968, 0x3d364f39, 0xb15e1733, 0x4944172b) | ||
|
||
//************************************************************************************************ | ||
// IContextInfoProvider3 | ||
/** Extension to IContextInfoProvider and IContextInfoProvider2. | ||
Enable the plug-in to signal begin and end of editing for context information values. | ||
Use IComponentHandler2::startGroupEdit() and IComponentHandler2::endGroupEdit() to signal group edits. | ||
@ingroup contextInfo */ | ||
//************************************************************************************************ | ||
|
||
struct IContextInfoProvider3: IContextInfoProvider2 | ||
{ | ||
/** Begin edit of context info value, \see also IComponentHandler::beginEdit. */ | ||
virtual Steinberg::tresult PLUGIN_API beginEditContextInfoValue (Steinberg::FIDString id) = 0; | ||
|
||
/** End edit of context info value, \see also IComponentHandler::endEdit. */ | ||
virtual Steinberg::tresult PLUGIN_API endEditContextInfoValue (Steinberg::FIDString id) = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (IContextInfoProvider3, 0x4e31fdf8, 0x6f4448d4, 0xb4ec1461, 0x68a4150f) | ||
|
||
//************************************************************************************************ | ||
// IContextInfoHandler | ||
/** Notification interface for context information changes. | ||
Implemented by the plug-in as extension of Steinberg::Vst::IEditController. | ||
@ingroup contextInfo */ | ||
//************************************************************************************************ | ||
|
||
struct IContextInfoHandler: Steinberg::FUnknown | ||
{ | ||
/** Called by the host if context information has changed. */ | ||
virtual void PLUGIN_API notifyContextInfoChange () = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (IContextInfoHandler, 0xc3b17bc0, 0x2c174494, 0x80293402, 0xfbc4bbf8) | ||
|
||
//************************************************************************************************ | ||
// IContextInfoHandler2 | ||
/** Replacement of IContextInfoHandler passing additional information about what changed on the host-side. | ||
This interface will be preferred if implemented by the plug-in. It is required to | ||
receive certain notifications like volume, pan, etc. | ||
@ingroup contextInfo */ | ||
//************************************************************************************************ | ||
|
||
struct IContextInfoHandler2: Steinberg::FUnknown | ||
{ | ||
/** Called by the host if context information has changed. | ||
The identifier (id) is empty for the inital update. */ | ||
virtual void PLUGIN_API notifyContextInfoChange (Steinberg::FIDString id) = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (IContextInfoHandler2, 0x31e29a7a, 0xe55043ad, 0x8b95b9b8, 0xda1fbe1e) | ||
|
||
//************************************************************************************************ | ||
// Context Information Attributes | ||
//************************************************************************************************ | ||
|
||
namespace ContextInfo | ||
{ | ||
/** Channel types. */ | ||
enum ChannelType | ||
{ | ||
kTrack = 0, ///< audio track | ||
kBus, ///< audio bus | ||
kFX, ///< FX channel | ||
kSynth, ///< output of virtual instrument | ||
kIn, ///< input from audio driver | ||
kOut ///< output to audio driver (main or sub-out) | ||
}; | ||
|
||
/** Channel index mode. */ | ||
enum ChannelIndexMode | ||
{ | ||
kFlatIndex = 0, ///< channel indices are contiguous (example: track 1, track 2, bus 3, bus 4) | ||
kPerTypeIndex ///< channel indices restarts at zero for each type (example: track 1, track 2, bus 1, bus 2) | ||
}; | ||
|
||
// per instance | ||
const Steinberg::FIDString kID = "id"; ///< (R) channel identifier, use to compare identity (string) | ||
const Steinberg::FIDString kName = "name"; ///< (R/W) channel name, can be displayed to the user (string) | ||
const Steinberg::FIDString kType = "type"; ///< (R) channel type (int32, see ChannelType enumeration) | ||
const Steinberg::FIDString kMain = "main"; ///< (R) channel is main output (int32, 0: false, 1: true) | ||
const Steinberg::FIDString kIndex = "index"; ///< (R) channel index (int32, starts at zero) | ||
const Steinberg::FIDString kColor = "color"; ///< (R/W) channel color (int32: RGBA, starts with red value in lowest byte) | ||
const Steinberg::FIDString kVisibility = "visibility"; ///< (R) channel visibility (int32, 0: false, 1: true) | ||
const Steinberg::FIDString kSelected = "selected"; ///< (R/W) selection state, channel is selected exlusively and scrolled into view on write (int32, 0: false, 1: true) | ||
const Steinberg::FIDString kMultiSelect = "multiselect"; ///< (W) select channel without unselecting others (int32, 0: false, 1: true) | ||
const Steinberg::FIDString kFocused = "focused"; ///< (R) focus for user input when multiple channels are selected (int32, 0: false, 1: true) | ||
|
||
const Steinberg::FIDString kRegionName = "regionName"; ///< (R) name of region/event for region/event-based effects (string) | ||
const Steinberg::FIDString kRegionSelected = "regionSelected"; ///< (R) selection state of region/event for region/event-based effects (int32, 0: false, 1: true) | ||
|
||
// per instance (requires IContextInfoHandler2 on plug-in side) | ||
const Steinberg::FIDString kVolume = "volume"; ///< (R/W) volume factor [float, 0. = -oo dB, 1. = 0dB, etc.], also available as string | ||
const Steinberg::FIDString kMaxVolume = "maxVolume"; ///< (R) maximum volume factor [float, 1. = 0dB], also available as string | ||
const Steinberg::FIDString kPan = "pan"; ///< (R/W) stereo panning [float, < 0.5 = (L), 0.5 = (C), > 0.5 = (R)], also available as string | ||
const Steinberg::FIDString kMute = "mute"; ///< (R/W) mute (int32, 0: false, 1: true) | ||
const Steinberg::FIDString kSolo = "solo"; ///< (R/W) solo (int32, 0: false, 1: true) | ||
const Steinberg::FIDString kSendCount = "sendcount"; ///< (R) send count [int] | ||
const Steinberg::FIDString kSendLevel = "sendlevel"; ///< (R/W) send level factor, index is appended to id (e.g. "sendlevel0" for first), also available as string | ||
const Steinberg::FIDString kMaxSendLevel = "maxSendlevel"; ///< (R) maximum send level factor, also available as string | ||
|
||
// global | ||
const Steinberg::FIDString kActiveDocumentID = "activeDocumentID"; ///< (R) active document identifier, use to get identity of the active document (string) | ||
const Steinberg::FIDString kDocumentID = "documentID"; ///< (R) document identifier, use to compare identity (string) | ||
const Steinberg::FIDString kDocumentName = "documentName"; ///< (R) document name, can be displayed to user (string) | ||
const Steinberg::FIDString kDocumentFolder = "documentFolder"; ///< (R) document folder (string) | ||
const Steinberg::FIDString kAudioFolder = "audioFolder"; ///< (R) folder for audio files (string) | ||
const Steinberg::FIDString kIndexMode = "indexMode"; ///< (R) channel index mode (default is flat, see ChannelIndexMode enumeration) | ||
} | ||
|
||
} // namespace Presonus | ||
|
||
#include "pluginterfaces/base/falignpop.h" | ||
|
||
#endif // _ipslcontextinfo_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
//************************************************************************************************ | ||
// | ||
// PreSonus Plug-In Extensions | ||
// Written and placed in the PUBLIC DOMAIN by PreSonus Software Ltd. | ||
// | ||
// Filename : ipsleditcontroller.h | ||
// Created by : PreSonus Software Ltd., 02/2017, last updated 10/2017 | ||
// Description : Plug-in Edit Controller Extension Interface | ||
// | ||
//************************************************************************************************ | ||
/* | ||
DISCLAIMER: | ||
PreSonus Plug-In Extensions are host-specific extensions of existing proprietary technologies, | ||
provided to the community on an AS IS basis. They are not part of any official 3rd party SDK and | ||
PreSonus is not affiliated with the owner of the underlying technology in any way. | ||
*/ | ||
//************************************************************************************************ | ||
|
||
#ifndef _ipsleditcontroller_h | ||
#define _ipsleditcontroller_h | ||
|
||
#include "pluginterfaces/vst/vsttypes.h" | ||
#include "pluginterfaces/base/funknown.h" | ||
#include "pluginterfaces/base/falignpush.h" | ||
|
||
namespace Steinberg { | ||
namespace Vst { | ||
class IEditController; }} | ||
|
||
namespace Presonus { | ||
|
||
/** @defgroup editController Edit Controller Extensions */ | ||
|
||
/** Parameter extra flags. Used with IEditControllerExtra. @ingroup editController */ | ||
enum ParamExtraFlags | ||
{ | ||
kParamFlagMicroEdit = 1<<0 ///< parameter should be displayed in host micro view | ||
}; | ||
|
||
/** Automation mode. Used with IEditControllerExtra. @ingroup editController */ | ||
enum AutomationMode | ||
{ | ||
kAutomationNone = 0, ///< no automation data available | ||
kAutomationOff, ///< data available, but mode is set to off | ||
kAutomationRead, ///< data + read mode | ||
kAutomationTouch, ///< data + touch mode | ||
kAutomationLatch, ///< data + latch mode | ||
kAutomationWrite ///< data + write mode | ||
}; | ||
|
||
/** Slave mode. Used with ISlaveControllerHandler. @ingroup editController */ | ||
enum SlaveMode | ||
{ | ||
kSlaveModeNormal, ///< plug-in used in different location following given master | ||
kSlaveModeLowLatencyClone ///< plug-in used as hidden slave for low latency processing following given master | ||
}; | ||
|
||
//************************************************************************************************ | ||
// IEditControllerExtra | ||
/** Extension to Steinberg::Vst::IEditController with additonal flags and notifications | ||
not available in the standard edit controller interface. | ||
@ingroup editController */ | ||
//************************************************************************************************ | ||
|
||
struct IEditControllerExtra: Steinberg::FUnknown | ||
{ | ||
/** Get extra flags for given parameter (see ParamExtraFlags). */ | ||
virtual Steinberg::int32 PLUGIN_API getParamExtraFlags (Steinberg::Vst::ParamID id) = 0; | ||
|
||
/** Set automation mode for given parameter (see AutomationMode). */ | ||
virtual Steinberg::tresult PLUGIN_API setParamAutomationMode (Steinberg::Vst::ParamID id, Steinberg::int32 automationMode) = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (IEditControllerExtra, 0x50553fd9, 0x1d2c4c24, 0xb410f484, 0xc5fb9f3f) | ||
|
||
//************************************************************************************************ | ||
// ISlaveControllerHandler | ||
/** Extension to Steinberg::Vst::IEditController used to notify the plug-in about slave instances. | ||
The host might decide to use "cloned" (slave) instances in various scenarios, e.g. to process | ||
audio paths with different latencies simultaneously or to synchronize grouped plug-in instances | ||
between multiple mixer channels - see SlaveMode. In this case multiple plug-in instances are active | ||
at the same time even though it looks like one to the user, i.e. only the editor of the master | ||
instance is visible and can be used to change parameters. The edit controller implementation has | ||
to synchronize parameter changes between instances that aren't visible to the host internally. | ||
@ingroup editController */ | ||
//************************************************************************************************ | ||
|
||
struct ISlaveControllerHandler: Steinberg::FUnknown | ||
{ | ||
/** Add slave edit controller. Implementation must sync non-automatable parameters between | ||
this instance (master) and given slave instance internally, i.e. when the master (this) | ||
changes update all connected slaves. | ||
*/ | ||
virtual Steinberg::tresult PLUGIN_API addSlave (Steinberg::Vst::IEditController* slave, Steinberg::int32 slaveMode) = 0; | ||
|
||
/** Remove slave edit controller. */ | ||
virtual Steinberg::tresult PLUGIN_API removeSlave (Steinberg::Vst::IEditController* slave) = 0; | ||
|
||
static const Steinberg::FUID iid; | ||
}; | ||
|
||
DECLARE_CLASS_IID (ISlaveControllerHandler, 0xd93894bd, 0x67454c29, 0x977ae2f5, 0xdb380434) | ||
|
||
} // namespace Presonus | ||
|
||
#include "pluginterfaces/base/falignpop.h" | ||
|
||
#endif // _ipsleditcontroller_h |
Oops, something went wrong.