Git Product home page Git Product logo

djcontroller.js's Introduction

djcontroller.js

Build

A library for interacting with MIDI DJ controllers in JavaScript.

Features

The library aims to be...

  • Compatible: By using Mixxx's mapping format, we can use existing mappings for a wide range of controllers.
  • Extensible: Adding custom DJ controllers is easy.
  • Lightweight: By operating entirely abstractly in terms of interfaces it can be used anywhere, including in browsers and Node.js-based environments.

Getting Started

To install the dependencies, run

npm install

To build the package, run

npm run build

To continuously rebuild it in the background you can also use

npm run watch

Examples

To build and run the browser example, first make sure to have a directory named controllers in the repository containing controller mappings in Mixxx's format (.midi.xml mappings and .js scripts). You can download Mixxx's mappings by running

scripts/clone-mixxx-mappings

Note: Mixxx's mappings are GPL-licensed, so if you decide to bundle them in a downstream application, make sure to comply with its licensing terms!

To start a development server, you can now run

npm run -w examples/browser serve

djcontroller.js's People

Contributors

fwcd avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

h1ghbre4k3r

djcontroller.js's Issues

Add support for Mixxx's JS controller scripts

This is probably a bit more involved than #1 since it involves running the script with the same API as Mixxx (e.g. providing an engine that interfaces with the DJ application).

Since most (all?) invocations of the script are quick one-shot calls to functions mapped in the XML script, IIUC, we might be able to 'collect' a list of actions to take that we can return to the consumer of this library, instead of requiring them to provide callbacks/an interface to us.

The type declarations here might be interesting:

In-script APIs to implement:

  • engine (partially implemented)
    • getValue
    • setValue (partially implemented)
    • setParameter (partially implemented)
  • script (partially implemented)

To be investigate:

  • Could we use Web Workers or some other means of isolation to properly sandbox the scripts while still providing them with context to interact with the app?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.