Coder Social home page Coder Social logo

joslarson / bitwig-api-proxy Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 128 KB

Don't use this: A set of proxy classes that wrap the Bitwig Controller Scripting API, automatically caching observed properties and created objects.

License: BSD 3-Clause "New" or "Revised" License

JavaScript 46.10% TypeScript 53.90%

bitwig-api-proxy's Introduction

Bitwig API Proxy

DON'T USE THIS. This package is no longer useful in Bitwig >= 2.0 as the api now gives you direct access to read values without setting up observers. As such, this package will no longer be maintained.


This set of proxy classes wrap the Bitwig Controller Scripting API in a way that automatically caches observed properties and created objects, while having the added benefit of removing the need for stub files. It exists as part of the Typewig framework, but can be used generally.

Installation

$ npm install --save bitwig-api-proxy

Usage

Once you have setup an observer for the first time or called a create method...

import { host } from 'bitwig-api-proxy';


const transport = host.createTransport();
transport.addIsPlayingObserver(isPlaying => {/* ...do something */});

...the associated value will be added to the cache of the method's class instance (as shown below).

console.log(transport.cache.isPlaying);  // always reflects the current isPlaying state

Limitations

The cache, while helpful, currently has its limitations. Cached property names will be the same for method calls with the same methodName, but different args. That means that if you call a create method more than once, each subsequent call will replace the associated cached reference. The same goes for observer methods.

bitwig-api-proxy's People

Contributors

joslarson avatar

Stargazers

 avatar

Watchers

 avatar

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.