The wrapper now takes care of processing type - all objects updated to fit the new design

nix
Alex Harker 7 years ago
parent 6d9e9d3ffe
commit 481dd955ba

@ -260,13 +260,13 @@ protected:
template <typename Client, typename Wrapper> template <typename Client, typename Wrapper>
class NonRealTime class NonRealTime
{ {
using Params = typename Client::Params; using ParamSetType = typename Client::ParamSetType;
public: public:
static void setup(InterfaceTable *ft, const char *name) { DefinePlugInCmd(name, launch, nullptr); } static void setup(InterfaceTable *ft, const char *name) { DefinePlugInCmd(name, launch, nullptr); }
NonRealTime(World *world, sc_msg_iter *args) NonRealTime(World *world, sc_msg_iter *args)
: mParams{*Wrapper::getParamDescriptors()} : mParams{Client::getParameterDescriptor()}
, mClient{mParams} , mClient{mParams}
{} {}
@ -275,10 +275,10 @@ public:
static void launch(World *world, void *inUserData, struct sc_msg_iter *args, void *replyAddr) static void launch(World *world, void *inUserData, struct sc_msg_iter *args, void *replyAddr)
{ {
if (args->tags && ((std::string{args->tags}.size() - 1) != Wrapper::getParamDescriptors()->count())) if (args->tags && ((std::string{args->tags}.size() - 1) != Client::getParameterDescriptor().count()))
{ {
std::cout << "ERROR: " << Wrapper::getName() << " wrong number of arguments. Expected " std::cout << "ERROR: " << Wrapper::getName() << " wrong number of arguments. Expected "
<< Wrapper::getParamDescriptors()->count() << ", got " << (std::string{args->tags}.size() - 1) << Client::getParameterDescriptor().count() << ", got " << (std::string{args->tags}.size() - 1)
<< ". Your .sc file and binary plugin might be different versions." << std::endl; << ". Your .sc file and binary plugin might be different versions." << std::endl;
return; return;
} }
@ -314,8 +314,8 @@ public:
static void destroy(World *world, void *data) { delete static_cast<Wrapper *>(data); } static void destroy(World *world, void *data) { delete static_cast<Wrapper *>(data); }
protected: protected:
ParameterSet<Params> mParams; ParamSetType mParams;
Client mClient; Client mClient;
private: private:
static Result validateParameters(NonRealTime *w, World *world, sc_msg_iter *args) static Result validateParameters(NonRealTime *w, World *world, sc_msg_iter *args)
@ -470,10 +470,10 @@ public:
} }
}; };
template <class Client> template <template<typename T> class Client>
void makeSCWrapper(const char *name, InterfaceTable *ft) void makeSCWrapper(const char *name, InterfaceTable *ft)
{ {
FluidSCWrapper<Client>::setup(ft, name); FluidSCWrapper<Client<float>>::setup(ft, name);
} }
} // namespace client } // namespace client

@ -1,3 +1,4 @@
// A tool from the FluCoMa project, funded by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899) // A tool from the FluCoMa project, funded by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899)
#include <clients/nrt/BufferComposeNRT.hpp> #include <clients/nrt/BufferComposeNRT.hpp>
@ -5,10 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<BufferComposeClient, float,float>("BufCompose", BufComposeParams, ft); makeSCWrapper<BufferComposeClient>("BufCompose", ft);
// registerCommand<fluid::wrapper::BufCompose,fluid:: client::BufferComposeClient>(ft, "BufCompose");
// fluid::wrapper::printCmd<fluid::client::BufferComposeClient>(ft,"BufCompose","FDCompose");
} }

@ -1,4 +1,5 @@
// FD_BufHPSS, an NRT buffer HPSS Processor
// FD_BufHPSS, an NRT buffer HPSS Processor
// A tool from the FluCoMa project, funded by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899) // A tool from the FluCoMa project, funded by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant agreement No 725899)
#include <clients/rt/HPSSClient.hpp> #include <clients/rt/HPSSClient.hpp>
@ -6,8 +7,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NRTHPSS,double,float>("BufHPSS",NRTHPSSParams,ft); makeSCWrapper<NRTHPSS>("BufHPSS", ft);
} }

@ -1,10 +1,12 @@
#include <clients/nrt/NMFClient.hpp> #include <clients/nrt/NMFClient.hpp>
#include <FluidSCWrapper.hpp> #include <FluidSCWrapper.hpp>
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NMFClient,double,float>("BufNMF",NMFParams, ft); makeSCWrapper<NMFClient>("BufNMF", ft);
} }

@ -7,8 +7,9 @@
static InterfaceTable* ft; static InterfaceTable* ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NoveltyClient,double,float>("BufNoveltySlice",NoveltyParams,ft); makeSCWrapper<NoveltyClient>("BufNoveltySlice", ft);
} }

@ -7,9 +7,10 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NRTSines,double,float>("BufSines",NRTSineParams,ft); makeSCWrapper<NRTSines>("BufSines", ft);
} }

@ -10,5 +10,5 @@ static InterfaceTable* ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NRTTransientSlice,double,float>("BufTransientSlice",NRTTransientSliceParams, ft); makeSCWrapper<NRTTransientSlice>("BufTransientSlice", ft);
} }

@ -1,11 +1,13 @@
#include <clients/nrt/FluidNRTClientWrapper.hpp> #include <clients/nrt/FluidNRTClientWrapper.hpp>
#include <clients/rt/TransientClient.hpp> #include <clients/rt/TransientClient.hpp>
#include <FluidSCWrapper.hpp> #include <FluidSCWrapper.hpp>
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens) { PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NRTTransients,double,float>("BufTransients",NRTTransientParams,ft); makeSCWrapper<NRTTransients>("BufTransients", ft);
} }

@ -6,8 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidGainUgen) { PluginLoad(FluidGainUgen)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<GainClient<float>>("FluidGain", ft); makeSCWrapper<GainClient>("FluidGain", ft);
} }

@ -6,12 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidSTFTUGen) { PluginLoad(FluidSTFTUGen)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<HPSSClient<float>>("FluidHPSS", ft); makeSCWrapper<HPSSClient>("FluidHPSS", ft);
} }

@ -6,12 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidSTFTUGen) { PluginLoad(FluidSTFTUGen)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<NMFMatch<float>>("FluidNMFMatch", ft); makeSCWrapper<NMFMatch>("FluidNMFMatch", ft);
} }

@ -6,8 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidSTFTUGen) { PluginLoad(FluidSTFTUGen)
ft = inTable; {
ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<BaseSTFTClient<float>>("FluidSTFTPass", ft); makeSCWrapper<BaseSTFTClient>("FluidSTFTPass", ft);
} }

@ -6,9 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidSTFTUGen) { PluginLoad(FluidSTFTUGen)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<SinesClient<float>>("FluidSines", ft); makeSCWrapper<SinesClient>("FluidSines", ft);
} }

@ -6,8 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidSTFTUGen) { PluginLoad(FluidSTFTUGen)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<TransientsSlice<float>>("FluidTransientSlice",ft); makeSCWrapper<TransientsSlice>("FluidTransientSlice", ft);
} }

@ -6,8 +6,9 @@
static InterfaceTable *ft; static InterfaceTable *ft;
PluginLoad(FluidSTFTUGen) { PluginLoad(FluidSTFTUGen)
{
ft = inTable; ft = inTable;
using namespace fluid::client; using namespace fluid::client;
makeSCWrapper<TransientClient<float>>("FluidTransients", ft); makeSCWrapper<TransientClient>("FluidTransients", ft);
} }

Loading…
Cancel
Save