示例#1
0
ToggleFF::ToggleFF(UGen const& trig) throw()
{
	initInternal(trig.getNumChannels());	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new ToggleFFUGenInternal(trig);		
	}
}
示例#2
0
FSinOsc::FSinOsc(UGen const& freq) throw()
{	
	initInternal(freq.getNumChannels());
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new FSinOscUGenInternal(freq, 0.f, i);
	}
}
示例#3
0
void SkScene::update ()
 {
   if ( !_skeleton ) return;
   if (_needsInit)
	   initInternal();
   const std::vector<SkJoint*>& joints = _skeleton->joints ();
   for (size_t i=0; i<joints.size(); i++ ) update ( i );
 }
示例#4
0
Thru::Thru(Thru_InputsWithTypesOnly) throw()
{
	initInternal(input.getNumChannels());
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new ThruUGenInternal(Thru_InputsNoTypes);
		internalUGens[i]->initValue(input.getValue(i));
	}
}
BlockDelay::BlockDelay(UGen const& input) throw()
{
	int numChannels = input.getNumChannels();
	initInternal(numChannels);
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new BlockDelayUGenInternal(input);
	}
}
示例#6
0
ASR::ASR(const float attackTime, const float sustainLevel, const float releaseTime, const UGen::DoneAction doneAction) throw()
{
	ugen_assert(attackTime >= 0.f);
	ugen_assert(sustainLevel > 0.f);
	ugen_assert(releaseTime >= 0.f);
	
	initInternal(1);
	internalUGens[0] = new ASRUGenInternal(attackTime, sustainLevel, releaseTime, doneAction);
}
示例#7
0
Trig::Trig(UGen const& input) throw()
{
	initInternal(input.getNumChannels());
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new TrigUGenInternal(input);
	}
}
示例#8
0
Error Ssr::init(const ConfigSet& cfg)
{
	Error err = initInternal(cfg);
	if(err)
	{
		ANKI_R_LOGE("Failed to initialize reflection pass");
	}
	return err;
}
MicroSwapchain::MicroSwapchain(SwapchainFactory* factory)
	: m_factory(factory)
{
	ANKI_ASSERT(factory);

	if(initInternal())
	{
		ANKI_VK_LOGF("Error creating the swapchain. Will not try to recover");
	}
}
示例#10
0
Impulse::Impulse(Impulse_InputsWithTypesOnly) throw()
{	
	UGen inputs[] = { Impulse_InputsNoTypes };
	const int numInputChannels = findMaxInputChannels(numElementsInArray(inputs), inputs);
	initInternal(numInputChannels);
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new ImpulseUGenInternal(Impulse_InputsNoTypes);
	}
}
示例#11
0
Error Pps::init(const ConfigSet& config)
{
	Error err = initInternal(config);
	if(err)
	{
		ANKI_LOGE("Failed to init PPS");
	}

	return err;
}
Error FinalComposite::init(const ConfigSet& config)
{
	Error err = initInternal(config);
	if(err)
	{
		ANKI_R_LOGE("Failed to init PPS");
	}

	return err;
}
示例#13
0
FFTSender::FFTSender(UGen const& input, 
					 FFTEngine::FFTModes mode,
					 FFTEngine const& fft, 
					 const int overlap,
					 const int firstBin,
					 const int numBins) throw()
{
	initInternal(1);
	internalUGens[0] = new FFTSenderUGenInternal(input, mode, fft, overlap, firstBin, numBins);
}
示例#14
0
Error GrManagerImpl::init(const GrManagerInitInfo& init)
{
	Error err = initInternal(init);
	if(err)
	{
		ANKI_LOGE("Vulkan initialization failed");
		return ErrorCode::FUNCTION_FAILED;
	}

	return ErrorCode::NONE;
}
示例#15
0
Schmidt::Schmidt(UGen const& input, UGen const& lo, UGen const& hi) throw()
{	
	UGen inputs[] = { input, lo, hi };
	const int numInputChannels = findMaxInputChannels(numElementsInArray(inputs), inputs);
	initInternal(numInputChannels);	
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new SchmidtUGenInternal(input, lo, hi);
	}
}
示例#16
0
Error Tiler::init()
{
	Error err = initInternal();

	if(err)
	{
		ANKI_LOGE("Failed to init tiler");
	}

	return err;
}
示例#17
0
//==============================================================================
void Hdr::init(const ConfigSet& initializer)
{
	try
	{
		initInternal(initializer);
	}
	catch(const std::exception& e)
	{
		throw ANKI_EXCEPTION("Failed to init PPS HDR") << e;
	}
}
示例#18
0
//==============================================================================
void Pps::init(const ConfigSet& config)
{
	try
	{
		initInternal(config);
	}
	catch(const std::exception& e)
	{
		throw ANKI_EXCEPTION("Failed to init PPS") << e;
	}
}
示例#19
0
Pause::Pause(Pause_InputsWithTypesOnly) throw()
{
	UGen inputs[] = { Pause_InputsNoTypes };
	const int numInputChannels = findMaxInputChannels(numElementsInArray(inputs), inputs);
	initInternal(numInputChannels);
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new PauseUGenInternal(Pause_InputsNoTypes);
		internalUGens[i]->initValue(input.getValue(i) * level.getValue(i));
	}
}
示例#20
0
SinOsc::SinOsc(UGen const& freq, Buffer const& initialPhase) throw()
{	
	int numChannels = ugen::max(freq.getNumChannels(), initialPhase.size());
	
	initInternal(numChannels);
		
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new TableOscUGenInternal(freq, initialPhase.wrapAt(i), Buffer::getTableSine8192());
	}
}
Application::Application(int w, int h, const std::string& title,
                         bool showDebugIcon) :
    frameRate(0.0f), rootRegion("Root"), showDebugIcon(showDebugIcon), onResize(
        nullptr) {
    if (context.get() == nullptr) {
        context.reset(new AlloyContext(w, h, title));
    } else {
        throw std::runtime_error(
            "Cannot instantiate more than one application.");
    }
    initInternal();
}
示例#22
0
LagUD::LagUD(UGen const& input, UGen const& lagTimeUp, UGen const& lagTimeDown) throw()
{
	UGen inputs[] = { input, lagTimeUp, lagTimeDown };
	const int numInputChannels = findMaxInputChannels(numElementsInArray(inputs), inputs);		
	initInternal(numInputChannels);
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new LagUDUGenInternal(input, lagTimeUp, lagTimeDown);
		internalUGens[i]->initValue(input.getValue(i));
	}
}
示例#23
0
BufferValues::BufferValues(Buffer const& buffer) throw()
{
	ugen_assert(buffer.size() > 0);
	ugen_assert(buffer.getNumChannels() > 0);
	
	initInternal(buffer.size());
	generateFromProxyOwner(new BufferValuesUGenInternal(buffer));
	
	for(int i = 0; i < buffer.size(); i++)
	{
		internalUGens[i]->initValue(buffer.getSampleUnchecked(i));
	}
}
示例#24
0
TableOsc::TableOsc(Buffer const& table, UGen const& freq, Buffer const& initialPhase) throw()
{	
	// could check here that the table is padded appropriately and use a less efficient version if not
	
	int numChannels = ugen::max(freq.getNumChannels(), initialPhase.size());
	
	initInternal(numChannels);
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new TableOscUGenInternal(freq, initialPhase.wrapAt(i), table);
	}
}
karplusUGen::karplusUGen(UGen const& input,
						const float minFreq,
						UGen const& fundamental,
						UGen const& decayTime,
						UGen const& cutoff) throw()
{
	initInternal(input.getNumChannels());
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new karplusUGenInternal(input, minFreq, fundamental, decayTime, cutoff);
	}
}
示例#26
0
HPF::HPF(UGen const& input, UGen const& freq) throw()
{
	int numChannels = 1;
	numChannels = input.getNumChannels() > numChannels ? input.getNumChannels()	: numChannels;
	numChannels = freq.getNumChannels()	 > numChannels ? freq.getNumChannels()	: numChannels;
	
	initInternal(numChannels);
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new HPFUGenInternal(input, freq);
	}
}
示例#27
0
void SkScene::set_visibility ( int skel, int visgeo, int colgeo, int vaxis )
 {
   if ( !_skeleton ) return;

   if (_needsInit)
	   initInternal();

   const std::vector<SkJoint*>& joints = _skeleton->joints();
   for (size_t i=0; i<joints.size(); i++ )
    { 
      set_visibility ( joints[i], skel, visgeo, colgeo, vaxis );
    }
 }
