frank_channel
Member
I just received my Teensy 3.6 and am excited to get started with it. The first project I would like to work on is getting Pure data running on my Teensy using libpd: https://github.com/libpd/libpd.
I know there is already an Audio library for the Teensy, however, I am still interested in this project for a number of reasons: i) I have experience using pure data, and I have already a repertoire of audio "patches" developed in the language; ii) I like that I can test and develop patches on the desktop; iii) Pure data patches can be loaded and changed at runtime.
My main question is as follows. When loading a pure data patch (which describes the audio processing graph) libpd makes calls to fopen and lseek. These are platform dependent system calls, which are implemented in "newlib" as stubs that return an error code (I think). I am guessing the first thing I will need to do is overwrite these stubs with implementations specific to the Teensy 3.6 hardware (e.g., loading a file from the SD card, reading blocks, etc)? However, I'm not 100% sure how all this works (and it is a little opaque to me when using the teensyduino). For example, do I need to rebuild libc?
I am looking for any help in the form of examples, advice, etc... For example, has anyone done any "retargeting" with a Teensy? If so, what is the work-flow, and are there any pedagogical examples?
All the best,
Corey
I know there is already an Audio library for the Teensy, however, I am still interested in this project for a number of reasons: i) I have experience using pure data, and I have already a repertoire of audio "patches" developed in the language; ii) I like that I can test and develop patches on the desktop; iii) Pure data patches can be loaded and changed at runtime.
My main question is as follows. When loading a pure data patch (which describes the audio processing graph) libpd makes calls to fopen and lseek. These are platform dependent system calls, which are implemented in "newlib" as stubs that return an error code (I think). I am guessing the first thing I will need to do is overwrite these stubs with implementations specific to the Teensy 3.6 hardware (e.g., loading a file from the SD card, reading blocks, etc)? However, I'm not 100% sure how all this works (and it is a little opaque to me when using the teensyduino). For example, do I need to rebuild libc?
I am looking for any help in the form of examples, advice, etc... For example, has anyone done any "retargeting" with a Teensy? If so, what is the work-flow, and are there any pedagogical examples?
All the best,
Corey
Last edited: