Help setting up OSS, virtual_OSS and JACK

Hi,

I'm new to FreeBSD, willing to move away from my current Linux (Arch) system. I'm running into some problems to setup a proper system for my needs. These include, among others, using SuperCollider.

SuperCollider's server needs JACK to be running in the background. In Linux I use PipeWire and everything seems to work fine. I tried installing it in FreeBSD but didn't manage to make it work. I then discovered OSS and virutal_OSS. I removed PipeWire, and installed both *OSS. I do get sound from from some apps (Firefox), but I cannot seem to get the sound out from SuperCollider. The server boots, the VU meter displays audio going out, Catia displays a System output, which SuperCollider is connected to, but no sound goes through the headphones. I tried both with internal soundcard and an external USB Scarlett Focusrite, with similar results: audio from Firefox, no audio from SC.

I'm a bit lost on how OSS, virtual_OSS and JACK interact. I don't see any devices or drivers where they are supposed to be in JACK. I have searched quite a bit, read the OSS manual, watched meka's videos, read his blog, but they are a step ahead, they deal with RT and sample jitters, not the basic setup, which is where I'm stuck. Is there a guide somewhere that explains how to setup a system with OSS and JACK? Do I even need JACK in FreeBSD? If there isn't a guide, I'm willing to write one, but first I would need some help in understanding how it works (I'm no computer scientist or sysadmin, so I don't think I can understand very low-level stuff, just a bit lower than regular user-level).

Cheers.
 
How many channels does your audio device have?
I use a couple of different ones. The one that has the most has 4 ins and 4 outs. But I may use more channels before sending it out, and may have to use up to 8 or 12 channels once in a while.

virtual_oss replaces /dev/dsp and jackd sits on top of that again. That's the way I do it.
Cool, thanks. I'll check that out
 
Unfortunately not for me. I haven't dedicated much more time to it. My last try was following these notes, but couldn't get it working. I still haven't figured out how to connect JACK's output to OSS's input. I do get sound from the browser with OSS, but once I install JACK and try to connect it I loose all the sound everywhere, browser included. The Supercollider server boots normally, so JACK appears to be running, and the meter shows there's audio going out through the output channels, but no sound comes out from any device (speaker, headphones or usb sound card -- I tried with Focusrite Scarlett Solo and Behringer U-Phoria UMC 404HD).

I'm aware that JACK needs to be configured from the CLI, because the GUI config tools don't work with FreeBSD, but I didn't manage to make it work either.

What have you tried? What have you achieved?
 
jackd probably runs on the wrong device then. Try starting it by hand, and change dsp to different /dev/dsp devices shown by sndstat:

Code:
jackd -r -d oss -r 48000 -C /dev/dsp -P /dev/dsp
 
Thank you VERY much. It seems to work. I haven't tested on USB devices, but now SC outputs sound through my laptop speakers.

I really appreciate all your help.
 
you need to disable realtime
You can but certainly don't need to. To get the best performance you should rather enable realtime capabilities for your user and run jackd in realtime mode.

To enable realtime support:
* load the mac_priority kernel module
* add your user to the realtime group

Funnily, mac_priority(4) tells us that "mac_priority first appeared in FreeBSD 14.0" although the feature is already included in 13.1-RELEASE :)
On earlier versions you can install sysutils/mac_rtprio which is basically the same.
 
You can but certainly don't need to. To get the best performance you should rather enable realtime capabilities for your user and run jackd in realtime mode.

To enable realtime support:
* load the mac_priority kernel module
* add your user to the realtime group

Funnily, mac_priority(4) tells us that "mac_priority first appeared in FreeBSD 14.0" although the feature is already included in 13.1-RELEASE :)
On earlier versions you can install sysutils/mac_rtprio which is basically the same.
Yes you will need real time for less latency and if it runs on 13 then its better to use it
 
Back
Top