MegaArman / pd_extern_example

Example external puredata objects in C, with my notes as comments. Derived from

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pd_extern_example

Example external puredata objects in C. To build (Linux environments), simply run "Make" in the example's directory and open the PD patch to test it.

To summarize creating externs for PureData:

  1. decide what you need at a conceptual level. An extern is useful if the PD GUI isn't allowing you to create an intuitive solution
  2. write the C code, you can use the helloworld example here as boilerplate
  3. build your object with Make, can modify the helloworld example's
  4. open a .pd patch that uses your object and wire it to what it needs to be wired to

NOTE: a pd object can't be named with spaces or hyphens, keep this in mind when calling gensym. Underscores are OK. The setup function needs to be <classname>_setup like hello_world_setup. You may want all "public" methods to include the classname like so

helloworld

you will see the pd patch contains a bang. Click the bang, then Window->Pd window to see the output. shows how to use inlets.

counter

every time bang is hit, the outputted value increases. Shows how to use both inlets and outlets.

References

https://github.com/pure-data/externals-howto

https://www.youtube.com/playlist?list=PLn3ODBv0ka5g_zKRpmgc58-Tj-Qn-P5qz

About

Example external puredata objects in C, with my notes as comments. Derived from


Languages

Language:Makefile 56.0%Language:C 44.0%