75 template<
typename T,
size_t N>
87 template<
typename T,
size_t N>
99 template<
typename T,
size_t N>
104 virtual tresult
init();
186 tresult
addRawParameter(std::unique_ptr<RTRawVstParameter> iParameter);
246 std::unique_ptr<RTRawVstParameter> rtParam{rawPtr};
263template<
typename T,
size_t N>
277 std::unique_ptr<IRTJmbOutParameter> rtParam{rawPtr};
285template<
typename T,
size_t N>
299 std::unique_ptr<IRTJmbInParameter> rtParam{rawPtr};
308template<
typename T,
size_t N>
This is the lock free version of the AtomicValue.
Definition Concurrent.h:331
This is the lock free version of the SingleElementQueue.
Definition Concurrent.h:162
This helper class is used to display the parameters (vst/jmb) WARNING: this class is allocating memor...
Definition ParamDisplay.h:33
Interface defining a message handler.
Definition MessageHandler.h:32
Abstraction for allocating and sending a message.
Definition MessageProducer.h:34
Simple implementation of IMessageHandler which will delegate the message handling based on MessageID.
Definition MessageHandler.h:41
Simple wrapper class with better api.
Definition Messaging.h:43
Used to communicate the state between the UI and the RT and read/write to stream.
Definition NormalizedState.h:39
This is the class that maintains all the registered parameters.
Definition Parameters.h:41
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition RTJmbInParameter.h:142
Templated class for RT Jamba Inbound parameter.
Definition RTJmbInParameter.h:72
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition RTJmbOutParameter.h:171
Templated class for RT Jamba parameter.
Definition RTJmbOutParameter.h:71
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition RTParameter.h:277
bool isMessagingEnabled() const
Definition RTState.h:148
RTState(Parameters const &iParameters)
Definition RTState.cpp:27
std::map< ParamID, std::unique_ptr< IRTJmbInParameter > > fInboundMessagingParameters
Definition RTState.h:176
tresult addInboundMessagingParameter(std::unique_ptr< IRTJmbInParameter > iParameter)
Definition RTState.cpp:117
tresult handleMessage(Message const &iMessage) override
Called by the UI thread (from RTProcessor) to handle messages.
Definition RTState.cpp:369
virtual bool beforeProcessing()
This method should be call at the beginning of the process(ProcessData &data) method before doing any...
Definition RTState.cpp:275
tresult addOutboundMessagingParameter(std::unique_ptr< IRTJmbOutParameter > iParameter)
Definition RTState.cpp:82
std::map< ParamID, std::unique_ptr< IRTJmbOutParameter > > fOutboundMessagingParameters
Definition RTState.h:173
std::vector< ParamID > const & getAllRegistrationOrder() const
Definition RTState.h:160
virtual void afterProcessing()
This method should be called at the end of process(ProcessData &data) method.
Definition RTState.cpp:308
virtual tresult sendPendingMessages(IMessageProducer *iMessageProducer)
Called (from a GUI timer) to send the messages to the GUI (JmbParam for the moment).
Definition RTState.cpp:334
virtual tresult writeLatestState(IBStreamer &oStreamer)
This method should be called from Processor::getState to store the latest state to the stream.
Definition RTState.cpp:263
tresult addRawParameter(std::unique_ptr< RTRawVstParameter > iParameter)
Definition RTState.cpp:53
RTJmbInParam< T > addJmbIn(JmbParam< T > iParamDef)
This method should be called to add an rt inbound jmb parameter.
Definition RTState.h:295
virtual int32 getParamUpdateSampleOffset(ProcessData &iData, ParamID iParamID) const
This uses the same algorithm as when the param value is updated (implemented in applyParameterChanges...
Definition RTState.cpp:187
RTRawVstParam add(RawVstParam iParamDef)
This method is called for each parameter managed by RTState.
Definition RTState.cpp:37
Concurrent::LockFree::AtomicValue< NormalizedState > fLatestState
Definition RTState.h:231
Parameters const & fPluginParameters
Definition RTState.h:167
virtual bool resetPreviousValues()
Called from the RT thread from afterProcessing to reset previous values (copy current value to previo...
Definition RTState.cpp:320
std::map< ParamID, std::unique_ptr< RTRawVstParameter > > fVstParameters
Definition RTState.h:170
virtual void afterReadNewState(NormalizedState const *iState)
Gives a chance to subclasses to tweak and/or display the state after being read.
Definition RTState.h:214
std::vector< ParamID > fAllRegistrationOrder
Definition RTState.h:179
MessageHandler fMessageHandler
Definition RTState.h:182
virtual bool onNewState(NormalizedState const *iLatestState)
Called from the RT thread from beforeProcessing to set the new state.
Definition RTState.cpp:291
virtual tresult init()
Call this method after adding all the parameters.
Definition RTState.cpp:377
virtual void beforeWriteNewState(NormalizedState const *iState)
Gives a chance to subclasses to tweak and/or display the state before being written.
Definition RTState.h:218
virtual tresult readNewState(IBStreamer &iStreamer)
This method should be called from Processor::setState to update this state to the state stored in the...
Definition RTState.cpp:247
virtual bool applyParameterChanges(IParameterChanges &inputParameterChanges)
This method should be called in every frame when there are parameter changes to update this state acc...
Definition RTState.cpp:153
void computeLatestState()
Definition RTState.cpp:237
RTJmbOutParam< T > addJmbOut(JmbParam< T > iParamDef)
This method should be called to add an rt outbound jmb parameter.
Definition RTState.h:273
Concurrent::LockFree::SingleElementQueue< NormalizedState > fStateUpdate
Definition RTState.h:227
This is the main class that the plugin should use as it exposes only the necessary methods of the par...
Definition RTParameter.h:195
The typed version.
Definition RTParameter.h:96
Definition ParamDisplay.cpp:29
Definition RTJmbInParameter.h:26
std::array< RTRawVstParam, N > RTRawVstParams
An array of RTRawVstParam.
Definition RTParameter.h:340
std::array< RTJmbInParam< T >, N > RTJmbInParams
An array of RTJmbInParam.
Definition RTJmbInParameter.h:182
std::array< RTVstParam< T >, N > RTVstParams
An array of RTVstParam.
Definition RTParameter.h:267
std::array< RTJmbOutParam< T >, N > RTJmbOutParams
An array of RTJmbOutParam.
Definition RTJmbOutParameter.h:208
std::array< VstParam< T >, N > VstParams
Definition ParamDef.h:513
std::array< JmbParam< T >, N > JmbParams
Definition ParamDef.h:525
std::array< RawVstParam, N > RawVstParams
Definition ParamDef.h:516
std::shared_ptr< JmbParamDef< T > > JmbParam
Definition ParamDef.h:522
std::shared_ptr< VstParamDef< T > > VstParam
Definition ParamDef.h:509
std::shared_ptr< RawVstParamDef > RawVstParam
Definition ParamDef.h:510
constexpr std::array< U, N > transform(std::array< T, N > const &a, F &&f)
Transforms an array containing elements of type T into an array containing elements of type U by appl...
Definition stl.h:49