[Audio settings] set pure data's delay (msec) for one single patch

OK folks,

I discoverded a methods to find what internal messages you can send to PD, in order to change settings, create objects, etc., in non-GUI mode.

(Works in Vanilla, don’t know for extended or other Purr Data stuff)

  • Run Pd
  • put these objects in the canvas:
    [r pd]
    |
    [print]

Now, whatever you do in PD, will be printed in the console.

To make your patch control PD, just copy the log that is in the console inside the message boxes of your patch.
Link them to the object [s pd], and voilà: when you bang the messages the stuff happens in Pd.

For instance, I wanted to automatically inscrease the latency up to 9 in a patch that was crackling all over the place.
I asked pd to print in the console all the actions of settings I did, and it gave:

  • print: audio properties (for the action open the audio settings)
  • print: key 1 57 0 (for pressing the 9 key)
  • print: key 0 57 0 (for releasing the 9 key)
  • print: audio-dialog 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 44100 9 -1 64 (for clicking on the OK button)

Once I had the steps in Pd’s own language, I just opened my patch, and put these phrases in message boxes (I guess the order means something to Pd, each message needs to be read one after the other, in the right order), hooked a [loadbang] object to the first inlet, and hooked the last outlet to a [s pd] object.

I’d love to attach the example patches, but the forum rules won’t let me. I’ll try to upload them on patchstorage later.

This is a simple one, but from there, you can change anything you want in the instance of Pd that is running your patch, form your patch, in non-GUI mode.

I’ll give it a try on my “blips” patch on the Organelle as soon as I can.

1 Like