From d08fb1df93b9f9585f401b1cf156df627c1cf024 Mon Sep 17 00:00:00 2001 From: mescalinum Date: Thu, 17 Nov 2011 20:44:52 +0000 Subject: add test for binbuf & atom types svn path=/trunk/externals/loaders/tclpd/; revision=15792 --- tests/binbuf_helper.tcl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/binbuf_helper.tcl (limited to 'tests/binbuf_helper.tcl') diff --git a/tests/binbuf_helper.tcl b/tests/binbuf_helper.tcl new file mode 100644 index 0000000..863dd01 --- /dev/null +++ b/tests/binbuf_helper.tcl @@ -0,0 +1,17 @@ +package require Tclpd 0.3.0 +package require TclpdLib 0.20 + +proc binbuf_helper::constructor {self args} { + pd::add_outlet $self list +} + +proc binbuf_helper::0_bang {self} { + set binbuf [pd::get_binbuf $self] + foreach atom $binbuf { + foreach {atomtype atomvalue} $atom break + pd::outlet $self 0 list [list [list symbol atomtype] [list symbol $atomtype]] + pd::outlet $self 0 list [list [list symbol atomvalue] [list symbol $atomvalue]] + } +} + +pd::class binbuf_helper -- cgit v1.2.1