JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 41
  • Score
    100M100P100Q70596F
  • License MIT

JavaScript utility for click track events.

Package Exports

  • click-track

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (click-track) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Click Tracks for your JavaScript

WIP - Still in early development

Description

Create JavaScript event emitter in browser for a click track. Specify tempo and time signature. Get event for each beat or each bar. Use built-in timer or specify your own. Sync timer with HTML5 audio.

Install

npm i click-track

Features

  • Typings for Typescript
  • Sync with HTML Audio or Video element
  • Sync with YouTube player

Issues

  • Using offset option and scrubbing audio begins to offset the click track (Turned out to be the file was reporting incorrect audio position. Nothing to do with offset. Exported as .ogg and fixed. Maybe to do with .mp3)
  • requestAnimationFrame in event callback doesn't last long enough for classes to be attached to DOM element

TODO

  • Remove dependencies (rxjs)
  • Tests
  • Implement event triggers for beats and bars
  • Implement event triggers for start/stop/repeat click track
  • Parameter for track offset
  • Add built-in ticker
  • Add support for custom ticker
  • Option to sync with html5 audio or video
  • Option to sync with youtube iframe player
  • Publish code examples
  • Tempo maps for varying tempos
  • Include source maps in dist
  • Voice/instrument tracks
  • Include minified/targeted build