Routing MODEP outputs to a DAW

Hi
I’ve been playing a bit with patchbox and MODEP
I’ve installed xrdp so I can login with the standard windows RDP client, works great (you can also lower GPU’s RAM, I’m on a rpi3 A+).
You get a pretty neat GUI, very responsive and you can play around with other cool software.

I’ve also installed Reaper (arm version) and it works great. I would’n put too much tracks on it but it works without any problems.

Now, the question is: In Reaper, I had to setup the audio interface to Pulseaudio and I can record and playback whatever I play on my guitar, but it’s pre-MODEP.
I would think it would be possible to connect to JACK and get the signal pos-MODEP but I’ve been unable to use JACK in there.
jack_lsp command gives a list of ins and outs including individual fx, but I havent’t found any way to route that.

Any clues ?

Hey, you should try to get everything use Jack directly, then you should be able to customize the audio routings using jack_connect or GUI clients.

Thanks for your answer.
OK, how could this be done ?
I’ve tried using Patchage but I just get a message saying “Unable to create client” and I have no idea how in jack_connect I could connect modep outputs to some kind of virtual outputs I could see in Reaper as inputs.
Can you be more specific ?

Is Jack running on your system?

What’s the output of these commands:

cat /etc/environment
systemctl status jack

here’s cat /etc/environment

JACK_PROMISCUOUS_SERVER=jack
PATCHBOX_MODULE_ACTIVE=/usr/local/patchbox-modules/modep/

and here’s jack status:

