beaTunes News

Thursday, April 28, 2016

How to use multiple folders in a single, folder-based collection

beaTunes4 logo

A question that comes up every now and then is how to use multiple base-folders in a folder-based library. Folder-based libraries are those, that have nothing to do with iTunes, but basically contain all songs in a given base folder (more info). By default, folder-based libraries are based on a single folder and the beaTunes user interface does not let you add other folders. Despite this, beaTunes 4 is capable of basing folder-based libraries on more than one folder—but it requires a tiny bit of hacking.

beaTunes stores information about music collections in a file called preferences2.xml, which is stored in the folder ~/Library/Application Support/beaTunes/ on OS X and in %LocalAppData%\tagtraum industries\beaTunes\ on Windows. Unfortunately, the folders are a little hard to find on both operating systems. On OS X, ~/Library/ is hidden—use Go -> Go to Folder... in Finder to find it. On Windows, simply copy the mentioned path and paste it into the File Explorer's path field.

Before you open the file, please make sure that beaTunes is not running. Then take a look with your favorite text editor, e.g. Atom. If you're using multiple, folder-based libraries, you should see something like this:

<?xml version="1.0" encoding="UTF-8"?>
<preferences>
    <components>
        <component id="beatunes">
            <file-collection persistentid="7DB1A93611184EB2" selected="true" name="FileSystem">
                <root>/Users/demo_user/folder_a</root>
            </file-collection>
            <file-collection persistentid="7BAF626404544925" name="FileSystem">
                <root>/Users/demo_user/folder_b</root>
            </file-collection>
            [...]
        </component>
        [...]
    </components>
</preferences>

In essence, this describes two folder-based libraries: One based on folder_a and one on folder_b. All you need to do to combine both libraries into one, is to move the <root>-element describing folder_b to the <file-collection>-element containing folder_a. Once that is done, you can remove the now empty <file-collection>-element for folder_b. The result looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<preferences>
    <components>
        <component id="beatunes">
            <file-collection persistentid="7DB1A93611184EB2" selected="true" name="FileSystem">
                <root>/Users/demo_user/folder_a</root>
                <root>/Users/demo_user/folder_b</root>
            </file-collection>
            [...]
        </component>
        [...]
    </components>
</preferences>

Now save the preferences2.xml file, start beaTunes and select the library we just modified. To identify which one it is, open the beaTunes general preferences and open the combo box that lists the existing libraries. When hovering over the items with the mouse, beaTunes will show all root-folders for each library in the tooltip (screenshot). Once the right library is selected, you may need to synchronize via the File menu, if beaTunes isn't doing it automatically.

