overdub

tp-7-mtp

sparkyfen/tp-7-mtp · ★ 0

The Linux route to TP-7 files without Field Kit: SysEx MTP switch, tray app, APT repo, and reverse-engineering notes.

README from GitHub, MIT

TP-7 Linux File Transfer

Transfer recordings from a Teenage Engineering TP-7 tape recorder on Linux (and macOS) — without the official Field Kit app.

The TP-7 connects via USB as a MIDI/Audio device. To access files, it must be switched to MTP mode using a proprietary MIDI SysEx command. This tool handles the mode switch and file transfer.

Install (Debian/Ubuntu/Mint)

# Add the APT repository
curl -fsSL https://sparkyfen.github.io/tp-7-mtp/pubkey.asc | sudo tee /etc/apt/keyrings/tp7-mtp.asc > /dev/null

# Detect the Ubuntu codename (works on Mint too)
CODENAME=$(grep UBUNTU_CODENAME /etc/os-release 2>/dev/null | cut -d= -f2)
[ -z "$CODENAME" ] && CODENAME=$(lsb_release -cs)

echo "deb [signed-by=/etc/apt/keyrings/tp7-mtp.asc] https://sparkyfen.github.io/tp-7-mtp $CODENAME main" | sudo tee /etc/apt/sources.list.d/tp7-mtp.list
sudo apt update

# Install
sudo apt install tp7-mtp

Then launch tp7-tray from your app menu, or use tp7-mtp on the command line.

Quick Start (from source)

Linux (Tray App)

# Install dependencies
sudo apt install python3-pip libusb-1.0-0-dev jmtpfs python3-gi \
    gir1.2-ayatanaappindicator3-0.1 python3-pyudev

# Set up venv with system packages (needed for GTK bindings)
python3 -m venv --system-site-packages .venv
.venv/bin/pip install pyusb

# Set up udev rules (one-time, for non-root USB access)
sudo cp 69-teenage-engineering.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

# Launch the system tray helper
.venv/bin/python3 tp7_tray.py &

The tray icon shows device status — click to connect (switch to MTP) or disconnect. On GNOME/MATE desktops, GVFS auto-mounts the TP-7 and the tray offers an "Open Files" option.

Linux (CLI)

# Switch to MTP and mount
sudo python3 tp7_linux.py --mount /mnt/tp7

# Copy recordings
cp /mnt/tp7/recordings/*.wav ~/Music/

# Unmount when done
fusermount -u /mnt/tp7

macOS

pip3 install pyusb

# Switch to MTP and list files
sudo python3 tp7_files.py

# Download all recordings
sudo python3 tp7_files.py --download ~/Desktop/tp7_recordings

Or use the native CoreMIDI tool (no dependencies):

# Build
clang -o tp7_switch_mtp tp7_switch_mtp.c -framework CoreMIDI -framework CoreFoundation

# Switch to MTP mode
./tp7_switch_mtp

How It Works

  1. Detect the TP-7 on USB (Vendor 0x2367, Product 0x0019)
  2. Send SysEx greet to the MIDI interface:
    F0 00 20 76 19 40 60 [id] 01 F7
    
  3. Send SysEx mode switch to enter MTP mode:
    F0 00 20 76 19 40 60 [id] 04 00 01 03 F7
    
  4. Wait for USB re-enumeration (~1-2 seconds)
  5. Access files via standard MTP protocol

Files

FileDescription
tp7_tray.pyLinux system tray connect/disconnect helper
tp7_linux.pyLinux CLI tool (switch + mount + copy)
tp7_files.pyCross-platform MTP file browser/downloader
tp7_switch_mtp.cmacOS native CoreMIDI mode switch
69-teenage-engineering.rulesLinux udev rules for USB permissions
REVERSE_ENGINEERING_NOTES.mdDetailed protocol documentation

SysEx Protocol

The TP-7 uses Teenage Engineering's proprietary MIDI SysEx protocol:

Request:  F0 00 20 76 19 40 60 [reqId] [cmd] [payload] F7
Response: F0 00 20 76 19 40 [b6] [reqId] [cmd] [status] [payload] F7

Commands: 0x01=greet, 0x02=echo, 0x03=dfu, 0x04=mode
Status:   0x00=ok, 0x01=error, 0x02=cmdNotFound, 0x03=badRequest
ByteMeaning
00 20 76TE MIDI manufacturer ID
19TP-7 product ID
40Device constant
60Request flag (responses use 20 + lower bits)
04Mode command
00 01 03MTP mode payload

USB Device Info

ModeProduct NameConfigsKey Interface
MIDI (default)TP-73Interface 3: MIDI (Bulk EP 0x02/0x81)
MTPTP-7 MTP Device1Interface 0: Vendor (Bulk EP 0x02/0x81)

Requirements

  • Python 3.6+
  • pyusb (pip3 install pyusb)
  • Linux: libusb-1.0, jmtpfs (for FUSE mount)
  • Linux (tray app): python3-gi, gir1.2-ayatanaappindicator3-0.1, python3-pyudev
  • macOS: Xcode Command Line Tools (for C tool)

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Teenage Engineering AB. "Teenage Engineering", "TP-7", and "Field Kit" are trademarks of Teenage Engineering AB. This is an independent reverse-engineering project for interoperability purposes under applicable law.

License

MIT License. See LICENSE for details.