aboutsummaryrefslogtreecommitdiff
path: root/tests/binbuf_helper.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/binbuf_helper.tcl')
-rw-r--r--tests/binbuf_helper.tcl17
1 files changed, 17 insertions, 0 deletions
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