Skip to content

Code and other resources for managing my swing music library.

Notifications You must be signed in to change notification settings

samsucik/swing-music

Repository files navigation

Downloading from online-jazz-archive

  1. Go to jazz-on-line.com/artists, choose an artist and copy artist's name from the URL
  2. Paste the name into jazz-on-line-scraper/index.js
  3. Run node jazz-on-line-scraper/index.js (creates list of URLs with the artist's songs)
  4. Run ./downloader.sh jazz-on-line-scraper/list-name (replace list-name with actual list). This downloads the mp3 files where found
  5. Create master directory for all songs of the artist
  6. Run ./sorter.sh masterdir and all downloaded mp3 files will be organised in subdirectories of masterdir

Organising with Google Music

  1. Like songs that you're interested in
  2. Go the the 'Thumbs-up' playlist and use export_google_music.js (kudos to Jeremie Miserez) in developer console to get a list of the songs
  3. Save the list of songs and regexp away everything except the songs' names (careful with Roy Eldridge's songs from archive.org!)
  4. Run tagger.sh to tag all the songs from the list as, let's say, Lindy songs
  5. Open Mixxx and the tag should appear! If not, select songs and click right > Metadata > Import from file tags

BPM

  1. Although Mixxx can calculate BPM, it very often fails on swing music. Use Adam Harries's Ellington instead:
# Crawl the music library (or a part of it)
ellington init library.json -d ~/Directory-to-scan/

# Calculate BPM
ellington bpm library.json 

# Write BPM as TBPM ID3v2 tag (instead of using Ellington like: ellington write library.json)
./bpm_writer.py library.json
  1. In Mixxx, the BPM info doesn't load nicely. Workaround: select the songs, right click > Clear > BPM and Beatgrid. Then right click > Metadata > Import From File Tags.

Using Mixxx

Organising music

Use the grouping tag (TIT1) to categorise music as Lindy, Blues, bad, etc. Also, BPM, bitrate, duration... :-)

BPM Analysis

Go to Analyze tab, select songs and start analysis (adds BPM info). Double-check because Mixxx generally does a poor job analysing BPM in swing music: Right click > Properties > BPM and check the BPM manually.

DJ-ing

  1. Start Mixxx
  2. Ensure HW is channelled properly (Options > Preferences). Generally, use laptop's jack for headphones and external sound card (usb) for speakers
  3. Ensure equaliser is set all the way to the left
  4. Ensure fading time is set to 0 seconds (or to a negative value)
  5. Check that Auto DJ contains enough songs (if not, can import entire playlist to Auto DJ)
  6. Hit Enable Auto DJ and watch the magic happen
  7. Preview songs in the Preview deck (enable if hidden), check the beginning, end, middle, duration, tempo, etc
  8. To add songs to Auto DJ, right click and either Add to Auto DJ Queue, or Load to Deck (to play it as the next song)

Exporting ratings from Mixxx (and writing as metadata)

Export ratings along with song title and artist (list A):

sqlite3
.open mixxxdb.sqlite
.header on
.mode csv
.once mixxx-library.csv
select artist,title,rating from library order by artist;

Create a playlist containing all songs (ideally sorted by artist for better alignment with list A) and export it as CSV (list B).

Generate map from file location to rating:

import pandas as pd
B = pd.read_csv("everything.csv", usecols=["Artist","Title","Location"])
A = pd.read_csv("mixxx-library.csv")
rating_map = {"0": 0, "1": 1, "2": 64, "3": 128, "4": 196, "5": 255}
with open("ratings.csv", "w") as f:
	for _, s in B.iterrows():
		idx, idx_real = 1, False
		for col in ["Artist", "Title"]: 
			if not pd.isnull(s[col]): 
				idx = idx & (A[col.lower()] == s[col])
				idx_real = True
		if not idx_real: 
			print("{} cannot be matched with its rating because it has no title or artist set".format(s["Location"]))
			continue
		s1 = A.loc[idx]
		if len(s1) < 1: print("Rating not found for: {} ({})".format(s["Title"], pd.isnull(s["Artist"])))
		else: f.write("{}#{}\n".format(s["Location"], rating_map.get(str(s1.iloc[0]["rating"]), "0")))

Lessons learnt as a DJ

  • Mix old and new tracks, beware of playing only historical (low-quality) tracks!
  • Know which songs are the floor-fillers in the particular community.
  • Play it safe (at least from the beginning), don't go for fast songs first.
  • Don't play fasts songs (or songs otherwise discouraging) if people don't know them, or risk having an empty dancefloor (there must be something positive about the song that will keep people dancing even at crazier tempos).
  • Use the equaliser, in particular to make the rhythm section more audible in older recordings, or to eliminate to unpleasant, low-quality high-pitched tones.

Useful resources

About

Code and other resources for managing my swing music library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published