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 🙏

© 2024 – Pkg Stats / Ryan Hefner

midas-control

v1.0.3

Published

* Connects using ethernet * Implements OSC protocol * Designed for & Tested on Midas-M32R Live

Downloads

14

Readme

Intro

A sdk for midas mixing consoles, also can be used for X32

This repo is still TESTING, not stable enough for production use

  • Connects using ethernet
  • Implements OSC protocol
  • Designed for & Tested on Midas-M32R Live

Installation

npm i midas-control

Short Demo

const Midas = require("midas-control")
let m32 = new Midas("10.0.10.15") //Connect to console via udp protocol

//Listen on data sent by the console
m.events.on("data", (d) => {
    console.log(d) //Parsed method data here
})

//renew subscription, expires in 10s
function renew() {
    m.send(["/xremote"])  //Renews subscription to control flow of the console
    m.send(["/meters", ",si", "/meters/0", 1])  //Renews subscription to meter values (level)
}

renew()
setInterval(() => {
    renew()
}, 8000) //renew every 8 seconds to prevent data loss

Methods

Midas(string ipAddress)

let midas = new Midas("10.0.10.15") //returns an midas object with 

midas.events

A event emitter which calls data event everytime there's incoming message from the console

m.events.on("data", (d) => {
    if (d[0] == "/meters/0") {
        console.log(d[2][16])
    } else {
        console.log(d)
    }
    // console.log(m.methodList.indexOf(d[0])) //Check if this method is supported by the methods.json
})

midas.search()

Execute a search for consoles by broadcasting /xinfo

m.search() // returns nothing, if there're any consoles, they will reply via data event

midas.send(Array params[])

// Input array: data to midas, params as array elements
// Input format: [functionName,dataTypes,data1,data2,...]
midas.send(["/meters", ",si", "/meters/0", 1]) // returns nothing

For all function names and params, please refer to OSC api document (This is what I used, for reference only).

Or, you can just use the exec method (see below) instead

midas.exec(method, param1, param2, ...)

midas.exec(midas.methods.ch[0].mix.fader, 1)// returns nothing

Same as above, but parsed methods into an object for easier access.

You can print (method).params to see required data types

Eg. console.log(midas.methods.ch[0].mix.fader.params)

Note that midas.methods is a static object containing only strings, so ...

To enable your IDE for giving you hints on possible methods:

Please save midas.methods into an object or json file for IDEs to access Eg.

let midas = new Midas("10.0.10.15") //Connect to console via udp protocol

//Save a copy of possible methods into current directory
fs.writeFile("./methods.json", JSON.stringify(midas.methods), (e) => { 
    if (e) console.log(e)
})

//Then, everytime you want to call a method, just
const methods = require("./methods.json")
// ... and once you enter methods. the IDE will give you possible choices

Known Issues

  • Some of the commands will be dropped if sent at the same time

About

  • This project is not finished yet, any new ideas can be contributed to github
  • I will create the github page ASAP

TODO

  • Function call to console using promise
  • Return value validation
  • Command queue