An open API service indexing awesome lists of open source software.

https://github.com/tim-smart/mtc

Transform stream that parses MTC messages and outputs SMPTE objects.
https://github.com/tim-smart/mtc

Last synced: about 1 year ago
JSON representation

Transform stream that parses MTC messages and outputs SMPTE objects.

Awesome Lists containing this project

README

          

# @tim-smart/mtc

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

## Usage

```typescript
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());
});
```