Prevent Novation Launchkey and Launchpad from resetting play position

Discuss Live-ready controllers other than Push.
Post Reply
Exie
Posts: 33
Joined: Tue Jan 02, 2007 2:58 am

Prevent Novation Launchkey and Launchpad from resetting play position

Post by Exie » Mon Apr 14, 2025 12:19 pm

Here's a way to disable the default behaviour of Novation LaunchPad/LaunchKey play button that doesn't respect a cursor and plays a song from the start, as this seems to be almost never desirable. Then Play and Shift+Play behave similarly to Space and Shift+Space. The fix is applied on the next Live run.

Auto Patch (Windows)

Create Live-Novation-patch.ps1 file with an editor (Notepad) with the following contents at the desktop:

Code: Select all

Read-Host -Prompt "Press any key to start"
$filePath = "C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\novation\transport.pyc"
$timestamp = Get-Date -Format "yyyyMMddHHmmss"
$backupFilePath = "$filePath`_backup$timestamp"
Copy-Item -Path $filePath -Destination $backupFilePath
Write-Output "Backed up $backupFilePath"
$fileContent = [System.IO.File]::ReadAllBytes($filePath)
$fileString = [System.Text.Encoding]::Default.GetString($fileContent)
$fileString = [regex]::Replace($fileString, "(?<=current_song_|start_)time", "tim1")
$fileContent = [System.Text.Encoding]::Default.GetBytes($fileString)
[System.IO.File]::WriteAllBytes($filePath, $fileContent)
Write-Output "Patched $filePath"
Read-Host -Prompt "Press any key to exit"
Adjust $filePath to your version if necessary. Right click and "Run with PowerShell". The script creates a backup and applies the fix.

Auto Patch (macOS)

Create Live-Novation-patch.sh text file with an editor (TextEdit with Format>Make Plain Text) with the following contents at the desktop:

Code: Select all

#!/bin/bash
read -n 1 -s -r -p "Press any key to start"
echo ""
file_path="/Applications/Ableton Live 12 Suite.app/Contents/App-Resources/MIDI Remote Scripts/novation/transport.pyc"
timestamp=$(date +"%Y%m%d%H%M%S")
backup_file_path="${file_path}_backup${timestamp}"
cp "$file_path" "$backup_file_path"
echo "Backed up $backup_file_path"
perl -p -i -e 's/(current_song_|start_)time/${1}tim1/g' "$file_path"
echo "Patched $file_path"
read -n 1 -s -r -p "Press any key to exit"
Adjust file_path to your version if necessary. Open Terminal app and run the script with the command:
chmod +x ~/Desktop/Live-Novation-patch.sh && ~/Desktop/Live-Novation-patch.sh
The script creates a backup and applies the fix. You might be able to run it with right click and "Open in Terminal" on the next runs.

Manual Patch

Backup the original transport.pyc file and restore it if things go wrong, not doing this will require to reinstall Live.

On Windows:
(Live 11) C:\ProgramData\Ableton\Live 11 Suite\Resources\MIDI Remote Scripts\novation\transport.pyc
(Live 12) C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\novation\transport.pyc

On Mac, use this link to locate app folder, should be something like Contents/App Resources/MIDI Remote Scripts/novation/transport.pyc.

Use any hex editor (Notepad++, etc) and NOT Notepad to patch transport.pyc:
  • Find and replace current_song_time text with something else of the same length, e.g. current_song_tim1
  • (Live 11.2.25+ and 12 only) Find and replace start_time text with something else of the same length, e.g. start_tim1
It's necessary to repeat the fix on each Live update. Previously modified file is likely to become incompatible with current Live version and fail to work. The patched transport.pyc file can be relatively safely reused only if the size and supposedly the content match between versions, but consider patching it again to avoid possible problems.

The edit above is the only fix that is needed. The script can be decompiled with a decompiler like pylingual.io, but this is necessary in this case only to understand what's going on. This is what it looks like:

Code: Select all

    def _on_play_button_toggled(self, is_toggled, _):
        if is_toggled:
            self.song.current_song_time = 0.0
            self.song.start_time = 0.0
        self.song.is_playing = is_toggled

Post Reply