GithubHelp home page GithubHelp logo

yaito3014 / mmk3-hid-control Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emerah/mmk3-hid-control

0.0 0.0 0.0 250 KB

Modular framework that build valid messages to display on Maschine MK3 screens.

License: GNU General Public License v3.0

Python 100.00%

mmk3-hid-control's Introduction

MMK3-HID-Control

the problem we are trying to solve is the problem of gaining access to the gorgeous screens found on newer generation ni products, namely Maschine MK3 and Komplete Kontrol S-MK2 series.

this can be very useful if we for example want to use one of those ni products with ableton live and be able to see meaningful feedback on the screens instead of using the old and ugly mackie control protocol for text display. to make things worse, mackie is only available on the maschine mk3 hardware and not the komplete series.

for this prototype engine we will try to accomplish 2 things:

  • send valid data messages to Maschine MK3 to fill the screens with colors.
  • send images to Maschine MK3 screens

Display Images on Maschine MK3 screens

since we know the product ids of all NI products with similar screens, we could assume that what works here will also work with komplete keyboards from the S mk2 family with minor touches. in order to be able to access Maschine MK3 screens and therefore be able to accomplish the goals of this prototype we must suspend ni drivers.

Suspending ni backend support services

ni products are back-powered by ni drivers that handle all communications between the hardware device and ni applications running on your computer like komplete kontrol and maschine 2 software or other midi-capable software. as soon as your computer starts, these drivers claims control of the hardware and therefore before we are able to send date to the screens, we must suspend these background processes/drivers to be able to claim control of the hardware to ourselves.

this operation is complletely safe. as soon you start maschine 2 software or at worst restart your computer, the drivers start up and immidiately claim control of the Maschine MK3 hardware device again.

Platform

the code in this prototype was developed on macOS 10.14.6 and 10.15.x. since we must accesses the system to suspend ni drivers the code will only work on mac. developed with python 3.7.7

Required

this prototype uses pyusb, which uses libusb as its backend. and uses PIL for image creation. these libraries must be installed before this prototype will work on your computer

brew install libusb 
pip3 install Pillow
pip3 install pyusb

note on libusb: libusb has been recently updated to ver 1.0.23 (used in this project). currently brew installs an older version of libusb .. otherwise you will have to build the libusb library from source. in case you decide to build the library on your mac, you must have autoconf, automake, and libtools installed before you attempt at building the library ..

automake installs autoconf as a requirement.

brew install automake, libtool

How to run

download this packege. in terminal, cd to the package folder and type:

python3 main.py

script will ask you to agree to suspending ni drivers. if you choose yes, the script will run and you should see you Maschine MK3 screens blink in random colors. and display the 2 images at the end of the color sequence.

you should set "running" flag in main.py to False after suspending the drivers the first time so it doesnt ask you everytime you run it. the process of suspending the drivers allows 6 seconds if wait so the system has enough time to actually suspend the drivers.

mmk3-hid-control's People

Contributors

emerah avatar yaito3014 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.