Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScarletWin

Sponsor Geoffrey Bennett first. This project is only possible because of his years of work reverse-engineering the Focusrite Control Protocol on Linux. Before you donate to ScarletWin, donate to him: https://liberapay.com/gdb/

ScarletWin is a free, open-source Windows user-mode service for Focusrite Scarlett 4th-generation USB audio interfaces. It is a port of the protocol knowledge in Geoffrey Bennett's linux-fcp kernel driver — without that prior work, this project would not exist.

Not affiliated with or endorsed by Focusrite Audio Engineering Ltd. "Focusrite" and "Scarlett" are trademarks of Focusrite Audio Engineering Ltd. and are used here only to identify the hardware ScarletWin works with.


The problem

Focusrite Scarlett 4th-gen interfaces can drop out on Windows — going silent or disappearing from the audio device list — after sleep/resume, under heavy USB/CPU load, or after repeated plug/unplug cycles. ScarletWin watches for that and can optionally recover from it automatically. See ARCHITECTURE.md for why this happens.

Try this first

Update Focusrite's own driver before installing anything here. On the author's Scarlett 2i2 4th Gen, installing Focusrite Audio Drivers 4.150.0.432 (August 2026) was followed by weeks with no dropouts at all, where there had been regular ones before. A driver update is free, supported, and simpler than running a third-party service. Only use ScarletWin if an updated driver doesn't fix it for you.

No warranty, no support

Provided AS-IS, with no warranty of any kind and no support. It has been tested only on one Focusrite Scarlett 2i2 4th Gen on Windows 11. Other Scarlett 4th-gen models and other Windows versions are untested — they may work, may not, or may behave differently.

What it installs and does

ScarletWin installs as a Windows service (ScarletWin) running as LocalSystem, starting automatically at boot.

  • By default it is notify-only. It watches for the Scarlett dropping off USB and around sleep/wake, and logs what it sees. It does not touch the device.
  • With AutoRecover set to true in appsettings.json, it will disable and re-enable the USB device (a PnP cycle) when it detects a dropout, and around system sleep/wake, in an attempt to bring the interface back without a reboot.

Blue-screen warning — read before enabling AutoRecover

Disabling/re-enabling the Scarlett's USB device while another application is still holding its audio stream open can blue-screen Windows (bug-check 0x19 BAD_POOL_HEADER in the Focusrite driver). Before a PnP cycle, ScarletWin tries to close known "stream holder" processes first — but out of the box it doesn't know about your applications. You must tell it.

In appsettings.json, fill in:

{
  "ScarletWin": {
    "AutoRecover": false,
    "StreamHolderProcesses": ["MyDawApp"],
    "StreamHolderCommandLineMatches": ["my_audio_script.py"]
  }
}
  • StreamHolderProcesses — a list of process-name prefixes to close before any PnP cycle (matched against the process name, case-insensitive).
  • StreamHolderCommandLineMatches — a list of text fragments; any python or python3 process whose command line contains one of them is closed too.

If both lists are left empty, ScarletWin logs a warning on every recovery attempt and proceeds anyway — a PnP cycle can still blue-screen your machine if an application has the Scarlett open. List every application on your machine that keeps an audio stream open to the Scarlett.

Building

Requires the .NET 8 SDK. From the src/ folder:

dotnet publish -c Release -r win-x64 --self-contained true -p:PublishAot=false -p:PublishSingleFile=true -o bin/publish

This produces src/bin/publish/ScarletWin.exe (a single self-contained file of about 70 MB that carries its own .NET runtime, so nothing else needs installing) plus appsettings.json next to it.

The project file has native AOT switched on, but do not publish that way: an AOT build needs the Visual Studio C++ build tools, and the Windows management calls behind StreamHolderCommandLineMatches do not work in an AOT build. Use the command above.

Installing / uninstalling

  1. Put ScarletWin.exe and appsettings.json in the same folder as Install-ScarletWin.bat.
  2. Right-click Install-ScarletWin.batRun as administrator.
  3. To remove it, right-click Uninstall-ScarletWin.batRun as administrator.

The installer will not overwrite an existing appsettings.json already in the install folder, so your settings survive a reinstall/upgrade.

Logs

Logs are written to %ProgramData%\ScarletWin\ (typically C:\ProgramData\ScarletWin\), plus entries in the Windows Event Log under the ScarletWin source.

What it isn't

  • Not a kernel driver.
  • Not a replacement for Microsoft's usbaudio2.sys — that handles the audio streaming, and it works correctly.
  • Not an ASIO driver — use FlexASIO for low-latency DAW use.
  • Not a firmware updater. (Use Bennett's scarlett2 for that.)

Architecture

See ARCHITECTURE.md.

License

GPLv2. See LICENSE.

Credit

  • Geoffrey Bennettlinux-fcp, scarlett2, alsa-scarlett-gui. Sponsor him: https://liberapay.com/gdb/
  • The Focusrite-Scarlett-on-Linux community — original reverse-engineering effort.
  • Etienne Dechamps — FlexASIO, the closest cultural sibling to this project.

About

Windows service that watches a Focusrite Scarlett 4th Gen USB audio interface for dropouts and can reset it. GPLv2, provided as-is.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages