Giter VIP home page Giter VIP logo

open-ls9-control's Introduction

open-ls9-control

Open LS9 Control is a C++ library for controlling the Yamaha LS9 mixer. There are also Python bindings included known as PyOpenLS9.

It depends on the Network-MIDI driver for macOS or the Network Driver for Windows and the port name is "<Device Name> Port 1" where <Device Name> is the name from System Preferences.

Parameters

A parameter is defined by an element, index and channel, defined in C++ as an aggregate thus:

struct Parameter {
  int element;
  int index;
  int channel;
};

And in Python as a dataclass thus:

@dataclass
class Parameter:
  "Some parameter of the desk"
  element : int
  index : int
  channel : int

The LS9 class

In C++ the LS9 class is constructed with the port name as a std::string_view and exposes the following methods:

  • static auto portNames() -> std::vector<std::string>
  • void addGlobalCallback(std::function<void(Parameter, int32_t)> callback)
  • void addParamCallback(Parameter param, std::function<void(Parameter, int32_t)> callback)
  • auto get(Parameter param, std::chrono::milliseconds timeout) -> int32_t
  • void set(Parameter param, int32_t value)
  • void fade(Parameter param, int32_t value, std::chrono::milliseconds duration, std::chrono::milliseconds timeout)
  • auto nextParamTouched() -> Parameter
  • auto getChannelName(int ch, std::chrono::milliseconds timeout) -> std::string

The Python class is much the same: any callable can be used where a std::function is expected and an integer number of milliseconds is used where a std::chrono::milliseconds is expected. It also has the portNames static method which returns a list of strings.

open-ls9-control's People

Watchers

James Cloos avatar Jonathan Tanner 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.