[PD] [pd REFERENCE] format [was: Re: Pd META: Author/Help Patch Authors]

Frank Barknecht fbar at footils.org
Thu Sep 3 15:56:22 CEST 2009


Hallo,
João Pais hat gesagt: // João Pais wrote:

> Is there any place where it's explained what are the meta patches, and  
> what should be in each patch? I never understood the meaning of them, and 
> therefore, have never made any.

I could find any clear docs about that myself. I can however send you the
specification for "pd REFERENCE" supbatches in RjDj help files. Note that this
is not dealing with META information like lices, author, etc. Think of it as an
alternative implementation of the main pddp help patch area into a parsable
format. The RjDj helpfiles can be got here: http://trac.rjdj.me ("Browse source")


Embedding parsable reference info into a subpatch
=================================================

Each help file includes a subpatch called "REFERENCE" with graph on parent
(GOP) enabled.  The subpatch's GOP area is 450 px wide. The subpatch contains
only comments. 

The comments will generally consist of a colon-separated key:value pair. Also
allowed are "free" comments that don't use any of the following key names.
These will be appended to the "Description" field as separate paragraphs,
ordered by the value of their "y"-coordinate.  (We can think about adding them
to the previously encountered field instead.)

Required key names:

  Name: the name of the object
  Summary: short description of the object
  Description: Longer description of the object

Optional key names:

  Argument <x>: argument x, where x is an integer index of the arg, zero-based.
  Inlet <x>: message or audio inlet x, where x is an integer index of the inlet, zero-based.
  Outlet <x>: message or audio outlet x, where x is an integer index of the outlet, zero-based.
  Tags: dash-separated list of key words (was "comma-separated" before)

Quick awk-oneliner to filter out the subpatch:

$ cat file-help.pd | awk 'BEGIN {RS=";"} /canvas .* REFERENCE/,/restore .* REFERENCE/  { for (i=4; i<=NF; i++) printf("%s ", $i); print ""}'  | grep -v REFE | sort

Ciao
-- 
Frank




More information about the Pd-list mailing list