npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pmtc

v0.10.0

Published

pMTC

Readme

pMTC

soo-doh em ti si

An easy to use reader for full frame (SysEx) Midi Timecode

Why Full frame only

  • It cuts down on network traffic
  • You get all the time information in one packet per frame
  • The Kissbox TC2TR supports it out of the box [with minor configuration], which was the original use case.

Change-log

  • 0.10.0

    • depencey updates
  • 0.9.0

    • First logged change
    • Converted to Typescript
    • Enums are now properly named. Old naming will be deprecated in 1.0.X
    • Converted to using Yarn
    • readme updates

Installation

yarn install pmtc

Usage

const { PMTC } = require('pmtc')

const configArgs = {
  // Listen for pMTC data on all interfaces on port 5005
  interfaceAddress: '',
  port: 5005,
  useFreewheel: true,
}

const server = new PMTC(configArgs)
server.run()
server.on('timecode', (data) => {
  console.log(data)
})

Want to test with a pMTC Generator? Find one on my Github

Data format

The timecode data is converted to an easy to use JSON packet with a few options.

{ "TRANSPORT": "STOPPED", "FRAMERATE": "fr24", "JSON": "{\"hours\":0,\"minutes\":0,\"seconds\":0,\"frames\":0}", "FRAME": 0, "MTC": [240, 127, 127, 1, 1, 0, 0, 0, 0, 247], "SEQUENCE": 1560910609673 }

Optionally, you can set the mtcOnly flag to receive the raw data packet (useful to multicast or broadcast)

const server = new PMTC('', 5005, true)
server.run()

// <Buffer f0 7f 7f 01 01 00 00 03 11 f7>

Config Options

interfaceAddress

Description: The IP address of the network interface you want to listen on. Default: Any

port

Description: The UDP port to listen on. Default: 5005

mtcOnly

Description: Timecode data is sent out exactly as it came in. This is useful for re-broadcasting or adding a freewheel or heartbeat option. Default: false

useHeartbeat

Description: Sends out the last known timestamp on an interval if timecode and freewheel aren't running. Default: false

useFreewheel

Description: Freewheels internally generated timecode message at the last know frame rate for a predetermined time. Default: false

useSequenceNumber

Description: Whether to include a sequence number in the packet. Note: Sequence numbers will not appear in mtc only packets Default: false

freewheelTolerance

Description: The number of milliseconds past a missed frame should the freewheel kick in. Default: 5

freewheelFrames

Description: The number of frames to freewheel before stopping the freewheel. Default: 30

heartBeatIntervalMillis

Description: The rate a heartbeat should tick in milliseconds. Default: 1000

Functions

PMTC.run()

Starts the server listening for pMTC data.

PMTC.stop()

stops the server.

A note on sequence numbers

But why? Isn't the point of timecode to be sequential?

Yes, however, as this system could potentially be used over UDP, packets do not have a guaranteed delivery or delivery order, this helps ensure that you are not processing old data.

TODOs

  • [ ] Add quarter frame support... maybe
  • [ ] Fix setters and getters
  • [ ] Add a timezone just for fun?