Hardware and low latency setup
Inspired by this thread - https://forums.freebsd.org/threads/is-there-any-dac-compatible-with-freebsd.74463 I finally got around to test if my old Roland Tri-Capture usb sound device could work with FreeBSD15.Edit: With help from tingo on this forum and the freebsd-usb mailing list the old Roland now works fine with 15-RELEASE. For more info please see this thread.
After plugging in the Roland
/etc/login.conf
:memorylocked=unlimited:\
remembering to do cap_mkdb /etc/login.conf after edit /etc/rc.conf
kldlist="mac_priority"
jackd_enable="NO"
jackd_user="myusername"
jackd_rtprio="YES"
remembering to do pw groupmod realtime -m myusername after edit
And tuning a few parameters from this link
/etc/sysctl.conf
hw.snd.latency=0
hw.snd.latency_profile=0
kern.timecounter.alloweddeviation=0
/boot/loader.conf
hw.usb.audio.buffer_ms="1"
I start (as user) jack manually with
jackd -R -doss -r44100 -p512 --device /dev/dsp3 and this works fine with Roland Tri-Capture I added an old MIDI keyboard with a cheap MIDI to USB plug that also works fine.
When I record guitar there is no noticeable latency. I can record MIDI and audio tracks simultaneously.
It's really great, especially since the computer is an old laptop from 2014-2015. To be specific it's a HP 15-g041so with AMD E2-3800 APU, Radeon(TM) HD Graphics (KABINI), 8Gb RAM and FreeBSD 15-RELEASE-P5.
Software
To record guitar and have some fun with sound F/X, create songs I need a low latency sound server, a midi server, a DAW and plugins.The low latency sound server mentioned above is jack. Jack takes care of the audio and to manage midi the alsa-seq-server is in play.
DAW
For DAW I started out with audio/qtractor because it looked more simple to use than others but I noticed some issues, mainly with the plugins. Scouring the Internet I found hints that Qtractor could have issues with GTK framework mismatch. I moved on to Ardour.Installing Ardour as pkg and running it crashed. After grabbing a working config and three patches from Bugzilla audio/ardour built and worked.
Plugins
To find plugins just search the FreeBSD ports for lv2 (or ladspa). There's plenty to choose from.Because of the issues with plugins and qtractor I looked for a plugin that could "host" other plugins. I found Carla.
Carla
Carla really nice. I found that it used to be in the ports tree (it was deleted in June 25) and I noticed that there was a newer version upstream so I "stole" the Makefile from the old port (before June 25), changed it and built it and once I found it was working ok I committed the port.Carla is so nice because it works as a router for applications that connect to Jack. Or rather as a router for the music nodes inside these applications. It works as a plugin into the DAW as well and and also has an option to export plugins from Carla as lv2 plugins. Starting Carla before any other app that connects to Jack makes all apps running routable in Carlas patchbay - providing Carla is configured for multiclient.
More plugins
While I was scouring for plugins I also found a reworked version of the audio/rkr-lv2 called rakarrack plus that I built and committed as a FreeBSD port.I also added audio/guitarix, audio/ir-lv2, audio/neuralrack-lv2, audio/ratatouille-lv2 and had so much fun testing sound F/X that it should be illegal.
After a while I calmed down and set out to create a nice clean sound that works with single coil pickups and found files for ratatouille on Tone3000 to emulate a Fender Twin Reverb with a 4x10 Alnico Cab with a touch of reverb.
I installed audio/hydrogen and routed it into Ardour using Carla, first to play along and then to test the midi export from hydrogen and import to Ardour. Everything works fine.
Moving on to the midi ....
Midi
Installed audio/jack_umidi, plugged in the cheap midi usb plug and did jack_umidi -d /dev/umidi1.0. Hooked up the old Evolution MK-149, fired up Carla and Ardour. Made sure that Ardour could see the MIDI interface and enabled Music Data in preferences/MIDI Port Config. Inserted a MIDI track and .... no sound.Spent alot of time going through the routing in both Carla and Ardour. Fired up Qtractor and got sound fromthe MIDI keyboard, went back to Ardour and .... still nothing.
Finally on the verge of going back to Qtractor I unplugged the MIDI USB and replugged it. Sound galore! Seems Ardour needs to have it replugged. Immense fun testing different plugins for the MIDI track!
All set to create some music!.
And .... with updates came crashes for Ardour. Looks like Ardour has bugs when saving the session. With an old config it can start but a saved session can't be loaded and config gets garbled on exit. Also I noticed that upstream Ardour is at 9.2.0. Naturally I attempted to port that version but got stuck when building with this error:
../libs/tk/ytk/gtksearchenginesimple.c:215:12: error: use of undeclared identifier 'FTW_STOP'Ah well, qtractor was updated as well and seems to manage plugins a little better now.
/grandpa
Last edited: