Home User Forums SongKong Music Tagger Jaikoz Music Tagger Albunack Music Service

Saturday 23 November 2013

From Music Players to Automated Tagging

A new version of SongKong has been released today with improvements in all areas, and I thought it  would be worth giving a historical background of music tagging and its development as I see it.

First we had the Musicplayer just for playing CD's on your computer. Then as MP3 became popular and users started ripping their CD's as files on their computer music players such as Winamp became popular. Originally no meta data could be stored in MP3s at all but it quickly became apparent that as users could store files on their computer they need to store information about the files, and just using the file name was not sufficient.

So ID3v11 was added, but this was very limiting and so a new system ID3v2 was developed that was much more powerful. Music playing software added functionality to allow this information to be added but music players tend to work one file at a time, and this wasn't a very efficient way to add meta data, new software was required the Tagger !

I don't know what the first tagger was but there were plenty of mp3 taggers with very similar names that worked in a very similar way, they allow you to modify multiple fields and were just that bit more efficient than stand alone Music players.

Around this time the iPod and iTunes was born, this massively increased the amount of digital music people were storing on their computers.

We also had new formats such as wma, ogg vorbis and mp4, so now we needed taggers that could edit multiple formats in a way that hid the differences.

As people got serious about listening to digitised music lossless formats  became more important such as Apple Lossless and Flac.

As peoples collections got larger modifying all their metadata by hand became unsustainable, but help was on hand in the guise of online Music databases. The first one was freecdb that could tag your music if you had the original CD by looking up a digital fingerprint but this wasn't much good for songs that you already had on your computer.

But then new databases such as Discogs and MusicBrainz were created and these allowed Automated Taggers that could lookup information for songs and get meta data for those songs without needing the original CD if they just had some meta data.

Then with audio fingerprinting it was possible to lookup songs without any meta data at all as long as the song is already in the database.

Most taggers were cautious in making full use of this and provided options from online databases but user made the final decision about the best match but some such as Jaikoz made the choice for the user, although the user could adjust the criteria used to pick the best match.

But Jaikoz still provides manual tagging together with automated tagging, it provides the user with the tools to do what they want, but with so much choice it can be difficult to be consistent, and time consuming.

Now as the online databases have got larger and more accurate, users music collections have got larger, and users time has got ever more limited we see the emergence of the Fully Automated Tagger or Rules Based Tagger.

The idea is that rules define how you want your music collection to be organized, then the rules can be applied to your whole music collection without any manual editing required giving a totally consistent music collection. You can change the rule and then reapply to the whole collection to maintain a consistent music collection. This the premise of SongKong and in my next post I'll explain how SongKong attempts to reach that wholly grail of a totally consistent music collection we are not quite there yet, but getting closer.

Friday 22 November 2013

Using Jaikoz to modify the Release Time field on iTunes

iTunes has a Release Date field but you cannot actually edit the field in iTunes, at least not for music files,there is also a Year field and this is editable but sometimes it would be useful to use both.

In Jaikoz the Year field is clearly displayed in the default configuration but for mp3s the Release Date field is also available. By using View/Show ID3 and selecting the ID3 Edit tab you can see the Release Time (TDRL) field and if you enter a value in here and save changes the change is reflected in iTunes Release Date field.

Behind the scenes Release Time use the ID3v24 frame TDRL, whereas Year uses TDRC.

Wednesday 16 October 2013

New MusicBrainz Server release, time to update

Twice a year on a set date MusicBrainz do a server release that includes changes to their schema database. Changes to the database can be disruptive for MusicBrainz customers who keep their own copy of the database whicc is why these changes are limited to two releases a year.

MusicBrainz did such a release on October 14th, the major change is that the concept of places have been added so that venues and recording studios can be added to the database. For example once the data is added you could see what albums have recorded at a particular studio. Maybe some of this information will be used by taggers at some point, but until a music player exists that can use this information I don't see much point.

If you are using the MusicBrainz VM with Jaikoz or SongKong I would advise a little patience, within the week there should be a new VM updated to the latest database and search, this is easier than trying to update the server yourself.

The new MusicBrainz server temporarily broke tagging with SongKong and Jaikoz, it exposed a bug in both applications and I quickly released new versions of SongKong (1.11.0) and Jaikoz (5.7.0) to resolve this issue. The change has temporarily been reverted to allow the earlier versions of SongKong and Jaikoz to function but will be added back in 1 months time so please get on and update your versions to the latest version.


