beaTunes News

Thursday, October 31, 2013

So where exactly does beaTunes store key and color?

A question that comes up again and again, is where data is stored. The clear answer is: It depends. So, let me explain...

First of all, you need to know, what kind of library you have. beaTunes works with two different kinds of music collections: Either an iTunes library or a folder-based one. Let's assume for now you have an iTunes-based library (if you're using iTunes—that's the highly recommended kind). Whenever you change something in beaTunes, it is reflected in iTunes. This is because beaTunes tells iTunes right away and iTunes (not beaTunes!) makes the change in two locations: The audio file itself and the iTunes database. Obviously this can only work for fields that are supported by iTunes, like BPM and Artist. Other fields, like Key or Color, that are not supported, cannot be stored by iTunes. Those fields are always stored in the internal beaTunes database. This is very efficient and does not mess with your files. However, if the database ever breaks, the data is lost unless you have a backup of the database. This is why beaTunes can also write non-iTunes fields like Key to your files. But it's not the default behavior. To enable embedding of non-iTunes fields in your files, you have to check the appropriate box in beaTunes' General preferences, before you make any changes. That's right: Only changes made after you checked that box are also written to your audio files. And once they were written to your files, they are readable by other applications like Serato or Traktor.

Does that mean you have to re-analyze all your tracks to export data to your files? The short answer is: No. In the Tools menu you can find an item called Embed non-iTunes Fields. It allows you to embed all data from the internal beaTunes library into your files. Be warned—this means every single file will be touched and changed (it's a Library Batch Action). Perhaps you want to backup your files before you do something like this...

Now, at the beginning I mentioned the two kinds of libraries beaTunes supports. With the second one, folder-based, things are easier. Since beaTunes does not communicate with iTunes, it always embeds your data into your files. That's it.

Labels: , ,

Tuesday, October 15, 2013

64 bit on Windows, Round 2

beaTunes2 logoJust like the last beaTunes release, I would like to offer a 64 bit version of beaTunes 3.5.16 as well. As already pointed out recently, there are a bunch of good reasons for a 64 bit version—future versions may not even be offered in 32 bit anymore. Until then though, there is still a lot of testing needed. The last release still had a bunch of 64 bit related bugs—most prominently, AAC/M4A files weren't decoded correctly and analyzed files stayed locked, making it impossible to edit them in other programs while beaTunes was running. Both these bugs are fixed in beaTunes 3.5.16 (and MFSampledSP 0.9.3, the culprit).

You can get the 64 bit version here: beaTunes-3-5-16-x86_64-win.exe

Please let me know, how this version works for you!

Thanks!

Labels: , ,

Monday, October 14, 2013

40% Off Regular Price

Quick notice for those of you who missed the news on Facebook and Twitter—we're having a sale tomorrow on Tuesday 10/15/2013 over at MacUpdate. Please share!

Labels:

Monday, October 7, 2013

Exporting Playlists to Spreadsheets

beaTunes2 logoThe other day someone asked on http://help.beatunes.com/ how he could export a playlist to a spreadsheet. Frankly, I loved the question, because it gave me a perfect opportunity to show off the beaTunes plugin API. Specifically, it gave me a chance to demonstrate how to write a PlayListExporter beaTlet.

The overall idea is very simple: All spreadsheet applications can import CSV. CSV stands for comma separated values and each line in such a file is just that. So all we have to do, is write some header with the column names, and then write the desired song attributes for each song. The only slightly complicated thing here, is the fact that we need to escape quotes and have to take care of possible null values.

The result is a little beaTlet (basically a script using the plugin API) written in Groovy that can be installed by placing it into the beaTunes plugin directory as explained here and here. Make sure to call the file the same as its class name: CSVPlayListExporter.groovy

To use it, restart beaTunes, right-click on a playlist, and choose Export PlaylistCSV. Then type in the file name and make sure to use the file extension .csv.

import java.io.File
import com.tagtraum.core.ProgressListener
import com.tagtraum.beatunes.library.PlayListExporter 
import com.tagtraum.beatunes.library.PlayList

class CSVPlayListExporter implements PlayListExporter {

    // Lowercase file extension (without the '.').
    def String getFileExtension() {
        "csv"
    }

    // Very short description for this exporter.
    def String getDescription() {
        "CSV"
    }

    // Lets you provide an id for this exporter.
    // The id may be used for referring to an instance of this exporter
    // in persistent configuration files.
    def String getId() {
        "groovy.csvplaylistexporter"
    }

    // Exports the given playlist to the given file.
    //
    // file to write to
    // playlist to export
    // progressListener that lets you report... well, progress
    def void export(File file, PlayList playList, ProgressListener progressListener) {
        file.withWriter { f ->
            // write CSV header for column names
            f.writeLine("Name,Album,Artist,Composer,Key,BPM")
            // write a comma separated line for each song
            playList.getSongs().each() { song ->
                f.writeLine("${esc(song.getName())},"
                + "${esc(song.getAlbum())},"
                + "${esc(song.getArtist())},"
                + "${esc(song.getComposer())},"
                + "${esc(song.getKey())},"
                + "${String.format(Locale.US, "%s", song.getBeatsPerMinute())}")
            }
        }
    }
    
    def String esc(Object s) {
        if (s == null) return ""
        "\"" + s.toString().replace("\"", "\"\"") + "\""
    }
}

Download

Labels: ,

Saturday, October 5, 2013

Running to your own tune—BPM adjusted

The last time you went for a run, listening to music, did you encounter that moment when suddenly that ballad came on and you thought Damn! That's not what workout music is supposed to sound like! Listening to the wrong music while running can really throw you off, dampen your mood, and ultimately slow you down. Listening to the right tracks though, can make you faster. But what are the right tracks?

Most people enjoy exercising to an energetic, upbeat music mix. Certainly not slow, but also not too fast. So finding the right music breaks down to a couple of different problems:

  1. Find music you generally like, something upbeat and energetic
  2. Determine the music's tempo
  3. Figure out what tempo matches your exercise

Finding upbeat Music

You probably own a music collection. It's on your computer, some of it is upbeat and energetic. Often this can be determined simply by genre or album, but that's certainly not ideal. Another way to do this, is using Last.fm tags. To find energetic music on Last.fm, you could simple search for music tagged with "energetic" or "running". But that still does not let you go running with the tracks you found. One way to take those energetic tracks with you is to transfer Last.fm tags to your own collection with—you guessed it—beaTunes. Simply install the Last.fm plugin via PreferencesPlugins, restart beaTunes, and click to analyze your library. In the analysis options dialog, de-select all tasks but the Last.fm one. Then set how many tags per song you want to import. Typically, the top 20 are more than enough. beaTunes will not be able to find tags for all of your tracks, but at least the mainstream ones will be successfully tagged. Once the analysis ran its course, type "energetic", "upbeat", or "running" into beaTunes' search field and it will find those songs for you in your own music library!

Determining the Tempo

Now that you have some songs that may be great for running, how do you know how fast they are? Musical tempo is usually measured in beats per minute (BPM), loosely defined as the number of times you tap your foot along to a song per minute. Tempi below 100 BPM are generally considered slow, tempi above 100 BPM are fast (see Wikipedia). Both iTunes and beaTunes can display BPM for your songs. To see the column in iTunes, you might have to switch to the tabular song list view, and then select BPM in ViewSong View Options (also available by right-clicking on the table header or the ⌘-J keyboard shortcut).

Unfortunately, seeing that column does not fill it with values. And iTunes is incapable of doing just that. To automatically determine the BPM, analyze your library with beaTunes. Make sure to select the BPM task in the analysis options dialog. For beaTunes 3.5, choose the Rayshoot algorithm and a BPM range from 90-180 BPM. Depending on the size of your library, analysis might take a while. Keep in mind, that software is notoriously bad at distinguishing between say 90 and 180  or 60 and 120 —beaTunes 3.5 is no exception (I'm working on this for beaTunes 4). Some obviously slow songs will have a BPM value that is twice the tempo they really are. This is not a problem, as long as they still sound upbeat. This is because when you are running to a 150 BPM song, you can keep on running seamlessly to a 75 BPM song—the beat still matches your strides!

Finding the right BPM

Which brings us directly to the crucial question: What BPM is right for me?

As so often, the answer is:

It depends...

Really, it depends on two factors. The first one is obvious—the faster you run, the faster your music needs to be. The second one... well, the taller you are, the slower your music needs to be. It comes down to the length of your strides. Tall runners obviously need fewer steps for the same distance. And since you want to match the beat of your music to your steps, you essentially have to match your music to your speed and height.

Unfortunately, it's hard to give you a concrete example, like "if you're 5'5 (1.65m) and run 8min/mile (5min/km) your ideal BPM is X". But here are some examples to get you started, leaving your height out of the picture:

  • 7:00min/mile: 90/180 BPM
  • 7:30min/mile: 87/174 BPM
  • 8:00min/mile: 83/168 BPM
  • 8:30min/mile: 82/164 BPM
  • 9:00min/mile: 80/160 BPM
  • 9:30min/mile: 77/154 BPM
  • 10:00min/mile: 75/150 BPM

Start running with a set BPM and, if it feels too slow, next time ramp it up a bit. To improve your time, choosing a BPM that's a little faster than your usual pace definitely helps!

Building the Playlist

Now that you know what BPM you need and all your songs are BPM-annotated, simply enter "energetic" or something similar into beaTunes' search field, then select a bunch of songs with the right BPM (tip: sort by BPM) and create a playlist from the selection via the File menu. That's it!

Hope you enjoy your next run!

Labels: , , , ,