How to use pipewire and jack plugins to remaster song files

Moderator: Forum moderators

Post Reply
geo_c
Posts: 2879
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2202 times
Been thanked: 876 times

How to use pipewire and jack plugins to remaster song files

Post by geo_c »

Recent KLV releases come with pipewire installed.
For instance this one: viewtopic.php?t=9949

By adding the package libjack-pipewire, applications that run using the native jack audio server can now be run with pipewire and mix with applications using the pulseaudio api. Very cool, it opens the compatibility of a whole world of audio/video linux software useage.

I've been running this setup for a week or two and really seeing what it can do. I run pro audio because I'm a musician with a working studio, and have used puppy OS's extensively for that purpose, but the pipewire framework takes it to a much higher level.

That being said, I wanted to see if the 'average consumer audio user' might be able to incorporate the pipewire-jack capabiiities.

So I ran this little test to see if I could take an mp3, one of somewhat inferior quality, apply some audio processing, and capture it in a new file without using the 'heavy-weight' audio packages and Digital Audio Workstations. Below are the results: my how-to remaster an mp3 using pipewire-jack and one audio jack compatible audio processor application.

To do this task I needed to install into KLV-airedale-RT the following packages:
libjack-pipewire (to run jack apps in pipewire)
jack_capture (to capture any audio going to the system audio output)
calf (to run the audio through plugins to do the processing)
musikcube (to play the source audio)
musikcube-pipewire (library for musikcube to use pipewire effectively, but it runs without it also)
qpwgraph (to route the audio through the plugins)

Once installed musikcube needs to be be launched from the terminal with the command pw-jack musikcube I won't go into detail now how to use it, but it must be pointed to a song library initially, and I also went into its settings menu and chose pipewire as the driver.
Image

All native jack-server applications that run in the pipewire-jack environment must be started in this manner. So I opened the calf plugin rack with the command pw-jack calfjackhost and chose 'add plugin' and added, GraphicEQ, Multiband-Compressor, and Limiter:
Image

Then I opened qpwgraph from the Xfce menu and made some connections. I routed the outputs of musikcube to the inputs of the GraphicEQ, outs of the EQ to the ins of the Compressor, outs of the Compressor to the ins of the Limiter, outs of the Limiter to the playback of the sound card.
Image

As an example I chose a song file which I had transfered from vinyl years ago using a cheap turntable and no preamp, just the turntable straight into a stereo interface. Needless to say it lacks a lot. So I used these three plugins to level out the EQ, compress it like a preamp would, and limit it to boost the volume to modern sensibilities. I opened the gui interfaces on each plugin, ran the song in musikcube on a loop repeat and tweaked:

EQ
Image
Compressor
Imageshare picture
Limiter
Image

The without hitting the ENTER key, I typed the jack_capture command to capture sound card output in mp3 320K high-quality format pw-jack jack_capture -mp3 -mp3q 0 -mp3b 320 -mb, and with one hand on the enter key I clicked start on musikcube and clicked on the terminal window containing the jack_capture command and hit ENTER to run the command, almost simultaneously. Hitting ENTER again at the song end stops the recording in jack-capture.

Here is jack_capture recording sound card output with musikcube providing the source audio through the calf plugins:
Image

And below are links to the results. I went a litlle overboard on the plugin settings to make sure the differences could be heard. So I don't vouch for this remaster mix as being the greatest, but it sounds good enough in my headphones at the moment:

ORIGINAL FILE:
https://mega.nz/file/bLh3mRzA#xd6qgaq5w ... XRIgSY82qo
REMASTERED FILE:
https://mega.nz/file/aHhXCJaJ#iWbP7P3sU ... eSoiXnDQMI

Last edited by geo_c on Sun Jan 28, 2024 4:09 am, edited 1 time in total.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2879
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2202 times
Been thanked: 876 times

Re: How to use pipewire and jack plugins to remaster song files

Post by geo_c »

And a few post test observations:

The beauty of a setup like this is that all the plugin settings can be stored for later use. So I have effectively set myself up with a Vinyl Transfer Remaster Kit simply by saving the routing and plugin settings with a simple project save in Calf Plugin Host.

However I was not so successful saving my route between the plugins and applications using qpwgraph. That routing graph is a little buggy to operate, but granted I'm not very experienced with it. I tried saving, but it didn't seem to work.

Instead I opened a more dependable application, which has been part of native jack for a long time. The Carla Plugin rack has a very sound graph and it's also a plugin host that can load any lv2, vst, ladspa plugins and virtual instruments.

With Carla I saved the project and when loaded the project file connected all the applications just as I had them. It can be installed with the xbps-install Carla command in a terminal.

qpwgraph seems buggy to connect, and sometimes doesn't give an option to disconnect. Helvum is a pipewire graph that displays much better and is more solid in the way it connects, but it doesn't save project files and therefore with Helvum one is always starting from scratch.

Carla gets my vote for connecting pipewire nodes.

geo_c
Old School Hipster, and Such

User avatar
Flash
Moderator
Posts: 978
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 127 times

Re: How to use pipewire and jack plugins to remaster song files

Post by Flash »

But does the remastered mp3 song sound any better? Can you even tell any difference?

Chaos coordinator :?
geo_c
Posts: 2879
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2202 times
Been thanked: 876 times

Re: How to use pipewire and jack plugins to remaster song files

Post by geo_c »

Flash wrote: Sun Jan 28, 2024 4:38 am

But does the remastered mp3 song sound any better? Can you even tell any difference?

Check out the examples at the bottom of the first post, and tell me what you think.

It all depends on how the file originally sounded and what was done to it. This one was very low level, midrangy, and I touched it up. I can tell the difference. It's not my best work, but I just got it in the ball park for the sake of a test run.

The point is this flash, with pipewire and jack apps you can take any audio from any source, browser, video, instrument, mic input and do just about anything you want to it. You could mix two sound files together by running them at same time, etc...

Linux audio is getting good, really good. And these KLVs are starting to crank it out.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2879
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2202 times
Been thanked: 876 times

Re: How to use pipewire and jack plugins to remaster song files

Post by geo_c »

So let me recap my answer to the point @Flash made, is it worth remastering a soundfile? Not if all of your sound files already are mastered correctly. If you do things like transfer from vinyl or cassette tape, audio from videos, etc, then there is a need.

But the bigger idea is this. We could always do that using a buggy bloated piece of software like Audacity, or an enormous all powerful pro audio package like Ardour. But with a good pipewire based distro, the libjack-pipewire library installed, and a few simple applications, anyone can manipulate audio however they would like.

So you could produce an audio or video message to your loved ones simply by installing a few jack plugins, and a couple players or recorders and learn how to use the graph to connect them. You don't need to learn all the ins and outs of configuring a Digital Audio Workstation. If your webcam has a good mic, you can mix songs underneath yourself speaking into the mic, and route the two audio signals through whatever processing they might need and mix them at the end of the chain. And all you need is the camera, a music player app, and a capture app, like OBS for instance in the case of video and audio simultaneously. Runs as an appimage very well in KLV-airedale-RT15.

geo_c
Old School Hipster, and Such

Post Reply

Return to “Sounds”