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.
- Host: GitHub
- URL: https://github.com/tim-smart/mtc
- Owner: tim-smart
- Created: 2018-12-13T03:52:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-13T03:53:22.000Z (over 7 years ago)
- Last Synced: 2025-02-14T09:23:55.044Z (over 1 year ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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());
});
```