Skip to content

A lightweight LAN jukebox server built on .NET for MIDI-capable self-playing pianos and external MIDI devices.

License

Notifications You must be signed in to change notification settings

yonimn2000/midi-jukebox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MidiJukebox

MidiJukebox is a lightweight LAN jukebox server built on .NET for MIDI-capable self-playing pianos and external MIDI devices. Simply connect a computer to a piano that accepts MIDI input, run the server, and users on the same local network can browse and play MIDI files on the piano. The app supports standard player controls, queuing, playlists, and flexible routing to external devices.

Screenshots

Home

Home

Playlists

Playlists

Key Features

  • Serve a folder of MIDI (.mid) files to clients on the LAN.
  • Standard player controls: play, pause, stop, skip, seek.
  • Search tools: filter tracks by name, duration, or piano percent -- which indicates how much of the track uses piano sounds.
  • Live queue and queue management.
  • Create, edit, and persist playlists in-app.
  • Optionally route server audio to external speakers for non-piano MIDI tracks.
  • Redirect specific MIDI channels to external MIDI devices with optional per-channel delay to keep audio synchronized.
  • Configure a fallback MIDI device for channels not redirected.

Configuration

Settings are read from appsettings.json. Relevant keys are under the MidiJukebox section. Example (trimmed):

{
  "MidiJukebox": {
    "TrackFolder": "C:\\Midi", // Full path to the folder containing MIDI files. Only files directly in this folder are served; subfolders are ignored.
    "MidiChannelRedirects": [ // Optional array to redirect a MIDI channel (1-16) to a named MIDI output device. Each entry:
      {
        "Channel": 1, // MIDI channel number (1-16).
        "Device": "USB2.0-MIDI", // Target MIDI output device name.
        "DelayMs": -300 // Integer milliseconds to shift events sent to that device. Use positive or negative values to delay/advance playback to help sync piano and external speakers.
      }
    ],
    "MidiFallbackDevice": "Microsoft GS Wavetable Synth" // Device used for any channels not matched by `MidiChannelRedirects`.
  },
}

Running

  1. Configure TrackFolder in appsettings.json to point to a folder with MIDI files.
  2. Configure any MidiChannelRedirects and a MidiFallbackDevice as needed.
  3. Run the app (for example: dotnet run or start from your IDE).
  4. From any device on the LAN, open a browser and navigate to the server URL (use the host machine's IP and configured port).

Compatibility

This project has been tested on Windows 7, Windows 10, and Windows 11. It targets .NET 8 and can theoretically be compiled for other platforms (for example Linux) and run on devices such as a Raspberry Pi, though platform-specific MIDI drivers and configuration may be required.

Usage notes

  • Add tracks to the queue and control playback from any connected client on the LAN.
  • Build playlists for recurring sets.
  • If you route audio to an external speaker, test and tune DelayMs values so piano audio and external speaker audio stay in sync.
  • Additional channel redirects let you optionally send particular instruments (MIDI channels) to other external sound devices.
  • There are plenty of free MIDI files available online to get started. Archives of thousands of files can be found with a web search.

Security

This project targets trusted local networks. If exposing beyond a trusted network, secure the server (HTTPS, authentication, firewall rules).

License

This project is distributed under the MIT License. See LICENSE.md.

About

A lightweight LAN jukebox server built on .NET for MIDI-capable self-playing pianos and external MIDI devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published