pd-externals / tclpd Goto Github PK
View Code? Open in Web Editor NEWTcl objects for Pure Data
License: GNU General Public License v2.0
Tcl objects for Pure Data
License: GNU General Public License v2.0
Tcl for Pd ========== This library allows one to write externals for Pd using the Tcl language. It wraps quite closely the pd API (m_pd.h, plus some private functions) Also a library of Tcl helper functions is provided. It is not mandatory to use it (moreover: it requires Tcl 8.5, while the tclpd external alone requires only Tcl 8.4), but it is a syntactic sugar and can simplify a lot the code. To use it simply add 'package require TclpdLib' in your Tcl external. Anyway, disregarding any approach chosen to develop Tcl externals, a general knowledge of Pd internals (atoms, symbols, symbol table, inlets, objects) is strongly required. (Pd-External-HOWTO is always a good reading) Compiling and installing ======================== To compile tclpd, simply type: make clean all To compile it with debug enabled: make clean alldebug Requirements are pd >= 0.39, swig, c compiler. To install tclpd, simply copy it to /usr/lib/pd/extra (or where you installed pure-data). Writing GUI externals ===================== Pd is split into two processes: pd (the core) and pd-gui. A pd external executes in the core. The same applies for a Tcl external loaded by tclpd, because tclpd creates a Tcl interpreter for that, running in the same process as pd. On the gui side (pd-gui) there is another Tcl interpreter living in a separate process, which communicates with pd using a network socket. Communication happens in one way (pd to gui) with the sys_gui function, and in the other way using ::pdsend. (needs to set up a receiver using pdbind, check the examples). Data conversion between Tcl <=> Pd ================================== In pd objects communicate using messages, and messages are made up of atoms. An atom could be a float, a symbol, a list, and so on. Tcl usually doesn't make distinction between strings and numbers. This means that simply translating a message text into a string could lose information about the atom type (to pd, symbol 456 is different from float 456, but if we just convert it as a string "456" the type information is lost). To maintain atom type infrmation, pd atoms are represented in Tcl as two element lists, where the first element indicates the atom type. Some examples of this conversion: Pd: 456 Tcl: {float 456} Pd: symbol foo Tcl: {symbol foo} Pd: list cat dog 123 456 weee Tcl: {{symbol cat} {symbol dog} {float 123} {float 456} {symbol wee}} Examples ======== Some examples externals are provided, including their helpfile. Authors ======= Please refer to AUTHORS file found in tclpd package. License ======= Please refer to COPYING file found in tclpd package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.