Hopefully you foundthis post by searching for openSUSE in conjunction with digital audioor the relevant software titles like jack/qjackctl,fluidsynth/qsynth, and a DAW like rosegarden, qtractor, lmms, orardour. Because it’s based on an enterprise product, openSUSE hasgreat technical features, but sometimes it seems that the bestsupport (packaging and documentation) is for business-orientedsoftware, while all the creative suite distros are ubuntu variants.Well, I’m no musician, so lack of music software wouldn’t be adeal-breaker, but I am curious, and I like to sing, so I decided toexplore the possibility. This isn’t a proper how-to, from theperspective of an expert, just an invitation to explore along withme. Mostly I’m looking at info written in other contexts,collecting and summarizing it in one place. Hopefully, that’ll be auseful service, and in this post I’ll explain how to get a “back-end” up and running and play some synthesized sounds, then explore software that runs on top of that back-end in later weekly posts.
So the first thing Idiscovered is that openSUSE uses a low-latency kernel by default. Youcan prove it to yourself by running “uname -a” in terminal andscanning the output for the word PREEMPT. (The more I learn aboutopenSUSE, the more I like it.) However, if you check out the configfile in /boot and scan for the line CONFIG_HZ, then you’ll see itequals 250Hz, and some older tutorials say that 1000Hz is necessaryfor digital audio. These days, the kernel has HR (hi-res) timerinstead, but you have to configure your DAW to use it. Short version,the default kernel should be good to go – we’ll see. (By the way,don’t try editing that config file to govern the behavior of thekernel, because unlike most config files, it’s just a historicalrecord of how the kernel was compiled.)
So the basics: ALSAis the linux sound driver and already installed; JACK is a soundserver but is sometimes mistakenly called a driver. Functionally it’sa virtual patchbay, and all the digital audio workstations use it.Qjackctl is the GUI for it, so install that and it’ll pick up JACKas a dependency. MIDI is all about synthesizing music – take astring of notes and apply a soundfont to change their aural qualityjust like regular fonts change the visual quality of a string ofletters. Without a soundfont, a midi file sounds ugly. Installqsynth, the GUI for fluidsynth, and it’ll pick up a good soundfontas a dependency. These programs take a little set-up, which is thefocus of today’s post, and to test that the setup works, you’llneed a virtual keyboard like vkeybd. A different one called vmpk ismore feature-rich, but it’s from the experimental repo and crashedwhen I tried it.
For the digitalaudio software itself, I’m most anxious to try out rosegarden,because it can do something unique: Record some music, and it’lltry to write music notation for what you sang! We also have Audacity,LMMS, and Qtractor in the standard repo, and the highly-regardedArdour in an experimental repo (so install at your own risk –you’ve been warned – don’t wake the baby because she’ll cry –I mean I know you installed Tumbleweed yourself so in a worst-casescenario you could do it again but focus on what a soul-crushinghassle that’d be).
Hopefully thisweekend I’ll have a post on one of the DAWs, but this one is to laythe groundwork: Install qjackctl, qsynth, and vkeybd. Don’t openthem yet, though.
Pulseaudio kind ofdoes the same job as JACK, but it’s more focused on the experienceof the consumer than the creator. Now you can just kill pulse andthat may be what the pros do on dedicated hardware, but I’m anamateur and I use my laptop for other stuff too, so I want to keeppulse and have it play nice with JACK. Since the plugin’s there bydefault, the way to make that happen is append these lines to/etc/pulse/default.pa:
load-modulemodule-jack-sink
load-modulemodule-jack-source
[Not sure how sophisticated the audience is here for things like appending to a file; if using KDE, then open File Manager - Super User (under system in the start menu), and then you can click on a configuration file in the root system and edit it with kate. Obviously, be careful while browsing system files with super powers.]
In order to useJACK, you’ll need to add yourself to the “audio” group. WithopenSUSE we can do that through the GUI in YaST: User and GroupManagement, open your user account, click the details tab, and checkthe box for any group you need - “audio” in this case. Then save.
Now that you’re amember of the audio group, you have to define what the means byappending these lines to /etc/security/limits.conf:
@audio - rtprio 95
@audio - memlockunlimited
Honestly, I don’tknow why there’s not a script to do this automatically when youinstall JACK – anyone using JACK needs these lines. The config filewill explain what these terms mean. I’ve seen recommendations touse 99 instead of 95 for the real-time priority, but I figure there’sno real competition on my machine.
Okay, fire upqjackctl and click settings. Highest priority here is the box in themiddle labeled interface. It refers to your hardware, and until youspecify a soundcard, you won’t hear anything. Also, if you specifythe wrong soundcard (like maybe the video card which also handlessound for HDMI output), you’ll hear nothing. If it’s not obviouswhich is which, you can try ‘em all quicker than you can finddocumentation online.
The sample rate is48000 by default but needs to be 44100 for compatibility with qsynth.I’ve hard from professional musicians who say the default framesper period of 1024 is fine, others who recommend as low as possible,and others who think something around 128 is best. So my conclusionis that it depends on your hardware, and this is one time toliterally play it by ear. I’m using 128, but I’m not sure thevirtual keyboard is much of a test.
Now startqsynth and click its settings. Technically, these are the settingsfor engine 1, and you can define more. Why you’d need to, I don’tyet know. Set the midi “driver” to jack, and then on thesoundfonts tab, open whatever you find in /usr/share/sounds/sf2. Nowopen vkeybd, open its View menu, and start vkeybd, and check key andcontrols. This keyboard doesn’t have all 88 piano keys, but the“key” control lets you map its 36 keys to the low, mid, or highrange of a piano. The controls menu lets you change the “channel”it plays on qsynth, which you’ll have fun with in a minute if thisall goes well.
Back to qjackctlagain, but this time click connect. On the
Audio tab, connectqsynth to system. On the
MIDI tab, connectsystem to qsynth. And on the
ALSA tab, connectvirtualkeyboard to midithrough.
Also on qjackctl,click start, and on qsynth, click start or restart. Both of theseprograms can live in the systray, and since you’ll have them bothopen whenever you do anything with digital audio, it might suit yourworkflow best to put them there.
Finally, click somekeys on the virtual keyboard - hear anything? Gosh I hope so, becauseI don’t know any trouble-shooting steps besides trying thedifferent hardware as the “interface” for qjackctl settings. Ifyou do hear something, it means your back-end is ready to go, and wecan explore using it with more sophisticated programs than vkeybd.
Back on qsynth,click channels, then click the line for the first channel. Trysomething from the list, like violin or trombone. Then press keys onvkeybd. Remember, you can just tap, or hold to sustain a note, oreven hold while you move the mouse across multiple keys. So, you canmake some cool sounds, but you can’t really play this like a realkeyboard. Fortunately, you can pick up an entry-level MIDI-capablekeyboard for less than a hundred bucks, and I found a MIDI-to-USBadapter on Amazon for ten more. Way back in high school, I playedtrombone (poorly), but the instrument I use best is my voice, and I’mhoping that I can simply use a microphone as input and change thenotes I sing to an instrumental part, but that’s for a later post.
One last thing. On qjackctl, click patchbay. On the left click Add, choose Audio/qsynth, and on the right click add and choose Audio/system. Then repeat for MIDI and ALSA, basically recreating the work you did in connections. Then save with a name like virtual keyboard. Next click on settings, options tab, set Activate Patchbay Persistance and choose the file you just created. Next time you start these programs, the connections are already in place. When working with more complex programs that are crash-prone, patchbay persistence will probably save a lot of time,
If anyone else outthere is curious about digital audio on opensuse, suggest a topic orpost your own. Otherwise, I plan to try rosegarden over the weekend,because I’ve come up with a couple of tunes. I know what they soundlike, obviously, but supposedly Rosegarden can construct the notationto show me what they look like, which sounds pretty cool. ‘Til nexttime,
GEF
PS: Stop reading ifyou’re an old hand with openSUSE, but if you only found this postbecause of the reference to audio and know little about the distro,ignore the shallow reviews! You know, the ones that waste a paragraphon whether they like the default wallpaper, as if that’s not theeasiest thing to change. Those reviews all say that openSUSE has apoor “out of the box” experience, and that’s because it doesn’tship what it shouldn’t. That takes 3 steps to rectify, and in themidst of all the other software you’re downloading and settingsyou’re playing with to get your perfect experience, hardlynoticeable. I’ll come back to that in a moment.
The reasons to tryopenSUSE are its “strong technical features” of which thestrongest, in my opinion, is snapper. It takes a snapshot every halfhour (and saves it for 4 hours), and it takes a snapshot every timeyou change the system (as by installing software) and saves 50changes. The cleanup algorithms are key; that’s what keeps thesnapshots from consuming your whole disk like an infestation of kudzugrass. (Remember to specify a cleanup algorithm if you take a manualsnapshot.) Notice how it uses both time- and count-based algorithms;if you leave your computer in the bag for a month, it should stillhave 50 snapshots. If you hose up your computer, 49 of the 50 shouldbe good, eh? And the bootloader lets you review the snapshots bytimestamp, pick one from before you messed up, and then if bootsproperly, roll back. Heck, it’s easier to do it than to explain it,and it has saved me lots of time.
Another contenderfor strongest feature is the build service, which tests newlyreleased software like the gorilla tested Samsonite luggage. It’sautomated but full of realistic user scenarios, hundreds of them on avariety of hardware. Thanks to the build service, Tumbleweed managesto serve up the latest software within a couple days of officialrelease, and yet it’s more stable than most other distros’ pointreleases. When I refer to official versus experimental repos above,the official ones have gone through this testing; the “experimental”ones aren’t doing anything wild, they’re just normal compiled andpackaged programs that haven’t been through the build servicetests.
In spite of thestupid name, YaST is a darn good graphical control center. Yes,desktop environments are starting to have sophisticated settingsexposure, but YaST is better for about half the things it does, andit exposes options that are normally available only in config filesobscure command line switches. Since openSUSE is desktop-agnostic andhas excellent implementations of several, a common interface forcritical system tasks helps the community support individual users.
Another strongtechnical feature is the installer, not the prettiest but the mostthoughtful, especially the partitioner (from YaST). It makes goodrecommendations even in complex multi-boot scenarios and the expertmode offers fine control. If you’re of a mind to try openSUSE, letme give you some advice for the install:
-
Choose “GuidedSetup” for partitionng, and then set LVM as a parameter. You maynot need it now, but LVM offers flexibility down the line, becausethe partitions can be changed and new ones added.
-
OpenSUSE willpropose separate root and userspace partitions, which is reallyhelpful if you ever need to reinstall. By default, it proposes BTRFSfor root because that supports snapper, and XFS for userspace. XFSpartitions can’t be shrunk, which is why the default proposal issmall – you can always expand later, right? Or just change from XFSto Ext4, or use BTRFS here too in case at some point you want tostart using snapper to backup your documents or music projects.
-
OpenSUSE willsuggest 40GB for the root partition, and remember that snapshots takehalf of that. Normal users may not need more, but if you’re readingthis post, you’re planning to play around with all kinds ofcreative suites, so you’ll probably want to bump this up.
On those gripesabout the “out of box” experience that shallow reviews mention.Search on the internet for these three things: “opensuse community”for a 1-click installer for multimedia codecs, “opensuse sleepingbeauty” for a 1-click installer for better on-screenfont-rendering, and “microsoft web fonts” for fonts like TimesNew Roman that Microsoft licensed for public use (if you want to beable to read Word documents that use those fonts, anyway). Note that1-click install only works with Firefox, or with Chrome(ium) using anextension. [If you want to save yourself a lot of clicks on the“1-click” install of multimedia codecs, open YaST’s softwaremanagement, Configure Repositories, Add commununty repo Packman andsave, select Option tab to Allow Vendor Change, and then on Packagetab, for All Packages, Update if newer version available. All thedependencies for the multimedia codecs live on this Packman repo, andyou’ll have to approve vendor changes for them individually if youdon’t follow this procedure first.]
So, I’ve got lotsof reasons to like openSUSE, even if it doesn’t have the reputationfor digital audio, but from what I’ve seen, it’s got a kernelthat can do the job, a working backend of pulseaudio, JACK, andqsynth, and a good if not wide selection of popular DAW software forme to test in the coming weeks. In the past I’ve found consistentlythat openSUSE is better than its rep – that could be its motto –and I suspect I’ll find the same to hold true, at least for theDAWs tested by the build service. See you then!