Wednesday 9 October 2013

New Song Changes Report in Songkong 1.9

With SongKong 1.9 we completely overhauled the song changes report, here is an example of such a report Song Changes Report

The main aims were to increase its responsiveness for big reports, and avoiding information overload by breaking down the information into smaller segments. To achieve this pages are split down into smaller parts and Javascript is liberally sprinkled over.

But the report is still quite complex so this post we explain the different sections in a bit more detail.



This summarizes how many songs have been loaded and checked, how long it took and how many and what percentage have been matched to MusicBrainz, Discogs and if we could find artwork for them.

One thing to consider when matching is whether to rematch songs that have already been matched or whether to ignore songs that are already matched. By default SongKong rematches all your songs but if you disable Basic:Match all songs, even if already matched then all songs that already have a Musicbrainz Id are ignored and not considered in the following sections.

MusicBrainz Summary


MusicBrainz is the primary data source used by SongKong.

This section shows what MusicBrainz releases your songs have been matched to. In the left handside we group the matches by the first letter of the album artist, if the first letter is not a letter they are put into the * grouping. Expanding on one of the letter groupings, lists the artists starting with that letter in alphabetical order. Selecting an artist from the list shows how your songs have been matched to their releases on the right hand side of the report.

By default only details of the first matching releases are shown, you can open close details by clicking on the small arrow in the release header information. The header tells you the name of the release together with its MusicBrainz Id, Record Label and Catalog No if known. It all shows you how many of the total songs on the release have found corresponding matches in your collection.

The details provide a hyperlink to open the MusicBrainz page for the release. Below this we list all the songs that were matched together with the song artist, Disc No and Track No.

If you have multiple copies of a song then the same release may be listed more than once, we always match the most complete match first.

Note this section looks at the details of your songs and their mapping to MusicBrainz, if the were already matched to MusicBrainz but not matched during this run of Fix Songs they will still show in this section.

Discogs Summary

This works in the same way as MusicBrainz. Songs can be matched to Discogs either by a direct search to Discogs or by a relationship existing from a MusicBrainz Release to a Discogs release. But Discogs is a secondary data source and Discogs matching and searching can be disabled, if both options are disabled in the Match tab then this section will not be shown.

Song Changes


This section shows what changes have been made to your files and is a listed as a file hierarchy. Each leaf folder can be selected and then the changes for each file in the folder are shown on the right handside of the report.

It is important to realize there is not a tight correspondence between songs matched in MusicBrainz/Discogs and Song Changes for the following reasons.
  1. If the song was already matched to MusicBrainz and then rematched again to the same release they may not be any change required because the song already contains the fields matched.
  2. Most songs can have Acoustids created, these are stored in the files. So even if no match was made to MusicBrainz or Discogs the song may still require saving
  3. If the fiename mask has changed then the file will probably need to be renamed even if no metadata added to the files themselves.
  4. If Fix Songs is canceled before its has completed songs may have been matched to MusicBrainz but interrupted before the changes could actually be written to file.
The list of changes made to a file is split into
  1. Fields Added
  2. Fields Modified
  3. Fields Deleted

Songs Not Matched

Selecting this list all the songs that are not matched to either MusicBrainz or Discogs in the right hand side using a file hierarchy view.

Songs Not Matched to MuscBrainz

Selecting this list all the songs that are not matched to MusicBrainz in the right hand side using a file hierarchy view.

Songs Not Matched to Discogs

Selecting this list all the songs that are not matched to Discogs in the right hand side using a file hierarchy view.

Tuesday 20 August 2013

SongKong 1.8 with new performance status bar and improved Virtual Machine performance

Whilst SongKong works quicker when using a MusicBrainz virtual machine I confess it was not working quite as quick as I hoped, and I didn't know where the problem lay so I added some performance statistics to the new SongKong taskbar in SongKong 1.8.

MusicBrainz Delay

The MusicBrainz Delay records the additional delays added to SongKong to prevent more than one query per second being sent to MusicBrainz inline with its terms of service. When using a virtual machine the delay should have been zero, but this was not the case. This uncovered an issue that rate limiting was only disabled when doing MusicBrainz lookups, but not for searches, fixing this problem boosted performance

MusicBrainz / AcoustId / Discogs Queue

