beaTunes News

Friday, December 24, 2021

Update: beaTunes 5.2.25

Gee! It's been a while. A lot has happened under beaTunes' hood and this maintenance release will incorporate some of the changes. As a first of a small series of releases, I have open-sourced three internal beaTunes libraries, namely JaplScript, Obstunes, and Obstmusic.

The first, JaplScript, is a library that allows you to generate Java programming interfaces for pretty much any macOS desktop app that is scriptable via AppleScript. The other two, Obstunes and Obstmusic, are such generated APIs and are used by beaTunes to communicate with iTunes and Music, respectively (other generated APIs, for example for the Photos app, can be found here - feel free to contribute!). One cool application for these libraries is the combination with JBang. This basically lets you script your Mac desktop apps in Java. Here's an example:

This release also fixes a small bug that occurred when editing the year field in the main song table.

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

Changes in 5.2.25

Last but not least: Happy Holidays!!

Labels: , ,

Sunday, October 7, 2018

beaTunes on Mojave and Windows 10: Dark Mode and the AEpocalypse

Recently Apple has released Mojave, version 10.14 of its desktop operating system macOS. With respect to beaTunes this had three effects:

  1. The much touted dark mode was not automatically supported.
  2. Mojave asked for user permission, before it let beaTunes talk to iTunes.
  3. Due to a bug in Mojave, oftentimes beaTunes was unable to display the remaining time in its player.

With today's update, all three issues were addressed to various degrees.

Automatic Dark Mode

beaTunes 5 has supported a dark theme for a long time now. With v5.1.10, it will automatically honor the system setting at startup time (switching to or from dark mode while beaTunes is running is still not possible). This applies to both macOS 10.14 and Windows 10. Note that this implies, that you cannot select the theme from within beaTunes anymore. Instead you have to use the operating system's dialogs.
To enable the dark mode under Mojave, open the System Preferences under , then select General and then Dark. If beaTunes was already running, please restart it, so it can pick up the changed setting.

To enable the dark mode under Windows 10, open the system Settings (the cog wheel in the Windows menu), then select Personalization and Colors. Scroll down to Choose your default app mode and select Dark. More detailed guides can be found all over the web, e.g. here. Again, you might want to restart beaTunes after the change.

AEpocalypse :: Averted

With Mojave Apple introduced AppleScript Sandboxing. In essence that is a mechanism that prompts the user for permission before one application can control another, i.e. can send Apple Events to it. Let me be clear about this: It's a good thing. But, as pointed out before, Apple could have made more of an effort to ship a quality implementation earlier. That said, the final result does not seem to be all that bad. I have made an effort to provide decent explanatory messages in case something goes wrong. The important thing to remember is that you can turn automation (AppleEvent) permissions on and off in your System Preferences under Security & Privacy.

And should nothing work anymore, you can reset the authorization mechanism for all apps using the following line from the Terminal command line:

tccutil reset AppleEvents

For more info, please see Daniel Jalkut's blog post.

Player Issues Workaround

A couple of words about the beaTunes audio player. Because Apple broke one of their APIs, the player did not correctly show the remaining time, a playhead or segments. Luckily, I've found a workaround, so this is fixed in v5.1.10.

What else?

Additionally to the mentioned changes forced by external events, I have found some time to change/fix some other things. Fans of classical music will probably like that if a tonal key can be found in a track title, it will be used instead of content-based estimates. And I'm sure macOS users will appreciate that the playing-track system notification now shows album art.

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

Changes in 5.1.10

  • Fixed non-committing genre changes in info panel.
  • Fixed possible application hang during recovery.
  • Added automatic support for Mojave and Windows 10 dark modes.
  • Added workaround for Mojave AVPlayer bug (remaining time).
  • Added support for album art in macOS system notifications.
  • Enabled compression when communicating with AcousticBrainz.
  • Improved key import from textual metadata for classical music.
  • Improved export of m3u playlists with non-ISO-8859-1 chars.

Labels: , , , , ,

Tuesday, September 11, 2018

beaTunes, macOS Mojave, and the AEpocalypse

As you might know, a new version of Apple's operating system macOS named Mojave is going to be released very soon. Be advised that beaTunes is not optimized for Mojave yet. Specifically, there is no integration with Mojave's dark mode and AppleScript may cause some headaches.

