started XCut
This commit is contained in:
parent
5aad24d1db
commit
929e66278c
|
@ -0,0 +1 @@
|
||||||
|
*moved-aside*
|
BIN
RFWUGens.scx
BIN
RFWUGens.scx
Binary file not shown.
|
@ -1,11 +0,0 @@
|
||||||
AverageOutput : UGen {
|
|
||||||
*ar {
|
|
||||||
arg in, trig=0.0, mul=1.0, add=0.0;
|
|
||||||
^this.multiNew('audio', in, trig).madd(mul, add);
|
|
||||||
}
|
|
||||||
|
|
||||||
*kr {
|
|
||||||
arg in, trig=0.0, mul=1.0, add=0.0;
|
|
||||||
^this.multiNew('control', in, trig).madd(mul, add);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
AverageOutput : UGen {
|
||||||
|
*ar {
|
||||||
|
arg in, trig=0.0, mul=1.0, add=0.0;
|
||||||
|
^this.multiNew('audio', in, trig).madd(mul, add);
|
||||||
|
}
|
||||||
|
|
||||||
|
*kr {
|
||||||
|
arg in, trig=0.0, mul=1.0, add=0.0;
|
||||||
|
^this.multiNew('control', in, trig).madd(mul, add);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SwitchDelay : UGen {
|
||||||
|
*ar { arg in, drylevel=1.0, wetlevel=1.0, delaytime=1.0, delayfactor=0.7, maxdelaytime=20.0, mul=1.0, add=0.0;
|
||||||
|
^this.multiNew('audio', in, drylevel, wetlevel, delaytime, delayfactor, maxdelaytime).madd(mul, add)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XCut : UGen {
|
||||||
|
*ar { arg inArray, which=0.0, envLength=2000;
|
||||||
|
^this.multiNewList(['audio', which, envLength, inArray.size] ++ inArray.asArray);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
SwitchDelay : UGen {
|
|
||||||
*ar { arg in, drylevel=1.0, wetlevel=1.0, delaytime=1.0, delayfactor=0.7, maxdelaytime=20.0, mul=1.0, add=0.0;
|
|
||||||
^this.multiNew('audio', in, drylevel, wetlevel, delaytime, delayfactor, maxdelaytime).madd(mul, add)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -46,6 +46,11 @@ struct AverageOutput : public Unit {
|
||||||
uint32 count;
|
uint32 count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct XCut : public Unit {
|
||||||
|
float prev_trig;
|
||||||
|
uint32 envlen;
|
||||||
|
};
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void SwitchDelay_next(SwitchDelay *unit, int inNumSamples);
|
void SwitchDelay_next(SwitchDelay *unit, int inNumSamples);
|
||||||
void SwitchDelay_Ctor(SwitchDelay* unit);
|
void SwitchDelay_Ctor(SwitchDelay* unit);
|
||||||
|
@ -53,8 +58,28 @@ extern "C" {
|
||||||
|
|
||||||
void AverageOutput_next(AverageOutput *unit, int inNumSamples);
|
void AverageOutput_next(AverageOutput *unit, int inNumSamples);
|
||||||
void AverageOutput_Ctor(AverageOutput* unit);
|
void AverageOutput_Ctor(AverageOutput* unit);
|
||||||
|
|
||||||
|
void XCut_next(XCut *unit, int inNumSamples);
|
||||||
|
void XCut_Ctor(XCut *unit);
|
||||||
|
void XCut_Dtor(XCut *unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void XCut_Ctor(XCut *unit) {
|
||||||
|
printf("Hello world, num inputs is %d\n", (int)ZIN0(2));
|
||||||
|
|
||||||
|
//unit->envlen = (uint32)ZIN0(1);
|
||||||
|
|
||||||
|
SETCALC(XCut_next);
|
||||||
|
}
|
||||||
|
|
||||||
|
void XCut_next(XCut *unit, int inNumSamples) {
|
||||||
|
RGen& tgen = *unit->mParent->mRGen;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void XCut_Dtor(XCut *unit) {
|
||||||
|
// nothing to do for now
|
||||||
|
}
|
||||||
|
|
||||||
void SwitchDelay_Ctor( SwitchDelay* unit ) {
|
void SwitchDelay_Ctor( SwitchDelay* unit ) {
|
||||||
RGen& rgen = *unit->mParent->mRGen;
|
RGen& rgen = *unit->mParent->mRGen;
|
||||||
|
@ -200,6 +225,7 @@ void AverageOutput_next( AverageOutput *unit, int inNumSamples ) {
|
||||||
extern "C" void load(InterfaceTable *inTable) {
|
extern "C" void load(InterfaceTable *inTable) {
|
||||||
ft = inTable;
|
ft = inTable;
|
||||||
DefineDtorUnit(SwitchDelay);
|
DefineDtorUnit(SwitchDelay);
|
||||||
|
DefineDtorUnit(XCut);
|
||||||
DefineSimpleUnit(AverageOutput);
|
DefineSimpleUnit(AverageOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue