Skip to content

Repository files navigation

Songsterr Tab Exporter

A Chrome extension that exports Guitar Pro tablature from Songsterr to a printable PDF, with full notation and tab rendered via alphaTab.

Chrome MV3 License


Features

  • Exports any Songsterr song to a multi-page PDF
  • Renders both standard notation and guitar tablature (ScoreTab layout)
  • Selectable tracks — choose which instruments to include
  • Scale slider to adjust the size of the notation before printing
  • Automatically captures the Guitar Pro file when you click Songsterr's own Download button, or falls back to intercepting it silently
  • Supports .gp5 and .gpx (Guitar Pro 6+) formats
  • Clean PDF output: no bar number colors, no grey secondary voices, no empty metadata labels

Installation

Prerequisites

  • Google Chrome (or any Chromium-based browser such as Microsoft Edge)
  • curl available in your terminal (for the setup script)

Steps

  1. Clone the repository

    git clone https://github.com/plean/songsterr-tab-exporter.git
    cd songsterr-tab-exporter
  2. Download alphaTab and its fonts

    bash setup.sh

    This downloads lib/alphatab.min.js (~2 MB) and the Bravura music font from jsDelivr.

  3. Load the extension in Chrome

    • Open chrome://extensions
    • Enable Developer mode (toggle in the top-right corner)
    • Click Load unpacked and select the project folder

The extension icon will appear in your toolbar.


Usage

  1. Navigate to any song page on songsterr.com
  2. Click the Songsterr Tab Exporter icon in your toolbar
  3. Select the tracks you want to export
  4. Click Export to PDF
    • The extension will automatically click Songsterr's Download button to capture the Guitar Pro file
    • If that fails (e.g. you need to be logged in), click the Download button on the Songsterr page manually first, then try again
  5. A new tab opens with the rendered score
  6. Adjust the Size slider if needed
  7. Click Print / Save as PDF and choose Save as PDF in the print dialog

How it works

The extension has three components running in different contexts:

File Context Role
content-main.js Page (MAIN world) Intercepts fetch, XHR, and URL.createObjectURL to capture the GP file as Songsterr downloads it
content.js Extension (ISOLATED world) Reads the page state (song ID, track list, title), bridges messages between the page and the extension
background.js Service worker Orchestrates the capture flow, fetches the GP file if needed, stores it in chrome.storage.local
export.html / export.js Extension page Renders the full score using alphaTab in SVG mode and provides the print interface
popup.html / popup.js Extension popup Track selection UI and export trigger

GP file capture strategy

The background script tries three approaches in order:

  1. Blob intercept — the MAIN world script hooks URL.createObjectURL; when Songsterr's download button is clicked (automatically or by the user), the blob is captured before the browser saves it
  2. Fetch intercept — the MAIN world script also hooks window.fetch; for songs served directly from CloudFront, the response body is captured
  3. Direct URL fallback — the background script constructs candidate CloudFront URLs from the song/revision ID and fetches them directly

Project structure

songsterr-tab-exporter/
├── manifest.json          # Chrome MV3 manifest
├── setup.sh               # Downloads alphaTab and fonts
├── background.js          # Service worker
├── content-main.js        # Page-world interceptor
├── content.js             # Isolated-world bridge
├── popup.html             # Toolbar popup
├── popup.js
├── export.html            # Score rendering page
├── export.js
└── lib/                   # Created by setup.sh
    ├── alphatab.min.js
    └── font/
        ├── Bravura.woff
        ├── Bravura.woff2
        └── Bravura.otf

Browser compatibility

Browser Support
Chrome Full support
Edge Full support (Chromium-based, load from Chrome Web Store or unpacked)
Firefox Not supported — requires world: "MAIN" in content scripts, which Firefox does not implement
Safari Not supported

Dependencies

  • alphaTab v1.3.1 — music notation rendering (downloaded by setup.sh, not included in the repository)
  • Bravura — SMuFL music font (downloaded by setup.sh)

Neither dependency is bundled in this repository. Run setup.sh to fetch them.


Known limitations

  • Requires a Songsterr account with GP download access for some songs
  • The exported PDF width matches the A4/Letter paper format; very wide scores may have the rightmost notes slightly clipped depending on margin settings
  • Drum tracks are included but rendered in standard percussion notation

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages