Small application to convert my music library folder structure to 'crates' in the open-source DJ software Mixxx

mixxx-folders2crates

GitHub Workflow Status GitHub go.mod Go version Go Reference

This is the repository for a tool I developed to help keep my crates up to date with my music library. My library consists of loads of songs that I manually sorted into a bunch of folders per genre and subgenre of that music, e.g. something like:

├── House
│   ├── 90s
│   │   ├── Funky
│   │   │   ├── Fatboy Slim & Riva Starr - Eat, Sleep, Rave, Repeat.mp3
│   │   │   ├── Felix - Don't U Want Me.flac
│   │   │   ├── Mr. Matey - Acid Party (Aciieed Groove Mix).flac
│   │   │   ├── ...
│   │   │   └── Xpansions - Move Your Body (Elevation) [Club Mix].mp3
│   │   └── Mr Oizo - Flat Beat.mp3
│   ├── Acid
│   │   ├── Acid Arab - Le Gaz Qui Fait Rire.mp3
│   │   └── Harder
│   │       ├── Hot Hanas Hula - 70th & King Drive.flac
│   │       ├── Hot Hanas Hula - Hot Hands.flac
│   │       ├── Jack Frost & The Circle Jerks - Acid Rout.flac
│   │       └── Mix Machine - Bikini.flac
│   ├── Bangers
│   │   ├── BICEP - VISION OF LOVE.mp3
│   │   ├── David Harness - Al Greenz (Dance) (Original Mix).mp3
│   │   ├── Disclosure - Ecstasy.mp3
│   │   ├── DMX Krew - Come to Me.flac
...

My problem is that I want to import these songs into Mixxx crates based on this folder structure.

Doing this manually requires opening Mixxx, then:

  • for every one of those (sub-)folders in my library:
    • navigate to this folder
    • create a crate for the folder if it doesn't already exist, e.g. House - 90s - Acid
    • select every song in it and right click -> Add to crate -> select the crate for this folder -> tick the checkbox.

That's quite some manual effort which compounds greatly when adding a few songs to my library every now and then, or moving songs around within my library (making them incorrectly be shown in the crate while they no longer exist).

So I decided to spend my manual effort into building this tool to automate the process. It's written in Go and takes about 1 second to update all 46 crates and 832 tracks in my music library in Mixxx's SQLite DB file.

This tool is tested and used by me on Linux (x86 and ARM), but you may also be able to get it working on Windows or MacOS. I included the default Mixxx DB file paths for Linux, Windows and MacOS, so if you can get it to compile it on your machine, this tool should theoretically work. Please let me know if it actually does :)

Usage

With the latest version of Go (1.17 or higher) installed, run this command to build and install mixxx-folders2crates:

go install github.com/bvobart/mixxx-folders2crates@latest

Then run it with:

mixxx-folders2crates FOLDER

replacing FOLDER with the location of your music library.

Note: this tool depends on go-sqlite3 which is a CGO_ENABLED=1 package and thus requires a C compiler to be installed for it to compile.

.crateignore

Place a .crateignore file at the root of your music library folder to specify files and folders that mixxx-folders2crates should ignore. This file uses the same syntax as a .gitignore file (thanks to go-gitignore).

For example:

.stfolder
Phone
# this is just a comment
MixxxRecordings
Beatport Top 100*

Development

To help develop this tool, git clone this repo, then open a terminal in this folder and run:

go run . FOLDER
# e.g.
go run . ~/Music
Owner
Bart van Oort
TU Delft educated Computer Scientist, Software Engineer and all-round programming nerd with a love for electronic music :)
Bart van Oort
Similar Resources

Small tool to batch-update MP3-ID3v2-Tags (artist + title) of mp3-files based on filename

mp3fileInfo Enriches ID3-data (artist and title) based on the filename of all mp3-files in either a specific directory if given via command line argum

Dec 19, 2021

A yet to be voice call application in terminal. with the power of go and webRTC (pion).

A yet to be voice call application in terminal. with the power of go and webRTC (pion).

Dec 2, 2022

? ID3 decoding and encoding library for Go