示例#28
0
RecordBuf::RecordBuf(UGen const& input,
					 Buffer const& buffer, 
					 UGen const& recLevel,
					 UGen const& preLevel,
					 UGen const& loop, 
					 const UGen::DoneAction doneAction) throw()
{
	ugen_assert(buffer.size() > 0);
	ugen_assert(buffer.getNumChannels() > 0);

	const int numChannels = ugen::max(buffer.getNumChannels(), input.getNumChannels());
	initInternal(numChannels);
	generateFromProxyOwner(new RecordBufUGenInternal(input, buffer, recLevel, preLevel, loop.mix(), doneAction));
}
示例#29
0
MulAdd::MulAdd(UGen const& input, UGen const& mul, UGen const& add) throw()
{	
	UGen inputs[] = { input, mul, add };
	const int numInputChannels = findMaxInputChannels(numElementsInArray(inputs), inputs);
	
	ugen_assert(numInputChannels > 0);
	
	initInternal(numInputChannels);
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new MulAddUGenInternal(input, mul, add);
		internalUGens[i]->initValue(input.getValue(i) * mul.getValue(i) + add.getValue(i));
	}
}
示例#30
0
BAllPass::BAllPass(UGen const& input, UGen const& freq, UGen const& rq) throw()
{
	UGen inputs[] = { input, freq, rq };
	const int numInputChannels = findMaxInputChannels(numElementsInArray(inputs), inputs);
	initInternal(numInputChannels);
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		BEQBaseUGenInternal* filter = new BAllPassUGenInternal(input, freq, rq);
		filter->calculateCoeffs(freq.getValue(i), rq.getValue(i), 1.f);
		filter->initValue(input.getValue(i));
		internalUGens[i] = filter;
	}
}