diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-08-30 15:02:38 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-08-30 15:02:38 +0200 |
commit | ae448d0621c6dac59570ff9e9d6026c901d05c04 (patch) | |
tree | 388a02c46ceb0138686daaf24022050e315cdcb8 /lib | |
parent | ebb2c113ca26cd936c6b5a16b7b501240b41c559 (diff) | |
download | digitale-debutanten-ae448d0621c6dac59570ff9e9d6026c901d05c04.tar.gz |
added Chugen-implementation of Clipper UGen
will probably be slower than the "Clipper" implementation - will test that
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ClipperGen.ck | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ClipperGen.ck b/lib/ClipperGen.ck new file mode 100644 index 0000000..ffd946a --- /dev/null +++ b/lib/ClipperGen.ck @@ -0,0 +1,10 @@ +/* + * clip signal using a Ghugen + */ +public class ClipperGen extends Chugen { + fun float + tick(float in) + { + return Math.max(Math.min(in, 1), -1); + } +} |