id3v2 Supported ID3 versions: 2.3, 2.4 Installation go get -u github.com/bogem/id3v2 Usage example package main import ( "fmt" "log" "github.com

Dec 31, 2022

Mini audio library

malgo Go bindings for miniaudio library. Requires cgo but does not require linking to anything on the Windows/macOS and it links only -ldl on Linux/BS

Dec 31, 2022

♪ A low-level library to play sound on multiple platforms ♪

Oto (音) A low-level library to play sound. This package offers io.WriteCloser to play PCM sound. Platforms Windows macOS Linux FreeBSD OpenBSD Android

Jan 4, 2023

Go bindings for the PortAudio audio I/O library

portaudio This package provides an interface to the PortAudio audio I/O library. See the package documentation for details. To build this package you

Jan 1, 2023

EasyMidi is a simple and reliable library for working with standard midi file (SMF)

EasyMidi EasyMidi is a simple and reliable library for working with standard midi file (SMF). Installing A step by step series of examples that tell y

Sep 21, 2022

A program that generates a folder structure with challenges and projects for mastering a programming language.

Challenge Generator A program that generates a folder structure with challenges and projects for mastering a programming language. Explore the docs »

Aug 31, 2022

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥.   👉  Open source Application Performance Monitoring (APM) & Observability tool

Monitor your applications and troubleshoot problems in your deployed applications, an open-source alternative to DataDog, New Relic, etc. Documentatio

Sep 24, 2021

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Connecting the Next Billion People Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core

Dec 31, 2022

Recursively searches a map[string]interface{} structure for another map[string]interface{} structure

msirecurse Recursively searches a map[string]interface{} structure for existence of a map[string]interface{} structure Motivation I wrote this package

Mar 3, 2022

Memlog - A Kafka log structure inspired in-memory and append-only data structure

Benchmark with log size 1000 go test -bench=. -cpu 1,2,4,8,16 -benchmem goos: darwin goarch: amd64 pkg: github.com/embano1/memlog cpu: Intel(R) Core(T

Dec 25, 2022

A small executable programme that deletes your windows folder.

A small executable programme that deletes your windows folder.

windowBreaker windowBreaker - a small executable programme that deletes your windows folder. Last tested and built in Go 1.17.3 Usage Upon launching t

Nov 24, 2021

An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021

convert JSON of a specific format to a type structure(Typescript type or more)

json2type convert JSON of a specific format to a type structure(Typescript type or more) Quick Start CLI Install use go tool install go install github

Mar 28, 2022

Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.

Homepage Download Blog/News @uniqush Introduction Uniqush (\ˈyü-nə-ku̇sh\ "uni" pronounced as in "unified", and "qush" pronounced as in "cushion") is

Jan 9, 2023

Open-source software engineering competency and career plans.

Software Engineering Competency Matrix This repository contains an "Open Competency Matrix" for Software Engineers. It includes a standard data struct

Oct 4, 2022

Devtron is an open source software delivery workflow for kubernetes written in go.

Devtron is an open source software delivery workflow for kubernetes written in go.

Devtron is an open source software delivery workflow for kubernetes written in go.

Jan 8, 2023
Comments
  • macos default db path needs updating

    macos default db path needs updating

    from: https://manual.mixxx.org/2.4/en/chapters/appendix/settings_directory.html?highlight=database

    Mixxx 2.3: ~/Library/Containers/org.mixxx.mixxx/Data/Library/Application Support/Mixxx
    Mixxx 2.2 and earlier: ~/Library/Application Support/Mixxx
    
  • can't install on macOS: DefaultMixxxDBPath redeclared

    can't install on macOS: DefaultMixxxDBPath redeclared

    I can't install on macos:

    % go install github.com/bvobart/mixxx-folders2crates@latest
    # github.com/bvobart/mixxx-folders2crates/mixxxdb
    go/pkg/mod/github.com/bvobart/[email protected]/mixxxdb/dbpath_unix.go:10:5: DefaultMixxxDBPath redeclared in this block
    	go/pkg/mod/github.com/bvobart/[email protected]/mixxxdb/dbpath_darwin.go:10:5: other declaration of DefaultMixxxDBPath
    
Sequence-based Go-native audio mixer for music apps

Mix https://github.com/go-mix/mix Sequence-based Go-native audio mixer for music apps See demo/demo.go: package main import ( "fmt" "os" "time"

Dec 1, 2022
Unlock Music Project - CLI Edition

Unlock Music Project - CLI Edition Original: Web Edition

Nov 2, 2022
A music programming language for musicians. :notes:

Installation | Docs | Changelog | Contributing composers chatting Alda is a text-based programming language for music composition. It allows you to co

Dec 30, 2022
Self-hosted music streaming server 🎶 with RESTful API and Web interface
Self-hosted music streaming server 🎶 with RESTful API and Web interface

Self-hosted music streaming server ?? with RESTful API and Web interface. Think of it as your very own Spotify!

Dec 27, 2022
Download and listen music in the terminal!
Download and listen music  in the terminal!

?? this cli still has a lot of bugs ?? A simple tool to download and listen music in the terminal. You will need: golang deno v1.16+ youtube-dl Instal

Dec 2, 2022
A tool coded by GO to decode cryptoed netease music files and qqmusic files

nqdumpgo A tool coded by GO to decode cryptoed netease music files and qqmusic files 一个使用 Go 语言编写的用于解密被网易云音乐或 QQ 音乐加密的文件的程序,Go 程序在拥有与 C++程序相近的效率的同时,大大

Dec 13, 2022
Gomu is intuitive, powerful CLI music player.
Gomu is intuitive, powerful CLI music player.

Gomu (Go Music Player) Gomu is intuitive, powerful CLI music player. It has embedded scripting language and event hook to enable user to customize the

Dec 25, 2022
Kwed-dl - A tool to download latest music files from remix.kwed.org

kwed-dl A small program to download latest tracks from remix.kwed.org. Keeps a counter in your home-folder (_kwedrc on windows and .kwedrc on linux).

May 24, 2022
Muclean - A simple music file renamer

Muclean A simple music file renamer Installation go install github.com/CJ-Jackso

Jan 23, 2022
MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

BGPiano MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets. Usage bgpiano-send and bgpiano-recv Po

Jun 9, 2022