Permalink
Browse files

DBAP4e.ck added: experimental panner with additional effects

  • Loading branch information...
1 parent ea312f6 commit 781d6f506adfcdea292200dcecd00ed6bc45fd98 @hoch hoch committed Oct 24, 2012
Showing with 16 additions and 9 deletions.
  1. +0 −7 panning/DBAP4.ck
  2. +16 −2 panning/DBAP4e.ck
View
@@ -52,11 +52,4 @@ class DBAP4 extends Chubgraph
fun void setGain(float gain) {
gain => _in.target;
}
-
- // setReverb(): set overall reverb mix parameter
- fun void setReverb(float mix) {
- for (0 => int i; i < 4; ++i) {
- mix => _r[i].mix;
- }
- }
}
View
@@ -3,7 +3,7 @@
// @desc General purpose panner for 4-channel configuration. Based
// on DBAP (distance based amplitude panning) method.
// Some experimental effects are added to enhance spatial cues.
-// @revision 1
+// @revision 2
// @version chuck-1.3.1.3
@@ -57,7 +57,7 @@ class DBAP4e extends Chubgraph
}
}
- // setGain(): set overall gain
+ // setGain(): set source gain
fun void setGain(float gain) {
gain => _in.target;
}
@@ -68,4 +68,18 @@ class DBAP4e extends Chubgraph
mix => _r[i].mix;
}
}
+
+ // setDelayTime(): set delay time for each delay
+ // NOTE: an array of 4 floats between 0.5 ~ 20(ms)
+ // ex) d4e.setDelayTime([0.5, 10, 5, 17]);
+ fun void setDelayTime(float dt[]) {
+ if (dt.cap < 4) {
+ <<< "[DBAP4e] Invalid array." >>>;
+ return;
+ } else {
+ for(0 => int i; i < 4; ++i) {
+ dt[i]::ms => _d[i].delay;
+ }
+ }
+ }
}

0 comments on commit 781d6f5

Please sign in to comment.