[TUT] how to add dsp in linux (by using JACK)

Share here your personal tips or creations: desktop, conky, docks, widgets or tweaks are welcomed here!
kurotsugi
Posts: 2143
Joined: 09 Jan 2014 00:17

[TUT] how to add dsp in linux (by using JACK)

Postby kurotsugi » 19 Aug 2015 17:11

it was a result of another experiment with bs2b in this thread http://forums.solydxk.nl/viewtopic.php?f=74&t=5725

a fellow called "snap" mentioned a tool called "stereotool" which could be used as dsp in linux. I'll be using stereotool in this tutorial but it should also work with other similar tool which using JACK. I haven't checked yet but this one seems works too http://kxstudio.linuxaudio.org/Applications:Cadence. this tutorial will cover how to set up your system so that it could has a dsp but it won't cover about "how to use the dsp tool". well...honestly...this dsp stuff is quite complex and I'm still trying to figure that part too :lol:

pre-requisities:
1. a dsp tool which utilize jack.
2. JACK.
3. jack modules for pulseaudio and pavucontrol. in case if you want to run pulse along with jack.

Code: Select all

sudo apt-get install jackd2 qjackctl pulseaudio-module-jack pavucontrol 
after you complete the pre-requisities,
A. preparing JACK.
1. start jack server. run 'qjackctl' and press 'start'.
2. load jack modules

Code: Select all

pactl load-module module-jack-sink
pactl load-module module-jack-source
it will create a new sink in pulse called 'jack'.
3. start pavucontrol and your favourite media player
similar with our previous experiment, we'll using pavucontrol to control the audio output. in order to use jack you need to change your audio output to jack
Image
after this step your jack will works.
note: do not close qjackctl!!

B. starting the dsp and reroute the audio channel.
1. start your dsp. we'll use stereotool as reference but other dsp tool should works too.
2. open qjackctl and press "connect". press "expand all"
if you follow the A part correctly, in the left side you'll see "pulseaudio jack sinc", "stereotool", and "system". while on the right side "stereotool", and "system". you'll also see that pulseadio is directly connected to system playback. we'll need to put "stereotoll" between "pulse" and "system" to make the dsp works.
3. close the connection between "pulse" and "system". you can manually did that or simply "disconnect all".
4. put "steretool" between "pulse" and "system". connect pulse's front-left and front-right to stereotool's in-l and in-r. after that connect stereotool's out-l and out-r to system's playback_1 and playback_2.
http://postimg.org/image/b8zkosx39/
the link above is not an exact interface of qjackctl but it should help you understand how it should done. credit for snap for the image :3
5. done.

start your music and play with your dsp.

please note that when jack server is running pulseaudio can't access your soundcard. you need to make sure that your app is using jack sink to make it work. some people said that running pulse along with jack isn't an ideal solution since it will increase your system load and potentially decrease the sound quality due too many layer between your app and your soundcard. while that might true pulseaudio gives you more control to your system and quite easy to use. on top of that pulse doesn't take much cpu power so it won't decrease your sound quality much.

using pulseaudio also makes it possible to mix JACK's dsp with other dsp. for an instance, we can add LADSPA plugins along with JACK. we can use this one for example http://forums.solydxk.nl/viewtopic.php?f=74&t=5725. with pulseaudio we can mix stereotool with bs2b. simply follow the tutorial to enable bs2b on that thread. after that, change the ladspa stream output into jack and your music player's output into ladspa plugin.

that's just a little example of mixing JACK's dsp with other dsp. other dsp like pulse-adio-equalizer should works too :3

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: [TUT] how to add dsp in linux (by using JACK)

Postby Snap » 19 Aug 2015 17:25

Added to my huge audio reference bookmarks collection.

God job.
This likely means that your installation is broken. -Mr Pixbuf.

Image

kurotsugi
Posts: 2143
Joined: 09 Jan 2014 00:17

Re: [TUT] how to add dsp in linux (by using JACK)

Postby kurotsugi » 19 Aug 2015 17:52

theorically using alsa should works too. unfortunately I'm not accustomed with it. in this tutorial bs2b plugin is placed before jack (App > pulseaudio > ladspa > jack > stereotool > sound card). it's easy to change the audio route with pulse but I think we can create similar route without pulseaudio (alsa > ladspa > jack > stereotool > soundcard). the key is that we need to use ladspa (either from pulse or alsa) before jack since if our app is directly using jack this trick won't work.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: [TUT] how to add dsp in linux (by using JACK)

Postby Snap » 19 Aug 2015 18:05

It depends on the apps. Players use to have choices to use pulse, alsa or jack directly, like VLC, SMPlayer, etc... Regular apps will use whatever is the system default. Some crap only uses pulse.

Also with jack you can use ladish front ends like Patchage or Claudia to make and arrange the connections to set sound chains any way you want them.
This likely means that your installation is broken. -Mr Pixbuf.

Image


Return to “Customizations”

Who is online

Users browsing this forum: No registered users and 2 guests