Install Rivendell Automation: Part 4 – Rivendell Hosts

Install Rivendell Automation: Part 4 – Rivendell Hosts

rd-hostsRivendell is finally installed and you’re staring at shiny new automation trying to figure out how to get audio in/out of it. Lets spend some quality time getting intimate with RDAdmin, Rivendell Host config files, and get all up in it, like Barry White.

Each Rivendell computer in your network is called a “Host.” So the Host file represents each physical Rivendell machine. I cannot stress this enough… Rivendell hosts MUST match the ACTUAL hostname you chose for your hardware when you installed Linux. If you don’t remember what you named it, open a terminal and type “hostname” without the quotes. It’s also the word after the @ symbol: user@HOSTNAME in the terminal.

NOTE: It’s also worth mentioning that there was a bug (and it may have already been fixed) where using dashes in the hostname wreaked havoc for some users. Save yourself a headache later, ignore the example image, and avoid using dashes in HOST-NAMES. If you got this far, and just realized you already gave your machine a hostname with a dash (like I did in the example image), it’s easy enough to fix. Best to do it now, though, before creating the database and Rivendell hosts. Edit the following files and change the hostname:

This is the quick and dirty version of the tutorial. I’ll update and refine it as time permits. Maybe.

Create MySQL database and default Rivendell Host:

If this is a server/client configuration, these steps MUST BE PERFORMED ON THE SERVER the first time to create the Rivendell database and default Rivendell Host. You can find the application shortcuts for the Rivendell modules in All Applications/Sound & video/RD[modulename]… Click on RDAdmin. This is where you will tweak settings for the various Rivendell modules including the Host Manager.

The first time you open RDAdmin it will ask for your root MySQL user name and password. Enter “root” for the user name and the password you chose while installing MySQL-server and press “enter”  (HINT: it’s not b@N@n@$). Hollaback!

In a moment, you should see a dialog box confirming “New Rivendell Database Created.” Click “OK.”

This is the part I was talking about like 2 hours ago — when I said you were, literally “moments” away from fully functioning Rivendell automation — and about how you’d need that mySQL password — but it was totally different from the Rivendell admin password — and you’d see what I was talking about in PART FOUR… Just sayin’… From now on, whenever you access RDAdmin, you will use “admin” for the user name and hit “enter” without entering a password. Unless you decide to password protect RDAdmin — which you can do — under RDAdmin/Manage Users/Double-click “admin”/press “Change Password” button. But it comes with the following caveat: if you ever need to upgrade versions of Rivendell and the database needs to update it’s schema, you need to remove your RDAdmin passwords BEFORE YOU UPGRADE, or you could be locked out F-F-F-F-F-F-F-F-F-F-F-FOREVER. Which would be totally E-F-F-F-F-F-F-F-F-F-F-F’D. Not really, because you could dump your SQL data from the console, but that’s a whole other mess…

Configure JACK with QjackCTL GUI:

Now we need to open qjackctl (Jack Control — find it in Sound & Video/QjackCtl) or simply type: qjackctl in the terminal.

Remember the scripts you created in PART ONE of the tutorial? You finally get to use them! Click the “Setup” button on QjackCtl. Next, click on the “Options” tab. Tick all 4 boxes under the “Scripting” header. Then click on the … (dots) to the far right of each field and navigate to your “rdscripts” folder and choose the corresponding script, i.e., Execute Script on Startup | choose: on_startup.sh, etc…

Click the “Settings” tab. Tick the box next to “Realtime” if it isn’t already checked and edit the following options:

  • Priority:9
  • Frames/Period:1024
  • Sample Rate:48000
  • Periods/Buffer:4
  • You should be able to keep all the other defaults.
  • Click “Save” at the top (you can leave the preset name as (default).

 

On the “Misc” tab, tick the following options:

  • Start JACK audio server on application startup
  • Confirm application close
  • Enable system tray icon
  • Start minimized to system tray
  • Leave everything else as is.
  • Click the “OK” button on the bottom right.

 

Now, click the “Patchbay” button, then click the “load” button. Navigate to your “rdscripts” folder and choose “rd_jack_patch.xml” and click “Open.” Press the “Activate” button. This should patch audio in/out of Rivendell/Jack/Soundcard and keep the settings persistent between reboots. I warned you this was the quick and dirty version, right?? Maybe dirtier, than it is quick…

Create Client Host config:

When you installed your server, the Rivendell installer should have generated the default Host file for the server. But you will need to create this manually for each client in order to get clients talking to the server and vice-versa. It’s actually pretty simple, but here’s where some of that nuance comes in. A simple typo in your hostname and you’ll be chasing your tail trying to figure out why you don’t have any audio. Why you can’t rip/import audio into Rivendell. Or find Jack in the “Audio Ports” and “Audio Resources” section of the RDAdmin/Manage Hosts option. You get the point…

  1. Open RDAdmin and click on “Manage Hosts”
  2. Click “Add” IMPORTANT: The New Host Name MUST MATCH THE ACTUAL HOSTNAME of each client EXACTLY.
  3. Input the hostname of the client you are configuring and choose your existing host in the “Base Host On” Dropdown. Then click “OK”
  4. If you receive a warning from Rivendell about “No Audio Configuration Data.” Click “OK” twice to dismiss it.
  5. REPLACE the default localhost IP address with the STATIC IP address of the client you are configuring and click “OK.”

 

I find that a reboot is usually better than just restarting the Rivendell daemons to bring everything online. When the system comes back up, open RDadmin, click on “Manage Hosts,” double click on the client you’re configuring, then click “Audio Ports” and Audio Resources”

If you don’t see “JACK” (*or if you DO see STEVE) listed in the “Card Driver” field of “Audio Ports” or “Audio Adapters” section of “Audio Resources”… Uh-oh… Something went HORRIBLY WRONG and you need to start over from the very beginning!    Seriously….       WTF?         j/k…

Have a look in qjackctl and confirm that you’ve added your scripts to the “options” tab of qjackctl setup, and didn’t forget to load the rd_jack_patch.xml file and activate it in the patchbay.

IMPORTANT: Don’t forget to add QjackCtl to: Preferences/Startup Applications

  • Click “Add”
  • Give it a name, like: RD Jack Control
  • Command: qjackctl
  • Click “Add”
  • Click “Close”
  • Then, breathe deeply and reboot.

Assign HTTP Xport (MUSIC IMPORT) to Clients:

To import audio from the client to the server, do the following in RDAdmin:

  1. Click “Manage Hosts”
  2. Double-click your RIVENDELL SERVER from the hosts window.
  3. REPLACE the default localhost IP address (looks like 127.0.1.1 or similar, if you haven’t already changed it) with the STATIC IP address of your SERVER (looks like 192.168.1.90 or similar if you have changed it).
  4. In the “HTTP Xport” section, confirm “localhost” is selected and click “OK.”
  5. Now, double-click your RIVENDELL CLIENT from the hosts window.
  6. REPLACE the default localhost IP address (looks like 127.0.1.2 or similar, if you haven’t already changed it) with the STATIC IP address of your SERVER (looks like 192.168.1.91 or similar if you have changed it).
  7. In the “HTTP Xport” section, choose your SERVER hostname from dropdown menu and click “OK.”

Assign Core Audio Engine (RDAirPlay) to Hosts:

If your server is going to be the primary “on-air” machine, you can leave the defaults alone. To assign Core Audio Engine (RDAirPlay) responsibilities to a client

  1. Open RDAdmin.
  2. Double-click your RIVENDELL CLIENT from the “Manage Hosts” menu.
  3. Confirm “localhost” is selected next to “Core Audio Engine”
  4. Click “OK”

Automate Music Import with Custom Dropboxes

By now, you’ve probably figured out that Rivendell is no joke! It can do things that Master Control and NexGen only dreamed of doing… For FREE… It manages to do all of this without breaking a sweat, and thanks to Linux, it’s less likely to ever get a virus, or CRASH!

Let’s say you have a hard drive with 47,000 songs (that someone “loaned” you) and you’d like to rip ’em into Rivendell and launch a terrible radio station that no one will listen to (or a laser focused major market station that decimates the competition).

Fire up RDAdmin, click on “Manage Hosts,” double-click on the host you want to configure for importing music, and then press the “*Dropboxes” button. *No relation to dropbox.com.

  1. Choose a default group (the “group” or category that audio from this dropbox will be imported into — VERY handy when you have a lot of audio to import — every shortcut is helpful.
  2. Click the “Select” button to the right of “Path Spec” and navigate to the folder you’d like to use — EX: /home/ucla/Music/Dropbox/mp3/*.mp3 — the suffix is the most important part. It’s an automatic FAIL if you forget.) 
  3. Put: %a_%t. — including the period — in the Metadata Pattern field (which should pull artist and title info from most audio files if it exists — there’s a cheatsheet of Rivendell Metadata patterns somewhere…) Wait, I FOUND IT!!!
  4. Enter: /home/*user account*/errorlog.txt — in the Log File field
  5. Tick “Delete source files after import” (if you don’t want dupes clogging up your pipes.)
  6. Tick “Normalize levels” and enter -13 dBFS in the box
  7. Tick “Attempt to work around malformatted input files”
  8. Click “OK”
  9. Create a few of these with different groups, options, and experiment!
  10. One more thing: Rivendell can import the common audio formats: wav, mp1,2,3, ogg and flac — so you should create a dropbox for EACH filetype — because the filetype is part of the path spec — and if you drop a .wav in the .mp3 dropbox — it will be IGNORED, like a photo enforced traffic signal in LA. I haven’t actually tested this theory, but it’s too much work while I’m writing. Follow my logic?

 

If you wanted to be all fancy, you could even get a free dropbox.com account (see how I made that segue??) Download the Dropbox client, plug in your credentials and map that dropbox folder to a Rivendell Dropbox and you’ll be importing music from bed… Or Japan… There are other more efficient ways to do this, but they’re less fun and involve FTP and forwarding ports and mounting shares. And that’s just ewwwww.

Incidentally, if you do this, make sure you COPY files into dropbox on the source computer, or Rivendell will delete the files from your source too — because we told Rivendell to delete after import, remember? — and the default behavior is move, NOT, copy when dragging files into your dropbox.com folder… Don’t ask how I know that… It makes me feel uncomfortable. Or you could just UN-check delete after Import. But then, yeah, clogged pipes.

More later…

PART ONE: SYSTEM PREPARATION PART TWO: INSTALL SERVER PART THREE: INSTALL CLIENT PART FOUR: CONFIGURE HOSTS