http://wiki.rivendellaudio.org/api.php?action=feedcontributions&user=Ltyndale&feedformat=atomRivendell Wiki - User contributions [en]2024-03-28T08:47:45ZUser contributionsMediaWiki 1.26.4http://wiki.rivendellaudio.org/index.php?title=Compiling_Audio_Science_Driver_V4.20.42_on_Ubuntu_22.04&diff=758Compiling Audio Science Driver V4.20.42 on Ubuntu 22.042024-02-18T02:38:03Z<p>Ltyndale: </p>
<hr />
<div>From a recent email on the Rivendell mailing list, there is an issue getting the Audioscience HPI driver V4.20.42 working on Ubuntu 22.04. Chris Cottingham reached out to Audioscience and received the fix below.<br />
<br />
The drivers can be downloaded here:<br />
<br />
https://www.audioscience.com/internet/download/linux_drivers.htm<br />
<br />
https://www.audioscience.com/internet/download/drivers/released/v4/20/42/hpklinux_4.20.42.tar.gz<br />
<br />
---------------------------------<br />
<br />
Re: [Rivendell] ASI card issues - Ubuntu 22<br />
Contact photo<br />
From Chris Cottingham on 2024-01-27 14:11<br />
<br />
I have an update for everyone. I contacted Audioscience and Delio responded to my issue with the ASI driver and Ubuntu 22.04. He found an issue with the makefile and compiling on Ubuntu 22.04. He had me make some changes to the Makefile and the asihpi.c files in the /alsa-drv directory.<br />
<br />
Once I made these changes, the 4.20.42 driver was made and installed by DKMS just fine. He was awesome!! <br />
<br />
He also mentioned that they are going to release a new version with the changes in the future. He did not say when and I did not ask. I was just happy to have a working driver. <br />
<br />
Here are the changes he had me make. They worked for me. I do not warranty them nor does Audioscience. Your mileage may vary but I hope it fixes issues for other people as well. The "-" are what you remove and the "+" are what you add. Do not add the "-" or the "+" symbols in the file. They are only here to show what is removed and added. <br />
<br />
Once these changes are made, simply go into the hpilinux_4.20.42/alsa-drv directory and input "sudo dkms install . " command. <br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - Makefile <br />
<br />
-ifdef KBUILD_VERBOSE<br />
+ifneq ($(or $(KBUILD_MODULES),$(KBUILD_VERBOSE),$(KBUILD_EXTMOD)),)<br />
<br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - asihpi.c <br />
<br />
-static int snd_asihpi_card_free(struct snd_card *card)<br />
+static void snd_asihpi_card_free(struct snd_card *card)<br />
{<br />
- if (!card)<br />
- return 0;<br />
-<br />
- return snd_card_free(card);<br />
+ if (card) {<br />
+ snd_card_free(card);<br />
+ }<br />
}<br />
<br />
<br />
I hope this helps everyone!<br />
<br />
Have a wonderful day!</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Compiling_Audio_Science_Driver_V4.20.42_on_Ubuntu_22.04&diff=757Compiling Audio Science Driver V4.20.42 on Ubuntu 22.042024-02-18T02:31:17Z<p>Ltyndale: </p>
<hr />
<div>From a recent email on the Rivendell mailing list, there is an issue getting the Audioscience HPI driver working on Ubuntu 22.04. Chris Cottingham reached out to Audioscience and received the fix below.<br />
<br />
The drivers can be downloaded here:<br />
<br />
https://www.audioscience.com/internet/download/linux_drivers.htm<br />
<br />
https://www.audioscience.com/internet/download/drivers/released/v4/20/42/hpklinux_4.20.42.tar.gz<br />
<br />
---------------------------------<br />
<br />
Re: [Rivendell] ASI card issues - Ubuntu 22<br />
Contact photo<br />
From Chris Cottingham on 2024-01-27 14:11<br />
<br />
I have an update for everyone. I contacted Audioscience and Delio responded to my issue with the ASI driver and Ubuntu 22.04. He found an issue with the makefile and compiling on Ubuntu 22.04. He had me make some changes to the Makefile and the asihpi.c files in the /alsa-drv directory.<br />
<br />
Once I made these changes, the 4.20.42 driver was made and installed by DKMS just fine. He was awesome!! <br />
<br />
He also mentioned that they are going to release a new version with the changes in the future. He did not say when and I did not ask. I was just happy to have a working driver. <br />
<br />
Here are the changes he had me make. They worked for me. I do not warranty them nor does Audioscience. Your mileage may vary but I hope it fixes issues for other people as well. The "-" are what you remove and the "+" are what you add. Do not add the "-" or the "+" symbols in the file. They are only here to show what is removed and added. <br />
<br />
Once these changes are made, simply go into the hpilinux_4.20.42/alsa-drv directory and input "sudo dkms install . " command. <br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - Makefile <br />
<br />
-ifdef KBUILD_VERBOSE<br />
+ifneq ($(or $(KBUILD_MODULES),$(KBUILD_VERBOSE),$(KBUILD_EXTMOD)),)<br />
<br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - asihpi.c <br />
<br />
-static int snd_asihpi_card_free(struct snd_card *card)<br />
+static void snd_asihpi_card_free(struct snd_card *card)<br />
{<br />
- if (!card)<br />
- return 0;<br />
-<br />
- return snd_card_free(card);<br />
+ if (card) {<br />
+ snd_card_free(card);<br />
+ }<br />
}<br />
<br />
<br />
I hope this helps everyone!<br />
<br />
Have a wonderful day!</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Compiling_Audio_Science_Driver_V4.20.42_on_Ubuntu_22.04&diff=756Compiling Audio Science Driver V4.20.42 on Ubuntu 22.042024-02-18T02:23:07Z<p>Ltyndale: </p>
<hr />
<div>From a recent email on the Rivendell mailing list, there is an issue getting the Audioscience HPI driver working on Ubuntu 22.04. Chris Cottingham reached out to Audioscience and received the fix below.<br />
<br />
The drivers can be downloaded here:<br />
<br />
https://www.audioscience.com/internet/download/linux_drivers.htm<br />
<br />
https://www.audioscience.com/internet/download/drivers/released/v4/20/42/hpklinux_4.20.42.tar.gz<br />
<br />
---------------------------------<br />
<br />
Re: [Rivendell] ASI card issues - Ubuntu 22<br />
Contact photo<br />
From Chris Cottingham on 2024-01-27 14:11<br />
<br />
I have an update for everyone. I contacted Audioscience and Delio responded to my issue with the ASI driver and Ubuntu 22.04. He found an issue with the makefile and compiling on Ubuntu 22.04. He had me make some changes to the Makefile and the asihpi.c files in the /alsa-drv directory.<br />
<br />
Once I made these changes, the 4.20.42 driver was made and installed by DKMS just fine. He was awesome!! <br />
<br />
He also mentioned that they are going to release a new version with the changes in the future. He did not say when and I did not ask. I was just happy to have a working driver. <br />
<br />
Here are the changes he had me make. They worked for me. I do not warranty them nor does Audioscience. Your mileage may vary but I hope it fixes issues for other people as well. The "-" are what you remove and the "+" are what you add. Do not add the "-" or the "+" symbols in the file. They are only here to show what is removed and added. <br />
<br />
Once these changes are made, simply go into the hpilinux_4.20.42/alsa-drv directory and input "sudo dkms install . " command. <br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - Makefile <br />
<br />
-ifdef KBUILD_VERBOSE<br />
+ifneq ($(or $(KBUILD_MODULES),$(KBUILD_VERBOSE),$(KBUILD_EXTMOD)),)<br />
<br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - asihpi.c <br />
<br />
-static int snd_asihpi_card_free(struct snd_card *card)<br />
+static void snd_asihpi_card_free(struct snd_card *card)<br />
{<br />
- if (!card)<br />
- return 0;<br />
-<br />
- return snd_card_free(card);<br />
+ if (card) {<br />
+ snd_card_free(card);<br />
+ }<br />
}<br />
<br />
<br />
I hope this helps everyone!<br />
<br />
Have a wonderful day!</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Compiling_Audio_Science_Driver_V4.20.42_on_Ubuntu_22.04&diff=755Compiling Audio Science Driver V4.20.42 on Ubuntu 22.042024-02-18T02:21:28Z<p>Ltyndale: Created page with "From a recent email on the Rivendell mailing list, there is an issue getting the Audioscience HPI driver working on Ubuntu 22.04. Chris Cottingham reached out to Audioscience..."</p>
<hr />
<div>From a recent email on the Rivendell mailing list, there is an issue getting the Audioscience HPI driver working on Ubuntu 22.04. Chris Cottingham reached out to Audioscience and received the fix below.<br />
<br />
The drivers can be downloaded here:<br />
<br />
https://www.audioscience.com/internet/download/linux_drivers.htm<br />
<br />
---------------------------------<br />
<br />
Re: [Rivendell] ASI card issues - Ubuntu 22<br />
Contact photo<br />
From Chris Cottingham on 2024-01-27 14:11<br />
<br />
I have an update for everyone. I contacted Audioscience and Delio responded to my issue with the ASI driver and Ubuntu 22.04. He found an issue with the makefile and compiling on Ubuntu 22.04. He had me make some changes to the Makefile and the asihpi.c files in the /alsa-drv directory.<br />
<br />
Once I made these changes, the 4.20.42 driver was made and installed by DKMS just fine. He was awesome!! <br />
<br />
He also mentioned that they are going to release a new version with the changes in the future. He did not say when and I did not ask. I was just happy to have a working driver. <br />
<br />
Here are the changes he had me make. They worked for me. I do not warranty them nor does Audioscience. Your mileage may vary but I hope it fixes issues for other people as well. The "-" are what you remove and the "+" are what you add. Do not add the "-" or the "+" symbols in the file. They are only here to show what is removed and added. <br />
<br />
Once these changes are made, simply go into the hpilinux_4.20.42/alsa-drv directory and input "sudo dkms install . " command. <br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - Makefile <br />
<br />
-ifdef KBUILD_VERBOSE<br />
+ifneq ($(or $(KBUILD_MODULES),$(KBUILD_VERBOSE),$(KBUILD_EXTMOD)),)<br />
<br />
<br />
~/hpilinux_4.20.42/alsa-drv/ - asihpi.c <br />
<br />
-static int snd_asihpi_card_free(struct snd_card *card)<br />
+static void snd_asihpi_card_free(struct snd_card *card)<br />
{<br />
- if (!card)<br />
- return 0;<br />
-<br />
- return snd_card_free(card);<br />
+ if (card) {<br />
+ snd_card_free(card);<br />
+ }<br />
}<br />
<br />
<br />
I hope this helps everyone!<br />
<br />
Have a wonderful day!</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Setup_%26_Configuration&diff=754Setup & Configuration2024-02-18T02:16:43Z<p>Ltyndale: /* Sound card setups */</p>
<hr />
<div>=== Rivendell Setup & Configuration ===<br />
<br />
==== General ====<br />
* [[Post installation errata | Post installation configuration tasks]] - Things you may need to do after installing Rivendell.<br />
* [[Choosing how to start Rivendell]] - Describes how to enable multiple Linux user access to Rivendell.<br />
* [[How_to_change_the_text_editor_that_RDLogManager_logs_and_reports_display_with|How to change the text editor that RDLogManager logs and other reports in Rivendell display with to another editor]]<br />
* [[How do I make Rivendell play Audio from the "Line In" of the Sound Card on the air?]]<br />
* [[rdadmin database creation and other dialog screens]] - Contains examples of various Rivendell user dialog screens.<br />
* [[How to import audio from a windows/samba shared folder on Ubuntu]] - Similar techniques can be used with other distributions.<br />
* [[How to rename a Rivendell host]]<br />
* [[Firewall Setup|Setting Up A Local Firewall On The Rivendell System]]<br />
* [http://rivendell.tryphon.org/wiki/Current_2.0_BETA_Upgrade/Installation_Info How to Upgrade Rivendell to version 2 from an earlier version]<br />
* [[How to trigger events from tones on your network]]<br />
* [[Streaming from Rivendell]] <br />
* [[On_Screen_Keyboard|How to setup an On Screen Keyboard]]<br />
* [[How to get now playing information into a text file]] - You may also need to refer to [[Rivendell Loadable Module SDK - For Sending Now & Next Data to external systems | Rivendell Loadable Module SDK]]<br />
<br />
==== Configuring Audio Subsystems (ALSA and Jack) to work with Rivendell ====<br />
** [[Configuring Rivendell to work with ALSA]]<br />
** [[ALSA/Audigy Multichannel Setup]]<br />
** [[Jack]] - Updated information on using JackAudio<br />
** [[Configuring Jack with Pulseaudio on Linux Mint 21]] - Information on getting Jack --> Pulseuadio working on Mint21<br />
** [[Configuring Jack for use in Rivendell]] - Old information, out of date!<br />
** [[Fine tuning ALSA for your sound card]]<br />
<br />
==== Sound card setups ====<br />
** [[Delta 1010LT]]<br />
** [[ALSA/Audigy_Multichannel_Setup|Audigy Multichannel Setup]]<br />
** [[Sound_Cards_Known_to_work_with_Rivendell|Sound cards known to work with Rivendell]]<br />
** [[Compiling Audio Science Driver V4.20.42 on Ubuntu 22.04]]<br />
** [[Compiling Audio Science Drivers for older ASI4215, ASI4300 series that are not supported in the newest versions]]<br />
** [[ALSA/Audigy_Multichannel_Setup_Old|Old Info - Audigy Multichannel Setup]]<br />
<br />
==== Setting up a Networked Rivendell System ====<br />
** [[Networked Audio Library|Setting Up the Audio Library On a Different Machine]]<br />
** [[Can I move just my audio carts to another Rivendell System?]]<br />
** [[Remote Client Access|Setting Up Rivendell for Remote Client Access]]<br />
** [[Setting up a dedicated Rivendell MySQL and audio store server]]<br />
** [[Hot Standby Host|Setting Up a Hot Standby Host (appnote0003)]]<br />
** [[Setup of Hot Standby rdcatchd events]]<br />
** [[Proper MySQL database migration]]<br />
** [[DHCP vs. static IP addresses]]<br />
** [[NFS Server and Client Configuration]]<br />
<br />
==== Touch screen Setups ====<br />
* [[ELO touchscreen setup (debian/KDE)]]<br />
<br />
==== Switcher Setups ====<br />
** [[Wegener Unity 4000 Satellite Receiver]]<br />
** [[Network Switcher setup - Broadcast Tools SS 8.2|Broadcast Tools SS 8.2]]<br />
** [[Flexroute Digital Receiver]]<br />
** [[Content Depot PRSS]]<br />
** [[How_do_I_make_Rivendell_play_Audio_from_the_%22Line_In%22_of_the_Sound_Card_on_the_air%3F|Local Audio Adapter]]<br />
<br />
==== General Purpose Input/Output (GPIO) Setups ====<br />
** [[Axia Element board]]<br />
** [[Joystick port as GPI]]<br />
** [[Serial Port / Modem Control Lines as GPIO]]<br />
<br />
==== Rivendell Setup Troubleshooting ====<br />
** [[RDAdmin first start - "Wrong access permissions for accessing mysql!"]]<br />
** [[Test tone will not play after initial setup]]<br />
** [[No Sound output or input after setting up Jack or Audio Science Sound Card when they were not the first card]]<br />
** [[Delayed playback response on click info]]<br />
** [[Garbled audio, alsa error 32: Broken pipe, Xrun errors]]<br />
** [[Ubuntu - No sound/sound card in Rivendell after setup]]<br />
** [[Ubuntu - After installation I get an error "Cannot start Rivendell daemons"]]<br />
** [[KXStudio or Kubuntu (KDE Desktop) - Can't set colors in RDlogmanager events/clocks]]<br />
** [[CHAIN TO at end of log does not always work properly]]<br />
** [[How to fine tune ALSA to minimize the varying delay/gap when segueing(~50-150ms)]]<br />
** [[Error Message - rdfilewrite: unable to open output file]]<br />
** [[Error Message - Cart Creation Failure Unable to create new cart for voice track]]<br />
** [[Gray buttons in RDLogEdit on Windows Rivendell Host]]<br />
** [[I have sound but the levels are very low. How do I increase them?]]<br />
** [[The meters only work if I am logged in as root]]<br />
** [[Importing an audio file gets to about 50%, pauses, and then fails with an unhelpful error]]<br />
** [[My Dropbox doesn't import any of the audio files I put in there]]<br />
** [[Serial port Troubleshooting]]<br />
** [[CD ripping Troubleshooting]]<br />
** [[Troubleshooting GPIs and GPOs | GPIs and GPOs Troubleshooting]]</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=753Jack2024-02-11T05:47:27Z<p>Ltyndale: </p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 or 4 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under the logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
== Enabling Promiscuous Mode on Rivendell V3 ==<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4 as it defaults to run in promiscuous mode. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user. Once you have made the various changes the easiest way to ensure all the updates are picked up is to reboot the system.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
If you are running Rivendell V4 or have set up promiscuous mode on Rivendell V3 (as described above) then you should be able to start JACK Clients your Linux desktop and they should be able to see the Jackd server. If there are clients you always want to have started then it is best to have Rivendell start them up.<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=752Jack2024-02-11T05:46:59Z<p>Ltyndale: /* Enabling Promiscuous Mode on Rivendell V3 */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 or 4 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under the logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Enabling Promiscuous Mode on Rivendell V3 ===<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4 as it defaults to run in promiscuous mode. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user. Once you have made the various changes the easiest way to ensure all the updates are picked up is to reboot the system.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
If you are running Rivendell V4 or have set up promiscuous mode on Rivendell V3 (as described above) then you should be able to start JACK Clients your Linux desktop and they should be able to see the Jackd server. If there are clients you always want to have started then it is best to have Rivendell start them up.<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Configuring_Jack_with_Pulseaudio_on_Linux_Mint_21&diff=751Configuring Jack with Pulseaudio on Linux Mint 212024-02-11T05:42:46Z<p>Ltyndale: Configuring Jack with Pulseaudio on Linux Mint 21</p>
<hr />
<div>This information was supplied by Luigino Bracci Roa via the Rivendell Open Source Automation Users Facebook Forum.<br />
<br />
=== Steps to install Rivendell 4 with JACK and Pulseaudio in Linuxmint 21 Mate (Ubuntu 22.04-based) ===<br />
<br />
- Install Linuxmint 21 Mate<br />
<br />
- Update packages (sudo apt update && sudo apt upgrade)<br />
<br />
- Install KXStudio repositories following steps in https://kx.studio/Repositories<br />
<br />
sudo apt update<br />
sudo apt install kxstudio-default-settings cadence jackd2 pulseaudio-module-jack linux-image-lowlatency catia<br />
<br />
- Add your user to the "audio" group (sudo adduser <username> audio)<br />
<br />
- Run Cadence. Click on Configure, then click on Driver, choose ALSA, choose in Device/Interface your sound card or sound device. Configure other parameters and click OK.<br />
<br />
- In JACK Bridges / Alsa Audio, choose in Bridge type: ALSA -> Pulseaudio- JACK<br />
<br />
- In Pulseaudio, turn on "Auto-start at login"<br />
<br />
- Do NOT turn on the option "Auto-start JACK or LADISH at login"<br />
<br />
- Reboot<br />
<br />
- Install Rivendell 4 following steps in https://software.paravelsystems.com/howtos/ubuntu/jammy/ (starting in "Running installation script")<br />
<br />
- Add current user to the group "rivendell" (sudo adduser <username> rivendell)<br />
<br />
- Run "sudo systemctl disable rivendell.service" (we don't want Rivendell to start automaticaly as a service whern the system boots, we need to start it after JACK is running)<br />
<br />
- Let's disable Pulseaudio so it don't run at startup:<br />
<br />
systemctl --user disable pulseaudio.service<br />
systemctl --user disable pulseaudio.socket<br />
sudo systemctl --global disable pulseaudio.service<br />
sudo systemctl --global disable pulseaudio.socket<br />
<br />
- As root, create a file /etc/sudoers.d/rivendell with this content (replace "username" with your user):<br />
<br />
username ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart rivendell.service<br />
username ALL=(ALL) NOPASSWD: /usr/bin/systemctl start rivendell.service<br />
username ALL=(ALL) NOPASSWD: /usr/bin/systemctl stop rivendell.service<br />
<br />
I'm making this so a regular user can start or stop Rivendell without being root.<br />
<br />
- Let's make a script to start JACK, and then Rivendell, in the appropiate order. First, create a ~/Scripts forder and then, create an script "start-rivendell.sh" with the following content:<br />
<br />
#!/bin/sh<br />
notify-send "Please wait while starting audio services..."<br />
cadence-session-start -s<br />
sudo systemctl start rivendell.service<br />
sleep 3<br />
notify-send "Audio services started!"<br />
<br />
- You can place in the script other needed commands... I also place there a "mount /var/snd" for my workstations.<br />
<br />
- Give exec permissions to the script (chmod +x ~/Scripts/start-rivendell.sh)<br />
<br />
- In the Linuxmint menu, find the "Startup Applications" applet. Add the script "/home/<username>/Scripts/start-rivendell.sh" (use the full path, change <username> as appropiate).<br />
<br />
- Remove any other Cadence startup script in Startup Applications.<br />
<br />
- Reboot.<br />
<br />
- Configure the host in rdadmin (in "Manage hosts", add your host computer, verify that JACK is show in Audio Resources, then configure the cards and ports as appropiate)<br />
<br />
- In this point you can reboot your server and, after logged in, and after receiving the "Audio services started" message, you can check with catia or other patchbay, and Rivendell should be running in JACK.<br />
<br />
- You can use the jack_connect command (placing it in the start-rivendell.sh script) to automatically connect Rivendell with the system ins and outs in JACK. Or you can place this in /etc/rd.conf:<br />
<br />
[JackSession]<br />
Source1=rivendell_1:playout_0L<br />
Destination1=system:playback_1<br />
Source2=rivendell_1:playout_0R<br />
Destination2=system:playback_2<br />
Source3=rivendell_1:playout_1L<br />
Destination3=system:playback_3<br />
Source4=rivendell_1:playout_1R<br />
Destination4=system:playback_4<br />
...etc.<br />
<br />
- If you get any problem with rdlibrary uploading or listening carts, it's probable you have troubles with the rdxport.cgi permissions. I've solved it with this commands:<br />
<br />
sudo chown root:root /var/www/rd-bin/rdxport.cgi<br />
sudo chmod 4755 /var/www/rd-bin/rdxport.cgi</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Configuring_Jack_with_Pulseaudio_on_Linux_Mint_21&diff=750Configuring Jack with Pulseaudio on Linux Mint 212024-02-11T05:41:23Z<p>Ltyndale: Created page with "This information was supplied by Luigino Bracci Roa via the Rivendell Open Source Automation Users Facebook Forum. === Steps to install Rivendell 4 with JACK and Pulseaudio i..."</p>
<hr />
<div>This information was supplied by Luigino Bracci Roa via the Rivendell Open Source Automation Users Facebook Forum.<br />
<br />
=== Steps to install Rivendell 4 with JACK and Pulseaudio in Linuxmint 21 Mate (Ubuntu 22.04-based) ===<br />
<br />
- Install Linuxmint 21 Mate<br />
<br />
- Update packages (sudo apt update && sudo apt upgrade)<br />
<br />
- Install KXStudio repositories following steps in https://kx.studio/Repositories<br />
<br />
sudo apt update<br />
sudo apt install kxstudio-default-settings cadence jackd2 pulseaudio-module-jack linux-image-lowlatency catia<br />
<br />
- Add your user to the "audio" group (sudo adduser <username> audio)<br />
<br />
- Run Cadence. Click on Configure, then click on Driver, choose ALSA, choose in Device/Interface your sound card or sound device. Configure other parameters and click OK.<br />
<br />
- In JACK Bridges / Alsa Audio, choose in Bridge type: ALSA -> Pulseaudio- JACK<br />
<br />
- In Pulseaudio, turn on "Auto-start at login"<br />
<br />
- Do NOT turn on the option "Auto-start JACK or LADISH at login"<br />
<br />
- Reboot<br />
<br />
- Install Rivendell 4 following steps in https://software.paravelsystems.com/howtos/ubuntu/jammy/ (starting in "Running installation script")<br />
<br />
- Add current user to the group "rivendell" (sudo adduser <username> rivendell)<br />
<br />
- Run "sudo systemctl disable rivendell.service" (we don't want Rivendell to start automaticaly as a service whern the system boots, we need to start it after JACK is running)<br />
<br />
- Let's disable Pulseaudio so it don't run at startup:<br />
<br />
systemctl --user disable pulseaudio.service<br />
systemctl --user disable pulseaudio.socket<br />
sudo systemctl --global disable pulseaudio.service<br />
sudo systemctl --global disable pulseaudio.socket<br />
<br />
- As root, create a file /etc/sudoers.d/rivendell with this content (replace "username" with your user):<br />
<br />
username ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart rivendell.service<br />
username ALL=(ALL) NOPASSWD: /usr/bin/systemctl start rivendell.service<br />
username ALL=(ALL) NOPASSWD: /usr/bin/systemctl stop rivendell.service<br />
<br />
I'm making this so a regular user can start or stop Rivendell without being root.<br />
<br />
- Let's make a script to start JACK, and then Rivendell, in the appropiate order. First, create a ~/Scripts forder and then, create an script "start-rivendell.sh" with the following content:<br />
<br />
#!/bin/sh<br />
notify-send "Please wait while starting audio services..."<br />
cadence-session-start -s<br />
sudo systemctl start rivendell.service<br />
sleep 3<br />
notify-send "Audio services started!"<br />
<br />
- You can place in the script other needed commands... I also place there a "mount /var/snd" for my workstations.<br />
<br />
- Give exec permissions to the script (chmod +x ~/Scripts/start-rivendell.sh)<br />
<br />
- In the Linuxmint menu, find the "Startup Applications" applet. Add the script "/home/<username>/Scripts/start-rivendell.sh" (use the full path, change <username> as appropiate).<br />
<br />
- Remove any other Cadence startup script in Startup Applications.<br />
<br />
- Reboot.<br />
<br />
- Configure the host in rdadmin (in "Manage hosts", add your host computer, verify that JACK is show in Audio Resources, then configure the cards and ports as appropiate)<br />
<br />
- In this point you can reboot your server and, after logged in, and after receiving the "Audio services started" message, you can check with catia or other patchbay, and Rivendell should be running in JACK.<br />
<br />
- You can use the jack_connect command (placing it in the start-rivendell.sh script) to automatically connect Rivendell with the system ins and outs in JACK. Or you can place this in /etc/rd.conf:<br />
<br />
[JackSession]<br />
Source1=rivendell_1:playout_0L<br />
Destination1=system:playback_1<br />
<br />
Source2=rivendell_1:playout_0R<br />
Destination2=system:playback_2<br />
<br />
Source3=rivendell_1:playout_1L<br />
Destination3=system:playback_3<br />
<br />
Source4=rivendell_1:playout_1R<br />
Destination4=system:playback_4<br />
<br />
...etc.<br />
<br />
- If you get any problem with rdlibrary uploading or listening carts, it's probable you have troubles with the rdxport.cgi permissions. I've solved it with this commands:<br />
<br />
sudo chown root:root /var/www/rd-bin/rdxport.cgi<br />
sudo chmod 4755 /var/www/rd-bin/rdxport.cgi</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Setup_%26_Configuration&diff=749Setup & Configuration2024-02-11T05:31:36Z<p>Ltyndale: /* Configuring Audio Subsystems (ALSA and Jack) to work with Rivendell */</p>
<hr />
<div>=== Rivendell Setup & Configuration ===<br />
<br />
==== General ====<br />
* [[Post installation errata | Post installation configuration tasks]] - Things you may need to do after installing Rivendell.<br />
* [[Choosing how to start Rivendell]] - Describes how to enable multiple Linux user access to Rivendell.<br />
* [[How_to_change_the_text_editor_that_RDLogManager_logs_and_reports_display_with|How to change the text editor that RDLogManager logs and other reports in Rivendell display with to another editor]]<br />
* [[How do I make Rivendell play Audio from the "Line In" of the Sound Card on the air?]]<br />
* [[rdadmin database creation and other dialog screens]] - Contains examples of various Rivendell user dialog screens.<br />
* [[How to import audio from a windows/samba shared folder on Ubuntu]] - Similar techniques can be used with other distributions.<br />
* [[How to rename a Rivendell host]]<br />
* [[Firewall Setup|Setting Up A Local Firewall On The Rivendell System]]<br />
* [http://rivendell.tryphon.org/wiki/Current_2.0_BETA_Upgrade/Installation_Info How to Upgrade Rivendell to version 2 from an earlier version]<br />
* [[How to trigger events from tones on your network]]<br />
* [[Streaming from Rivendell]] <br />
* [[On_Screen_Keyboard|How to setup an On Screen Keyboard]]<br />
* [[How to get now playing information into a text file]] - You may also need to refer to [[Rivendell Loadable Module SDK - For Sending Now & Next Data to external systems | Rivendell Loadable Module SDK]]<br />
<br />
==== Configuring Audio Subsystems (ALSA and Jack) to work with Rivendell ====<br />
** [[Configuring Rivendell to work with ALSA]]<br />
** [[ALSA/Audigy Multichannel Setup]]<br />
** [[Jack]] - Updated information on using JackAudio<br />
** [[Configuring Jack with Pulseaudio on Linux Mint 21]] - Information on getting Jack --> Pulseuadio working on Mint21<br />
** [[Configuring Jack for use in Rivendell]] - Old information, out of date!<br />
** [[Fine tuning ALSA for your sound card]]<br />
<br />
==== Sound card setups ====<br />
** [[Delta 1010LT]]<br />
** [[ALSA/Audigy_Multichannel_Setup|Audigy Multichannel Setup]]<br />
** [[Sound_Cards_Known_to_work_with_Rivendell|Sound cards known to work with Rivendell]]<br />
** [[Compiling Audio Science Drivers for older ASI4215, ASI4300 series that are not supported in the newest versions]]<br />
** [[ALSA/Audigy_Multichannel_Setup_Old|Old Info - Audigy Multichannel Setup]]<br />
<br />
==== Setting up a Networked Rivendell System ====<br />
** [[Networked Audio Library|Setting Up the Audio Library On a Different Machine]]<br />
** [[Can I move just my audio carts to another Rivendell System?]]<br />
** [[Remote Client Access|Setting Up Rivendell for Remote Client Access]]<br />
** [[Setting up a dedicated Rivendell MySQL and audio store server]]<br />
** [[Hot Standby Host|Setting Up a Hot Standby Host (appnote0003)]]<br />
** [[Setup of Hot Standby rdcatchd events]]<br />
** [[Proper MySQL database migration]]<br />
** [[DHCP vs. static IP addresses]]<br />
** [[NFS Server and Client Configuration]]<br />
<br />
==== Touch screen Setups ====<br />
* [[ELO touchscreen setup (debian/KDE)]]<br />
<br />
==== Switcher Setups ====<br />
** [[Wegener Unity 4000 Satellite Receiver]]<br />
** [[Network Switcher setup - Broadcast Tools SS 8.2|Broadcast Tools SS 8.2]]<br />
** [[Flexroute Digital Receiver]]<br />
** [[Content Depot PRSS]]<br />
** [[How_do_I_make_Rivendell_play_Audio_from_the_%22Line_In%22_of_the_Sound_Card_on_the_air%3F|Local Audio Adapter]]<br />
<br />
==== General Purpose Input/Output (GPIO) Setups ====<br />
** [[Axia Element board]]<br />
** [[Joystick port as GPI]]<br />
** [[Serial Port / Modem Control Lines as GPIO]]<br />
<br />
==== Rivendell Setup Troubleshooting ====<br />
** [[RDAdmin first start - "Wrong access permissions for accessing mysql!"]]<br />
** [[Test tone will not play after initial setup]]<br />
** [[No Sound output or input after setting up Jack or Audio Science Sound Card when they were not the first card]]<br />
** [[Delayed playback response on click info]]<br />
** [[Garbled audio, alsa error 32: Broken pipe, Xrun errors]]<br />
** [[Ubuntu - No sound/sound card in Rivendell after setup]]<br />
** [[Ubuntu - After installation I get an error "Cannot start Rivendell daemons"]]<br />
** [[KXStudio or Kubuntu (KDE Desktop) - Can't set colors in RDlogmanager events/clocks]]<br />
** [[CHAIN TO at end of log does not always work properly]]<br />
** [[How to fine tune ALSA to minimize the varying delay/gap when segueing(~50-150ms)]]<br />
** [[Error Message - rdfilewrite: unable to open output file]]<br />
** [[Error Message - Cart Creation Failure Unable to create new cart for voice track]]<br />
** [[Gray buttons in RDLogEdit on Windows Rivendell Host]]<br />
** [[I have sound but the levels are very low. How do I increase them?]]<br />
** [[The meters only work if I am logged in as root]]<br />
** [[Importing an audio file gets to about 50%, pauses, and then fails with an unhelpful error]]<br />
** [[My Dropbox doesn't import any of the audio files I put in there]]<br />
** [[Serial port Troubleshooting]]<br />
** [[CD ripping Troubleshooting]]<br />
** [[Troubleshooting GPIs and GPOs | GPIs and GPOs Troubleshooting]]</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=748Jack2024-02-11T05:27:11Z<p>Ltyndale: /* Adding JACK Clients */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 or 4 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under the logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Enabling Promiscuous Mode on Rivendell V3 ===<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user. Once you have made the various changes the easiest way to ensure all the updates are picked up is to reboot the system.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
If you are running Rivendell V4 or have set up promiscuous mode on Rivendell V3 (as described above) then you should be able to start JACK Clients your Linux desktop and they should be able to see the Jackd server. If there are clients you always want to have started then it is best to have Rivendell start them up.<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=747Jack2024-02-11T05:21:52Z<p>Ltyndale: /* Enabling Promiscuous Mode on Rivendell V3 */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 or 4 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under the logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Enabling Promiscuous Mode on Rivendell V3 ===<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user. Once you have made the various changes the easiest way to ensure all the updates are picked up is to reboot the system.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=746Jack2024-02-11T05:20:27Z<p>Ltyndale: /* Overview */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 or 4 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under the logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Enabling Promiscuous Mode on Rivendell V3 ===<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=745Jack2024-02-11T05:18:57Z<p>Ltyndale: /* Configure Rivendell 3 For Use With JACK */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 or 4 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under that user logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Enabling Promiscuous Mode on Rivendell V3 ===<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=744Jack2024-02-11T05:18:12Z<p>Ltyndale: </p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under that user logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Enabling Promiscuous Mode on Rivendell V3 ===<br />
<br />
'''Note that this is NOT necessary if you are running Rivendell V4. It is only needed with V3.'''<br />
<br />
Setting up promiscuous mode on Rivendell V3 requires the creation of an environment variable file, and adding that variable to Systemd's Rivendell.service file.<br />
<br />
First create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
You will also need to make sure that the logged in user is part of the audio group. From a shell:<br />
<br />
usermod -a -G audio **user**<br />
<br />
where **user** is the logged in user.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=743Jack2024-02-11T05:10:37Z<p>Ltyndale: /* Overview */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under that user logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default Jack behavior.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=742Jack2024-02-11T05:10:14Z<p>Ltyndale: /* Overview */</p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When ''jackd''(8) (the JACK daemon) is run in promiscuous mode then Rivendell can start jackd as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under that user logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default behavior.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Jack&diff=741Jack2024-02-11T05:09:05Z<p>Ltyndale: </p>
<hr />
<div>The [https://jackaudio.org/ Jack Audio Connection Kit] (JACK) is a suite of professional-grade, low-latency tools for routing digital audio.<br />
<br />
== Configure Rivendell 3 For Use With JACK ==<br />
<br />
This has been confirmed to work with Rivendell 4 and Ubuntu 22.04.3 LTS - 2/1/24 kw<br />
<br />
=== Overview ===<br />
<br />
You have a several choices for getting audio out of a Rivendell system. Notably Rivendell supports [https://alsa-project.org/ ALSA], the native Linux audio subsystem, and JACK, a layer above ALSA.<br />
<br />
JACK enables multiple audio applications to simultaneously access audio devices on Linux systems.<br />
<br />
With Rivendell 3.x there are two ways to run JACK. By default Rivendell processes and JACK processes must be run as the same user ID. And since Rivendell processes (in the packaged version available from [[Paravel Systems - USA|Paravel Systems]]) '''''always''''' run as ''root'', this means ''jackd''(8) (the JACK daemon) must also run as ''root''.<br />
<br />
The other way to run JACK is in Promiscuous mode. When Jack is run in promiscuous mode then Rivendell can start Jack as ''root'' and as long as the logged in user is a member of the audio group, then any JACK processes run under that user logged in user will also see the JACK server. With Rivendell V3 accomplishing this requires a few minor modifications to configuration files. With Rivendell V4 this is the default behavior.<br />
<br />
=== Configuring Rivendell to use JACK ===<br />
<br />
Prior to configuring JACK, ensure that your computer has the following packages installed: zsh, zita-ajbridge, jackd (no real time when prompted), jacktools (added 2/1/24 kw - Ubuntu 22.04.3 LTS)<br />
<br />
So, you&rsquo;ve decided to use JACK for your Rivendell audio. First, make sure you tell Rivendell to '''not''' use any ALSA devices on your computer using the [[RDAlsaConfig]] Rivendell app. Run this app from the Rivendell menu and simply unhighlight all devices in the list, as shown here:<br />
<br />
[[Image:RDAlsaConfig-no-selections.png|center|400px|thumb|border|RDAlsaConfig Ready for JACK]]<br />
<br />
:(As an aside, when you use JACK for Rivendell&rsquo;s audio routing, you can also use any other [https://jackaudio.org/applications/ JACK-enabled audio app] alongside Rivendell.)<br />
<br />
:(Another aside: know that Rivendell works fine using both JACK clients and [http://www.audioscience.com/ Audio Science] adapters.)<br />
<br />
Set up JACK on a per-host basis by modifying the configuration in [[RDAdmin]]->[[RDAdmin#Manage_Hosts|Manage Hosts]]->''hostname''. In the host configuration window, touch the '''JACK Settings''' button to manage the Jack settings.<br />
<br />
Ensure that Rivendell starts the JACK app by checking the '''Start JACK Server''' checkbox. Unless you have a ''really'' good reason to change it (beyond the scope of this article), leave the '''JACK Server Name''' set to ''(default)'' as shown here: <br />
<br />
[[Image:Jack-clients-3.4.1.png|center|thumb|440px|border|Configured JACK Clients in Reivendell 3.4.1]]<br />
<br />
<div style="clear: both"></div><br />
<br />
It is easiest to set the '''JACK Command Line''' to the full path of a shell script so you can make changes to the way in which the JACK app is started.<br />
<br />
:'''Note''' that regardless of how you configure the '''JACK Command Line''' if you make ''<u>any</u>'' changes to the '''JACK Settings''' you ''<u>must</u>'' restart the Rivendell service, interrupting audio playout, in order for the changes to take effect. Plan your changes accordingly.<br />
<br />
Here is an example JACK startup script:<br />
<br />
<nowiki><br />
#!/bin/sh<br />
<br />
#######################################################################<br />
##<br />
## This script is started by Rivendell caed when the Rivendell daemons<br />
## are launched. The script assumes a "default" Rivendell installation<br />
## with the username 'rd' automatically logged in and running the<br />
## windowing system.<br />
##<br />
## Change the JACK sample rate to match your Rivendell sample rate<br />
## set in RDAdmin->System Settings.<br />
##<br />
#######################################################################<br />
<br />
export LANG=en_US.UTF-8<br />
export TERM=xterm<br />
export QTDIR=/usr/lib64/qt4<br />
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/home/rd/bin<br />
export XDG_DATA_DIRS=/usr/local/share/:/usr/share/<br />
export XDG_RUNTIME_DIR=/run/user/1000<br />
export QT_GRAPHICSSYSTEM_CHECKED=1<br />
<br />
exec /usr/bin/jackd --name default -d dummy -r 48000 2>&1 > /var/tmp/jackd.log</nowiki><br />
<br />
Copy the above text and save it in a file named <tt>/usr/local/bin/jackd-start</tt>. Make the file executable with <tt>sudo chmod +x /usr/local/bin/jackd-start</tt>. Enter the full path of the shell script into the '''JACK Command Line''' text box.<br />
Ensure that the sample rate in the above script matches the sample rate in Rivendell Admin > System Settings<br />
<br />
When using the above script, notice that we initialize JACK with a ''&ldquo;dummy&ldquo;'' device. We do this because the default device name is always ''&ldquo;system&rdquo;''. Not only is this a useless name, it is also something one cannot change without editing the JACK source code. In the above script, we assign the ''&ldquo;dummy&rdquo;'' device to the ''&ldquo;system&rdquo;'' JACK client in order to &ldquo;get it out of the way&rdquo;. We then use ''jack-plumbing'' or some other means to connect JACK client inputs and outputs.<br />
<br />
==== Adding JACK Clients ====<br />
<br />
After configuring Rivendell to start the JACK subsystem, you probably need to also start some JACK clients. Do this by adding each one in the '''JACK Clients to Start''' section (see the figure above for examples).<br />
<br />
You might consider using the ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin/pmw-jack-setup pmw-jack-setup]'' script (or something like it) to configure your ALSA sound devices to work with JACK. This script accepts two parameters: the name of the ALSA device to configure, and the &ldquo;human-readable&rdquo; name you want to give the JACK client. You can learn your ALSA device names by running the command <tt>sudo aplay -l</tt> (or <tt>su - root -c 'aplay -l'</tt>) in a terminal window. Running this command results in output like:<br />
<br />
<nowiki><br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Intel [HDA Intel], device 0: CX20561 Analog [CX20561 Analog]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 0: Intel [HDA Intel], device 1: CX20561 Digital [CX20561 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</nowiki><br />
<br />
In the above output, the device name for ''card 0'' is <tt>Intel</tt>. Many people prefer more appropriate names for their JACK devices. One common name for the built-in sound device (the &ldquo;sound card&rdquo; on the PC&lsquo;s motherboard) is ''&ldquo;Onboard&rdquo;''. Set up your first '''JACK Client''' in '''RDAdmin''' as follows:<br />
<br />
:* touch '''Add'''<br />
:* enter a meaningful description in the '''Description''' text box; experience (and observing the [https://github.com/ElvishArtisan/rivendell/blob/master/cae/cae_jack.cpp source code]) has shown that the JACK Clients are started in the alpha-numeric order of the '''Description''' label. Use this knowledge to guide your choices of descriptions<br />
:* enter the path and parameters to the setup script: <tt>/usr/local/bin/pmw-jack-setup Intel Onboard</tt> in the '''Command Line''' text box<br />
:* touch '''OK''' to save your settings<br />
<br />
Repeat the above steps for as many ALSA-compatible hardware audio devices as you want to use with Rivendell. Note that ''pmw-jack-setup'' merely configures your hardware audio devices for use with JACK. It does not connect them to Rivendell. Also note that using ''pmw-jack-setup'' requires that you also download and install the &ldquo;helper script&rdquo;, ''[https://github.com/opensourceradio/ram/blob/master/usr/local/bin//zsh-functions zsh-functions]'' in ''/usr/local/bin''. ''zsh-functions'' in turn may also require the installation of additional packages.<br />
<br />
The version of ''pmw-jack-setup'' on github attempt to discern the number of input and output channels for the ALSA device. You can override this with the <tt>--ci ''NUM-CHANNELS''</tt> (capture channels) and <tt>--co ''NUM-CHANNELS''</tt> (playback channels) options, where ''NUM-CHANNELS'' is the actual number of input and output channels you want to use.<br />
<br />
As with <tt>/usr/local/bin/jackd-start</tt>, be sure to set the permissions on ''pmw-jack-setup'' with <tt>sudo chmod +x /usr/local/bin/pmw-jack-setup</tt>.<br />
<br />
<br />
==== Connecting JACK Inputs and Outputs ====<br />
<br />
Once you have successfully configured Rivendell to launch JACK and configure your audio devices, you need to &ldquo;connect&rdquo; the devices to Rivendell. There are several ways to do this, including:<br />
<br />
:* run one or more Rivendell [http://opsguide.rivendellaudio.org/html/chapter.rml.html Macros] to make the connections (see [http://opsguide.rivendellaudio.org/html/sect.rml.commands.html#sect.rml.connect_jack_ports__jc_ JC])<br />
:* run a JACK plumbing service daemon such as ''jack-plumbing'' to automate the connections<br />
:* run the command line ''jack_connect'' application to make the connections<br />
:* use a graphical tool such as [https://qjackctl.sourceforge.io/ qjackctl] or [https://drobilla.net/software/patchage patchage] to make the connections<br />
<br />
The most reliable methods for making JACK connections are those that perform the work automatically and in the background. Unfortunately, CentOS does not package the ''jack-plumbing'' command, so one must either download the source code from the [[wikipedia:Debian_Linux|Debian]] website: [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226.orig.tar.bz2 here] or [http://deb.debian.org/debian/pool/main/j/jack-tools/jack-tools_20131226-1.debian.tar.gz here] and compile it (the original source code for ''jack-plumbing'' seems to have been lost in the bit bucket), or choose a different &ldquo;plumbing&rdquo; tool to manage the JACK connections.<br />
<br />
Here is an example of a configuration file for ''jack-plumbing''. Note that the &ldquo;comment character&rdquo; is a semicolon (&ldquo;&#59;&rdquo;) rather than the more common hash symbol (&ldquo;&#35;&rdquo;). In general, the ''jack-plumbing'' '''''connect''''' statement format is <tt>(connect "source" "destination")</tt>. If you place this in ''/etc/jack-plumbing'' you can start the app with simply ''/bin/jack-plumbing'' (see the figure above):<br />
<br />
<nowiki><br />
; JACK port connection rules.<br />
; See man jack-plumbing for details.<br />
; dklann@broadcasttool.com, Fri Aug 14 09:20:55 PDT 2020<br />
<br />
; Connect the first Rivendell output port to the Onboard card.<br />
; See also pmw-jack-setup and the JACK client name for the<br />
; built-in audio device. Substitute your audio device for<br />
; "Onboard" as necessary...<br />
(connect "rivendell_0:playout_0L" "Onboard:playback_1")<br />
(connect "rivendell_0:playout_0R" "Onboard:playback_2")<br />
; If your sound card has multiple outputs such as the Focusrite Scarlet 4i4, Rivendell can access the second set of outputs with (uncomment):<br />
;(connect "rivendell_0:playout_1R" "Onboard:playback_3")<br />
;(connect "rivendell_0:playout_2R" "Onboard:playback_4")<br />
<br />
; Connect the first Rivendell input port to the Onboard card.<br />
(connect "Onboard:capture_1" "rivendell_0:record_0L")<br />
(connect "Onboard:capture_2" "rivendell_0:record_0R")<br />
<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; Audio processing with Calf plugins<br />
; Use this along with calfjackhost to connect some Calf audio<br />
; plugins for real-time audio processing.<br />
;<br />
; Rivendell Primary output to BassEnhancer<br />
;(connect "rivendell_0:playout_0L" "calf:bassenhancer_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:bassenhancer_in_r")<br />
; -or- Rivendell Primary output to MultibandCompressor input<br />
;(connect "rivendell_0:playout_0L" "calf:multibandcompressor_in_l")<br />
;(connect "rivendell_0:playout_0R" "calf:multibandcompressor_in_r")<br />
; MultibandCompressor output to Limiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; BassEnhancer output to MultibandCompressor input<br />
;(connect "calf:bassenhancer_out_l" "calf:multibandcompressor_in_l")<br />
;(connect "calf:bassenhancer_out_r" "calf:multibandcompressor_in_r")<br />
<br />
; MultibandCompressor output to MultibandLimiter input<br />
;(connect "calf:multibandcompressor_out_l" "calf:multibandlimiter_in_l")<br />
;(connect "calf:multibandcompressor_out_r" "calf:multibandlimiter_in_r")<br />
<br />
; MultibandLimiter output to Onboard input<br />
;(connect "calf:multibandlimiter_out_l" "Onboard:playback_1")<br />
;(connect "calf:multibandlimiter_out_r" "Onboard:playback_2")<br />
<br />
; Limiter output to glasscoder input<br />
; This assumes you are running GlassCoder with the JACK<br />
; client name "glass".<br />
;(connect "calf:multibandlimiter_out_l" "glass:input_1")<br />
;(connect "calf:multibandlimiter_out_r" "glass:input_2")</nowiki><br />
<br />
=== Restart Rivendell Service ===<br />
<br />
After making changes to your JACK configuration in Rivendell you must restart the Rivendell service. Do this by either rebooting your Rivendell computer, or running the following command in a terminal window:<br />
<br />
<nowiki>sudo systemctl restart rivendell.service</nowiki><br />
<br />
== Future Work ==<br />
<br />
To do: make JACK work with [https://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio].<br />
<br />
This is complete as of April, 2021: <del>To do: in ''pmw-jack-setup'': use data in ''/proc/asound'' to automatically discern the number of input and output channels for ALSA devices.</del><br />
<br />
In 2021 the [https://pipewire.org/ pipewire] audio subsystem is maturing and aims to be compatible with and to eventually replace both the PulseAudio and the JACK audio systems. Pipewire may include more &ldquo;plumbing&rdquo; tools over the long run.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=740Installing Rivendell2024-02-11T04:54:11Z<p>Ltyndale: /* Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 */</p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.x on Ubuntu18 04 | Legacy Rivendell 3.6.x on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.8) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
===== Upgrading to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
<br />
* [[Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source | Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source ]] - while '''unsupported by the official release''' it is possible to upgrade to Rivendell 4.x on Ubuntu 18.04 for those who have previously compiled Rivendell 3.x. This explains how to do it.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Rivendell 3.x on Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Rivendell 3.x on Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=738Legacy Rivendell 3.6.x on Ubuntu18 042024-02-11T04:53:21Z<p>Ltyndale: Ltyndale moved page Legacy Rivendell 3.6.7 on Ubuntu18 04 to Legacy Rivendell 3.6.x on Ubuntu18 04</p>
<hr />
<div>How to install Rivendell 3.6.8 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/archive/refs/tags/v3.6.8.tar.gz<br />
<br />
The current 3.x release is 3.6.8. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.8.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.8<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y install autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect. If you have rdmonitor running you will see which configuration is running.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.8/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-368/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.7_on_Ubuntu18_04&diff=739Legacy Rivendell 3.6.7 on Ubuntu18 042024-02-11T04:53:21Z<p>Ltyndale: Ltyndale moved page Legacy Rivendell 3.6.7 on Ubuntu18 04 to Legacy Rivendell 3.6.x on Ubuntu18 04</p>
<hr />
<div>#REDIRECT [[Legacy Rivendell 3.6.x on Ubuntu18 04]]</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=737Installing Rivendell2024-02-11T04:52:14Z<p>Ltyndale: /* Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 */</p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.8) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
===== Upgrading to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
<br />
* [[Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source | Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source ]] - while '''unsupported by the official release''' it is possible to upgrade to Rivendell 4.x on Ubuntu 18.04 for those who have previously compiled Rivendell 3.x. This explains how to do it.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Rivendell 3.x on Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Rivendell 3.x on Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=736Legacy Rivendell 3.6.x on Ubuntu18 042024-02-11T04:51:15Z<p>Ltyndale: /* Don't delete your source! */</p>
<hr />
<div>How to install Rivendell 3.6.8 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/archive/refs/tags/v3.6.8.tar.gz<br />
<br />
The current 3.x release is 3.6.8. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.8.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.8<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y install autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect. If you have rdmonitor running you will see which configuration is running.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.8/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-368/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=735Legacy Rivendell 3.6.x on Ubuntu18 042024-02-11T04:50:46Z<p>Ltyndale: </p>
<hr />
<div>How to install Rivendell 3.6.8 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/archive/refs/tags/v3.6.8.tar.gz<br />
<br />
The current 3.x release is 3.6.8. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.8.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.8<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y install autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect. If you have rdmonitor running you will see which configuration is running.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=734Legacy Rivendell 3.6.x on Ubuntu18 042024-02-11T04:50:17Z<p>Ltyndale: /* Get the Rivendell source from GIT and compile source */</p>
<hr />
<div>How to install Rivendell 3.6.7 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/archive/refs/tags/v3.6.8.tar.gz<br />
<br />
The current 3.x release is 3.6.8. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.8.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.8<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y install autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect. If you have rdmonitor running you will see which configuration is running.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Setup_%26_Configuration&diff=732Setup & Configuration2024-02-06T17:22:36Z<p>Ltyndale: /* Configuring Audio Subsystems (ALSA and Jack) to work with Rivendell */</p>
<hr />
<div>=== Rivendell Setup & Configuration ===<br />
<br />
==== General ====<br />
* [[Post installation errata | Post installation configuration tasks]] - Things you may need to do after installing Rivendell.<br />
* [[Choosing how to start Rivendell]] - Describes how to enable multiple Linux user access to Rivendell.<br />
* [[How_to_change_the_text_editor_that_RDLogManager_logs_and_reports_display_with|How to change the text editor that RDLogManager logs and other reports in Rivendell display with to another editor]]<br />
* [[How do I make Rivendell play Audio from the "Line In" of the Sound Card on the air?]]<br />
* [[rdadmin database creation and other dialog screens]] - Contains examples of various Rivendell user dialog screens.<br />
* [[How to import audio from a windows/samba shared folder on Ubuntu]] - Similar techniques can be used with other distributions.<br />
* [[How to rename a Rivendell host]]<br />
* [[Firewall Setup|Setting Up A Local Firewall On The Rivendell System]]<br />
* [http://rivendell.tryphon.org/wiki/Current_2.0_BETA_Upgrade/Installation_Info How to Upgrade Rivendell to version 2 from an earlier version]<br />
* [[How to trigger events from tones on your network]]<br />
* [[Streaming from Rivendell]] <br />
* [[On_Screen_Keyboard|How to setup an On Screen Keyboard]]<br />
* [[How to get now playing information into a text file]] - You may also need to refer to [[Rivendell Loadable Module SDK - For Sending Now & Next Data to external systems | Rivendell Loadable Module SDK]]<br />
<br />
==== Configuring Audio Subsystems (ALSA and Jack) to work with Rivendell ====<br />
** [[Configuring Rivendell to work with ALSA]]<br />
** [[ALSA/Audigy Multichannel Setup]]<br />
** [[Jack]] - Updated information on using JackAudio<br />
** [[Configuring Jack for use in Rivendell]] - Old information, out of date!<br />
** [[Fine tuning ALSA for your sound card]]<br />
<br />
==== Sound card setups ====<br />
** [[Delta 1010LT]]<br />
** [[ALSA/Audigy_Multichannel_Setup|Audigy Multichannel Setup]]<br />
** [[Sound_Cards_Known_to_work_with_Rivendell|Sound cards known to work with Rivendell]]<br />
** [[Compiling Audio Science Drivers for older ASI4215, ASI4300 series that are not supported in the newest versions]]<br />
** [[ALSA/Audigy_Multichannel_Setup_Old|Old Info - Audigy Multichannel Setup]]<br />
<br />
==== Setting up a Networked Rivendell System ====<br />
** [[Networked Audio Library|Setting Up the Audio Library On a Different Machine]]<br />
** [[Can I move just my audio carts to another Rivendell System?]]<br />
** [[Remote Client Access|Setting Up Rivendell for Remote Client Access]]<br />
** [[Setting up a dedicated Rivendell MySQL and audio store server]]<br />
** [[Hot Standby Host|Setting Up a Hot Standby Host (appnote0003)]]<br />
** [[Setup of Hot Standby rdcatchd events]]<br />
** [[Proper MySQL database migration]]<br />
** [[DHCP vs. static IP addresses]]<br />
** [[NFS Server and Client Configuration]]<br />
<br />
==== Touch screen Setups ====<br />
* [[ELO touchscreen setup (debian/KDE)]]<br />
<br />
==== Switcher Setups ====<br />
** [[Wegener Unity 4000 Satellite Receiver]]<br />
** [[Network Switcher setup - Broadcast Tools SS 8.2|Broadcast Tools SS 8.2]]<br />
** [[Flexroute Digital Receiver]]<br />
** [[Content Depot PRSS]]<br />
** [[How_do_I_make_Rivendell_play_Audio_from_the_%22Line_In%22_of_the_Sound_Card_on_the_air%3F|Local Audio Adapter]]<br />
<br />
==== General Purpose Input/Output (GPIO) Setups ====<br />
** [[Axia Element board]]<br />
** [[Joystick port as GPI]]<br />
** [[Serial Port / Modem Control Lines as GPIO]]<br />
<br />
==== Rivendell Setup Troubleshooting ====<br />
** [[RDAdmin first start - "Wrong access permissions for accessing mysql!"]]<br />
** [[Test tone will not play after initial setup]]<br />
** [[No Sound output or input after setting up Jack or Audio Science Sound Card when they were not the first card]]<br />
** [[Delayed playback response on click info]]<br />
** [[Garbled audio, alsa error 32: Broken pipe, Xrun errors]]<br />
** [[Ubuntu - No sound/sound card in Rivendell after setup]]<br />
** [[Ubuntu - After installation I get an error "Cannot start Rivendell daemons"]]<br />
** [[KXStudio or Kubuntu (KDE Desktop) - Can't set colors in RDlogmanager events/clocks]]<br />
** [[CHAIN TO at end of log does not always work properly]]<br />
** [[How to fine tune ALSA to minimize the varying delay/gap when segueing(~50-150ms)]]<br />
** [[Error Message - rdfilewrite: unable to open output file]]<br />
** [[Error Message - Cart Creation Failure Unable to create new cart for voice track]]<br />
** [[Gray buttons in RDLogEdit on Windows Rivendell Host]]<br />
** [[I have sound but the levels are very low. How do I increase them?]]<br />
** [[The meters only work if I am logged in as root]]<br />
** [[Importing an audio file gets to about 50%, pauses, and then fails with an unhelpful error]]<br />
** [[My Dropbox doesn't import any of the audio files I put in there]]<br />
** [[Serial port Troubleshooting]]<br />
** [[CD ripping Troubleshooting]]<br />
** [[Troubleshooting GPIs and GPOs | GPIs and GPOs Troubleshooting]]</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=721Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-11-16T02:22:37Z<p>Ltyndale: /* Building and Installing the Code */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL-7 / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default autofs<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.1.0.tar.gz<br />
cd ~/rivendell-4.1.0/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
sudo systemctl restart apache2<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
At this point you can probably just restart your Rivendell services and it will likely all work, but it isn't a bad idea to reboot your system.<br />
<br />
== Audio ==<br />
<br />
ALSA will work in the same manner that ALSA has always worked.<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. The environment variables will already be set in both the rivendell.service file and the rivendell-env.sh file, so no need to edit anything.<br />
<br />
If you have decided to start up Jack using qjackctl *before* you start the Rivendell services then make sure that the Jack dbus interface is turned off.<br />
<br />
If there are initial problems getting Jack to run, it could be temporary files stored in /dev/shm being owned by a user other then the user starting up jackd. I have mainly run into this situation in test scenarios where I have first started Jack and then started the Rivendell services, but there was one time when the temporary files prevented Jack from starting up in any manner. To fix this, first stop your Rivendell services<br />
<br />
sudo systemctl stop rivendell.service<br />
<br />
Then check to see if Jack is running, if it is then end all Jackd (or jackdbus) processes (kill it with the kill command if you have to)<br />
<br />
ps -C jackd<br />
ps -C jackdbus<br />
<br />
Delete the temporary jack files in /dev/shm/<br />
sudo rm /dev/shm/jack*<br />
<br />
Then restart Jack and / or your Rivendell services. With promiscuous mode set up it really is easier to have Rivendell start Jackd, however some may still decide to start Jack first using qjackctl (or in some other manner) and then start Rivendell services.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=694Legacy Rivendell 3.6.x on Ubuntu18 042023-07-03T04:23:10Z<p>Ltyndale: /* Optional - Make RDSelect work */</p>
<hr />
<div>How to install Rivendell 3.6.7 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/releases/download/v3.6.7/rivendell-3.6.7.tar.gz<br />
<br />
The current release is 3.6.7. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.7.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.7<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y install autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect. If you have rdmonitor running you will see which configuration is running.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=693Legacy Rivendell 3.6.x on Ubuntu18 042023-07-03T04:21:33Z<p>Ltyndale: /* Optional - Make RDSelect work */</p>
<hr />
<div>How to install Rivendell 3.6.7 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/releases/download/v3.6.7/rivendell-3.6.7.tar.gz<br />
<br />
The current release is 3.6.7. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.7.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.7<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y install autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=692Legacy Rivendell 3.6.x on Ubuntu18 042023-07-03T04:20:45Z<p>Ltyndale: /* Optional - Make RDSelect work */</p>
<hr />
<div>How to install Rivendell 3.6.7 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/releases/download/v3.6.7/rivendell-3.6.7.tar.gz<br />
<br />
The current release is 3.6.7. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.7.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.7<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
For file system mounting, RDSelect uses autofs which by default may not be installed on Ubuntu 18.04. To install it:<br />
<br />
sudo apt-get -y autofs<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=691Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-03T04:12:52Z<p>Ltyndale: /* Preparing the Environment and Installing Dependencies */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL-7 / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default autofs<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
sudo systemctl restart apache2<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
At this point you can probably just restart your Rivendell services and it will likely all work, but it isn't a bad idea to reboot your system.<br />
<br />
== Audio ==<br />
<br />
ALSA will work in the same manner that ALSA has always worked.<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. The environment variables will already be set in both the rivendell.service file and the rivendell-env.sh file, so no need to edit anything.<br />
<br />
If you have decided to start up Jack using qjackctl *before* you start the Rivendell services then make sure that the Jack dbus interface is turned off.<br />
<br />
If there are initial problems getting Jack to run, it could be temporary files stored in /dev/shm being owned by a user other then the user starting up jackd. I have mainly run into this situation in test scenarios where I have first started Jack and then started the Rivendell services, but there was one time when the temporary files prevented Jack from starting up in any manner. To fix this, first stop your Rivendell services<br />
<br />
sudo systemctl stop rivendell.service<br />
<br />
Then check to see if Jack is running, if it is then end all Jackd (or jackdbus) processes (kill it with the kill command if you have to)<br />
<br />
ps -C jackd<br />
ps -C jackdbus<br />
<br />
Delete the temporary jack files in /dev/shm/<br />
sudo rm /dev/shm/jack*<br />
<br />
Then restart Jack and / or your Rivendell services. With promiscuous mode set up it really is easier to have Rivendell start Jackd, however some may still decide to start Jack first using qjackctl (or in some other manner) and then start Rivendell services.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=690Legacy Rivendell 3.6.x on Ubuntu18 042023-07-03T04:12:13Z<p>Ltyndale: /* Install Dependencies */</p>
<hr />
<div>How to install Rivendell 3.6.7 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns autofs<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/releases/download/v3.6.7/rivendell-3.6.7.tar.gz<br />
<br />
The current release is 3.6.7. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.7.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.7<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=689Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-03T01:38:29Z<p>Ltyndale: /* Audio */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL-7 / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
sudo systemctl restart apache2<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
At this point you can probably just restart your Rivendell services and it will likely all work, but it isn't a bad idea to reboot your system.<br />
<br />
== Audio ==<br />
<br />
ALSA will work in the same manner that ALSA has always worked.<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. The environment variables will already be set in both the rivendell.service file and the rivendell-env.sh file, so no need to edit anything.<br />
<br />
If you have decided to start up Jack using qjackctl *before* you start the Rivendell services then make sure that the Jack dbus interface is turned off.<br />
<br />
If there are initial problems getting Jack to run, it could be temporary files stored in /dev/shm being owned by a user other then the user starting up jackd. I have mainly run into this situation in test scenarios where I have first started Jack and then started the Rivendell services, but there was one time when the temporary files prevented Jack from starting up in any manner. To fix this, first stop your Rivendell services<br />
<br />
sudo systemctl stop rivendell.service<br />
<br />
Then check to see if Jack is running, if it is then end all Jackd (or jackdbus) processes (kill it with the kill command if you have to)<br />
<br />
ps -C jackd<br />
ps -C jackdbus<br />
<br />
Delete the temporary jack files in /dev/shm/<br />
sudo rm /dev/shm/jack*<br />
<br />
Then restart Jack and / or your Rivendell services. With promiscuous mode set up it really is easier to have Rivendell start Jackd, however some may still decide to start Jack first using qjackctl (or in some other manner) and then start Rivendell services.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=688Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-03T01:36:17Z<p>Ltyndale: </p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL-7 / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
sudo systemctl restart apache2<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
At this point you can probably just restart your Rivendell services and it will likely all work, but it isn't a bad idea to reboot your system.<br />
<br />
== Audio ==<br />
<br />
ALSA will work in the same manner that ALSA has always worked.<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. The environment variables will already be set in both the rivendell.service file and the rivendell-env.sh file, so no need to edit anything.<br />
<br />
If you have decided to start up Jack using qjackctl *before* you start the Rivendell services then make sure that the Jack dbus interface is turned off.<br />
<br />
If there are initial problems getting Jack to run, it could be temporary files stored in /dev/shm being owned by a user other then the user starting up jackd. I have mainly run into this situation in test scenarios where I have first started Jack and then started the Rivendell services, but there was one time when the temporary files prevented Jack from starting up in any manner. To fix this, first stop your Rivendell services<br />
<br />
sudo systemctl stop rivendell.service<br />
<br />
Then check to see if Jack is running, if it is then end all Jackd (or jackdbus) processes (kill it with the kill command if you have to)<br />
<br />
ps -C jackd<br />
ps -C jackdbus<br />
<br />
Delete the temporary jack files in /dev/shm/<br />
sudo rm /dev/shm/jack*<br />
<br />
Then restart Jack and / or your Rivendell services. With promiscuous mode set up it really is easier to have Rivendell start Jackd, however some may still decide to start Jack first using qjackctl (or in some other manner).</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=687Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-03T01:05:10Z<p>Ltyndale: </p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL-7 / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=686Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-03T01:04:31Z<p>Ltyndale: </p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the Appliance Installers provided by Paravel for Ubuntu 22.04, RHEL / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=685Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-03T01:03:21Z<p>Ltyndale: </p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel for Ubuntu 22.04, RHEL / CentOS 7, or RHEL-8 / Rocky Linux 8. See [[Installing Rivendell | Installing Rivendell]].'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=671Installing Rivendell2023-07-02T18:57:44Z<p>Ltyndale: /* Upgrading to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 */</p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.7) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
===== Upgrading to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
<br />
* [[Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source | Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source ]] - while '''unsupported by the official release''' it is possible to upgrade to Rivendell 4.x on Ubuntu 18.04 for those who have previously compiled Rivendell 3.x. This explains how to do it.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Rivendell 3.x on Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Rivendell 3.x on Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=670Installing Rivendell2023-07-02T18:56:33Z<p>Ltyndale: /* Updating to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 */</p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.7) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
===== Upgrading to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
* [[Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source | Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Sourc[[Link title]]e ]] - while '''unsupported by the official release''' it is possible to upgrade to Rivendell 4.x on Ubuntu 18.04 for those who have previously compiled Rivendell 3.x. This explains how to do it.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Rivendell 3.x on Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Rivendell 3.x on Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=669Installing Rivendell2023-07-02T18:55:49Z<p>Ltyndale: </p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.7) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
===== Updating to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
* [[Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source | Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source ]] - while '''unsupported by the official release''' it is possible to upgrade to Rivendell 4.x on Ubuntu 18.04 for those who have previously compiled Rivendell 3.x. This explains how to do it.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Rivendell 3.x on Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Rivendell 3.x on Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=668Installing Rivendell2023-07-02T18:54:38Z<p>Ltyndale: /* Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 */</p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Rivendell 3.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.7) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
===== Updating to Rivendell 4.x on Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
* [[Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source | Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source ]] - while '''unsupported by the official release''' it is possible to upgrade to Rivendell 4.x on Ubuntu 18.04 for those who have previously compiled Rivendell 3.x. This explains how to do it.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=667Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-02T18:43:29Z<p>Ltyndale: /* Uninstalling Rivendell 3.x */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel.'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database!<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=666Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-02T18:43:03Z<p>Ltyndale: /* Uninstalling Rivendell 3.x */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel.'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by making a backup of your database. For this you can use rddbconfig. As a rule of thumb never do an update of Rivendell without first backing up your database.<br />
<br />
Next shut down and uninstall Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=665Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-02T18:26:22Z<p>Ltyndale: /* Building and Installing the Code */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel.'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by shutting down and uninstalling Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
sudo cp ./conf/rd-bin.conf /etc/apache2/conf-available/<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=664Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-02T18:15:28Z<p>Ltyndale: /* Preparing the Environment and Installing Dependencies */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel.'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by shutting down and uninstalling Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable and put the value in your .bashrc file so you won't have to worry about it next time.<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=663Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-02T18:14:37Z<p>Ltyndale: /* Preparing the Environment and Installing Dependencies */</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel.'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by shutting down and uninstalling Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Many of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Updating_to_Rivendell_4.x_on_Legacy_Ubuntu18_04,_Compiled_from_Source&diff=662Updating to Rivendell 4.x on Legacy Ubuntu18 04, Compiled from Source2023-07-02T18:13:18Z<p>Ltyndale: Created page with "For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu1..."</p>
<hr />
<div>For those who are running Rivendell 3.x on Ubuntu 18.04 and compiled the code from source using the [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions, it is possible to upgrade to Rivendell 4.x without upgrading to a newer version of Ubuntu. You'll have to compile the 4.x source code, as '''Rivendell 4.x is not officially supported on Ubuntu 18.04.''' The code does work, however it has not gone through anywhere near the amount of testing that has been seen on newer versions of Ubuntu. '''CONSIDER THIS YOUR WARNING!'''<br />
<br />
'''Note that this guide is presented for those who want to upgrade to Rivendell 4.x from working Rivendell 3.x install on Ubuntu 18.04. It presumes that you have familiarity with Rivendell and have gone through the process of building 3.x from source in the past. It is not intended as a fresh install of Rivendell 4.x on 18.04. For a fresh install you are better off to go with a more up to date OS using one of the installers provided by Paravel.'''<br />
<br />
NOTE: As with the previous 3.x compile instructions, these instructions do not include the HPI driver support for AudioScience cards. It does work with ALSA and JackAudio.<br />
<br />
== Should I upgrade my current system or reinstall? ==<br />
<br />
This is a great question. Whether you want to install a newer Operating System or just keep your current system and compile Rivendell for it really depends on your own situation. The best course of action would be to install a newer version of the OS and then Rivendell 4.x but the choice is up to you. There are benefits both ways.<br />
<br />
'''Reinstall with latest OS:'''<br />
* Provides the latest OS and future security updates<br />
* Gives the benefit of being able to install Rivendell packages from Paravel and update to new versions with a simple apt update rivendell command<br />
* More future proof, less likely that some feature in the future might stop working<br />
<br />
'''Compiling Rivendell 4.x on older Ubuntu 18.04 based system:'''<br />
* If you have a large Ubuntu 18.04 installation and are not ready to update your entire plant <br />
* You have hardware which works on the older OS but doesn't work properly on a newer OS<br />
<br />
Of course either route you go you should first set up a test environment before changing anything mission critical. This could be done in a VM or on an actual spare computer. If you have decided to compile Rivendell 4.x from source on Ubuntu 18.04, continue on.<br />
<br />
== Uninstalling Rivendell 3.x ==<br />
As mentioned this guide presumes you are running Rivendell 3.x compiled from source based on the previous [[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] instructions.<br />
<br />
Start by shutting down and uninstalling Rivendell 3.6.x. If you don't do this you may run into issues compiling the new version. Change to your old source folder, stop your Rivendell services and uninstall.<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell.service<br />
sudo make uninstall<br />
sudo ldconfig -v<br />
<br />
== Preparing the Environment and Installing Dependencies ==<br />
<br />
Install the additional dependencies to make 4.x work. Some of these will already be installed, but it'll only install the ones missing.<br />
<br />
sudo apt install -y apache2 libexpat1-dev libexpat1 libid3-dev libcurl4-gnutls-dev libcoverart-dev \<br />
libdiscid-dev libmusicbrainz5-dev libcdparanoia-dev libsndfile1-dev libpam0g-dev libvorbis-dev python3 \<br />
python3-pycurl python3-pymysql python3-serial python3-requests libsamplerate0-dev qtbase5-dev libqt5sql5-mysql \<br />
libsoundtouch-dev libsystemd-dev libjack-jackd2-dev libasound2-dev libflac-dev libflac++-dev libmp3lame-dev \<br />
libmad0-dev libtwolame-dev docbook5-xml libxml2-utils docbook-xsl-ns xsltproc fop make g++ libltdl-dev \<br />
autoconf automake libssl-dev libtag1-dev qttools5-dev-tools debhelper openssh-server autoconf-archive \<br />
gnupg pbuilder ubuntu-dev-tools apt-file libmagick++-dev icedax at-spi2-core qt5-default<br />
<br />
Check that QT5 is your default version. Open a shell<br />
qtchooser -print-env<br />
<br />
It should read<br />
<br />
QT_SELECT="default"<br />
QTTOOLDIR="/usr/lib/'''qt5'''/bin"<br />
QTLIBDIR="/usr/lib/x86_64-linux-gnu"<br />
<br />
If it does not reference a QT5 folder then reinstall qt5-default and check again<br />
sudo apt install qt5-default<br />
<br />
Set up Docbook environment variable<br />
<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns<br />
echo export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns >> ~/.bashrc<br />
<br />
== Building and Installing the Code ==<br />
<br />
Grab the latest production release. Head over to [https://github.com/ElvishArtisan/rivendell https://github.com/ElvishArtisan/rivendell] and on the right hand side of the page click on '''Production Release Latest.''' On that page under Assets you'll find 2 source code links, one a ZIP and the other a .tar.gz. Grab whichever one you prefer (for my example I'm grabbing the .tar.gz) and extract the source code. Change to that directory.<br />
<br />
tar -zxvf ./Downloads/rivendell-4.0.1.tar.gz<br />
cd ~/rivendell-4.0.1/<br />
<br />
Now compile and Install the code<br />
<br />
./autogen.sh<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
make<br />
sudo make install<br />
sudo ldconfig<br />
<br />
Set up the rest of the environment<br />
<br />
sudo cp ./conf/rivendell-env.sh /etc/profile.d/rivendell-env.sh<br />
sudo cp ./conf/rivendell-ubuntu.pam /etc/pam.d/rivendell<br />
<br />
Set up systemd<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
Update your database:<br />
sudo rddbmgr --modify<br />
<br />
Make sure your Apache configuration is set up<br />
sudo a2enconf rd-bin<br />
sudo a2enmod cgid<br />
<br />
You may want to double check the settings in your /etc/rd.conf file.<br />
<br />
Reboot your system.<br />
<br />
== Audio ==<br />
<br />
JackAudio will work in promiscuous mode as described in the [[https://wiki.rivendellaudio.org/index.php/Legacy_Rivendell_3.6.7_on_Ubuntu18_04#Optional_-_Jack_Audio_with_Promiscuous_Mode Jack Audio with Promiscuous Mode]] section of the 3.x wiki. <br />
<br />
ALSA will work in the same manner that ALSA has always worked.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=661Installing Rivendell2023-07-02T14:50:32Z<p>Ltyndale: /* Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 */</p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.7) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Installing_Rivendell&diff=660Installing Rivendell2023-07-02T14:49:41Z<p>Ltyndale: </p>
<hr />
<div>=== Appliance Installers ===<br />
The preferred and easiest way to create a working Rivendell system is to use one of the standard "appliance" installers provided by [https://paravelsystems.com Paravel Systems]. The following Linux distributions are supported:<br />
<br />
==== Ubuntu 22.04 "Jammy Jellyfish" (also works with Linux Mint 21) ====<br />
* [https://software.paravelsystems.com/howtos/ubuntu/jammy/ Ubuntu 22.04 Appliance Installer for Rivendell 4.x] ('''RECOMMENDED''')<br />
<br />
==== RedHat Enterprise Linux 7 (RHEL-7) (also works with CentOS 7) ====<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd4/ RHEL-7 Appliance Installer for Rivendell 4.x]<br />
* [https://software.paravelsystems.com/howtos/CentOS/7rd3/ RHEL-7 Appliance Installer for Rivendell 3.x] ('''DEPRECATED''')<br />
<br />
==== RedHat Enterprise Linux 8 (RHEL-8) (also works with Rocky Linux 8) ====<br />
* [https://software.paravelsystems.com/howtos/rhel/8rd4/ RHEL-8 Appliance Installer for Rivendell 4.x]<br />
<br />
<br />
=== Building from Source ===<br />
The "appliance" installations listed above can also be used as a basis for creating a development instance capable of building Rivendell from its original sources. While not recommended for use in production "on the air" environments, such a development instance can be extremely useful for for testing new features or bugfixes that have been committed to the GitHub repository but not yet released in the pre-built packages.<br />
<br />
* [https://wiki.rivendellaudio.org/index.php/Building_Rivendell_from_source Building a Rivendell Development Instance on Ubuntu 22.04 "Jammy Jellyfish"]<br />
<br />
<br />
=== Legacy/Deprecated Installs ===<br />
The following items apply to the deprecated v3.x versions of Rivendell, on various "not officially supported" distributions.<br />
<br />
==== Ubuntu ====<br />
===== Ubuntu 18.04 (Bionic Beaver) and Linux Mint 19.3 =====<br />
[[Legacy Rivendell 3.6.7 on Ubuntu18 04 | Legacy Rivendell 3.6.7 on Ubuntu18 04]] covers how to compile from source and install Rivendell 3 (v3.6.1) on Ubuntu 18.04. It has been reported these instructions also work on Linux Mint 19.3.<br />
<br />
<br />
==== Debian ====<br />
The following pages describe how to install Rivendell from source on a Debian system.<br />
<br />
===== Debian 10 (Buster) =====<br />
[[Debian10 | This page]] quickly relates how to install Rivendell 3 (v3.2.0) on Debian10.<br />
<br />
===== Debian 9 (Stretch) =====<br />
[[Debian9 | This page]] quickly relates how to install Rivendell 3 (v3.0.3) on Debian9.</div>Ltyndalehttp://wiki.rivendellaudio.org/index.php?title=Legacy_Rivendell_3.6.x_on_Ubuntu18_04&diff=658Legacy Rivendell 3.6.x on Ubuntu18 042023-07-02T14:47:26Z<p>Ltyndale: Ltyndale moved page Ubuntu18 04 to Legacy Rivendell 3.6.7 on Ubuntu18 04</p>
<hr />
<div>How to install Rivendell 3.6.7 on Ubuntu 18.04. It has been reported that these instructions also work on Linux Mint 19.3.<br />
<br />
This guide assumes you have the 64 bit build of Ubuntu 18.04 (or a variation such as LUbuntu 18.04) installed and running. Note that these instructions are based on a variety of sources including the folks at Radiotools.uk, the Raspberry PI build, and notes on the email list.<br />
<br />
Note that these instructions do not include support for ASI cards, I do not have an ASI card to test with.<br />
<br />
== Install and Update your OS ==<br />
These instructions are for Ubuntu 18.04 and various distributions based on Ubuntu 18.04. It has been tested with the 64 bit release. I have not tested with the 32 bit build.<br />
<br />
If you are looking for a build of Ubuntu 18.04, you might want to consider LUbuntu. It is a lighter weight distribution that works well.<br />
<br />
http://cdimage.ubuntu.com/lubuntu/releases/18.04.5/release/<br />
<br />
I highly suggest using a static IP address for Rivendell. This can either be set up when installing or later once the OS is installed.<br />
<br />
Once installed make sure that Ubuntu is fully updated. From a shell:<br />
sudo apt-get -y update<br />
sudo apt-get -y upgrade<br />
<br />
== Install Apache, MySQL, and GIT ==<br />
If you are doing a full stand alone install you'll need MySQL, Apache, and GIT. If you have a central audio store and / or MySQL server then you may not need Apache and MySQL.<br />
sudo apt-get -y install apache2<br />
sudo apt-get -y install mysql-server<br />
sudo apt-get -y install git<br />
<br />
== Set up your users and groups ==<br />
<br />
Create a Rivendell group<br />
sudo addgroup rivendell<br />
sudo adduser pypad<br />
<br />
Add your logged in user to the rivendell group<br />
sudo usermod -a -G rivendell %username% <-- Substitute your logged in user account<br />
<br />
Add your logged in user to the Audio group<br />
sudo usermod -a -G audio %username% <-- Substitute your logged in user account<br />
<br />
If you want this user to be able to access the serial port from Rivendell (useful for GPIO's)<br />
sudo usermod -a -G dialout %username% <-- Substitute your logged in user account<br />
<br />
Log out and log back in so your logged in user picks up all the new groups it is a member of.<br />
<br />
== Install Dependencies ==<br />
Note, some of these dependencies may not be needed, but as of writing Rivendell 3.6.7 successfully compiles with these installed.<br />
<br />
Note, if it asks about enabling Realtime for Jack, I normally say "yes" but this does not work on all systems.<br />
<br />
sudo apt-get -y install build-essential dpkg-dev fakeroot g++ g++-7 gcc gcc-7 \<br />
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan4 libatomic1 \<br />
libaudio-dev libcilkrts5 libcups2-dev libcupsfilters-dev libcupsimage2-dev libdrm-dev libexpat1-dev \<br />
libfakeroot libfontconfig1-dev libfreetype6-dev libgcc-7-dev libgl1-mesa-dev libgles1 libglu1-mesa-dev \<br />
libglvnd-core-dev libglvnd-dev libice-dev libiodbc2 libitm1 libjbig-dev libjpeg-dev libjpeg-turbo8-dev \<br />
libjpeg8-dev liblcms2-dev liblsan0 liblzma-dev libmng-dev libmng2 libmpx2 libmysqlclient20 libopengl0 \<br />
libpq5 libpthread-stubs0-dev libquadmath0 libsm-dev libstdc++-7-dev libtiff-dev libtiff5-dev libtiffxx5 libtsan0 \<br />
libubsan0 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev \<br />
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev \<br />
libxcb1-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \<br />
libxinerama-dev libxmu-dev libxmu-headers libxrandr-dev libxrender-dev libxshmfence-dev libxt-dev libxxf86vm-dev \<br />
make mesa-common-dev pkg-config x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \<br />
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev x11proto-xext-dev \<br />
x11proto-xf86vidmode-dev x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev libflac++6v5 libid3-3.8.3v5 \<br />
lame jackd2 screen samba patchage vlc-plugin-jack jackd libcdparanoia-dev libflac++-dev libsamplerate0-dev \<br />
libid3tag0-dev libid3-3.8.3-dev libcurl4-gnutls-dev libsndfile-dev libpam0g-dev libsoundtouch1-dev \<br />
libasound2-dev libtwolame-dev libmp3lame-dev libmp4v2-dev libfaad-dev libmad0-dev libjack-jackd2-dev \<br />
libice-dev libsm-dev libxt-dev libxi-dev libssl-dev build-essential libx11-dev libxext-dev xsltproc evince qt4* \<br />
libtag1-dev libmysqlclient-dev libqt4-sql-mysql libqt5sql5-mysql qtcreator curl python3-mysqldb python3-pyqt4 \<br />
python3-pip build-essential libssl-dev libffi-dev python3-dev python3-pyqt4* python3.7 docbook5* autotools-dev \<br />
libtooli* automake libcoverart1 libcoverart-dev libcoverart-doc libdiscid-dev libdiscid-doc libdiscid0 libmusicbrainz5-2 \<br />
libmusicbrainz5-dev fop docbook-xsl-ns<br />
<br />
== Get the Rivendell source from GIT and compile source ==<br />
<br />
wget https://github.com/ElvishArtisan/rivendell/releases/download/v3.6.7/rivendell-3.6.7.tar.gz<br />
<br />
The current release is 3.6.7. Expand the source package:<br />
<br />
tar -xfv rivendell-3.6.7.tar.gz<br />
<br />
If you want to compile the documentation, set up your Docbooks style sheet location:<br />
export DOCBOOK_STYLESHEETS=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/<br />
<br />
Change to your Rivendell source folder<br />
cd rivendell-3.6.7<br />
./autogen.sh<br />
<br />
If compiling '''with documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available<br />
<br />
If compiling '''without documentation:'''<br />
./configure MUSICBRAINZ_LIBS="-L/usr/local/lib -ldiscid -lmusicbrainz5cc -lcoverartcc" --libexecdir=/var/www/rd-bin --sysconfdir=/etc/apache2/conf-available --disable-docbook<br />
<br />
If configure is successful then compile the source:<br />
<br />
make<br />
sudo make install<br />
sudo ldconfig -v<br />
sudo systemctl daemon-reload<br />
sudo systemctl enable rivendell.service<br />
<br />
With any luck the first "make" will complete. It will take a long time. You may see some warnings during the compile, this is normal.<br />
<br />
'''Making Pypad Scipts Work'''<br />
<br />
Once the compile is complete the setup doesn't always copy the pypad.py file to where it needs to be for pypad scripts to work. The actual pypad scripts get installed /usr/local/lib64/rivendell/pypad/ but the pypad.py API file needs to be put into /usr/lib/python3/dist-packages/. Here is how to do this manually.<br />
<br />
sudo cp ./apis/pypad/api/pypad.py /usr/lib/python3/dist-packages/<br />
<br />
== Disable PulseAudio ==<br />
This is not always necessary, but sometimes it is required to get audio to work properly. As root edit the file:<br />
/etc/pulse/client.conf<br />
<br />
Uncomment the autospawn and make it no:<br />
autospawn = no<br />
<br />
Save the configuration file.<br />
<br />
== Getting MySQL to work and creating the Rivendell user and database ==<br />
Ubuntu 18.04 by default will only allow a user with elevated root access to log into the root MySQL user account. In other words you'll have to use sudo to log into the MySQL root account.<br />
sudo mysql -uroot<br />
CREATE USER 'rduser'@'%' IDENTIFIED BY 'letmein';<br />
CREATE DATABASE Rivendell;<br />
GRANT ALL PRIVILEGES ON Rivendell.* TO 'rduser'@'%' WITH GRANT OPTION;<br />
FLUSH PRIVILEGES;<br />
quit;<br />
<br />
Of course it is a good idea to change the "letmein" password above to something else. Just make sure that you remember this password, you will need to put it into your /etc/rd.conf file.<br />
<br />
MySQL 5.7 needs Strict mode turned off to avoid errors with Rivendell. Create the following file:<br />
sudo nano /etc/mysql/conf.d/disable_strict_mode.cnf<br />
<br />
Copy / paste into the file that is created: <br />
[mysqld]<br />
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION<br />
<br />
CTRL-O to write the file, CTRL-X to exit.<br />
<br />
If you want others Rivendell workstations to be able to connect to this machine's MySQL across the network then change the Bind in Mysql.<br />
<br />
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf<br />
<br />
Look for the bind-address= line and update it:<br />
bind-address = 0.0.0.0<br />
<br />
Restart your MySQL service<br />
sudo systemctl restart mysql<br />
<br />
== Configure Apache ==<br />
<br />
Turn on the cgid module:<br />
sudo a2enmod cgid<br />
<br />
Copy the Apache configuration<br />
sudo cp ~/rivendell/conf/rd-bin.conf /etc/apache2/conf-available/<br />
sudo ln -s /etc/apache2/conf-available/rd-bin.conf /etc/apache2/conf-enabled/rd-bin.conf<br />
sudo systemctl restart apache2<br />
<br />
== Make /var/snd ==<br />
Create /var/snd where your audio files will get stored<br />
sudo mkdir /var/snd<br />
sudo chown username:rivendell /var/snd <-- Note substitute your logged in user name and group`<br />
sudo chmod ug+rwx /var/snd<br />
<br />
== Configure Rivendell ==<br />
Copy the sample configuration file to /etc/rd.conf<br />
sudo cp ~/rivendell/conf/rd.conf-sample /etc/rd.conf<br />
<br />
Edit the file and update with any relevant user names, groups, etc.<br />
sudo nano /etc/rd.conf<br />
<br />
== Create your new database and generate audio ==<br />
<br />
If you are setting up a new install, populate your Rivendell database:<br />
<br />
sudo rddbmgr --create --generate-audio<br />
<br />
If you are updating from a previous version of Rivendell, then restore and / or update your database with rddbconfig:<br />
<br />
sudo rddbconfig<br />
<br />
Note, when updating from a previous 2.x version of Rivendell, I found that I had to start with an empty Rivendell database and use the '''Restore''' option in rddbconfig for the database to properly import and update to the latest schema.<br />
<br />
== Configure audio cards for ALSA access ==<br />
<br />
If you want to use your audio cards through ALSA, then configure them for access:<br />
<br />
sudo rdalsaconfig<br />
<br />
Select the card(s) you want to use and hit Save.<br />
<br />
== Start the Rivendell services ==<br />
Use systemd to start the Rivendell services:<br />
<br />
sudo systemctl start rivendell<br />
<br />
Then start up rdadmin:<br />
rdadmin<br />
<br />
Check your hosts, audio resources and other settings. If all looks okay start up rdairplay and see if you can play the test file.<br />
<br />
== Optional - Make RDSelect work ==<br />
RDSelect is an application that can be useful if you are running a setup that has more then one server, or where you want to have more then one /var/snd and MySQL server available. The most common use is when there is a hot standby server that you want workstations to be able to easily switch to in the event of a server failure. To make RDSelect work on Ubuntu there are a few additional things that need to be done.<br />
<br />
RDSelect requires the Rivendell configuration files to be located in /etc/rivendell.d so the first thing to do is create this folder:<br />
<br />
sudo mkdir /etc/rivendell.d<br />
<br />
Next, rd.conf must be located in /etc/rivendell.d and /etc/rd.conf must be a symlink to this file:<br />
<br />
sudo mv /etc/rd.conf /etc/rivendell.d<br />
sudo ln -s /etc/rivendell.d/rd.conf /etc/rd.conf<br />
<br />
Now to run rdselect you will need to run it as root and it needs an additional QT variable passed to work correctly on Ubuntu:<br />
<br />
sudo QT_X11_NO_MITSHM=1 rdselect<br />
<br />
You should see the RDSelect window come up and list the available configurations. You can create additional .conf files in your /etc/rivendell.d folder. Make sure you have a unique entry for the Label= parameter in each .conf file. This is the configuration name that you will see when you run rdselect.<br />
<br />
== Optional - Disable rdmonitor ==<br />
RDMonitor is a little monitor that sits on your screen to tell you what Rivendell configuration you are using. This is helpful if you are running a setup with a hot standby server and have configured rdselect to allow you to to easily switch from one server to another. If you are only running with a single server setup, or are running as a stand alone workstation with MySQL and /var/snd on the same workstation then there is little point in having rdmonitor running. In this case it just takes up space on the screen. Here is how to disable it.<br />
<br />
The easiest is to just make it no longer executable. From a shell:<br />
<br />
sudo chmod -x /usr/local/bin/rdmonitor<br />
<br />
Then if you reboot you'll find that rdmonitor does not pop up. If you later decide you want to re-enable it, just make it executable again:<br />
<br />
sudo chmod +x /usr/local/bin/rdmonitor<br />
<br />
== Optional - Jack Audio with Promiscuous Mode ==<br />
With Rivendell 3.x.x it is possible to get Rivendell to work with JackAudio in either promiscuous mode or with the older methods outlined below. In the future with Rivendell 4.x JackAudio using promiscuous mode will be the default and it will not be possible to change the User= field in the rivendell.service file. As a result the better approach is to use Jack in promiscuous mode as it solves a lot of the issues present in the older methods of using Jack.<br />
<br />
What is JackAudio promiscuous mode? Normally with Jack all Jack-aware clients need to be run under the same user in order to see the Jack server. With Jack running in promiscuous mode Jack clients can be run under different users and as long as all those users are members of the same group then they can see Jack. This means that Rivendell can start up the Jack server as root and if any logged in users are part of the audio group then any jack clients that are started will also see the Jack server. This provides the flexibility of the Approach 2 below with the benefits of the Approach 1 below. This setup is default when Rivendell 4 is installed but needs a few steps to turn it on in Rivendell 3.<br />
<br />
To set this up, create the following file:<br />
<br />
sudo nano /etc/profile.d/rivendell-env.sh<br />
<br />
And then copy / paste into the file:<br />
#<br />
# Run jackd(1) in promiscuous mode<br />
#<br />
export JACK_PROMISCUOUS_SERVER=audio<br />
<br />
You also need to add a line to your rivendell.service file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
and add the line '''Environment=JACK_PROMISCUOUS_SERVER=audio''' to the '''[Service]''' section of the file:<br />
<br />
[Service]<br />
LimitNOFILE=4096<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
Environment=JACK_PROMISCUOUS_SERVER=audio<br />
<br />
Save the file, and run a:<br />
<br />
sudo systemctl daemon-reload<br />
<br />
Then reboot. You should be able to set up Jack and have Rivendell start it automatically via the setting in rdadmin --> Manage Hosts --> Jack Settings. Let Rivendell start Jackd, and then if you start other Jack aware apps in the user-space, they should also see your Jack server. One issue on Ubuntu is when Rivendell starts Jack it doesn't always allow for connecting directly to the ASLA Jack driver. The work around is to connect it to the Dummy driver and then use ALSA_OUT or ALSA_IN as described in the Jack wiki article. See the '''[[Jack]] article''' for additional information on getting Rivendell to start JackAudio.<br />
<br />
Note that this method has been tested successfully on both Ubuntu 18.04 and the Raspberry PI running Jack2 with Jackd Version 1.9.9 and higher.<br />
<br />
One issue when having Jack start as root via rdadmin, if you later are looking to start Jackd using the logged in user (stopping the Rivendell services first and making sure jackd isn't running) Jack will sometimes throw an error that it can't access a driver. The issue is that files which Jack creates and are located in /dev/shm end up being owned by root:audio. To fix this, go to a shell and issue the following command:<br />
<br />
sudo chown username:audio /dev/shm/*<br />
<br />
Where username is the logged in user. Jackd should then start as your logged in user. If you do not have Rivendell set up to start Jack then by restarting the Rivendell services caed daemon should now find jack (running under your locally logged in user) when it starts.<br />
<br />
== Optional - Jack Audio (Older Method) ==<br />
Getting Jack to work takes a few extra steps. Jack and the Rivendell services all need to run under the same user ID in order for them to all see each other. In the CentOS distribution this is accomplished by having the Rivendell services start up jackd, this can be set up in rdadmin --> Manage hosts. When set up this way both the Rivendell services and Jack run as the root linux user. Under Ubuntu there are two approaches you can take for getting Jack to work.<br />
<br />
'''A word about users and ALSA.''' If you have multiple sound cards on your computer and want to have Rivendell use one under ALSA and another under Jack then you will need to use Approach 1 below. Sound cards set up for ALSA do not show up in Rivendell when the services are started under a user other then Root.<br />
<br />
'''Approach 1'''<br />
You can have Rivendell start up Jack under the '''root''' user by following the instructions in the [[Jack]] article. With these instructions Jack and the Rivendell services will be running under the '''Root''' user the same way that Rivendell is designed to run when running on CentOS. If you start Jack in this manner it is necessary to have Rivendell start up any Jack clients in its "clients to start" configuration so they will also run under root and also see Jack. For many this may be the easiest approach to getting things to work with Jack.<br />
<br />
'''Approach 2'''<br />
It is possible to start Jack as the logged in user and then start the Rivendell services under this same user. Using this approach makes it possible to start up additional Jack clients from the desktop and have them see Jack running. Note that when you use this approach if you have multiple sound cards on your system Rivendell will be unable to access additional sound cards via ALSA. You '''can''' use these sound cards through Jack with ''ALSA_IN'' and ''ALSA_OUT''.<br />
<br />
One disadvantage of this approach is that the services rdcatchd usually does not start properly and rdvairplayd often will start, but it will crash on initial use if you try and use virtual logs. This only happens when the Rivendell services are started as the locally logged in user, it does not happen when they are run as root. There is a work around for this (see below).<br />
<br />
The process for this approach is to have your system set up for auto-login, have Jack started before the Rivendell services and then have systemd start the Rivendell services under the same logged in user.<br />
<br />
First, stop the Rivendell services:<br />
sudo systemctl stop rivendell<br />
<br />
Next remove all audio cards from being selected in rdalsaconfig. If a sound card is selected in rdalsaconfig then sometimes Rivendell will grab the card instead of Jack.<br />
sudo rdalsaconfig<br />
<br />
To have Systemd start up the Rivendell services under the logged in user, we have to edit the following file:<br />
<br />
sudo nano /lib/systemd/system/rivendell.service<br />
<br />
In the [Service] section, add a line '''User=%username%''' where %username% is the logged in user, the same one that you are having start Jack. So if the logged in user is rd, then the [Service] section of the file should look like this:<br />
<br />
[Service]<br />
Type=simple<br />
ExecStart=/usr/local/sbin/rdservice<br />
PrivateTmp=false<br />
Restart=always<br />
RestartSec=2<br />
StartLimitInterval=120<br />
StartLimitBurst=50<br />
User=rd <--- Update the 'rd' with your logged in user - the one you want the daemons and Jack to run under!<br />
<br />
**Note, the "U" in User needs to be a capital U or it won't work!<br />
<br />
Once that file is updated with the needed user name, save the file and then reload the daemons for systemd (this loads up your changes)<br />
sudo systemctl daemon-reload<br />
<br />
Now start Jack audio. You can do this with qjackctl or with a command line. <br />
<br />
Once Jack is started, start up your Rivendell services. From a command prompt:<br />
<br />
sudo systemctl start rivendell<br />
<br />
you should find that Rivendell now sees Jack. Jack connections can now be made with Rivendell's Jack Connect [JC] macro or via Patchage or QJackCTL<br />
<br />
If this works, then what you can do is disable the Rivendell service from starting up, have the operating system start up Jack with the desktop, and use Cron to start up the Rivendell service. Be sure that you have your user set up for auto-login (no password required) upon reboot.<br />
<br />
Disable Rivendell service from systemd:<br />
sudo systemctl disable rivendell<br />
<br />
Find where your system allows you to add items to its autostart. In LUbuntu it is found in the <br />
Preferences --> Default Applications for LX Session --> Autostart option<br />
<br />
Under manually started applications, add in the command to start Jackd. I normally put this into a detached screen session.<br />
<br />
Once that is done, modify your root crontab:<br />
sudo crontab -e<br />
<br />
And add in a line for a delay and a start of the Rivendell services:<br />
<br />
@reboot sleep 60 && systemctl start rivendell<br />
<br />
If done correctly this will allow Jack to start, then after a brief delay will start up the Rivendell services which will see Jack as it is already running.<br />
<br />
**Note, as mentioned it has been found that when running the Rivendell services under the locally logged in user, the service rdcatchd usally does not start and rdvairplayd often crashes the first time you try and use a virtual log. Both of these services can be started manually and once started manually they seem to work fine. To check if they are running:<br />
<br />
ps -C rdcatchd -C rdvairplayd<br />
<br />
The output should look something like:<br />
<br />
PID TTY TIME CMD<br />
1143 ? 00:06:12 rdcatchd<br />
1225 ? 00:06:57 rdvairplayd<br />
<br />
If one of these services is not running, you can start one or both manually from a command shell with:<br />
<br />
rdcatchd &<br />
rdvairplayd &<br />
<br />
==Optional - Get Jack and Pulseaudio to work together ==<br />
This is not really related to Rivendell, but in some situations it is helpful to have Pulseaudio and Jack work together. This allows you to use audio applications that route their audio through Pulseaudo. Pulseaudio can be routed through Jack and ultimately Rivendell. Some users have found this allows them to set up a VOIP softphone application on the Rivendell workstation to allow for remote audio uses such as remote voicetracking.<br />
<br />
This approach presumes that you have not previously disabled Pulseaudio and are have already configured Jack for use. <br />
<br />
First you'll need to have the Pulseaudio-Jack bridge module installed:<br />
sudo apt-get install pulseaudio-module-jack<br />
<br />
The process when starting up Jack is that Pulseaudio first needs to be suspended, Jack started, and then the Pulseaudio modules started. When shutting down the Pulseaudio modules first need to be killed, Jack stopped, and then Pulseaudio started again. There are a number of ways to accomplish this, but the easiest is to create 4 scripts. First create a folder for these scripts:<br />
<br />
mkdir ~/scripts/<br />
<br />
'''File 1:'''<br />
sudo nano ~/scripts/1-pulse-jack-prestart.sh<br />
<br />
Copy / paste into the file: <br />
#!/bin/bash<br />
pacmd suspend true<br />
<br />
'''File 2:'''<br />
sudo nano ~/scripts/2-pulse-jack-poststart.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pactl load-module module-jack-sink channels=2<br />
pactl load-module module-jack-source channels=2<br />
pacmd set-default-sink jack_out<br />
pacmd set-default-source jack_in<br />
<br />
'''File 3:'''<br />
sudo nano ~/scripts/3-pulse-jack-prestop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
SINKID=$(pactl list | grep -B 1 "Name: module-jack-sink" | grep Module | sed 's/[^0-9]//g')<br />
SOURCEID=$(pactl list | grep -B 1 "Name: module-jack-source" |grep Module | sed 's/[^0-9]//g')<br />
pactl unload-module $SINKID<br />
pactl unload-module $SOURCEID<br />
sleep 5<br />
<br />
'''File 4:'''<br />
sudo nano ~/scripts/4-pulse-jack-poststop.sh<br />
<br />
Copy / paste into the file:<br />
#!/bin/bash<br />
pacmd suspend false<br />
<br />
Once you have created all these files, make them all executable:<br />
chmod +x ~/scripts/*<br />
<br />
Once you have these scripts created, if you are using '''Option 2''' from above to start Jack the easiest way to use them is to have qjackctl load them up. Set them up like this:<br />
<br />
[[Image:Jacksetup.png|center|600px|thumb|border|Pulseaudio-Jack Bridge setup]]<br />
<br />
Now when you start Jack in qjackctl you should see the Pulseaudio connections in the Connections screen. You can now connect / route these to any other Jack input / output.<br />
<br />
[[File:JackConnections.png | center]]<br />
<br />
Now if you restart your Rivendell services you should see the Rivendell connections show up.<br />
sudo systemctl start rivendell<br />
<br />
You can now connect Rivendell audio sources to and from Pulseaudio.<br />
<br />
==Optional - Tweak the upper margin of your display ==<br />
I've found that on Lubuntu 18.04 for some reason the top border of some of the windows displays above the top of the screen, making it difficult to move those windows around the desktop. This is especially bad with '''RDAirplay''' and '''RDAdmin'''. The way to fix this is to add a slight desktop margin on the top of the screen. In Lubuntu:<br />
<br />
Click the Menu button --> Preferences --> Openbox Configuration Manager<br />
On the left menu, click on the Margins tab and in the "Top" dialog box put 20 so it will read 20 px.<br />
Click the Close button<br />
<br />
Now when you start up rdairplay or rdadmin you'll see the top border of the window and will be able to move it around the screen. Depending on your screen and resolution you might need more then 20 pixels, try 30 if it is not enough.<br />
<br />
== Don't delete your source! ==<br />
A final note about the source that you have just compiled from. If in the future you are updating to a new version of the source code, you will first need to uninstall the current version. If you don't do this then the code remains linked to various existing libraries and the newer updated source will give you errors when you try and compile it. <br />
<br />
The easist way to uninstall from source is to go to your original source folder and do a make uninstall:<br />
<br />
cd ~/rivendell-3.6.7/<br />
sudo systemctl stop rivendell<br />
sudo make uninstall<br />
<br />
If you have used a generic ./rivendell/ folder for your source file name, then once uninstalled I recommend renaming the folder. I usually use reference to the version of the source that the folder contains. As an example:<br />
cd<br />
mv ~/rivendell/ ~/rivendell-367/<br />
<br />
Once you've done this you can then safely pull down the new source code from github and compile it.</div>Ltyndale