● jack.service - JACK Server
   Loaded: loaded (/lib/systemd/system/jack.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-09-17 10:07:25 CEST; 1min 25s ago
 Main PID: 403 (jackd)
    Tasks: 9 (limit: 985)
   CGroup: /system.slice/jack.service
           └─403 /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:audioinjectorpi -r 48000 -p 128 -n 2 -X seq -s -S

sept. 17 10:07:31 patchbox jackdrc[403]: JackEngine::XRun: client = mod-midi-merger was not finished, state = Triggered
sept. 17 10:07:31 patchbox jackdrc[403]: JackAudioDriver::ProcessGraphAsyncMaster: Process error
sept. 17 10:07:31 patchbox jackdrc[403]: port deleted: RtMidiOut-Client:midi/playback_1
sept. 17 10:07:35 patchbox jackdrc[403]: port created: RtMidiOut-Client:midi/playback_1
sept. 17 10:07:36 patchbox jackdrc[403]: JackEngine::XRun: client = mod-host was not finished, state = Triggered
sept. 17 10:07:36 patchbox jackdrc[403]: JackEngine::XRun: client = mod-midi-merger was not finished, state = Triggered
sept. 17 10:07:36 patchbox jackdrc[403]: port deleted: RtMidiOut-Client:midi/playback_1
sept. 17 10:07:39 patchbox jackdrc[403]: port created: RtMidiOut-Client:midi/playback_1
sept. 17 10:07:45 patchbox jackdrc[403]: port created: RtMidiIn-Client:midi/capture_1
sept. 17 10:07:45 patchbox jackdrc[403]: port deleted: RtMidiIn-Client:midi/capture_1

It looks fine, Patchage should be able to connect to the running Jack server. Could you start Patchage from within a GUI terminal on your desktop?

Just run patchage and see if it provides any additional info in the terminal.

Strange, when I click on “Connect to Jack”, it kind of freeze for a moment and than nothing. I don’t get the message I had previously…

Not sure what could be wrong. Just a wild guess, but maybe Jack is having overruns and is not stable - try again with reconfigured Jack server with increased buffer sizes, like -p 512 -n 3, just to make sure this issue is not caused by too small buffer sizes.

I’m not getting any overruns in MODEP unless I do something heavy (like a backup).
Changed Jack settings to -p 512 -n 3:

● jack.service - JACK Server
   Loaded: loaded (/lib/systemd/system/jack.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-09-20 09:08:34 CEST; 1min 20s ago
 Main PID: 393 (jackd)
    Tasks: 9 (limit: 985)
   CGroup: /system.slice/jack.service
           └─393 /usr/bin/jackd -t 2000 -R -P 95 -d alsa -d hw:audioinjectorpi -r 48000 -p 512 -n 3 -X seq -s -S

sept. 20 09:08:35 patchbox jackdrc[393]: No jack_get_descriptor entry-point for mod-midi-broadcaster
sept. 20 09:08:35 patchbox jackdrc[393]: No jack_get_descriptor entry-point for mod-midi-merger
sept. 20 09:08:37 patchbox jackdrc[393]: Cannot connect ports owned by inactive clients: "mod-host" is not active
sept. 20 09:08:39 patchbox jackdrc[393]: port created: RtMidiOut-Client:midi/playback_1
sept. 20 09:08:40 patchbox jackdrc[393]: port deleted: RtMidiOut-Client:midi/playback_1
sept. 20 09:08:43 patchbox jackdrc[393]: port created: RtMidiOut-Client:midi/playback_1
sept. 20 09:08:44 patchbox jackdrc[393]: port deleted: RtMidiOut-Client:midi/playback_1
sept. 20 09:08:47 patchbox jackdrc[393]: port created: RtMidiOut-Client:midi/playback_1
sept. 20 09:08:53 patchbox jackdrc[393]: port created: RtMidiIn-Client:midi/capture_1
sept. 20 09:08:53 patchbox jackdrc[393]: port created: RtMidiOut-Client:midi/playback_1

but I still don’t have audio in Patchage…

I really don’t get how MODEP uses jack without any problems and other can’t even see it running…

Something must be misconfigured or some incompatible version of some software/library is installed on your system.

OK, I’ll make a fresh install tonight to test this with a new system and report back.
Thx

Hey buddy, did you manage to get this working?
I’m currently putting together a little rig with a Pi for Modep and a Pi for Reaper, but it’s messy.

If you can get this working and routed the way you like on a PI3A ill he trying to copy on a Pi4.
Using a Pi4 with a 7" touchscreen is the plan, with a Behringer C1 as my mic/line input. The screen will show the reaper channel I’m recording to and allow for quick checking of the model UI page too.

Ah man, I’m far to excited for this ha ha

Hey
Sorry I took so long to report back.
So, I’ve found out that the fact that I was connecting to the Rpi thrue RDP doesn’t allow to access JACK with GUI, when connecting with hdmi or VNC, I can now see everything in patchage.
I’ve created a topic on treefallsound’s forum about that https://treefallsound.com/forum/index.php?topic=30.0 the bottom line beeing, you can route any output from jack to a Reaper input.
Means, you can route MODEP outputs to Reaper’s inputs 3&4 (1&2 being already assigned to physical input) and you can also route individual effect’s output to other Reaper’s inputs.
For that you can usage patchage but I find it a bit messy, so I just use jack_connect.
In order to determine what output to connect to what input I use jack_lsp -c

I’m in the process of making a bash script to automatically connect MODEP’s outputs to Reaper inputs 3&4. If that works OK, Ill probably try to also map the other effects because it actually might be interesting to be able to record you guitar sound a various stages of processing.
However jack_lsp doesn’t give much to work with so it’s not as easy as I hoped…

1 Like

This is amazing, thank you for the detailed feedback!
I’d be really interested in how you go about scripting the jack connections as I’ve not done too much with jack in the past.
Is your rdp issue avoidable using a VNC client as an alternative?

Yes, works with VNC.

1 Like

OK, I’ve made a little script to automatically connect MODEP’s outputs to Reaper’s input in Jack.
It’s in it’s early stage (meaning it’s a bit messy) but you can get in on github: https://github.com/MacFizz/JMConnector.git
It’s designed to connect the outputs to Reaper’s inputs 3&4 but using “jack_lsp” command you can change the scripts settings to accomodate your needs and connect to DAW you’re using.

I’ll be pretty busy in the next couple of weeks so I won’t work much on the script, however, any feedback would be appreciated. And I’ll manage to correct bugs if any.

1 Like

This is flipping brilliant, thanks for sharing it!

Wait until you’ve tested it… :wink:

Ha ha, hopefully tomorrow!

Took delivery of a SmartiPi touch Pro case today, so was able to put my Pi4 with a screen finally.
Was able to take the Pi 3 that I had with my screen and pair that with the Pisound I have, so slightly downgraded but will still serve as a pedal for my guitar playing.

Now I can get Reaper installed on Patchbox and have a good look at getting the connections routed.
Genuinely excited!

1 Like