Technical demo.

Based on the patches started yesterday evening, the example.pd shows how PD can be used with its user interface to interact RT with the engine. Once the work is done, by commenting a #define in the main class, you switch to release mode, without changing anything to the patch!

Parts of the video:

  1. edition: puredata used with ogre3d
  2. release: libpd loads the pd patch inside of ogre3d

As explained in this post, the edition is based on an OSC communication between the two apps, it works with the basic puredata.

There is 2 VERY important objects in this patch:

  • pobject_in: it can parse osc messages as well as internal messages (when used in release mode); it also create 4 internal senders pobject_in_trans, pobject_in_rot, pobject_in_scale & pobject_in_all; no need to be plugged to the pobject_in box, you can receive the messages anywhere in your patches;
  • pobject_out: it can pack osc messages for the engine as well as internal messages (when used in release mode); it also create 4 internal receivers pobject_out_trans, pobject_out_rot, pobject_out_scale & pobject_out_all; no need to be plugged to the pobject_out box, you can send messages from anywhere in your patches;

On the C++ side, the PdEngine has to be set in edition or release mode to works properly with pd. The communication with pd happens through the same methods. The idea here is to make the two modes transparent to the user, even if the c++ guy has to know what he’s doing :).

Keep in mind it’s a demo and there is a lot of optimisation to do on the C++ level, but it gives a good idea of the integration of the 2 libraries.

And, yeah, i’ll have to check how to record the sound with ffmpeg on linux…