Possible to use Netjack2 to share audio io?


#1

Is it Possible to use Netjack2 to share audio io from the PiSound? Here is my use case that I would like to play with, just not sure if PiSound can do this, hopefully you can help me with this evaluation.
Use case:
Rpi #1 with PiSound interface/hat-- this one I want to run the PiSound App and do Pure Data, here is where my pedalboard out #2 goes to the input, output is going to either a PA or 1 or 2 bass amps. Runs Netjack or something as the Master. This box uses Bluetooth, wifi and direct Ethernet cable connection to the next rpi
Rpi #2 hooked directly to the #1 box via 8 inch Ethernet cable or could be via small router that has only Rpis that would be all connected as slave device. Anyways, here I want to: A receive a copy of the Pi sound input and route it to a instance of ModeP then send the output back to Rpi #1. Here I would like to also forward any Midi from Rpi #2, provided via cheap USB midi, to Rpi #1 OR receive/send the midi like I do the audio from Rpi #1.
See, I am wanting to see if I could set up individual Rpis as “modular” setup, each handling a processior intensive task but ultimately using 1 with PiSound hat that serves as the main Audio IO.
If I could do ModeP And Pure Data like this, my life would be a lot easier. I know I could do it with multiple pi sounds but I only need the 1 input and the 1/4" stereo line out.
Any of you guys done similar setups and have any tips on how to get the Netjack2 set up and the final mixing of the output on the Rpi with the hat?
Thanks Guys
James Bolin


#2

Hey, theoretically it sounds possible, but in practice it will require you to lift up your sleeves a bit :slight_smile: On Pure Data side, you’d have to configure it to use the JACK backend, and somehow get it to use net Netjack2 as needed. On MODEP side, it is already using the JACK as the backend, but likely it won’t expose Netjack2 source and destination in the MOD UI - I think it has some filtering functions somewhere in its python scripts or mod-host binary which could be tweaked to include the Netjack2 stuff, or you may be able to make the appropriate JACK connections outside of MOD UI (the audio will get routed appropriately, but won’t be shown in MOD UI, may have some hidden consequences)


#3

Hey @Giedrius I was thinking just about the same after reading more about each. I just want in the end to be able to just use the final output of each. I don’t really want to do more than share the input which was why I wrote just thinking maybe it was a common ask… luckily for me, I am a applications developer by trade, so for me coding isn’t a issue. I guess you can say that I am still in my research and initial high level scoping phase.
Anyways, to start really the flow I am looking at a high level is as follows: PiSound input – copy/send the signal so that I can run both ModeP and Pure Data and run one of those via a 2nd RPi to allow a smoother UX and so that resources and all are independent of one another.
I was thinking something along the lines of take the input and dupe/send to the 2nd RPI running Jack Audio via Netjack or similar, then on the Pure Data there on box 2 just reuse that input. Finally to handle the output on Pure Data machine, box 2 send back via Netjack to the ModeP box and then just ensure that I am routing in the new pair of outputs to the main mix. See my intention here is to NOT have to touch the programs themselves at all, I only want to Target really the before and after or input(s) and outputs of each as they would be output. That is, if possible, I would rather modify a configuration and install items than get into having to touch any of the stuff that blokas and others provide. The old not reinventing the wheel approach lol
So given that, this is geared towardsthe more experienced with PiSound Dev guys out there like yourself @Giedrius , is the high level there something that can be done with the PiSound hardware and the code or am I thinking totally off base or is a very similar approach already in existence?