The example above assumes that you already have multiple folder-based libraries and shows you how to merge them into one. However, multiple libraries are not strictly necessary to add another base-folder to a library. In fact, you can simply add a new <root>-element to an existing <file-collection>, save the file and then start beaTunes (again: don't edit the file while beaTunes is running!). The two things you have to pay attention to though, are overlaps and loops. You should never add a folder to the file collection that is in some form a sub-folder of an already existing <root>-element. Also, you should never create loops in your directory structure, e.g. via symbolic links.

I hope this helps some folks with sprawling libraries. If you have any questions, please don't hesitate to ask.

Labels:

Wednesday, April 27, 2016

We're Having a Sale!

Only on 4/27&28 at bitsdujour.com.

Labels:

Wednesday, April 20, 2016

If you are using 32-bit beaTunes 4.x on Windows, update now!

At the end of the last post, there was a little note saying something about Apple's QuickTime. Even though it was stuck to the end of the post, it was important. Important enough to justify these extra lines. The gist of it is: If you are using the 32-bit version of beaTunes 4.x, you should update to beaTunes 4.6 and uninstall QuickTime. Why? QuickTime for Windows has known security issues that Apple will not fix. And beaTunes 4.6 does not require QuickTime anymore.

Why is this only important for the 32-bit version of beaTunes? Apple has never ported QuickTime into the 64-bit world, which is why the 64-bit version of beaTunes has never been able to use it. Instead, beaTunes uses the operating system's media libraries combined with FFsampledSP (a library based on FFmpeg).

Labels: , ,

Tuesday, April 19, 2016

beaTunes 4.6: High-Resolution Display Support for Windows and Other Goodies

I'm proud to write that today beaTunes 4.6 will be available for download as a free update for existing beaTunes 4 customers. Probably the most important new feature is the much improved high-resolution display support for Windows (sometimes referred to as HD or 4k). Yay! No more squinting to read an artist's name! As Windows hardware has slowly caught up with Apple's early Retina offensive and the Windows OS has started to support HiDPI displays much better, it was definitely time for this step. What was holding me back, was Java 8's lack of HiDPI support for Windows. To this day, there is still plenty wrong with it, so I had to build a few workarounds. Still, if you're using Windows with a high-resolution display, you will eventually notice some left-over rough edges, e.g. slightly odd-looking file dialogs. Those are presented by the Java Runtime Environment and pretty impossible to fix without patching the runtime itself. Luckily, the Oracle Java team is working hard to bring better HiDPI support to Java 9 and hopefully backports some fixes in the process. It may just be a matter of time, until all the little things are resolved.

You may ask, why ship something that's not perfect? Well, in my humble opinion, before today's update beaTunes was mostly broken on Windows HiDPI displays. With today's release it's 99% fixed—offering 100% of its functionality. If you ask me, that's a much better state of affairs.

Besides the obvious user interface changes, a bunch of things under the hood were improved. Writes to the internal database are now coalesced. In essence that means that a song property change is not persisted right away, but with a short delay. If other properties of the same song are also changed during this delay, these multiple write operations are combined into a single one. Especially during analysis of many different properties (e.g. key, BPM, ...) this behavior helps to avoid unnecessary database operations and thus reduces overall analysis time.

JavaScript Support

As we're already talking technical stuff—there's good news for JavaScript hackers! beaTunes now officially supports JavaScript as plugin scripting language. You may remember that Groovy, Jython, and JRuby are already supported. JavaScript is now the fourth language. Because JavaScript uses prototypical and not class-based inheritance, plugins are created in a slightly different way. But thanks to the Nashorn extensions, it's relatively easy for your JavaScript code to interact with beaTunes. Examples can be found in the beaTlet tutorial as well as on GitHub. BTW: the shipped implementations for Groovy and JRuby have been updated.

Pretty much with every minor (not micro) beaTunes update, an inspector gets a little makeover. For beaTunes 4.6, the English capitalization rules received some well-deserved love. For those of you, who've never noticed its existence, this inspector only shows problems, if the song language is known (different language, different rules). Prior to inspection, you can let beaTunes determine song languages automatically via the corresponding analysis task. Results are more accurate, if the lyrics are available. To make a long story short—the inspector has been rewritten and the results are much better now.

Other Little Fixes

A couple of other minor things have been fixed or improved. E.g. the Get Info dialog now shows a little icon to indicate whether a song has already been fingerprinted. And the visible column dialog finally contains proper descriptions for the columns Issue, DRM, and Enabled.

Specifically for Windows, there are two other important items:

  1. The Windows installer is now properly signed (I know, this should have happened a long time ago).
  2. The 32-bit version does not depend on Apple's QuickTime anymore, which turned out to be a serious security risk.

I hope you enjoy this free update. As always, you can download it from the download section of the website.

Thank you.

Most important changes in 4.6.0

  • Fixed relative salience error on 0 BPM.
  • Fixed some English capitalization rules.
  • Fixed missing artist in Album Info pane.
  • Fixed writing of last played date on Windows.
  • Fixed sorting by Album Replay Gain.
  • Fixed DNS lookup during database ops (caused by URL.equals()).
  • Improved performance, via coalesced database writes (reduced disk IO).
  • Improved some analysis error messages.
  • Improved "Analyze New"-behavior: Use last sync as reference point.
  • Improved "Album Info" to more often show actually useful info.
  • Improved HiDPI support for Windows.
  • Added fingerprint icon to Get Info pane.
  • Added support for JavaScript beaTlets.
  • Added signature to Windows installer.
  • Added index column to visible columns popup.
  • Removed QuickTime for Windows dependency (32bit).
  • Updated to JRuby 9.0.5.0.
  • Updated to Groovy 2.4.6.
  • Updated to Hibernate 5.1.0.
  • Updated to japlscript 3.1.3.
  • Updated to jipes 0.9.12.
  • Updated to slf4j 1.7.21.

Labels: , , , , ,