1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

BPM/grid bug.

Discussion in 'Archive' started by kokernutz, Mar 28, 2020.

  1. kokernutz

    kokernutz Active Member

    Messages:
    446
    Another entry in my mysterious "always losing beat grids" problem. I've have this problem for 2 years or so and can't figure out why this is happening although I think it partially has to do with iTunes/Music integration and iTunes only storing the tempo as a whole number.

    Well I'm seeing something new now... a freshly re-gridded track has its BPM reverted to the wrong BPM before my very eyes, and I can easily reproduce.


    1. I'm loading "Drop Back", which Traktor thinks is 119 BPM. (It's 120.)
    2. The second cue point is the first kick. You can see the grid is off.
    3. I re-grid the track, and you can see that the BPM now says 120 and the grid looks good.
    4. I then load the next track, and you can see Drop Back has switched back to 119.
    5. I reload Drop Back and the BPM is set to 120.
    Not such a big deal, right? Well, sometimes the BPM stays at 119 and I have to regrid the track over and over again.

    I used to think this only happened with tracks that had a BPM that was not a whole number (e.g., ending in .5 or .999) and I thought the fractional portion would get chopped off. However, now it happens with BPMs that have no fractions, and the BPM always go down by 1.

    Possibly related: I use Mixed In Key to set the key of the track after purchase, but I used to also set the initial tempo. Somehow I figured out that setting the tempo with MIK was causing Traktor to frequently say "ID3 tags could not be read" over and over, ever after thinking I fixed the tags. Not sure how I figured that out, but after turning off that option in MIK, I no longer have ID3 errors pop up in Traktor.
     
  2. kokernutz

    kokernutz Active Member

    Messages:
    446
    And after I quit Traktor and checked iTunes/Music, the tags show 119. So I think that something is not getting sync-ed correctly between the two apps.

    upload_2020-3-28_10-16-22.png
     
  3. kokernutz

    kokernutz Active Member

    Messages:
    446
    Another part of my workflow is to "Sync Song Info" from iTunes/Music to pull in any tag changes. So that might be resetting the Traktor BPM to whatever is in iTunes/Music. But that doesn't explain when the BPM is a whole number and correct. Sometimes it drops down a full point.

    I'm thinking at this point I might trying blanking out all the BPMs in iTunes/Music and changing my tag writing mode to "do not write any tags to files".

    However, then I lose seeing the BPM in iTunes/Music, and that's where I do a lot of my playlist prep using smart playlists or when accessing my library remotely when I am at my day job.
     
  4. kokernutz

    kokernutz Active Member

    Messages:
    446
    OK this new thing is probably because I am fixing beat grids via a smart playlist under the Music node, because the "switcheroo" is not happening when I regrid the tracks via my collection.

    However, the underlying issue where the BPMs change is driving me crazy. Maybe it's related to how I am usually browsing via tracks the Music node?
     
  5. kokernutz

    kokernutz Active Member

    Messages:
    446
    Just now:
    1. Re-gridding a track that Traktor said was 118.001 BPM.
    2. After re-grid, Traktor says 118.000. (Correct.)
    3. Load next track.
    4. Track from step 1 now says 117 BPM.
    #killme
     
    Last edited: Mar 29, 2020
  6. kokernutz

    kokernutz Active Member

    Messages:
    446
  7. Enzo @ NI

    Enzo @ NI Member

    Messages:
    86
    Hi kokernutz,
    as Sander anticipated I had a deeper look at the issue (or well... issues :( ). To some extent this is unfortunately the expected behaviour, which I will try to explain.

    When some information about a track changes in Traktor, the software stores the new info in the Traktor database and - depending on the Tag Writing setting in the File Management tab of Preferences - in standard ID3 (or XIPH) tags and the custom binary tag (called TRAKTOR4) in the file. When writing to file tags is enabled, all the metadata in Traktor are "downloaded" to the file even if you changed only the Rating or, let's say, the Genre.

    When it comes to BPM, ID3 standard only support round numbers (not iTunes/Music fault, at least this time!). If you import a track from iTunes with a BPM value of 121 and, after proper beatgridding, the track BPM is set to 122.231, Traktor will store the new precise value in its database and, eventually in the custom binary tag, while only a rounded 122 will be written in the standard ID3/XIPH file tags. That is why when re-opening the Track in iTunes/Music you will see this "wrong" value.

    Now comes the tricky part... both Traktor and iTunes/Music do read and write to file's tags in a "transparent" way meaning it happens without the user imperatively triggering a "Write info to file tags" menu or button. For example Traktor writes tags to files (in case something changed) when unloading a track from a deck or, in some cases, when shutting down the application. When it comes to reading tags from files, Traktor checks for the "last modified date" of the physical file and eventually reloads the metadata of a track when starting an editing (both inline within the Browser or by opening the Edit dialog), this also happens when loading a track into a deck. The idea behind this is that, in case you are editing the metadata of a track, you want to start from the current/most-fresh state (whichever is newer, Traktor database or file tags).

    iTunes/Music, depending on the version and macOS version, also reads/writes file tags trying to keep them in sync with the iTunes/Music database (aka library). Going back to your issue... you imported a track from iTunes and corrected the BPM in Traktor, now both Traktor database and the file tags have the most recent/correct value (apart from the rounded-up ID3 BPM). If you go back to iTunes and edit the track there (let's say changing the Genre or Comment), the software will probably load the newest state of the tags when opening the "Get Info" dialog (this is where you see the rounded up BPM loaded from ID3 tags written by Traktor) and save the new state after the editing of Genre/Comment has been completed. This will update the file last modified date so the next time you "use" the track in Traktor, it will notice that the information stored in the database (including the precise/correct BPM) might be obsolete and it will re-load the metadata from the file tags... overwriting the 122.231 with a solid 122 :(

    My example ends here, I hope I was able to explain clearly enough. Now some consideration about what I touched on above:

    - iTunes/Music integration has always been meant as "read only", Apple made it very clear with the introduction of the iTunesLibrary API (or, in Apple's nomenclature, framework) which provides an official but read-only access to one's iTunes/Music library. The few lucky moments in the love/hate history between iTunes and Traktor where a read/write integration seemed to work was because both softwares were using (without even knowing or intentionally supporting this as a feature) file tags as the interchange format/storage, with the limitations of the ID3 standards like the rounded numbers for BPM. After the official API has been introduced, the synchronisation performed by Apple's software between the library and the file tags has been changing a lot, most of the times in the direction of less synchronisation happening (in a way iTunes feels like owning the files and just letting other apps, usually media players or things like instagram, to temporarily use the content of ITS OWN library).

    - it is really hard for Traktor to introduce exceptions to the behavior/logic described above since, when the software notices a newer file, it is hard to tell if the new info (in this case, BPM) is right or wrong, an intentional change done by the user (using an external editor - Kid3, MusicBee, etc - or more specialised DJ softwares) or just an "accident" (like this case with iTunes).

    Nevertheless it seems like you have a good collection of corner cases of the interoperability described above which we could look into.
    I will get in touch in a private conversation to discuss them in further details.

    Thanks for reading all of this!
    Best, Enzo
     
    • Like Like x 2
  8. kokernutz

    kokernutz Active Member

    Messages:
    446
    Thanks for this detailed response - it is much appreciated.

    To your point about Traktor checking the last modified date of these files and reloading the meta data, I saw that as well. I created a smart playlist in iTunes which only includes files modified within the last day. I then know that the tracks in the playlist will probably will need to be re-gridded.

    upload_2020-4-29_10-17-46.png
     
  9. Enzo @ NI

    Enzo @ NI Member

    Messages:
    86
    Hey again kokernutz,
    just to add a detail I missed from the long post above: at the moment "Sync Song Info" only reloads Title, Artist, Album/Release and Rating from iTunes/Music API/XML. Nevertheless it could be Traktor also re-loads other information from the file itself if newer modifications occurred.

    Talk soon,
    Enzo
     
    • Informative Informative x 1
  10. kokernutz

    kokernutz Active Member

    Messages:
    446
    I would love an option: Ignore iTunes BPM.

    Traktor could set the integer BPM ID3 tag when gridding the track, but if the Traktor metadata ever needed to be refreshed from the file's tags or iTunes API, it would not include BPM among the tags that were being updated.
     
    Last edited: Apr 29, 2020
    • Like Like x 1
  11. kokernutz

    kokernutz Active Member

    Messages:
    446
    Enzo @ NI
    I'm fixing some grids again and I'm thinking about this again, as I do every time this happens and I think there is a still a related problem.

    If I fix the BPM in Traktor, and the BPM is an integer (e.g., 126.000) Traktor does not appear to be writing that to the ID3 tag of the file. If I look in iTunes, it is still 125.

    So, as part of my workflow, I'm going to manually change it in iTunes to 126.