diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-08-30 17:17:38 +0200 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-08-30 17:17:38 +0200 |
| commit | 3c19adc8a7d67305631d560ac69a8e6f74f052f8 (patch) | |
| tree | 3bf7d48107feeaa885425980942667f482e6e639 /chugins | |
| parent | fd7a7851ef99dedf5116dc5dff772445eb670218 (diff) | |
| download | digitale-debutanten-3c19adc8a7d67305631d560ac69a8e6f74f052f8.tar.gz | |
replace Chubgraph Clipper with Chugin Clipper, giving a significant speed increase
* Chubgraph Clipper now available as ClipperGraph
* Chugins are built in chugins/ and do not need to be installed
* additional command line options to ./start_chuck are passed to chuck
Diffstat (limited to 'chugins')
| -rw-r--r-- | chugins/Clipper.cpp | 22 | ||||
| -rw-r--r-- | chugins/Makefile | 15 |
2 files changed, 37 insertions, 0 deletions
diff --git a/chugins/Clipper.cpp b/chugins/Clipper.cpp new file mode 100644 index 0000000..7c80793 --- /dev/null +++ b/chugins/Clipper.cpp @@ -0,0 +1,22 @@ +#include <chuck_dl.h> +#include <chuck_def.h> + +CK_DLL_TICK(clipper_tick); + +CK_DLL_QUERY(Clipper) +{ + QUERY->setname(QUERY, "Clipper"); + + QUERY->begin_class(QUERY, "Clipper", "UGen"); + QUERY->add_ugen_func(QUERY, clipper_tick, NULL, 1, 1); + QUERY->end_class(QUERY); + + return TRUE; +} + +CK_DLL_TICK(clipper_tick) +{ + *out = in > 1. ? 1. : (in < -1. ? -1. : in); + + return TRUE; +} diff --git a/chugins/Makefile b/chugins/Makefile new file mode 100644 index 0000000..f75e667 --- /dev/null +++ b/chugins/Makefile @@ -0,0 +1,15 @@ +CFLAGS ?= -O3 + +CFLAGS += -m32 +CPPFLAGS += -I/usr/include/chuck -D__LINUX_JACK__ +LDFLAGS += -m32 + +CXXFLAGS += $(CFLAGS) + +all : Clipper.chug + +%.chug : %.o + $(CXX) -shared $(LDFLAGS) -o $@ $^ + +clean: + $(RM) *.chug *.o |
