Dynamic Effect Plugin Loader esp. For Rapsberry PI (DIY2 and Stamp Album effects/plugins)
DynamicEffectPluginLoaderForPI.zip
Background:
In the last couple of days I finally built something I have needed and wanted for a while (which later on I will discuss in more detail under a separate thread): an Arduino electric guitar.
In other words, I took the connections off the 5-way and knobs (internally connected to the pickups and line out) and rerouted the switch and knobs to an arduino. The reasoning being I can control Way more with pd and those knobs than what they were originally intended to do if I capture their output using Arduino.
However, the patch I had built for it was clocking in at about 275-300% of the pi's cpu. And while I could have gone back and added switches (which I took out a while back, to replace with fade-mixers for when I change an effect) throughout, the thought of doing that was more daunting than (considering how elaborate the patch is) I wanted to undertake.
Enter: Dynamic Patching.
I found that with just 3 straight-chained effects the pi ran at only about 10%.
So...here's what I built and am sharing now (before tying it into the arduino guitar, because I think others might want to go ahead and learn from it, extend it, expand upon it, use it, etc. etc.).
The patch(es, there are two, one laid out for the DIY2 plugins and one laid out for the Stamp Album ones, will probably consolidate them later, but other things are demanding my attention) is pretty straight forward:
(Dependency on the tof/menubutton, tof can be found via deken)
Click on the menus at the top to select an effect for each of the 5 slots or select the "unchanged" effect to leave that slot open.
Then click the BUILD bang or the CLEAR bang (to start over).
The selected effects will load into the PALLETTE subpatch already connected to adc~ and dac~.
That's really about all there is to it. Very straight-forward, clean, and very cpu light-weight. The racks of all 5 slots I tested ran at about 10-12% on my PI 3r2.
Hope you can make use of it. And would love to hear feedback.
For the future:
Add a hid-stomp controller to load preset racks (which you can send in via the tof/menubotton) to load racks on the fly;
Add a meta-level to send either hid, osc, or arduino commands to each of the loaded effects.
Merry Music to us, one and all.
Peace,
Scott
p.s. Oh! The arduino guitar: though it has no connected pickups it gets its audio signal from an (about) 1" piezo mic fun-tacked to the knob-well inside the guitar. Sounds great. Just pure guitar. The tone, texture, etc. come after the fact via the pd-side.
Ciao for now.
Wanna say: the real genius lies not in what I cobbled together, but the strength of will and purpose it took for the two original developers to make abstractions so completely consistent and thoroughly aligned. My highest regards to you both. Thank you, both, so very much, for helping to make my "job" so easy.