Jack2 Windows

1 view
Skip to first unread message

Channing Rupnick

unread,
Aug 5, 2024, 1:17:58 PM8/5/24
to terpitucha
ithink with the latest version of jack2 Downloads JACK Audio Connection Kit you dont need to installl ASIO4ALL its already implemented. Its working for me on Windows 10 with Ableton 11. But im also trying to figure out how to setup the Patchbay in Qjackctl to be able to just listen to SC via an Audio Channel in Ableton 11 and not having the direct SC Audio Output at the same time. any help is very much appreciated.

I use Qjackctl to start a Jack2 process to run sound recording and effects software for my electric guitar. My computer has a built-in soundcard, but for interfacing with my guitar, I run a Behringer U-Phoria UMC202HD ("U192k" according to 'cat /proc/asound/cards') connected via USB. I can run Jack2 and PulseAudio side-by-side because I simply tell Pavucontrol to ignore the Behringer (a simple matter of un-checking the convenient selection box) and everything remains nice and separated; the computer soundcard and the Behringer unit are both connected to different inputs on my stereo system, so I can switch between either by simply selecting the desired sound source on the stereo. This arrangement has worked for the last 3 - 4 years under Debian, and I was pleased to find it worked the same manner under Arch with minimal fuss.


On 15 JAN 2022, I did a full system upgrade with 'pacman -Syu', and saw that the jack2 and jack2-dbus packages were upgraded from 1.9.19-2 to 1.9.20-1.

After that, I could not start Jack2 with Qjackctl; it would simply crash. I also tried Guitarix and Carla, but they both would say they couldn't start or connect to the Jack2 server. I do not have PipeWire installed. Don't go there (please).


After all that, I remembered that I can downgrade packages in Arch fairly easily, so I followed the advice at: _packages. I downgraded the jack2 and jack2-dbus packages back to version 1.9.19-2 and started Qjackctl; everything worked with no problems.


SO... I conclude that the new version of Jack2 is borked, but I wanted to ask here before I file a bug report:

- Is there something I may have missed in all my testing? If so, please let me know and I'll give it a shot. I'd like to be able to use the newest version.

- Have others had the same problem? If so, I'll file a bug report referencing this post.


I started developing a simple guitar looper using C++ in windows 10 by using the jackaudio's api. I am no really sure if starting and closing the server should be implemented by using the API functions, but since I found it convenient to both start the server and set the parameters with a single command, I made a script for it.


While developing, the way of testing my code was to compile it, and before start running it, I had to start the server first, which in most cases I preferred to do it using the qjackctl. However this way proved to be error prone since lots of issues hasoccurred, especially when "the appropriate way ofshutting down the server" comes in. For instance, stopping the server via qjackctl forces myrunning program to exit normaly, but closing my running programwithout having stoped the server corrupts jack-audio behavior, ie. qjackctl sometimes hangs, crashes, and even if I restart my computer, or ever reinstall jack doesn't resolve the issue.


I am really clueless of how to debug this, since most solutions found in the internet are concerning Linux environment and apart from that, I find my implementation practice anorthodox , and I am pretty sure that I probably have to get my hands dirty with the API commands instead of searching for a ready to use- scripting solutions. However, debugging the server comes first for now.


EDIT10 minutes after posting the question, I managed to debug this, however I leave the post open, so as to help others that face a similar issue. The solution that worked for me is by running the following C++ code modified by the server_control example:


I've tried using a network bridge in the Windows Control Panel, but this removes the ability for me to SSH into the router. I've manually edited the router's IP to 192.168.2.1 to prevent IP duplication with the home router.


Is there a way for me to tell the router to use my laptop as its WAN, and have the laptop actually forward requests via WiFi to the outside world, while being able to SSH into the router from the same laptop?


Most of this is a matter of setting up network sharing (wifi > ethernet) within Windows. Have you connected another regular computer to the usb-ethernet port on the windows machine to verify that this part of the equation is functioning?


The reason is that it would be a tedious process to disconnect and reconnect everything closer to the home router, given that the laptop is also connected to other things that require it. If I can't find a solution, I'll probably resort to that, but I thought it would be easy enough in software.


The realtime-privileges package provides the realtime system group, which is permitted elevated rtprio and unlimited memlock with a sysctl drop-in configuration file and is permitted to alter the system's /dev/cpu_dma_latency file, which may be used by applications to prevent the CPU to use higher C states.


