Mark this one up as: Creative Ways to Use the [Shell] Object


{image of code at the bottom of this post}



By clicking "init" then selecting your left- and right- ins and outs, you can then switch between your midi (or for that matter any jack-in) out-ing to pd_in or system_playback. So from one perspective it is a jack-bypass/router.

Copy from the help file:

This abs is designed to empower the user to switch (in a sense a sort of jack router/bypass) between having a connection, in my case, the virtual midi synthesizer "amsynth", running into pd_in to instead running into system:playback.;

The benefit is that (using the shell object + jack_lsp) the rerouting is done in a single click (which certainly gets one to thinking).

The two inlets are init which writes a file to /tmp which it then reads to populate the connector names and the other inlet is the switch itself.


start jack and any and all apps you may want to run through the abs;

then click "init" this writes two files, one for ins and the other for outs;

select from the radios (which populate the symbols on the right);


then you can switch between the two connections using the vradio on the top-right.

Note: if you are using QJackCtl or other jack-guis you may need to refresh the connection page to ee the result. -svanya

#end help file

As I say, more than anything (since my system just points to shell scripts to do this), I just wanted to show some novel/powerful things we can do with the [shell] object.

Perhaps, you may find a use for it (or its ideas).

Happy pd-ing

p.s. feel obliged to add: in my case, I am using this with my latest and current project (a mobmuplat front-end to go on the body of my guitar (for me to use as I play) which will allow me to run my guitar pedals, a looper, amsynth and all of its controls, as well as the audio-bus controlling the mixing of all of those) to reroute my synth to and from going thru my pedal-rack. So in one case its just a synth ("amsynth" to be exact) and in the other case it is a synth-running-thru-my-pedal-rack.