While dark mode integration is purely cosmetic (just use the 'dark' theme accessible via beaTunes' general preferences), AppleScript issues may be more problematic. When you are using beaTunes to maintain your iTunes library on macOS, you are effectively letting beaTunes control iTunes via AppleScript. Mojave may introduce a new security mechanism called AppleScript Sandboxing. This means that, before an application is allowed to control another application via AppleScript, the user is asked whether that's OK. This is most certainly not a bad thing, but Apple's implementation is still fairly new (not to say immature) and has been ridiculed a bit, simply because it reminds people of an old Apple commercial (with reversed roles).

A couple of people in the indy software world have voiced some legit concerns and criticism. Here's a little reading list:

What does this mean for beaTunes?

For now—not a lot. I will wait until the final macOS Mojave version is released before making changes, simply because this security mechanism seems to be too much of a moving target. After the dust has settled, we will see what's the best way to proceed.

PS: If this does not scare you or you have trust in dot-0 versions of Apple's operating systems—by all means, please take beaTunes for a ride and report on help.beatunes.com what problems you ran into!

Labels: , , ,

Tuesday, August 21, 2018

Update: beaTunes 5.1.9

beaTunes 5.1.9 is just a maintenance release, fixing and improving a couple of things. Details are listed below.

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

Changes in 5.1.9

  • Fixed set media type to Music via AppleScript (macOS only).
  • Fixed delay when displaying context menu in large libraries.
  • Fixed case-sensitivity of ID3 TXT frame descriptions.
  • Updated built-in Discogs database.

Labels: , , ,

Sunday, April 22, 2018

Launching BeatGauge from iTunes

As you might know, beaTunes has a little brother called BeatGauge. BeatGauge is a so called One-Trick-Pony—all it can do is compute BPM values for songs in iTunes (Mac-only). It does this super-fast and quite well with a couple of limitations (it cannot break DRM or analyze any files from iCloud or Apple Music).

While it is already very simple to analyze your files with BeatGauge (just drag from iTunes), it can be simplified even more by installing the following AppleScript in ~/Library/iTunes/Scripts

Once installed in the correct location, an additional Script menu will appear in iTunes with an item called BeatGauge. It lets you launch BeatGauge for the currently selected songs.

You can download the script here. For installation tips, please see Doug's page (finding the right folder can be tricky). Last but not least, if you want to create a keyboard shortcut for the script to make BPM analysis even more comfortable, see here.

Labels: , , ,

Wednesday, June 7, 2017

Fixing Media Kind: It's a bird! It's a plane! No, it's a podcast!

iTunes had the ability to organize your media files into broad categories (music, movies, podcasts, audiobooks, ...) for a long time. This is especially significant for people who store audiobooks in iTunes and expect to listen to them on their iPhone using the iBooks app. That's only possible when the files are correctly categorized as "audiobook". Unfortunately, adjusting the media kind (that's what iTunes calls those categories) was only possible manually through the user interface. With version 12.4 Apple finally remedied this for macOS and the property was exposed via AppleScript. This means that software like beaTunes can manipulate it and move files into the correct category. A task made for a beaTunes inspection.

Now how would one know, whether a file is in the wrong category? The route I took for beaTunes 5 is to simply look at the genre label. If it says podcast in that label, chances are it's not a TV show. The same is true for audiobooks. The corresponding inspection is therefore aptly named "Genre does not match media kind". It lets you easily fix miscategorizations and thus makes it much easier to listen to your favorite audiobook while on the road. By the way, proper tracknumbers and identical album/artist values make it possible to group chapters into a book. Obviously, beaTunes can help here, too.

As mentioned above, programmatically manipulating the media kind on macOS happens via AppleScript. The Windows equivalent for this used to be the iTunes COM API. Unfortunately, Apple has abandoned it years ago. This is why beaTunes for Windows cannot offer the same functionality as beaTunes for macOS. On Windows, beaTunes offers proper media kind support only for folder-based libraries, where iTunes does not matter. It sure is disappointing, but it seems that Apple views iTunes for Windows as a legacy system, that's dragged along, because it cannot let it die for fear of public outcry. Which is ironic, given that so many people have a love/hate relationship with iTunes.

Labels: , , , , , , , ,