Needs hvcc for compilation.
python3 -m venv venv
. venv/bin/activate
pip install hvcc_teensy
The following translates the Puredata patch _main.pd into C++ files in a folder $DST.
The object ("context") will also be called $NAME:
hvcc _main.pd -n $NAME -o $DST -G hvcc_teensy
The contents of the subfolder $DST/teensy represent library code usable in the Arduino environment.
There are (potential) standard locations for these libraries:
- MacOS/Linux:
$HOME/Arduino/libraries/ - Windows:
My Documents\Arduino\libraries
In the generated library folder will be a header file $NAME.h to be included in the Arduino program.
The produced code depends on the Teensy core library.
If OPENAUDIO=1 is #defined before including the $NAME.h header file, the code will depend on OpenAudio_ArduinoLibrary for float_32 audio processing extensions.
In the example Makefiles (e.g., sine_out), this is taken care of by respective json metadata fed to the teensy generator.