A kernel facilitating the realtime kernel patchset (such as linux-rt or linux-rt-lts) may be used in situations where very low latencies are required.Refer to professional audio for further information and other advanced modifications.


Jack2 supports starting via the jackd(1) executable, the jack_control script (provided by the jack2-dbus package), the jack@.service systemd user service (refer to /etc/jack/example.conf for configuration documentation) or by using one of the graphical frontends, that support starting via the library or dbus interface.


JACK can handle one soundcard very well, and an arbitrary number of MIDI devices (connected e.g. via USB).If you start JACK and want to use a MIDI keyboard or a synthesizer or some other pure MIDI device, you have to start JACK with a proper soundcard (one that actually outputs or inputs PCM sound).As soon you have done that, you can connect the MIDI device. E.g. with QjackCtl (qjackctl), you click on the connect button and you will find your device listed under JACK-MIDI or ALSA-MIDI, depending on the driver.


To install some M-Audio MIDI keyboards, you will need the firmware package midisport-firmwareAUR. Also, the snd_usb_audio module has to be available.For more information about specific USB MIDI devices, see


The above will start a working JACK instance which other programs can then utilize. Details of each line follow. When discovering your own best configuration, it is helpful to do trial and error using QjackCtl's GUI with a non-D-Bus JACK2 version.


Sets JACK to use ALSA-compatible sound card named HD2. One can find the names with cat /proc/asound/cards. Most ALSA tutorials and default configurations use card numbers, but this can get confusing when external MIDI devices are in use; names make it easier.


Sets JACK to use 48000 khz sampling. Happens to work very well with this card. Some cards only do 44100, many will go much higher. The higher you go, the lower your latency, but the better your card and your CPU have to be, and software has to support this as well.


Sets JACK to use 64 frames per period. Lower is less latency, but the setting in this script gives 2.67 ms latency, which is nicely low without putting too much stress on the particular hardware this example was built for. If a USB sound system were in use it might be good to try 32. Anything less than 3-4 ms should be fine for realtime synthesis and/or FX, 5 ms is the smallest a human being can detect. QjackCtl will tell you how you are doing; at no-load, which means no clients attached, you will want a max of 3-5% CPU usage, and if you cannot get that without xruns (the red numbers which mean the system cannot keep up with the demands), you will have to improve your hardware.


Load QjackCtl. GUI configuration tells it to run in the system tray. It will pick up the JACK session started by D-Bus just fine, and very smoothly too. It maintains the patchbay, the connections between these applications and any other JACK-enabled applications to be started manually. The patchbay is set up using manual GUI, but connections pre-configured in the patchbay are automatically created by QjackCtl itself when applications are started.


If you use JACK for demanding tasks, but every now and then, it is possible to suspend a running pulseaudio session with QjackCtl just when you are using it. On a virgin config, modify the "Server prefix" option in the "Settings" > "Advanced" submenu, so that it states :


If you have a different number of output/input channels or your first two channels are not the ones you wish to route audio to, you cannot use the predefined jack pcm source from /etc/alsa/conf.d/50-jack.conf, but rather something like:


For another (more robust but definitely more complex) approach, is to configure and use an ALSA loopback device, by loading the snd-aloop kernel module, as is described in this article. This snd-aloop approach can also be used to bridge Wines ALSA output to JACK as explained in [3].


If you need to keep PulseAudio installed (in the event it is required by other packages, like gnome-settings-daemon), you may want to prevent it from spawning automatically with X and taking over from JACK.


In order to prevent ALSA from messing around with your firewire devices you have to blacklist all firewire related kernel modules. This also prevents PulseAudio from using firewire. Create the following file:


JACK can be configured to send audio data over a network to a "master" machine, which then outputs the audio to a physical device. This can be useful to mix audio from a number of "slave" computers without requiring additional cables or hardware mixers, and keeping the audio path digital for as long as possible (as hardware mixers with digital inputs are very rare).


The configuration is very simple, however it requires a network that supports multicast traffic (i.e. IGMP snooping must be enabled on managed network switches), and it requires all machines be running the same JACK major version (JACK1 or JACK2) as the protocols are not interoperable between versions. For JACK2, the netmanager module must be loaded:

3a8082e126
Reply all
Reply to author
Forward
0 new messages