Spotify Playlist to Gig Performer converter
Do you sort out your setlist in Spotify? This script generates a skeleton Gig Performer Gig file from a Spotify playlist. It’s a timesaver if you’ve already built your rackspaces.
Licence: Creative Commons CC0 1.0 Universal
Author: Andrew Hunt (https://musios.app)
Status: Beta
Overview
Do you sort out your setlist in Spotify? This script generates a skeleton Gig Performer Gig file from a Spotify playlist. It’s a timesaver if you’ve already built your rackspaces. The Gig file is sparse but contains:
- Set list with each song from the Spotify playlist.
- Some metadata for the playlist in a comment in the Gig script
- Each song has the name and artist(s)
- GP defaults are used for tempo (120bpm), key (C major), time signature (4/4)
- Gig Performer 5 Gig file format
Known Limitations & Issues
- Spotify will only return data for playlist owned by Spotify user. Spotify-curated playlists cannot be retrieved (however you can copy them into a new playlist and fetch that.)
- The tool needs better notification if the Spotify API request fails
- Maximum of 100 tracks will be added to GP .gig file
- Some Spotify playlist IDs are not supported by the Spotify playlist API
- Unfortunately, in late 2024 Spotify withdrew it’s “Feature” API which provided very useful information such as key, time signature, tempo, style and more. They say they will launch something new and better - who knows what or when.
This code is provided as-is. The structure for GP’s Gig file, song file and other file formats are clear but not documented and they recommend not manipulating the XML files.
Implementation
Spotify Developer App
This script makes calls to the Spotify Web API to retrieve playlist and song information.
Follow the Getting started instructions to create an app. Record the client ID and security key securely.
GetPlaylist Spotify API Request
/assets/js/spotify-getplaylist.js
accepts a Spotify playlist ID (or a sharable URI).
It requests and returns the full details for that playlist using the Get Playlist method
of the Spotify Web API.
The playlist must be public.
This function can be run
- Locally with
nodejs
(best for dev & test) - As an AWS Lambda function
- In a browser (with limitations due to CORS).
Spotify API credentials must be set as environment variables. To get API credentials, follow the guide on Getting started with Spotify Web API.
1
2
export SPOTIFY_CLIENT_ID="1b2a3**********************"
export SPOTIFY_CLIENT_KEY="4c5d6e**********************"
AWS Deployment
Deploy to Lambda following [AWS instructions])(https://docs.aws.amazon.com/lambda/latest/dg/getting-started.html).
- AWS account required with an admin user account
- Create a Lambda function
- Upload
/assets/js/spotify-getplaylist.js
as the code - Add the Spotify credentials to the environment
- Configure the function for CORS (see image below)
- Test the function in the console
- Test externally with cURL:
1
2
3
4
**export LAMBDA_URL="https://hdu*************************hsdj.lambda-url.ap-southeast-2.on.aws"
curl --request POST "${LAMBDA_URL}" \
--header "Content-Type: application/json" \
--data '{ "playlistId": "4OnxXeH9iH0BD8Ri7qZy9y" }'
Generating an XML Gig File (skeleton)
/assets/js/spotify-playlist-to-gigfile.js
transforms the Spotify playlist data to an Gig Performer Gig file. The output Gig file:
- GP proprietary XML structure for the
.gig
file - The format is for GP 5.x (not tested with GP 4.x or earlier)
- Gig file settings include:
- Gig script has metadata from Spotify playlist
- Default time signature:
4/4
- Default tempo / BPM: 120
- Single setlist with all the songs from the playlist
- One song per track in the Spotify playlist
- Song name and artist copied from the playlist
- Default time signature:
4/4
- Default tempo / BPM: 120
- Default key: C Major
- Send PC disabled
- No chords file
- Single Song Part called “main”
- Song script contains other song metadata including
- Duration (seconds)
- Album name, release date, artists, ID and sharable URL
- Spotify data (track id and sharable URL)
Web Site
The tool is a static website built with React, Bootstrap, SCSS, vite.
The process is roughly:
- User pastes a Spotify playlist share URL
- Parse and verify we can find a playlist ID
- Request the playlist details from the AWS Lambda service
- Lambda forwards the requests to the Spotify API
- Upon valid playlist response,
- Display a summary
- Display a table with all the tracks
- Show a Gig Performer summary and download button
- When GP .gig button in clicked, generate the XML and download
1
2
3
4
5
# Run locally for development
npm run dev
# Build static version
npm run build
Environment
Developed and tested with:
- Gig Performer 5.0.28
- MacOS Sequoia 15.2
node/NVM
version v23.4.0- Browsers
- Chrome Version 133.0.6943.54 (Official Build) (arm64)
- Arc Version 1.81.0 (58533) on Chromium Engine Version 133.0.6943.54
Roadmap Ideas
- Support a wider range of Spotify content such as individual tracks and albums
- Allow the track list to be edited
- Reorder tracks
- Checkboxes to select inclusions
- Edit the BPM, time signature etc
- Is there a public database with song details such as BPM, key signature, time signature etc?