@tim-smart/mtc
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@tim-smart/mtc

A transform stream that consumes MIDI messages and outputs timecode objects.

Usage

import { MTCStream } from "@tim-smart/mtc";
import { Input } from "easymidi";

const input = new Input("Network MIDI device");
const mtc = new MTCStream();

input._input.on("message", (delta: number, msg: number[]) => {
  const msgBuffer = Buffer.from(msg);
  mtc.write(msgBuffer);
});

mtc.on("data", timecode => {
  console.log(timecode.toString());
});

Readme

Keywords

Package Sidebar

Install

npm i @tim-smart/mtc

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

11.5 kB

Total Files

6

Last publish

Collaborators

  • tim-smart