Hi,
I'm exploring to use Pd in NRT by calling it from command line with -nogui and -send. It works very well with custom designed patches using [fast-forward $1< messages... For instance, I can run many instances of Pd by using a Python script to analyze or synthesize audio.
Nonetheless, I just noticed now that there is a -batch flag.
The pd command help prints: "-batch -- run off-line as a batch process". However, I could not really understand how this works (and also couldn't find any further tips in the docs/lists).
If anyone could give some example it would be really nice.
Thanks!
Hi,
On 04/02/2022 17:16, padovani wrote:
Nonetheless, I just noticed now that there is a -batch flag.
The pd command help prints: "-batch -- run off-line as a batch process". However, I could not really understand how this works (and also couldn't find any further tips in the docs/lists).
Historically I think batch came before fast-forward. It runs the scheduler as fast as possible forever, until a quit message is sent to the pd receiver.
Example could be something like:
pd -noprefs -noaudio -r 44100 -batch -nrt -open main.pd -send "onload sine.wav 440 1000"
where main.pd has [r onload] and uses the incoming message to write an audio a file using [writesf~] (remember to send pd "dsp 1", too).
For a real-world example, see the render.sh in my project: https://code.mathr.co.uk/dynamo