Skip to main content

A helping hand for managing Traktor collections.

Project description

Traktor Buddy

GPL-v3.0 PyPI - Python Version PyPI - Version

A helping hand for managing Traktor collections.

Installation

Traktor Buddy is a pure Python project. It requires at least Python 3.8.

You can install Traktor Buddy by typing the following in a terminal window:

pip install TraktorBuddy

Usage from the command line

Traktor Buddy supports various commands, sometimes with one or more extra arguments:

tktbud <options> command <arguments> <path>

The following commands are supported:

help <topic>       - Show a help message. topic is optional (use 'help topics' for a list).
version            - Print the current version.
tag <arguments>    - Add or remove tags (use 'help tag' for a list of arguments).
fix <arguments>    - Fix various things (use 'help fix' for a list of arguments).
purge              - Purge all collection backups apart from the most recent one.
listen             - Listen to tracks playing on Traktor and print info about them.

The following options are supported:

--test/-t          - Run in test mode. Affected tracks are printed out. No changes are saved.
--debug/-d         - Enable extra debugging information.
--verbose/-c       - Enable verbose mode.
--only=filter      - Only apply commands to some type of tracks.

If path is provided then the action is only applied to the track contained in the Playlist/Folder at that path. Paths are / separated, i.e. '/Folder1/Folder2/Playlist'. Use '\ ' for spaces. If no path is provided then then action is applied to ALL tracks in the collection.

Always keep backups

Traktor Buddy creates a backup of your collection in the Backup folder of Traktor before modifying anything but it's best to have your own too just in case. Make sure to backup the entire Traktor folder, i.e. ~/Documents/Native Instruments/Traktor 3.11.1 on macOS for example.

Also, it's a good idea to run commands with the -t option first (which means test mode) to make sure you understand how many tracks are affected/modified (you can use verbose mode to print track information). Finally, it's also a good idea to test your command on a small playlist of tracks first before applying it to your entire collection.

Tagging

Tags are words used to add custom properties or information to tracks. They can then be used to sort tracks more efficiently in smart playlists.

Tags are either single word, which describe a on/off type of value, or can use a name:value format which allows for sorting tracks based on a given value.

Most people will use playlists for sorting tracks in their collections but doing this requires manual upkeep. If you wanted to automatically sort your tracks based on, for example, the spot at which those tracks work in your set, you could add tags like settime:early, settime:late, etc.. and create smart playlists in Traktor that automatically filter for Comments2 contains settime:early.

Another example is, since Traktor doesn't let you create smart playlists based on Playlist membership, you can tag all the tracks in a playlist and then create smart playlists to filter tracks that are in a given playlist and other criterias.

The possibilities are endless.

Tags are added to the comments2 field in Traktor's database. If you already have information in these fields it will not be deleted but the tag will be appended to it. If you delete a tag, it may also delete information that happens to use the same word. Be careful.

Most tagging commands are self-explanatory, allowing you to add, delete or rename a tag.

One slightly more obscure command is tag years which will automatically create a Year tag for all tracks that have a release date available. For example if a track was released on 3/5/2015 then the tag Year:2015 will be added to the track if it's not already present.

This allows you to then easily sort tracks by year in smart playlists.

You can add the --only option to target only a certain type of tracks. --only=tracks will apply the tag only to regular tracks and not stem files while --only=stems` will apply the tag only to stem files.

Fix commands

These commands can be used to fix things in your Traktor collection. Each command is very specific to one issue and only performs that one function.

fix labels

Some DJ software store record label information in the grouping field of the music file. If a track is missing its record label, this will look for it in the grouping field of the music file and if found will update the record label for that track.

fix itunes

This removes any ITUNES elements in the track's information. This element was used by Traktor to sync your tracks with your local iTunes collection.

fix coverart

If a track has a covert art cache entry in its information which does not exists anymore in Traktor's cover art cache, this removes the cache entry information and touches (i.e. updates the modification date) the track's music file to force Traktor to reload the coverart from the file.

You can then simply load the track on a deck or check your database consistency and cover art will be read again and updated from the music file.

fix covercache

Goes thru Traktor's cover art cache and deletes any file that is no longer being used by your track collection.

Usage as a module

You can use Traktor Buddy in your own Python scripts to read and modify Traktor collections.

import TraktorBuddy

collection = TraktorBuddy.Collection()

for track in collection.tracks():
    print(track.title())

The module exposes classes for Collection, Folder, Playlist, Track or Listener for example. Full documentation will come later but the source code for those classes should make their interface fairly obvious.

Listening to Traktor

You can use the listen command or the Listener class in the module to get updates on each Track that Traktor is playing.

For this to work on Traktor's end you need to configure the broadcasting panel in settings:

  • Set proxy server to none.
  • Set server path to localhost.
  • Set the port to 8000.
  • Set the mount path to /.
  • Leave the password empty.
  • Select the lowest frequency and bitrate for format since we won't be using the audio.

Now start tktbud or your own app in listening mode and then turn Traktor's broadcasting on in the audio recorder panel (the little antenna). If everything works correctly the blue broadcasting light should stay on and you are ready to receive updates.

Traktor sends a new track update when a track is marked as played. This length of time before this happen can be set via the Play Count setting in the transport section of the settings,

License

Traktor Buddy is distributed under the terms of the GPLv3.0 or later license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traktorbuddy-2.0.0.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traktorbuddy-2.0.0-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file traktorbuddy-2.0.0.tar.gz.

File metadata

  • Download URL: traktorbuddy-2.0.0.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for traktorbuddy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8a213d0d036b53bc5967b79a80318d50d972b0dce82a9cfe590bf0125221e457
MD5 3947d527c7f4b3cf056a401224ade501
BLAKE2b-256 b4f447890ce184eec5ae60a122992adf0d231a45602075e1c92724ae28a19794

See more details on using hashes here.

File details

Details for the file traktorbuddy-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: traktorbuddy-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for traktorbuddy-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e67aead669a2a0e16d62d29987cdfdad21ca5d043d30d7b2c742a4fcff4960f
MD5 202c8382821661ae774f2d9393fab851
BLAKE2b-256 c28aa320cc08454715c7ee4987dc9863f7d8d0ed652a3d9d9b3d3da0a04483a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page