aboutsummaryrefslogtreecommitdiff
path: root/doc/additional/pd-msg/4.msg_from_tcl
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2002-11-13 08:53:08 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2002-11-13 08:53:08 +0000
commit59b6ed633cd63ec112f4367365ac14479a8e4120 (patch)
tree93246a8e380042152689005b2e50a542b03c5bd9 /doc/additional/pd-msg/4.msg_from_tcl
parent02a5595973b61d2cf789b9074167ed73b928d157 (diff)
This commit was generated by cvs2svn to compensate for changes in r208,
which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=209
Diffstat (limited to 'doc/additional/pd-msg/4.msg_from_tcl')
-rwxr-xr-xdoc/additional/pd-msg/4.msg_from_tcl/0.create_dummy_patch18
-rwxr-xr-xdoc/additional/pd-msg/4.msg_from_tcl/1.tcl2pd33
-rwxr-xr-xdoc/additional/pd-msg/4.msg_from_tcl/2.nogui35
-rwxr-xr-xdoc/additional/pd-msg/4.msg_from_tcl/2.nogui.txt12
-rwxr-xr-xdoc/additional/pd-msg/4.msg_from_tcl/recv.pd5
-rwxr-xr-xdoc/additional/pd-msg/4.msg_from_tcl/test.pd9
6 files changed, 112 insertions, 0 deletions
diff --git a/doc/additional/pd-msg/4.msg_from_tcl/0.create_dummy_patch b/doc/additional/pd-msg/4.msg_from_tcl/0.create_dummy_patch
new file mode 100755
index 00000000..030d0687
--- /dev/null
+++ b/doc/additional/pd-msg/4.msg_from_tcl/0.create_dummy_patch
@@ -0,0 +1,18 @@
+#!/usr/bin/wish -f
+
+#damien HENRY le 2001 07 14
+
+puts "***********************************************"
+puts "* This will create a patch in pure-data *"
+puts "* be sure that the recv.pd file is loadded *"
+puts "***********************************************"
+
+set to_pd [socket localhost 3006]
+
+puts $to_pd "pd-recv.pd obj 10 10 pd new_patch;"
+puts $to_pd "pd-new_patch msg 10 10 bang;"
+puts $to_pd "pd-new_patch msg 10 30 message;"
+puts $to_pd "pd-new_patch connect 0 0 1 0;"
+
+exit
+
diff --git a/doc/additional/pd-msg/4.msg_from_tcl/1.tcl2pd b/doc/additional/pd-msg/4.msg_from_tcl/1.tcl2pd
new file mode 100755
index 00000000..883cc78e
--- /dev/null
+++ b/doc/additional/pd-msg/4.msg_from_tcl/1.tcl2pd
@@ -0,0 +1,33 @@
+#!/usr/bin/wish -f
+
+#Here a small exemple that show how to send msg to pd from TCL.
+#damien HENRY
+#dh20010806
+
+puts "*********************"
+puts "* pd -nogui example *"
+puts "* (c) Damien HENRY *"
+puts "* This is GPL... *"
+puts "*********************"
+puts ""
+puts "WARNING : you need to run pd -open and load recv.pd first"
+
+#definition of the procedure that send msg to pd
+proc pd_send {string2send} {
+ set to_pd [socket localhost 3006]
+ puts $to_pd $string2send
+ .lmsg configure -text $string2send
+ close $to_pd
+}
+
+#create the gui
+wm title . "a simple tcl/tk gui msg-sender to pd"
+button .bsend -text "send to pd" -width 20 -command {pd_send "$pd_rcv $text2send;"}
+button .bq -text "quit" -width 20 -command {exit}
+entry .msg -textvariable text2send -width 30
+entry .pd_rcv -textvariable pd_rcv -width 10
+label .l1 -text "destination"
+label .l2 -text "msg to send"
+label .lmsg
+
+pack .l1 .pd_rcv .l2 .msg .lmsg .bsend .bq \ No newline at end of file
diff --git a/doc/additional/pd-msg/4.msg_from_tcl/2.nogui b/doc/additional/pd-msg/4.msg_from_tcl/2.nogui
new file mode 100755
index 00000000..7911e4b5
--- /dev/null
+++ b/doc/additional/pd-msg/4.msg_from_tcl/2.nogui
@@ -0,0 +1,35 @@
+#!/usr/bin/wish -f
+
+#Here a small exemple that show a way to use the -nogui option.
+#damien HENRY
+#dh20010730
+
+puts "*********************"
+puts "* pd -nogui example *"
+puts "* (c) Damien HENRY *"
+puts "* This is GPL... *"
+puts "*********************"
+puts ""
+puts "WARNING : you need to run pd -open recv.pd -nogui first"
+
+#definition of the procedure that send msg to pd
+proc pd_send {string2send} {
+ set to_pd [socket localhost 3006]
+ puts $to_pd "$string2send;"
+ .lmsg configure -text "$string2send;"
+ close $to_pd
+}
+
+#create the gui
+wm title . "a simple tcl/tk gui to open pd-patch"
+label .l1 -text "open : patch & path"
+entry .pd_patch -textvariable pd_patch -width 23
+entry .pd_path -textvariable pd_path -width 23
+button .bload -text Load -width 20 -command {pd_send "pd open $pd_patch $pd_path" }
+button .bclose -text close -width 20 -command {pd_send "pd-$pd_patch menuclose" }
+button .bdspon -text "dsp on" -width 20 -command {pd_send "pd dsp 1" }
+button .bdspoff -text "dsp off" -width 20 -command {pd_send "pd dsp 0" }
+label .lmsg
+button .bq -text "quit" -width 20 -command {exit}
+
+pack .l1 .pd_patch .pd_path .bload .bclose .bdspon .bdspoff .lmsg .bq \ No newline at end of file
diff --git a/doc/additional/pd-msg/4.msg_from_tcl/2.nogui.txt b/doc/additional/pd-msg/4.msg_from_tcl/2.nogui.txt
new file mode 100755
index 00000000..6bac6017
--- /dev/null
+++ b/doc/additional/pd-msg/4.msg_from_tcl/2.nogui.txt
@@ -0,0 +1,12 @@
+This small example show an easy way to use pd without the classical gui.
+
+
+0) run pd -open recv.pd -nogui
+1) run 2.nogui (use wish83 if you are under win xx)
+2) chose an abstraction to open, for example test.pd (in this folder)
+3) turn the dsp on
+4) here you can listen to your abstraction !!!
+
+Enjoy !!!
+
+Damien HENRY.
diff --git a/doc/additional/pd-msg/4.msg_from_tcl/recv.pd b/doc/additional/pd-msg/4.msg_from_tcl/recv.pd
new file mode 100755
index 00000000..554ab101
--- /dev/null
+++ b/doc/additional/pd-msg/4.msg_from_tcl/recv.pd
@@ -0,0 +1,5 @@
+#N canvas 357 509 628 150 10;
+#X obj 453 26 netreceive 3006 0 old;
+#X text 32 10 This patch is here to receive the commands sended by tcl scripts;
+#X text 27 66 Execute the tcl files in 4.msg_from_tcl. (use wish83if your under Win xx);
+#X text 25 92 Have a look to the TCL source to understand how does this work.;
diff --git a/doc/additional/pd-msg/4.msg_from_tcl/test.pd b/doc/additional/pd-msg/4.msg_from_tcl/test.pd
new file mode 100755
index 00000000..0cf63b09
--- /dev/null
+++ b/doc/additional/pd-msg/4.msg_from_tcl/test.pd
@@ -0,0 +1,9 @@
+#N canvas 357 509 468 150 10;
+#X text 18 101 Have a look to the TCL source to understand how does this work.;
+#X text 32 10 This patch is here to test the 2.nogui script;
+#X obj 35 32 osc~ 440;
+#X obj 34 82 dac~;
+#X obj 35 56 /~ 50;
+#X connect 2 0 4 0;
+#X connect 4 0 3 0;
+#X connect 4 0 3 1;