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

AppleScript to make BPM 100%??

Discussion in 'General DJ Forum' started by emkai, May 9, 2006.

Thread Status:
Not open for further replies.
  1. emkai

    emkai New Member

    Messages:
    10
    Is this possible?

    I'm trying to update my library with BPMs using Final Scratch version 2.0.3.041. I have over 2000 songs to update. I need the BPMs to be 100% verified, so i can also view these in iTunes to be able to create CD tracklists (i use CDs to DJ with too).

    I've read about "lock" buttons, etc which don't appear on the version i have.

    My question is does anyone know how to create an Applescript for the Mac so it will "verify" the BPM set by analysis?

    Currently, i'm clicking "edit" then cutting the bpm, typing any random number in, then writing the ID tag. Then paste back in and write the ID tag again. It's a pain in de @rse.

    There has to be an easy way to update and verify the BPMs......
     
  2. Voff

    Voff NI Product Owner

    Messages:
    44
    I feel your pain, but Traktor does not support Applescript.
     
  3. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    I'm not sure I understand. What differance does it make if the track's BPM is not set to 100% in Traktor?

    It only matters if you use the SYNC function in TraktorDJS or T3, and then you would beatgrid the tracks anyway which would set it to 100%.

    The percentage is only there as a guide. It's Traktors way of telling you it's not 100% sure it got the BPM correct while anaylising the track. By just accepting it as 100% you are just taking Traktors anaylis at face value and at times you will be way off (like with breaks style tracks).

    Does Traktor not write the BMP to the ID3 tag if it's not 100%?
     
  4. Voff

    Voff NI Product Owner

    Messages:
    44
    To get BPM values written to the ID3 tag, you HAVE to set the BPM in Traktor to 100%. *Then* write the tag.

    This is the only way to get the BPM-value to show up in iTunes.

    One could argue wether it would be useable to have Traktor scriptable (Applescript on OSX), and write a "macro" that would go in for each tune, set BMP value to 100%, write the tag end continue with the next tune.

    Another niceness that could benefit us as users could be a possibility to use iTunes as a browser, choose a tune and "send" it to deck A/B/C/D from within iTunes, and then make T3 the frontmost application.

    Or have T3 automatically import and analyze playlists at night when you are sleeping.

    Or script T3 to write your mixes to disk, import the .wav into iTunes for compression and upload the mix for podcasting

    Or... or... or...

    The possibilities are endless!
     
  5. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    OK, I had never tried to get the BPM values back to iTunes...

    All the ID3 info that Traktor has lives in the colletion.nml file, which is an XML file. So in theory you could easily write a script to "fix" the BPM percentage value in those files (no need for Traktor to even be open). I'm not at my studio so don't have access to Traktor or my collection files, but could look into it tonight.
     
  6. emkai

    emkai New Member

    Messages:
    10
    That would be great Adman_Tf!

    It's a real pain.

    It's very handy for me to have the BPM in iTunes.

    Any help would be greatly appreciated.......
     
  7. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    Have not had a look yet. I have not forgotten... Will have some time over the weekend.
     
  8. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    Sorry for the delayed reply on this.

    I chack out the files over the weekend. In the .NML file that stores your collection you'll find an attribute called "BPM_QUALITY"... THat is the one you need to fix.

    It'll have a value between 1 and 100.

    I have an AppleScript that will set them all to 100, it reliese on TextWrangler to perform the search and replace. I'll upload the script to me site later. In the meantime download TextWrangler from:
    http://www.bbedit.com/products/textwrangler/index.shtml


    If I get a chance I'll make a selfcontained script that does not rely on any other app, which would be great.

    I have not yet tested the "Write ID3 tags" after the fix...

    Next Script, copying the BPM data from the .NML file to the iTunes Library XML file. Great for track that can't store ID3 info like WAV and AIFF.... Watch this space...


    P.S. This script will only work on a Mac as it requires AppleScript.
     
  9. emkai

    emkai New Member

    Messages:
    10
    Have downloaded Textwrangler, i have a G4 Mac, so it should work fine.

    I think a selfcontained script would be great, but i'm happy to go with whatever for now. Anything is better than doing it manually.

    I'll await your link to the script..........

    Cheers for this......
     
  10. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    OK the first version of the script can be found here:

    http://www.jamjar.co.za/scripts/bpm_100.zip

    What you need to do is the following:

    1: Copy and back-up you collection.nml file.
    2: Open the copy of your .nml file in TextWrangler
    3: Run the script by double clicking on it

    What happens? All the "BPM_QUALITY" tags are set to 100. Now save the file and put it in the Traktor folder where you found it.

    Fire up Traktor and all BPM should be seen as having a quality of 100.

    If not, then somthing went wrong... Time to dig out that back-up.

    I can't stress this enough, BACK UP YOUR FILES BEFORE RUNNING THIS OR ANY OTHER SCRIPTS ON THEM!!!

    You have been warned. I take not responsability for any damage whatsoever.


    Let me know how it turns out. Will try get a selfcontained script sorted.
     
  11. blancodisco

    blancodisco NI Product Owner

    Messages:
    114
    I tried running this script tonite, and all i saw work was the text wrangler application window resize. None of the BPM_QUALITY parameters changed up.

    Wish I knew how to code some apple script to offer up some help.
     
  12. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    Can you send me your collection.nml file?

    I'm not running T3 at the moments and there might be differences in the file... I can look into why it's not working over the weekend.


    Adam
     
  13. blancodisco

    blancodisco NI Product Owner

    Messages:
    114
  14. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    Thanks Benny.

    I see where the problem is now. The "BPM_QUALITY" in TDJS2.6 is rounded off to a whole number. In T3 it has 6 decimal points.

    I'll look into a fix. Should not take long.

    Adam
     
  15. emkai

    emkai New Member

    Messages:
    10
    It works OK for me, presumably as i have Traktor FS2 bundled software with Final Scratch.

    But it did as stated. It set all the BPM_QUALITY parameters to 100%. Then i went into iTunes and selected Get Info, then did a "track & field" style series of mouse clicks then left it bringing in the BPMs from the newly written tags.

    Cheers for your help Adman!

    Your next challenge is that self contained script!
     
  16. Adman_Rob

    Adman_Rob NI Product Owner

    Messages:
    671
    Glad it worked emkai. FS2 uses the same engine and same .nml file as TDJS2.6. I'll be sorting thie our as a selfcontained script soon that will work for T3 also.

    Watch this space...

    :)
     
Thread Status:
Not open for further replies.