beaTunes News

Thursday, August 17, 2017

Remote Control

I've recently mentioned that starting with beaTunes 5.0.3 there is a mechanism that allows limited remote control of beaTunes from another process. This mechanism is pretty straight forward:

  1. Start beaTunes
  2. Locate the beaTunes5rc executable
  3. Run beaTunes5rc SOME.ACTION.ID

Let's assume you're on macOS and have installed beaTunes in the regular /Applications folder. Then beaTunes5rc is located at /Applications/beaTunes5.app/Contents/MacOS/beaTunes5rc (on Windows, a similar executable is located in the installation directory). A handy action id to use is audioplayer.pause.play. So to toggle play/pause from another program or the commandline/terminal, simply execute:

/Applications/beaTunes5.app/Contents/MacOS/beaTunes5rc audioplayer.pause.play

As return value you'll usually get a JSON document similar to this one:

{"request":"audioplayer.pause.play","status":"ok"}

In beaTunes most UI actions have an id and therefore can be triggered via this mechanism. A couple of these ids are listed in the API for RemoteControlService. However, the best way to find valid ids is to ask beaTunes5rc itself. To do so, simply call:

/Applications/beaTunes5.app/Contents/MacOS/beaTunes5rc list

This will return a JSON-formatted list of valid ids, often along with short descriptions.

Additionally to a simple status message some actions may return useful information. To get information about the currently playing song, you can e.g. use audioplayer.track.

The mechanism can be used integrate beaTunes with 3rd party applications, like BeardedSpice. And if you'd like to see a beaTunes integration with BeardedSpice, feel free to upvote the corresponding pull request.

Labels: , ,

Tuesday, August 15, 2017

Update: beaTunes 5.0.4

Today's update addresses a couple of nuisances, like a too small speaker icon, issues with inline BPM editing, etc. Furthermore, it contains some of changes that are supposed to make things run more smoothly, if you happen to have a large library (at least 10,000 songs—see also this post).

Because it has been requested independently by multiple people, I have added a field containing the date of the last analysis. This should make it easier to selectively analyze songs, based on when you last analyzed them. Note that this field does not indicate which analysis task you ran—just that you analyzed something. Initially this fields is empty, because beaTunes did not keep track of when you analyzed your songs prior to version 5.0.4. Also new in this version is the description field. It's the equivalent of the ID3 subtitle frame. If you are using an iTunes-based collection, please be aware that this field is not automatically read from iTunes, because iTunes does not seem to export it to its iTunes Library.xml file. If you want to populate it for specific, selected files, you might want to use File -> Refresh from File.

As always, you can download the new version from the download section of the website.

Changes in 5.0.4

  • Fixed ignore Amazon album version solution.
  • Fixed "Play in [preferred player]" not showing up in context menu.
  • Fixed database update for very large BPM values.
  • Fixed inline BPM editor for tempi without relative salience.
  • Fixed potential NPE in artwork inspector solution.
  • Fixed potential infinite loop in BPM detection for very short files.
  • Added field description.
  • Added field for last analysis date.
  • Increased size of speaker icon for currently playing song.
  • Decreased time to analysis start (sending data to server).
  • Improved error reporting for elevation errors on Windows.
  • Improved performance.
  • Updated built-in Discogs database.
  • Updated to JRuby 9.1.12.0.
  • Updated to Groovy 2.4.12-indy.
  • Updated to Hibernate 5.1.9.

Labels:

Do you have more than 10,000 songs in your collection?

These days music collections are usually a couple of thousand songs big. For these kinds of libraries, beaTunes features something called automatic synchronization. Whenever you switch from beaTunes to another application and back, beaTunes will try to make sure that changes to your music files are automatically imported. This is very convenient and no big deal—unless of course you have a very large collection. And with very large I mean ten thousands of songs.

Synchronizing external changes with the built-in internal database can take a while, especially when your music resides on a slow external drive, e.g. a NAS. You'll notice that beaTunes becomes sluggish, you may see timeouts, and in its status bar beaTunes displays something about synchronizing. Fortunately, this annoying behavior can easily be avoided.

Simply open the general preferences and turn off Synchronize on window activation. Of course that means that external changes aren't automatically discovered by beaTunes anymore. But this issue can easily be solved as well. Whenever you believe, beaTunes has gotten out of sync with your files, simply run File -> Synchronize. This lets you synchronize your metadata at a time of your choosing, and only when it's really necessary.

Labels: