Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maschine.Api

NuGet License: MIT Codacy Badge

A .NET library for interacting with Native Instruments Maschine controllers over USB HID. Currently targets the Maschine Mikro MK3 (VID 0x17CC / PID 0x1700).

Features

  • Full HID communication via HidSharp
  • RGB pad lighting control (single pad or all pads)
  • Pad pressure events (12-bit resolution per pad)
  • Button state change events (45 buttons, bit-packed)
  • Encoder delta events (9 encoders, signed relative rotation)
  • Full testability via injected IHidDeviceFactory abstraction
  • 100% unit test coverage with no hardware required

Installation

dotnet add package Maschine.Api

Quick Start

using Maschine.Api;
using Maschine.Api.Models;

await using var client = new MaschineClient();
await client.ConnectAsync();

// Light all pads red
await client.Pads.SetAllColorsAsync(PadColor.Red);

// React to pad presses
client.Pads.PadChanged += (_, pad) =>
{
    if (pad.IsPressed)
        Console.WriteLine($"Pad {pad.Index} pressed with pressure {pad.Pressure}");
};

// React to button presses
client.Buttons.ButtonChanged += (_, button) =>
    Console.WriteLine($"Button {button.Index} {(button.IsPressed ? "down" : "up")}");

// React to encoder rotation
client.Encoders.EncoderChanged += (_, encoder) =>
    Console.WriteLine($"Encoder {encoder.Index} moved by {encoder.Delta}");

Console.ReadLine();
await client.DisconnectAsync();

Device Support

Device VID PID Status
Maschine Mikro MK3 0x17CC 0x1700

Requirements

  • .NET 10.0 or later
  • Windows, macOS, or Linux (HidSharp cross-platform)
  • Native Instruments USB driver (Windows) or libusb/hidraw (Linux)

License

MIT — see LICENSE for details.

About

A .NET library for controlling Native Instruments Maschine controllers via USB HID

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages