diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/binbuf-test.tcl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/binbuf-test.tcl b/examples/binbuf-test.tcl new file mode 100644 index 0000000..a39118f --- /dev/null +++ b/examples/binbuf-test.tcl @@ -0,0 +1,23 @@ +package require Tclpd 0.2.2 +package require TclpdLib 0.17 + +pd::class binbuf-test { + constructor { + pd::add_outlet $self list + } + + destructor { + } + + 0_bang { + set binbuf [tclpd_get_object_binbuf $self] + pd::outlet $self 0 list [list "symbol binbuf" "symbol $binbuf"] + + set len [binbuf_getnatom $binbuf] + pd::outlet $self 0 list [list "symbol len" "symbol $len"] + + #for {set i 0} {$i < $len} {incr i} { + # pd::post $i:[tclpd_binbuf_get_atom $binbuf $i] + #} + } +} |