// Send and Receive
To make things easier to read, you can use
send and
receive
Keep the following in mind when naming your sends and receives:
If you have different receivers (with different names), you can use
remote to allocate messages from a central "distribution point" (similar to "route"). You give this object a list whose first element is the name of the receiver and whose second element is the message itself.
//Subpatches
In the course of programming, you will probably find that you run out of room at some point. For this reason, you can store parts of your patch in what are called
Subpatches. If you create a
pd object and enter a name (without spaces) as its argument - e.g.,
pd my-subpatch - a new window opens. (Once you've closed this window, you can reopen it in execute mode by clicking on the object
pd my-subpatch once.) Now you have room for new parts of your patch.
Subpatches solve not only spatial limitations, but also help you structure your patch more clearly. Parts of a patch that complete a certain task can be given their own subpatch, so that this little 'machine' is always available. A part like this is called a
module. Here's a sample module: a metronome that allows you to enter beats per minute instead of milliseconds:
Names you choose yourself cannot contain spaces. Instead you can use hyphens or underscores, as in this example
//Exercise
Make an interesting patch with a subpatch