Topic: Pianoteq - Linux - Bitwig Studio
This discussion thread was started in response to a sub-discussion in the "Really a Fantastic Product" thread, here: https://forum.modartt.com/viewtopic.php...04#p977704
Now that JACK is running I have another issue. Pianoteq standalone works perfectly with JACK, but for some reason Bitwig gives a "MIDI input error" saying "device or resource busy." I read that a2jmidid needs to be stopped for Bitwig (something about it requiring exclusive control), but stopping it in Ubuntu Studio Controls and in the terminal don't seem to change anything. I looked into using Cadence, but apparently KXStudio (which includes it) is no longer supported.
And now if I try to load Pianoteq as a VST in Bitwig it fails, citing the path to the VST along with "could not read metadata." Otherwise audio plays within Bitwig via JACK. I can check on the Bitwig forum since this seems to be more of a Bitwig issue.
I downloaded the latest version of Bitwig Studio (currently 4.0.1), and am using the current version of Pianoteq (7.4.2), to test using the Pianoteq plugin within Bitwig using a Linux OS (Linux Mint XFCE edition, in my case). Everything seems to be working fine so far. Informational notes and suggestions follow--
-- -- -- -- --
First, do not start the JACK audio/MIDI system and a2jmidid (the ALSA to JACK MIDI bridge). Stop both apps if they are running. Although Bitwig Studio can (be configured to) use JACK, it likes to start/stop and control everything within its own, separated, insulated universe, or so it seems. (For interaction between Bitwig and other apps running outside of Bitwig, such as the Pianoteq standalone app or other MID/audio apps, the configuration to get everything working well together might be a little more challenging, and JACK (and possibly a2jmidid) might be necessary or helpful. But configuring all that to work together will of course be a good learning experience.)
In Pianoteq's Linux version, the Pianoteq virtual instrument is included as a Linux-native LV2 (.lv2) plugin package. (The VST version of the plugin is simply the Pianoteq_7.so file within the "Pianoteq 7.lv2" directory/folder.)
In Linux, personal VST and LV2 virtual instruments by convention are placed most conveniently within a user's home directory, in two hidden directories (.vst and .lv2, respectively). To use the Pianoteq plugin within Bitwig Studio, first make a copy of the Pianoteq LV2 plugin, which is a directory containing several files, at (for example) Pianoteq 7 --> x86-64-bit --> Pianoteq 7.lv2, and paste the copy of that LV2 directory into the .lv2 directory inside your home directory (create the .lv2 directory first, if one does not already exist). Use your file browser's settings to display hidden "dot" files (perhaps the "View" menu --> display hidden directories; in Linux, directories that begin with a dot (a period) are normally invisible or not shown by default).
Launch Bitwig Studio. In Bitwig's Settings (the main dashboard icon at top center of Bitwig) --> Locations --> Plug-in Locations, click the "+ Add Location" and navigate to the .lv2 hidden directory (right-click in the file-browser window and select "show hidden files" or equivalent, if necessary), and select and/or open the .lv2 directory. It should now appear in Bitwig's list of locations in which to look for VST and other plugins. In that list, click the circular two-arrow icon for that directory's listing to cause Bitwig to monitor/check the directory for any changes (such as new plugins added to the .lv2 directory). If Bitwig does not immediately recognize and list the Pianoteq plugin (in Settings --> Plug-ins), cause Bitwig to rescan for plugins or Quit and then re-launch Bitwig so that it will make an initial scan of the plug-in locations listed in its settings.
The VST version of the Pianoteq plugin is simply the single file named Pianoteq_7.so, within the "Pianoteq 7.lv2" directory, so instead of the procedure in the previous paragraph (or in addition to it), the Pianoteq_7.so file can be copied and pasted inside the user's home directory's .vst folder/directory.
Bitwig Studio works well with any of the Linux audio-MIDI system backends, selected in Settings --> Audio --> Audio System Driver model. For example, one could choose from Bitwig's list of audio backends, ALSA (Advanced Linux Sound Architecture), JACK (Jack Audio Connection Kit), or Pulse Audio (the sound/audio system usually active by default in most Linux distributions.
In Bitwig, one can set up or add one's MIDI controllers (digital piano or other keyboard, various other MIDI controller hardware) in Settings --> Controllers.
After doing the processes above, add the Pianoteq plugin to an instrument track in Bitwig, open the Pianoteq plugin's window (by clicking the little window icon at the right of the plugin's listing in the instrument-track sidebar), to test whether one's MIDI and audio settings are working correctly, and that MIDI data (when one presses the notes of one's MIDI piano/keyboard, for example) are routed through the Pianoteq plugin, and audio is produced and routed to one's speakers or headphones, through whatever audio interface or connection one has configured/set-up.
A note-- Bitwig will start the JACK daemon on its own, if JACK is not already running. However, Bitwig will use the last settings JACK was configured to use, which is stored at {home-directory}/.config/jack/conf.xml (you can open this file in a text editor to see which settings were stored and will be in effect when JACK is started, whether JACK is started by Bitwig or by QJackctl or manually in a terminal commandline. SO-- if you hear pops and overruns in the audio in Bitwig, when using JACK, quit Bitwig and reconfigure the settings for JACK using QJackctl, for sample rate, number of samples per period (per buffer), and number of periods/buffers. It's easiest to choose a larger number for samples-per-period, which will increase audio latency but will decrease Xruns that cause the audio pops. Once that is done, and JACK is started, then stopped, in QJackctl, those new settings will be saved by QJackctl into JACK's configuration file mentioned above, and the next time Bitwig is launched and JACK is selected as the audio engine backend, those new settings will be used and set by Bitwig when it starts the JACK daemon (independently of QJackctl). You can confirm these changes by launching the system monitor or task manager, typing "jack" in the search field to filter out all other non-jack related processes, and look at the command that Bitwig issued in the background to start JACK, which will look something like this--
jackd -T -ndefoult -dalsa -r48000 -p128 -n2 -D -C{audio-interface} -P{audio-interface}
You can also edit the JACK config file manually in a plain-text editor (like xed or gedit), rather than using the QJackctl GUI interface to change basic settings.
Following the suggestions above should at least help to get the Pianoteq plugin working with Bitwig and supply a little immediate gratification. Then with that confidence, one can later tackle some potentially more complex inter-application configuration and audio/MIDI routing. Have fun; good luck.
Linux, Pianoteq Pro, Organteq