Exemplo n.º 1
0
ToggleFF::ToggleFF(UGen const& trig) throw()
{
	initInternal(trig.getNumChannels());	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new ToggleFFUGenInternal(trig);		
	}
}
Exemplo n.º 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);
	}
}
Exemplo n.º 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 );
 }
Exemplo n.º 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);
	}
}
Exemplo n.º 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);
}
Exemplo n.º 7
0
Trig::Trig(UGen const& input) throw()
{
	initInternal(input.getNumChannels());
	
	for(unsigned int i = 0; i < numInternalUGens; i++)
	{
		internalUGens[i] = new TrigUGenInternal(input);
	}
}
Exemplo n.º 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");
	}
}
Exemplo n.º 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);
	}
}
Exemplo n.º 11
0
Error Pps::init(const ConfigSet& config)
{
	Error err = initInternal(config);
	if(err)
	{
		ANKI_LOGE("Failed to init PPS");
	}

	return err;
}
Exemplo n.º 12
0
Error FinalComposite::init(const ConfigSet& config)
{
	Error err = initInternal(config);
	if(err)
	{
		ANKI_R_LOGE("Failed to init PPS");
	}

	return err;
}
Exemplo n.º 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);
}
Exemplo n.º 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;
}
Exemplo n.º 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);
	}
}
Exemplo n.º 16
0
Error Tiler::init()
{
	Error err = initInternal();

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

	return err;
}
Exemplo n.º 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;
	}
}
Exemplo n.º 18
0
//==============================================================================
void Pps::init(const ConfigSet& config)
{
	try
	{
		initInternal(config);
	}
	catch(const std::exception& e)
	{
		throw ANKI_EXCEPTION("Failed to init PPS") << e;
	}
}
Exemplo n.º 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));
	}
}
Exemplo n.º 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();
}
Exemplo n.º 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));
	}
}
Exemplo n.º 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));
	}
}
Exemplo n.º 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);
	}
}
Exemplo n.º 25
0
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);
	}
}
Exemplo n.º 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);
	}
}
Exemplo n.º 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 );
    }
 }
Exemplo n.º 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));
}
Exemplo n.º 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));
	}
}
Exemplo n.º 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;
	}
}