Dynamic patching environment with Pd Internal Messages. This package provides syntax highlighting, snippets and sending messages to Pd via pdsend when you write pdmsg code in Atom.
These messages can be useful if you are running pd without a gui, or building patches dynamically. For more information, please see below.
You can install in Atom: File > Settings > Packages > pdmsg
Or, using apm
$ apm install pdmsg
If you see an error like below, you need to install Python and C/C++ compiler toolchain, for node-gyp depending on your OS.
gyp ERR! build error
npm install --global windows-build-tools
You will need to have Pure Data (Pd) and pdsend which is a CLI for sending messages to Pd, installed. If you don't have them installed, please install Pd only (Pd includes pdsend).
You can change settings in Atom: File > Settings > Packages > pdmsg
Pdsend path
: Leave empty to use pdsend from the PATHBinding | Command | Description |
---|---|---|
ctrl-alt-p | Toggle | Start / Stop pdmsg |
shift-enter | Evaluate line | Run a line of code |
ctrl-enter | Evaluate block | Run a block of code |
Building a pd patch:
[netreceive <port> <udp> <old>]
[pd <name>]
Running pdmsg:
.pdmsg
Pdmsg:toggle
: Packages > pdmsg > Toggle
shift-enter
or ctrl-enter
to run thisCreating an instance of the pdmsg's connection allows you to communicate directly with Pd, i.e. Cn(port, host=localhost)
. It is used with the insertion operator, and then this operator inserts a message which is defined as a tuple.
Cn(3001, localhost) << (pd-ex, clear) // Send 'pd-ex clear;' to port 3001 on the local.
Send multiple messages by using the addition operator.
Cn(3001, localhost) << (pd-ex, clear) + (pd, dsp, 1) // Send 'pd-ex clear;pd dsp 1;'
Cn(3001) << (pd-ex, obj, 10, 10, osc~, 440)
Cn(3001) << (pd-ex, msg, 10, 50, 220)
Cn(3001) << (pd-ex, floatatom, 10, 100)
Cn(3001) << (pd-ex, symbolatom, 10, 130)
Cn(3001) << (pd-ex, text, 100, 10, "This is a comment")
Cn(3001) << (pd-ex, clear) // Clear a canvas+ (pd-ex, obj, 10, 10, osc~, 440) + (pd-ex, obj, 10, 60, dac~) // Put objects+ (pd-ex, connect, 0, 0, 1, 0) + (pd-ex, connect, 0, 0, 1, 1) // Connect them+ (pd, dsp, 1) // Turn on audio
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.