Skip to content

Instantly share code, notes, and snippets.

@headstash
Last active February 17, 2020 22:57
Show Gist options
  • Save headstash/242a61afeefc5c477c70cf4a31f41e27 to your computer and use it in GitHub Desktop.
Save headstash/242a61afeefc5c477c70cf4a31f41e27 to your computer and use it in GitHub Desktop.
Batch script to launch two instances of Synesthesia with two sets of MIDI bindings
@ECHO off
echo This script requires that you create a midi_mappings_1.json and midi_mappings_2.json file for each instance of Synesthesia. These files should be placed in %LOCALAPPDATA%\Synesthesia\Data\
tasklist /FI "IMAGENAME eq Synesthesia.exe" 2>NUL | find /I /N "Synesthesia.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo Synesthesia is running.
PAUSE
) else (
type %LOCALAPPDATA%\Synesthesia\Data\midi_mappings_1.json > %LOCALAPPDATA%\Synesthesia\Data\midi_mappings.json
start /d "C:\Program Files (x86)\Synesthesia" Synesthesia.exe
timeout /t 10
type %LOCALAPPDATA%\Synesthesia\Data\midi_mappings_2.json > %LOCALAPPDATA%\Synesthesia\Data\midi_mappings.json
start /d "C:\Program Files (x86)\Synesthesia" Synesthesia.exe
)
@headstash
Copy link
Author

headstash commented Feb 17, 2020

synesthesia_1.bat

@ECHO off
type %LOCALAPPDATA%\Synesthesia\Data\midi_mappings_1.json > %LOCALAPPDATA%\Synesthesia\Data\midi_mappings.json
start /d "C:\Program Files (x86)\Synesthesia" Synesthesia.exe

synesthesia_2.bat

@ECHO off
type %LOCALAPPDATA%\Synesthesia\Data\midi_mappings_2.json > %LOCALAPPDATA%\Synesthesia\Data\midi_mappings.json
start /d "C:\Program Files (x86)\Synesthesia" Synesthesia.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment