diff options
author | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-17 20:44:52 +0000 |
---|---|---|
committer | mescalinum <mescalinum@users.sourceforge.net> | 2011-11-17 20:44:52 +0000 |
commit | d08fb1df93b9f9585f401b1cf156df627c1cf024 (patch) | |
tree | 6d7f14b267d09cf15c01222f1a2f4641cccb8a75 /tests/binbuf_helper.tcl | |
parent | e5d015e9cb8b7394e8391e3bbb4dfbad8732f717 (diff) |
add test for binbuf & atom types
svn path=/trunk/externals/loaders/tclpd/; revision=15792
Diffstat (limited to 'tests/binbuf_helper.tcl')
-rw-r--r-- | tests/binbuf_helper.tcl | 17 |
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 |