All files: The great namespace purge

nix
Owen Green 7 years ago
parent 52bafc0184
commit 6660cb53dc

@ -18,7 +18,7 @@
//static InterfaceTable *ft;
namespace fluid {
namespace sc{
namespace wrapper{
/**
A descendent of SndBuf that will populate itself
from the NRT mirror buffers given a world and a bufnum
@ -37,7 +37,7 @@ namespace sc{
};
/**
A combination of SndBuf and parameter::BufferAdaptor (which, in turn, exposes FluidTensorView<float,2>), for simple transfer of data
A combination of SndBuf and client::BufferAdaptor (which, in turn, exposes FluidTensorView<float,2>), for simple transfer of data
Given a World* and a buffer number, this will populate its SndBuf stuff
from the NRT mirror buffers, and create a FluidTensorView wrapper of
@ -50,7 +50,7 @@ namespace sc{
nSamps = rows
nChans = columns
**/
class SCBufferView: public NRTBuf, public parameter::BufferAdaptor
class SCBufferView: public NRTBuf, public client::BufferAdaptor
{
public:
SCBufferView() = delete;
@ -153,7 +153,7 @@ namespace sc{
size_t mRank = 1;
};
class RTBufferView: public parameter::BufferAdaptor
class RTBufferView: public client::BufferAdaptor
{
public:
RTBufferView(World* world, int bufnum): mWorld(world), mBufnum(bufnum) {}
@ -233,7 +233,7 @@ namespace sc{
class NRTCommandBase{
using param_type = fluid::parameter::Instance;
using param_type = fluid::client::Instance;
public:
NRTCommandBase() = delete;
NRTCommandBase(NRTCommandBase&) = delete;
@ -312,7 +312,7 @@ namespace sc{
}
cmd << ", ";
if (d.getType() == parameter::Type::kBuffer) {
if (d.getType() == client::Type::kBuffer) {
if (count == 0)
cmd << d.getName() << ".bufnum";
else
@ -328,7 +328,7 @@ namespace sc{
ss << ";\n\n\t\tserver = server ? Server.default\n;" ;
if (Client::getParamDescriptors()[0].getType() ==
parameter::Type::kBuffer) {
client::Type::kBuffer) {
ss << "if("<<Client::getParamDescriptors()[0].getName()
<< ".bufnum.isNil) {Error(\"Invalid Buffer\").format(thisMethod.name, this.class.name).throw};\n\n";
}
@ -347,12 +347,12 @@ namespace sc{
NRT_Plug* cmd = new NRT_Plug(inUserData);
//Iterate over parameter descriptions associated with this client object, fill with data from language side
// std::vector<parameter::Instance> params = NRT_Plug::client_type::newParameterSet();
// std::vector<client::Instance> params = NRT_Plug::client_type::newParameterSet();
for (auto&& p: cmd->parameters())
{
switch(p.getDescriptor().getType())
{
case parameter::Type::kBuffer: {
case client::Type::kBuffer: {
long bufnum = static_cast<long>(args->geti());
if (bufnum >= 0) {
SCBufferView *buf = new SCBufferView(bufnum, inWorld);
@ -360,11 +360,11 @@ namespace sc{
}
break;
}
case parameter::Type::kLong: {
case client::Type::kLong: {
p.setLong(static_cast<long>(args->geti()));
break;
}
case parameter::Type::kFloat: {
case client::Type::kFloat: {
p.setFloat(args->getf());
break;
}
@ -388,14 +388,14 @@ namespace sc{
cmd->runCommand(inWorld, replyAddr, completionMsgData, completionMsgSize);
}
} //namespace sc
} //namespace wrapper
}//namespace fluid
template <typename NRT_Plug,typename NRT_Client>
void registerCommand(InterfaceTable* ft, const char* name)
{
PlugInCmdFunc cmd = fluid::sc::command<NRT_Plug>;
PlugInCmdFunc cmd = fluid::wrapper::command<NRT_Plug>;
(*ft->fDefinePlugInCmd)(name,cmd,nullptr);
}

@ -12,12 +12,12 @@
static InterfaceTable *ft;
namespace fluid {
namespace sc{
namespace wrapper{
class BufCompose: public NRTCommandBase
{
public:
using client_type = buf::BufferComposeClient;
using client_type = client::BufferComposeClient;
using NRTCommandBase::NRTCommandBase;
~BufCompose() {}
@ -55,7 +55,7 @@ namespace fluid {
return true;
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return bufferCompose.getParams();
}
@ -63,12 +63,12 @@ namespace fluid {
client_type bufferCompose;
client_type::ProcessModel mModel;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufCompose,fluid:: buf::BufferComposeClient>(ft, "BufCompose");
fluid::sc::printCmd<fluid::buf::BufferComposeClient>(ft,"BufCompose","FDCompose");
registerCommand<fluid::wrapper::BufCompose,fluid:: client::BufferComposeClient>(ft, "BufCompose");
fluid::wrapper::printCmd<fluid::client::BufferComposeClient>(ft,"BufCompose","FDCompose");
}

@ -17,7 +17,7 @@ using fluid::FluidTensor;
using fluid::FluidTensorView;
namespace fluid {
namespace sc{
namespace wrapper{
class BufHPSS: public NRTCommandBase
{
@ -34,7 +34,7 @@ namespace fluid {
 fft size
*/
public:
using client_type = hpss::HPSSClient;
using client_type = client::HPSSClient;
using NRTCommandBase::NRTCommandBase;
~BufHPSS() {}
@ -48,7 +48,7 @@ namespace fluid {
{
//sanity check the parameters
bool parametersOk;
hpss::HPSSClient::ProcessModel processModel;
client::HPSSClient::ProcessModel processModel;
std::string whatHappened;//this will give us a message to pass back if param check fails
std::tie(parametersOk,whatHappened,processModel) = processor.sanityCheck();
if(!parametersOk)
@ -82,20 +82,20 @@ namespace fluid {
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return processor.getParams();
}
private:
hpss::HPSSClient processor;
hpss::HPSSClient::ProcessModel mModel;
client::HPSSClient processor;
client::HPSSClient::ProcessModel mModel;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufHPSS,fluid::hpss::HPSSClient>(ft, "BufHPSS");
fluid::sc::printCmd<fluid::hpss::HPSSClient>(ft,"BufHPSS","FDHPSS");
registerCommand<fluid::wrapper::BufHPSS,fluid::client::HPSSClient>(ft, "BufHPSS");
fluid::wrapper::printCmd<fluid::client::HPSSClient>(ft,"BufHPSS","FDHPSS");
}

@ -19,10 +19,10 @@ static InterfaceTable *ft;
//Using statements for fluidtensor
using fluid::FluidTensor;
using fluid::FluidTensorView;
using fluid::nmf::NMFClient;
using fluid::client::NMFClient;
namespace fluid {
namespace sc{
namespace wrapper{
class BufNMF: public NRTCommandBase
{
@ -81,10 +81,10 @@ namespace fluid {
nmf.process(processModel);
mModel = processModel;
src = static_cast<SCBufferView*>(parameter::lookupParam("src", nmf.getParams()).getBuffer());
resynth = static_cast<SCBufferView*>(parameter::lookupParam("resynthbuf", nmf.getParams()).getBuffer());
dict = static_cast<SCBufferView*>(parameter::lookupParam("filterbuf", nmf.getParams()).getBuffer());
act = static_cast<SCBufferView*>(parameter::lookupParam("envbuf", nmf.getParams()).getBuffer());
src = static_cast<SCBufferView*>(client::lookupParam("src", nmf.getParams()).getBuffer());
resynth = static_cast<SCBufferView*>(client::lookupParam("resynthbuf", nmf.getParams()).getBuffer());
dict = static_cast<SCBufferView*>(client::lookupParam("filterbuf", nmf.getParams()).getBuffer());
act = static_cast<SCBufferView*>(client::lookupParam("envbuf", nmf.getParams()).getBuffer());
return true;
}
@ -113,7 +113,7 @@ namespace fluid {
return true;
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return nmf.getParams();
}
@ -125,11 +125,11 @@ namespace fluid {
SCBufferView* dict;
SCBufferView* act;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufNMF,fluid::nmf::NMFClient>(ft, "BufNMF");
registerCommand<fluid::wrapper::BufNMF,fluid::client::NMFClient>(ft, "BufNMF");
}

@ -13,12 +13,12 @@
static InterfaceTable *ft;
namespace fluid {
namespace sc{
namespace wrapper{
class BufNoveltySlice: public NRTCommandBase
{
public:
using client_type = segmentation::NoveltyClient;
using client_type = client::NoveltyClient;
using NRTCommandBase::NRTCommandBase;
~BufNoveltySlice() {}
@ -56,7 +56,7 @@ namespace fluid {
return true;
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return trans.getParams();
}
@ -64,12 +64,12 @@ namespace fluid {
client_type trans;
client_type::ProcessModel mModel;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufNoveltySlice,fluid::segmentation::NoveltyClient>(ft, "BufNoveltySlice");
fluid::sc::printCmd<fluid::segmentation::NoveltyClient>(ft,"BufNoveltySlice","FluidBufNoveltySlice");
registerCommand<fluid::wrapper::BufNoveltySlice,fluid::client::NoveltyClient>(ft, "BufNoveltySlice");
fluid::wrapper::printCmd<fluid::client::NoveltyClient>(ft,"BufNoveltySlice","FluidBufNoveltySlice");
}

@ -17,7 +17,7 @@ using fluid::FluidTensor;
using fluid::FluidTensorView;
namespace fluid {
namespace sc{
namespace wrapper{
class BufSines: public NRTCommandBase
{
@ -39,7 +39,7 @@ namespace fluid {
 fft size
*/
public:
using client_type = stn::SinesClient;
using client_type = client::SinesClient;
using NRTCommandBase::NRTCommandBase;
~BufSines() {}
@ -53,7 +53,7 @@ namespace fluid {
{
//sanity check the parameters
bool parametersOk;
stn::SinesClient::ProcessModel processModel;
client::SinesClient::ProcessModel processModel;
std::string whatHappened;//this will give us a message to pass back if param check fails
std::tie(parametersOk,whatHappened,processModel) = processor.sanityCheck();
if(!parametersOk)
@ -80,20 +80,20 @@ namespace fluid {
return true;
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return processor.getParams();
}
private:
stn::SinesClient processor;
stn::SinesClient::ProcessModel mModel;
client::SinesClient processor;
client::SinesClient::ProcessModel mModel;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufSines,fluid::stn::SinesClient>(ft, "BufSines");
fluid::sc::printCmd<fluid::stn::SinesClient>(ft,"BufSines","FDSines");
registerCommand<fluid::wrapper::BufSines,fluid::client::SinesClient>(ft, "BufSines");
fluid::wrapper::printCmd<fluid::client::SinesClient>(ft,"BufSines","FDSines");
}

@ -14,12 +14,12 @@
static InterfaceTable *ft;
namespace fluid {
namespace sc{
namespace wrapper{
class BufTransientsSlice: public NRTCommandBase
{
public:
using client_type = segmentation::TransientSliceNRT;
using client_type = client::TransientSliceNRT;
using NRTCommandBase::NRTCommandBase;
~BufTransientsSlice() {}
@ -58,7 +58,7 @@ namespace fluid {
return true;
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return trans.getParams();
}
@ -66,12 +66,12 @@ namespace fluid {
client_type trans;
client_type::ProcessModel mModel;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufTransientsSlice,fluid::segmentation::TransientSliceNRT>(ft, "BufTransientSlice");
fluid::sc::printCmd<fluid::segmentation::TransientSliceNRT>(ft,"BufTransientsSlice","FluidBufTransientSlice");
registerCommand<fluid::wrapper::BufTransientsSlice,fluid::client::TransientSliceNRT>(ft, "BufTransientSlice");
fluid::wrapper::printCmd<fluid::client::TransientSliceNRT>(ft,"BufTransientsSlice","FluidBufTransientSlice");
}

@ -12,12 +12,12 @@
static InterfaceTable *ft;
namespace fluid {
namespace sc{
namespace wrapper{
class BufTransients: public NRTCommandBase
{
public:
using client_type = str::TransientNRTClient;
using client_type = client::TransientNRTClient;
using NRTCommandBase::NRTCommandBase;
~BufTransients() {}
@ -62,7 +62,7 @@ namespace fluid {
return true;
}
std::vector<parameter::Instance>& parameters()
std::vector<client::Instance>& parameters()
{
return trans.getParams();
}
@ -70,12 +70,12 @@ namespace fluid {
client_type trans;
client_type::ProcessModel mModel;
};//class
} //namespace sc
} //namespace wrapper
}//namespace fluid
PluginLoad(OfflineFluidDecompositionUGens) {
ft = inTable;
registerCommand<fluid::sc::BufTransients,fluid::str::TransientNRTClient>(ft, "BufTransients");
fluid::sc::printCmd<fluid::str::TransientNRTClient>(ft,"BufTransients","FDTransients");
registerCommand<fluid::wrapper::BufTransients,fluid::client::TransientNRTClient>(ft, "BufTransients");
fluid::wrapper::printCmd<fluid::client::TransientNRTClient>(ft,"BufTransients","FDTransients");
}

@ -10,7 +10,7 @@ static InterfaceTable *ft;
namespace fluid {
class FDGain: public SCUnit
{
using AudioClient = fluid::audio::GainAudioClient<double, float>;
using AudioClient = fluid::client::GainAudioClient<double, float>;
using ClientPointer = std::unique_ptr<AudioClient>;
using SignalWrapper = AudioClient::Signal;
using AudioSignal= AudioClient::AudioSignal;
@ -23,10 +23,10 @@ public:
{
mClient = ClientPointer(new AudioClient(65536));
std::vector<parameter::Instance>& params = mClient->getParams();
std::vector<client::Instance>& params = mClient->getParams();
parameter::lookupParam("winsize", params).setLong(in0(1));
parameter::lookupParam("hopsize", params).setLong(in0(1));
client::lookupParam("winsize", params).setLong(in0(1));
client::lookupParam("hopsize", params).setLong(in0(1));
mClient->setHostBufferSize(bufferSize());
mClient->reset();

@ -7,13 +7,13 @@
static InterfaceTable *ft;
namespace fluid {
namespace hpss{
namespace wrapper{
class FDRTHPSS: public SCUnit
{
using AudioSignalWrapper = hpss::HPSSClient<double, float>::AudioSignal;
using SignalWrapper = hpss::HPSSClient<double, float>::Signal<float>;
using AudioSignalWrapper = client::HPSSClient<double, float>::AudioSignal;
using SignalWrapper = client::HPSSClient<double, float>::Signal<float>;
using SignalPointer = std::unique_ptr<SignalWrapper>;
using ClientPointer = std::unique_ptr<hpss::HPSSClient<double,float>>;
using ClientPointer = std::unique_ptr<client::HPSSClient<double,float>>;
template <size_t N>
using SignalArray = std::array<SignalPointer,N>;
public:
@ -23,7 +23,7 @@ namespace hpss{
//psize hszie pthresh hthresh Window size, Hop size, FFT Size
//Oh NO! Heap allocation! Make client object
mClient = ClientPointer(new hpss::HPSSClient<double,float>(65536));
mClient = ClientPointer(new client::HPSSClient<double,float>(65536));
setParams(true);
@ -61,16 +61,16 @@ namespace hpss{
assert(mClient);
for(size_t i = 0; i < mClient->getParams().size(); ++i)
{
parameter::Instance& p = mClient->getParams()[i];
client::Instance& p = mClient->getParams()[i];
if(!instantiation && p.getDescriptor().instantiation())
continue;
switch(p.getDescriptor().getType())
{
case parameter::Type::kLong:
case client::Type::kLong:
p.setLong(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kFloat: {
case client::Type::kFloat: {
// We need to constrain threshold (normalised) frequency pairs at
// runtime.
@ -78,7 +78,7 @@ namespace hpss{
auto constraint = paramConstraints.find(attrname);
if (constraint != paramConstraints.end()) {
double limit = parameter::lookupParam(constraint->second.param,
double limit = client::lookupParam(constraint->second.param,
mClient->getParams())
.getFloat();
@ -91,7 +91,7 @@ namespace hpss{
p.checkRange();
}
break;
case parameter::Type::kBuffer:
case client::Type::kBuffer:
// p.setBuffer( in0(i+1));
break;
default:
@ -134,7 +134,7 @@ namespace hpss{
PluginLoad(FluidSTFTUGen) {
ft = inTable;
registerUnit<fluid::hpss::FDRTHPSS>(ft, "FluidHPSS");
registerUnit<fluid::wrapper::FDRTHPSS>(ft, "FluidHPSS");
}

@ -13,7 +13,7 @@ namespace fluid {
namespace nmf{
class FDNMFMatch: public SCUnit
{
using Client = NMFMatch<double,float>;
using Client = client::NMFMatch<double,float>;
using AudioSignalWrapper = Client::AudioSignal;
using SignalWrapper = Client::Signal<float>;
using SignalPointer = std::unique_ptr<SignalWrapper>;
@ -45,7 +45,7 @@ namespace nmf{
return;
}
mRank = parameter::lookupParam("rank", mClient->getParams()).getLong();
mRank = client::lookupParam("rank", mClient->getParams()).getLong();
mClient->setHostBufferSize(bufferSize());
@ -71,27 +71,27 @@ namespace nmf{
assert(mClient);
for(size_t i = 0; i < mClient->getParams().size(); ++i)
{
parameter::Instance& p = mClient->getParams()[i];
client::Instance& p = mClient->getParams()[i];
if(!instantiation && p.getDescriptor().instantiation())
continue;
switch(p.getDescriptor().getType())
{
case parameter::Type::kLong:
case client::Type::kLong:
p.setLong(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kFloat: {
case client::Type::kFloat: {
p.setFloat(in0(i + 1));
p.checkRange();
}
break;
case parameter::Type::kBuffer: {
case client::Type::kBuffer: {
long bufnum = static_cast<long>(in0(i+1));
sc::RTBufferView* currentBuf = static_cast<sc::RTBufferView*>(p.getBuffer());
wrapper::RTBufferView* currentBuf = static_cast<wrapper::RTBufferView*>(p.getBuffer());
if(bufnum >= 0 && (currentBuf? (currentBuf->bufnum() != bufnum) : true)){
sc::RTBufferView* buf = new sc::RTBufferView(mWorld,bufnum);
wrapper::RTBufferView* buf = new wrapper::RTBufferView(mWorld,bufnum);
p.setBuffer(buf);
}
break;

@ -12,8 +12,8 @@ namespace fluid {
class FDSTFTPass: public SCUnit
{
using AudioSignalWrapper = audio::BaseSTFTClient<double, float>::AudioSignal;
using SignalWrapper = audio::BaseSTFTClient<double, float>::Signal<float>;
using AudioSignalWrapper = client::BaseSTFTClient<double, float>::AudioSignal;
using SignalWrapper = client::BaseSTFTClient<double, float>::Signal<float>;
// using SignalPointer = std::unique_ptr<signal_wrapper>;
public:
@ -28,7 +28,7 @@ public:
const float fftSize = in0(3);
//Oh NO! Heap allocation! Make client object
mClient = new audio::BaseSTFTClient<double,float>(65536);
mClient = new client::BaseSTFTClient<double,float>(65536);
mClient->getParams()[0].setLong(windowSize);
mClient->getParams()[1].setLong(hopSize);
mClient->getParams()[2].setLong(fftSize);
@ -75,7 +75,7 @@ private:
mClient->doProcess(std::begin(inputSignals),std::end(inputSignals),std::begin(outputSignals), std::end(outputSignals),numsamples,1,1);
}
audio::BaseSTFTClient<double, float> *mClient;
client::BaseSTFTClient<double, float> *mClient;
SignalWrapper *inputSignals[1];
SignalWrapper *outputSignals[1];
};

@ -7,11 +7,11 @@
static InterfaceTable *ft;
namespace fluid {
namespace stn{
namespace wrapper{
class FDRTSines: public SCUnit
{
using AudioSignalWrapper = stn::SinesClient<double, float>::AudioSignal;
using SignalWrapper = stn::SinesClient<double, float>::Signal<float>;
using AudioSignalWrapper = client::SinesClient<double, float>::AudioSignal;
using SignalWrapper = client::SinesClient<double, float>::Signal<float>;
// using SignalPointer = std::unique_ptr<signal_wrapper>;
public:
@ -31,7 +31,7 @@ namespace stn{
//
//Oh NO! Heap allocation! Make client object
mClient = new stn::SinesClient<double,float>(65536);
mClient = new client::SinesClient<double,float>(65536);
setParams(true);
// m_client->getParams()[0].setLong(pfilter_size);
@ -81,22 +81,22 @@ namespace stn{
assert(mClient);
for(size_t i = 0; i < mClient->getParams().size(); ++i)
{
parameter::Instance& p = mClient->getParams()[i];
client::Instance& p = mClient->getParams()[i];
if(!instantiation && p.getDescriptor().instantiation())
continue;
switch(p.getDescriptor().getType())
{
case parameter::Type::kLong:
case client::Type::kLong:
p.setLong(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kFloat:
case client::Type::kFloat:
p.setFloat(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kBuffer:
case client::Type::kBuffer:
// p.setBuffer( in0(i+1));
break;
default:
@ -117,7 +117,7 @@ namespace stn{
mClient->doProcess(std::begin(inputSignals),std::end(inputSignals),std::begin(outputSignals), std::end(outputSignals),numsamples,1,2);
}
stn::SinesClient<double, float> *mClient;
client::SinesClient<double, float> *mClient;
SignalWrapper *inputSignals[1];
SignalWrapper *outputSignals[2];
};
@ -126,6 +126,6 @@ namespace stn{
PluginLoad(FluidSTFTUGen) {
ft = inTable;
registerUnit<fluid::stn::FDRTSines>(ft, "FluidSines");
registerUnit<fluid::wrapper::FDRTSines>(ft, "FluidSines");
}

@ -10,7 +10,7 @@ namespace fluid {
namespace segmentation{
class FluidSliceTransients: public SCUnit
{
using audio_client = TransientsSlice<double, float>;
using audio_client = client::TransientsSlice<double, float>;
using AudioSignalWrapper = audio_client::AudioSignal;
using SignalWrapper = audio_client::Signal<float>;
@ -59,22 +59,22 @@ namespace segmentation{
assert(mClient);
for(size_t i = 0; i < mClient->getParams().size(); ++i)
{
parameter::Instance& p = mClient->getParams()[i];
client::Instance& p = mClient->getParams()[i];
if(!instantiation && p.getDescriptor().instantiation())
continue;
switch(p.getDescriptor().getType())
{
case parameter::Type::kLong:
case client::Type::kLong:
p.setLong(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kFloat:
case client::Type::kFloat:
p.setFloat(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kBuffer:
case client::Type::kBuffer:
// p.setBuffer( in0(i+1));
break;
default:

@ -7,11 +7,11 @@
static InterfaceTable *ft;
namespace fluid {
namespace stn{
namespace wrapper{
class FluidTransients: public SCUnit
{
using AudioSignalWrapper = stn::TransientsClient<double, float>::AudioSignal;
using SignalWrapper = stn::TransientsClient<double, float>::Signal<float>;
using AudioSignalWrapper = client::TransientsClient<double, float>::AudioSignal;
using SignalWrapper = client::TransientsClient<double, float>::Signal<float>;
// using SignalPointer = std::unique_ptr<signal_wrapper>;
public:
@ -31,7 +31,7 @@ namespace stn{
//
//Oh NO! Heap allocation! Make client object
mClient = new stn::TransientsClient<double,float>(65536);
mClient = new client::TransientsClient<double,float>(65536);
setParams(true);
// mClient->geParams()[0].setLong(pfilter_size);
@ -80,22 +80,22 @@ namespace stn{
assert(mClient);
for(size_t i = 0; i < mClient->getParams().size(); ++i)
{
parameter::Instance& p = mClient->getParams()[i];
client::Instance& p = mClient->getParams()[i];
if(!instantiation && p.getDescriptor().instantiation())
continue;
switch(p.getDescriptor().getType())
{
case parameter::Type::kLong:
case client::Type::kLong:
p.setLong(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kFloat:
case client::Type::kFloat:
p.setFloat(in0(i + 1));
p.checkRange();
break;
case parameter::Type::kBuffer:
case client::Type::kBuffer:
// p.setBuffer( in0(i+1));
break;
default:
@ -116,7 +116,7 @@ namespace stn{
mClient->doProcess(std::begin(inputSignals),std::end(inputSignals),std::begin(outputSignals), std::end(outputSignals),numsamples,1,2);
}
stn::TransientsClient<double, float> *mClient;
client::TransientsClient<double, float> *mClient;
SignalWrapper *inputSignals[1];
SignalWrapper *outputSignals[2];
};
@ -125,5 +125,5 @@ namespace stn{
PluginLoad(FluidSTFTUGen) {
ft = inTable;
registerUnit<fluid::stn::FluidTransients>(ft, "FluidTransients");
registerUnit<fluid::wrapper::FluidTransients>(ft, "FluidTransients");
}

Loading…
Cancel
Save