Skip to main content

Crate nord_usb

Crate nord_usb 

Source
Expand description

Clavia / Nord device transport and vendor protocol over USB.

This is an unofficial, community project: not affiliated with, endorsed by, or supported by Clavia DMI AB. “Nord” and the instrument names are Clavia’s trademarks, used here only to identify which files this crate reads.

Layered so the protocol is testable without hardware:

  • wire — message framing and codec. Pure, fully decoded, no I/O.
  • transport — the byte pipe. The only part that touches a device.
  • session — the transaction wrapper every operation runs inside.
  • op — typed operations.
  • device — an instrument as a value: session brackets and its own geometry.

The wire format was reverse-engineered from a corpus of NSM captures and is verified against every message in it.

§Portability

Desktop (macOS/Linux/Windows) via nusb, browsers via WebUSB. WebUSB is the binding constraint on the API shape — see transport::Transport for why there are no Send bounds, and why enumeration is deliberately backend-specific rather than part of the portable core.

Re-exports§

pub use device::Device;
pub use device::Geometry;
pub use error::Error;
pub use error::Result;
pub use session::ReadOnly;
pub use session::ReadWrite;
pub use session::Session;
pub use transport::Transport;
pub use wire::Location;
pub use wire::Message;
pub use wire::ObjectClass;
pub use wire::Service;
pub use wire::Status;

Modules§

deadline
Process-wide timer support without an async runtime.
device
An instrument as a value: a transport and the session bracket every operation runs inside.
envelope
Converting between the wire’s entity body and an on-disk CBIN file.
error
op
Typed operations.
session
The transaction wrapper every operation runs inside.
sleep
Pause without a runtime, on whichever backend is built.
transport
The bottom of the stack: moving bytes to and from the device.
wire
The vendor wire protocol.