SongKong uses a number of online databases for matching songs, not just MusicBrainz. All these databases have terms and conditions that restrict usage to one query per second so if SongKong is ready to send queries more quickly than that we have to queue the tasks. This status bar shows the queue for MusicBrainz, AcoustID and Discogs databases and is updated every thirty seconds. The most important queue is the MusicBrainz queue and this can be eliminated completely by using the local MusicBrainz server.

Memory Usage

When SongKong is started the maximum memory it can ever use is specified, this is the second value displayed and SongKong can never use more memory than this regardless of how much memory your computer actually has. Whereas the first value is how much of that memory SongKong is actually using. Note that SongKong uses a garbage collector to release memory that is no longer required and this is called periodically, if SongKong is nowhere near max memory usage it tries to recover memory less often than it could, and so the current memory usage may be higher than SongKong is actually using.

On Windows you can modify the maximum memory allocated by editing SongKong.ini (32-bit) and SongKong64.ini (64-bit)

On OSX you can modify the maximum memory allocated by editing /Applications/SongKong.app/Info.plist

On Linux you can modify the maximum memory allocated by editing songkong.sh

Other Fixes in SongKong 1.8

If you had the Update Genres option enabled it could cause Fix Songs to cancel prematurely, this is noe resolved.

If you removed all countries from Preferred Countries so that it was an empty list this will prevent Fix Songs from running

Thursday 15 August 2013

Faster SongKong matching with the new Musicbrainz VM

To speed up matching it is possible to configure your own local MusicBrainz servers instead of using the official MusicBrainz servers and use this with SongKong. This avoids the requirement to only send one query per second to the MusicBrainz server so speeds up the matching that can be achieved by SongKong,

Additionally this resolves an issue when trying to use multiple copies of SongKong at the same time in the same home network. Usually with a home network external services such as MusicBrainz see all your computers via the same ipaddress, and therefore the rate limiter is applied to all computers as if they were one computer, this effectively prevents you using multiple copies of SongKong on a home network in parallel. But if the server being used does not impose rate limiting then there is no longer a problem.

But the problem has always been the difficulty of setting up a MusicBrainz server in the first place !

Now at long last MusicBrainz have now released a new Musicbrainz VM containing both Musicbrainz Server AND Search Server I've been trying it out and it works great !

The latest official MusicBrainz instructions are available from here. but in this blog we document the instructions so that they are more relevant to using the Virtual Machine with SongKong as follows. Warning some of the steps can take a few hours to run but the procedure is very simple.

  1. Ensure you have a BitTorrent client such as Vuze installed, this is required to download the Virtual Machine, and is a much more reliable way to download large files.
  2. Download the 9GB MuscbrainzVM via your BitTorrent client
  3. Windows/Linux user can download and install from VmPlayer this is free and more reliable then VirtualBox
  4. Mac users can use Vm Fusion, although unfortunately this is not free, or try the less reliable VirtualBox
  5. The remainder of these instructions assume you are using VMPlayer, but the steps for VMFusion and VirtualBox are much the same.
  6. Start VMplayer and choose Import Virtual Machine from the File menu. Select the downloaded file.
  7. Select Options and increase Virtual Memory to at least 2GB if your machine is powerful enough
  8. Select Play Virtual Machine
  9. Log in on the console using the username vm and password musicbrainz
  10. Update the database with the latest data added since the VM was created using bin/replicate now this may take a while depending on how old the VM is.
  11. Build search indexes, this will take a few hours bin/reindex
  12. Get the IP address of your virtual machine.using command:ifconfig | grep eth0 -A 1
  13. You can check it is working in browser by pointing to port 5000 of the ipaddress found previously e.g.
  14. Configure SongKong, set Server:MusicBrainzServer and Server:MusicBrainz Search Server to the same address e.g.
  15. Now SongKong will use the local MusicBrainz server rather than the offical MusicBrainz server. This should be faster and more reliable.

What is the point of the iTunes Copy files to iTunes Media folder when adding to library ?

SongKong 1.7 now has support for updating for iTunes on OSX, so it has feature parity with SongKong on Windows, and playing with this got me thinking about the point of certain iTunes options.

Copy files to iTunes Media folder when adding to library

This option is enabled by default and if this option is enabled whenever adding songs to the iTunes library it will make a copy of every file and add it to iTunes media folder. So you end up with two copies of every file, one in its original location and one stored in the iTunes media folder.

Why would you want two versions of each file ?


Managing multiple copies of files is an unnecessary headache,  maybe there is some concern that iTunes will modify the file in some negative way but it seems unlikely.

If you have this option enabled subsequent modifications to the original file within SongKong will have no effect on the file used by iTunes because iTunes will now be using the copied file in the media folder UNLESS you rename or move the file then iTunes will see it as a different file and add it again !

Keep iTunes Media folder organized

Also enabled by default, this renames files based on their metadata once they are added to iTunes if the copy files options is enabled.  But this only renames the copy of the file, it doesn't help you with the original file if it is misnamed. And more importantly you have no say on how your file is renamed, iTunes renaming mask is rather simple and probably not what you really want to use.
 If you are using SongKong flexible rename mechanism why would you use iTunes limited filename and you probably don't want to iTunes to rename them differently as they are copied to the iTunes media folder anyway.

And if you are using SongKong to modify files already within the iTunes media folder you certainly dont want iTunes moving and renaming files as they are getting matched ?

Although you can use both options with SongKong I would recommend disabling both.

Friday 9 August 2013

Better track matching when submitting new releases to Musicbrainz

For some time Jaikoz has allowed you to submit new releases to Musicbrainz, the selected songs in Jaikoz are used to open the MusicBrainz Release Editor with all the details filled in, so that you just need to check the details and then submit the form.

But in MusicBrainz recordings can be linked to multiple releases so Jaikoz tries to identify when a recording already exists instead of creating a new recording. Doing this makes Musicbrainz more useful so that in an ideal world every recording listed in MusicBrainz is actually a unique recording, and we can see all the releases that the recording is based on.

Jaikoz did this by comparing track titles and durations but sometimes recordings were incorrectly linked when in fact they were different versions of same song.

A more accurate solution

Now with Jaikoz 5.5.0 we have replaced this by matching using Acoustids, only Musicbrainz recordings with the same acoustId as your track are potential candidates, and only then do we do further checks on title and duration to ensure a good match.

Solving a bug in iTunes that prevents artwork being displayed

Occasionally I've seen artwork that displays okay in most applications failing to display in iTunes or the Finder within OSX, recently I had a nice example of this issue and looked into it further.

How do mp3s store text ?

Now mp3s store data in fields called frames, and many such frames allow the text encoding to be chosen. The default is ISO-8859-1 character set but this isn't very good for storing non-latin text so you can also store the text using UTF-16, however the downside of this is that two bytes are used instead of one for each character so it is usual to use this unless you need to. Mp3s use the APIC frame to store artwork, and this includes the text encoding field

Why do you need a text encoding field for storing artwork ?

The APIC frame has a description field allowing to describe the artwork, this is rarely used but you can use it. In Jaikoz if you click on the edit artwork dialog you can add a description or change the type of the artwork.

What has this got to do with iTunes ?

Even if the text encoding field is set to UTF-16 the artwork will not display unless the description text is actually encoded as ISO-8859-1, this is a bug in Tunes

How does this manifest itself in Jaikoz ?

If you change the default text encoding to UTF-16 then Jaikoz will use this for every frame in the file whether you need it or not causing a problem for your artwork

So what can I do?

In Jaikoz 5.5.0 we use text encoding of ISO-8859-1 for APIC frames regardless of the value set for the text encoding, no other frames are affected. The only downside to this is that if you want to add a description for your image, and you add one that cannot be encoded in ISO8859-1 the description will not be saved.

How do I fix existing files ?

Just open them in Jaikoz 5.5.0 and use the File/Force Save option, this rewrites all the fields in the file even if they haven't changed so they are rewritten with the current preferences.

Wednesday 7 August 2013

Updates iTunes from SongKong 1.6 for Windows

Despite its shortcomings iTunes is a massively popular music player, not least of all because its the official way to move music from your computer to your iPod. Windows users of SongKong can now get SongKong to update iTunes with any changes to your music library made by SongKong, this includes the following situations:

When the metadata of songs already in iTunes are modified by SongKong.
When songs already in iTunes are renamed or moved by SongKong.
When SongKong matches a file not in iTunes , the file is automatically added to iTunes.
When duplicates are deleted by SongKong, the deleted files are removed from iTunes.

Jaikoz has had this support for some time, but because of various bugs in iTunes it does not always work 100%. So for SongKong I rewrite it from scratch and have created a more robust solution, SongKong completely ignores the iTunes.xml file because this can get out of date or corrupt and instead talks exclusively to iTunes itself, this is much more reliable.

Why Windows only ?

ITunes integration is one of the few area of SongKong that we have to use different technologies for different platforms. For Windows we use COM, but for OSX we will use Applescript, it made sense to get it fully working in one technology first and then move to the other, support for OSX will come in SongKong 1.7.

Thursday 11 July 2013

New Save Artwork to Filesystem option in SongKong 1.5

Pleased to announce the release of SongKong 1.5, this includes the ability to the save artwork to the filesystem.
Fix Songs:Artwork Options:Save Artwork to Filesystem

Artwork is automatically always embedded in your music files, this is the most portable solution because you just need to copy your music files from your computer to another computer or iPod and your artwork will still be available. However it may be useful to save your artwork to the filesystem as separate image files as well for various reasons.

  1. On Windows it looks for a file called folder.jpg or folder.png in a folder and if found uses it as an image for the folder itself.
  2. Saving your images as separate files allows you to manipulate them in paint and photo editing applications.
  3. Some Music players require artwork to be stored separate to the music files themselves to work properly.

Now folder is the default name of the images created by SongKong for compatability with the Windows but you can change this by altering Fix Songs:Artwork Options:Saved Artwork filename to anything you want. What you cannot do is specify a file type such as jpg or png. Images are output as the same format as the embedded artwork, these are typically the well supported jpg or png formats.

Wednesday 26 June 2013

Better AcoustID matching in Jaikoz 5.4.0

How AcoustID works

When a song is analyzed and the fingerprint is submitted to AcoustID the AcoustID server returns an existing AcoustID if the fingerprint has been submitted before, or if the new fingerprint is so similar to an existing fingerprint - alternatively it allocates a new AcoustID for this fingerprint. When songs are matched to Musicbrainz by Metadata you can submit the fingerprint/MusicBrainz Id pairing to AcoustID and it will link the AcoustIDs to the MusicBrainz recording.

A new Discovery

But I discovered something new about AcoustID this month, a fingerprint can sometimes be associated with multiple AcoustIDs ! But only one AcoustID is a good match , the others are AcoustIDs that better match different but similar fingerprints. When a fingerprint/AcoustID pairing is submitted to AcoustID it is only assigned to the best primary AcoustID.

Fixes in Jaikoz 5.4.0

When Jaikoz was looking up the AcoustID for a fingerprint linked to multiple AcoustID it was actually keeping the worst matching AcoustID rather than the best one, this was usually one that was not linked to a MusicBrainz recording and hence not very useful. This has now been fixed in the new release of Jaikoz and will improve the AcoustID matching that Jaikoz does.

Fixing your AcoustIDs

This means that using earlier versions of Jaikoz you may have songs in your collection with the correct fingerprint but the incorrect AcoustID. Whilst this is not a major issue because the AcoustIDs are only a mechanism used to get matches yo may want to fix as follows:

  1. Ensure the AcoustID column is visible in Jaikoz
  2. Right click on the header and select Empty Column
  3. Run Retrieve AcoustIDs
  4. Save any files that have changed

Thursday 13 June 2013

Better artwork matching in Jaikoz 5.3.0

Artwork has been improving steadily in Jaikoz over the last year, especially since the Cover Art Archive was introduced but with hew version of Jaikoz things have got even better.

First some terminology, within MusicBrainz the concept of an Album is represented by a Release Group, then different versions of that release group are known as Releases. A release is the thing that we can actually buy and often varies slightly between countries. So a release group often contains different releases because it is released in different countries with slightly different tracks. Discogs also uses releases and has similar concept of release groups, known as Masters

Until this release Jaikoz checked the matching release for artwork on both the Cover Art Archive, Amazon and Discogs but just for the matching release. But now if we find no match we then check all the releases within the same release group and Discogs masters, artwork is usually the same for all releases within release group but often MusicBrainz does not contain artwork links for every single release in a release group so this change gives a big improvement.

I ran a test over 1000 songs , and matching artwork went up from 782 to 960 !

Full list of changes in this release can be found here

Jthink blog Jthink Facebook page google_plus Jthink YouTube channel Email Paul at Jthink Subscribe to Weekly Newsletter