started XCut

This commit is contained in:
rob 2009-01-09 21:14:31 +00:00
parent 5aad24d1db
commit 929e66278c
6 changed files with 50 additions and 16 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*moved-aside*

Binary file not shown.

View File

@ -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);
}
}

23
classes/RFW-UGens.sc Normal file
View File

@ -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);
}
}

View File

@ -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)
}
}

View File

@ -46,6 +46,11 @@ struct AverageOutput : public Unit {
uint32 count;
};
struct XCut : public Unit {
float prev_trig;
uint32 envlen;
};
extern "C" {
void SwitchDelay_next(SwitchDelay *unit, int inNumSamples);
void SwitchDelay_Ctor(SwitchDelay* unit);
@ -53,8 +58,28 @@ extern "C" {
void AverageOutput_next(AverageOutput *unit, int inNumSamples);
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 ) {
RGen& rgen = *unit->mParent->mRGen;
@ -200,6 +225,7 @@ void AverageOutput_next( AverageOutput *unit, int inNumSamples ) {
extern "C" void load(InterfaceTable *inTable) {
ft = inTable;
DefineDtorUnit(SwitchDelay);
DefineDtorUnit(XCut);
DefineSimpleUnit(AverageOutput);
}