LoginSignup
4
5

More than 5 years have passed since last update.

[PureData]Pd Tips - コードレスパッチングへの端緒

Last updated at Posted at 2014-03-17

Pd を使う上で知っておくとパッチングがはかどるかもしれない Tips 集をお送りしています。

Pdのコマンドラインインターフェースを使う

Pdに対するメッセージ(下図)は、パッチにメッセージを書かずとも送信することができます。

Screen shot 2014-03-17 at 21.03.28.png

メニューバーの File > Message.. で表れるウィンドウがそれです(キーボードショートカットは Cmd + Shift + m)。

Screen shot 2014-03-17 at 21.09.48.png

pd dsp 1 と入力してリターン押すと DSP が ON になります。
また、pd quitで Pd を終了させることができます(使い途あるのかわかりませんけど...)。

既にこの手のメッセージングに習熟している方々はお気づきかもしれませんが、[receive] オブジェクトに値を送ることもできます。
以下は [receive foo] というオブジェクトに 数字1 を送る例です。

Screen shot 2014-03-17 at 21.16.11.png

テキストフィールド内で ; を使うと複数メッセージも送信できます。
Screen shot 2014-03-17 at 21.20.12.png

再利用しないアドホックなメッセージを送るのに便利かもしれません。

FUDIプロトコル

このような ; で始まるメッセージ形式を FUDI プロトコルというらしく、ミラー・パケット氏により開発・提唱されているものだそうです。Pd-vanilla のソース中のコメントにも度々出てくるのですが、あまりちゃんとしたドキュメントが存在していない感じです。

Wikipedia になぜか項目があるのでFUDIの素性ということで引用しつつリンクを紹介しておきます。

FUDI is a networking protocol used by the Pure Data patching language invented by Miller Puckette. It is a string based protocol in which messages are separated by semicolons. Messages are made up of tokens separated by whitespaces, and numerical tokens are represented as strings. (FUDI - Wikipedia, the free encyclopedia)

セミコロンで区切られた英語の平文をネットワーク上に流すとそれはもう FUDI って感じで、なんかプロトコルとしては緩い感じです。

実はこの形式のメッセージ送信は、Cycling'74 Max でもよく使われています。

Max 側のドキュメントを見ても FUDI というキーワードは見えてこないのですが、";" 始まりなので同じプロトコルと言えますね。

if the message in a message box begins with a semicolon (;) followed by the word max, any message which follows will be sent directly to the Max application itself, just as though there were a receive object named "max".
Controlling Max with Messages

現在ではOSCが広く使われているので日の目を見ませんが、Max と Pd には[netsend][netreceive]というプロセス間通信をやるためのオブジェクトが存在していて、TCP のセッション上で FUDI プロトコルのメッセージを流し合っていました。

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5