Ejemplo n.º 1
0
UGen UGenArray::mixScaleDynamic(bool shouldAllowAutoDelete) const throw()
{
	if((shouldAllowAutoDelete == true) && (internal->size() <= 0)) return UGen::getNull();
	if((shouldAllowAutoDelete == true) && (internal->size() == 1)) return Mix(*this, true);
	
	return Mix(*this, shouldAllowAutoDelete) / UGen(&internal->size()).lag(0.005);;	
}
Ejemplo n.º 2
0
BEGIN_UGEN_NAMESPACE

#include "../core/ugen_UGenArray.h"
#include "../buffers/ugen_Buffer.h"
#include "ugen_UnaryOpUGens.h"

UnaryOpUGenInternal::UnaryOpUGenInternal(UGen const& operand, const int channel) throw()
    :	UGenInternal(NumInputs)
{
    if(channel < 0)
        inputs[Operand] = operand;
    else
    {
        int numChannels = operand.getNumChannels();
        UGenInternal* internal = operand.getInternalUGen(channel % numChannels);
        inputs[Operand] = UGen(internal->getChannelInternal(channel), channel);
    }
}
Ejemplo n.º 3
0
UGen MyAndroidAudio::constructGraph(UGen const& input) throw()
{
	__android_log_print(ANDROID_LOG_DEBUG, "ugen", "MyAndroidAudio::constructGraph()");

	return SinOsc::AR(UGen(freq).lag(), 0, UGen(amp * on).lag());
}