Coder Social home page Coder Social logo

mrjoy / surface_master Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomasjachmann/launchpad

0.0 2.0 0.0 321 KB

A gem for accessing various MIDI controllers, including the Novation Launchpad, and Numark Orbit programmatically and easily.

License: MIT License

Ruby 100.00%

surface_master's Introduction

Control Center

A gem for interacting with various MIDI controllers.

This was originally forked from launchpad but has diverged considerably:

  • Abandon support for Novation Launchpad Mk 1.
  • Add support for Novation Launchpad Mk 2.
  • Add support for TouchOSB Bridge.
  • Improve allocation efficiency to reduce pressure on garbage collector.

Over time I will be generalizing this to interact with arbitrary control surfaces.

Supported Devices

  • Novation Launchpad, Mark 2 (the one with RGB support)
  • TouchOSC Bridge
    • At the moment only the Device interface is implemented, and you can either consume the input raw, or apply a mapping function of your own.

Requirements

Compatibility

The gem is known to be compatible with the following ruby versions:

  • MRI 2.2.4

Usage

To be written. In the meantime, see the examples directory.

Future plans

  • Support for more control surfaces.
  • Improve efficiency wrt memory allocations.
  • Expanded support for Novation Launchpad features (blinking/pulsing, etc)
  • Test suite.
  • Normalize message structures across devices a bit.

License

See LICENSE for details.

surface_master's People

Contributors

dgoodlad avatar mrjoy avatar rixth avatar thomasjachmann avatar

Watchers

 avatar  avatar

surface_master's Issues

undefined method `change' for #<SurfaceMaster::Launchpad::Device:0x0055d7fd1e6178> (NoMethodError)

Hey there! I just gave your surface_master project a quick whirl but was unable to get the 'launchpad_playground' example working. I didn't spend an extensive amount of time on it but figure I'd shout out here.

The first issue was similar to thomasjachmann#7 in that the library isn't correctly detecting the launchpad mini. By changing the following line, it can be made compatible but obviously removes support for the MK2:

diff --git a/lib/surface_master/launchpad/device.rb b/lib/surface_master/launchpad/device.rb
index 31ad4c9..3136e3d 100644
--- a/lib/surface_master/launchpad/device.rb
+++ b/lib/surface_master/launchpad/device.rb
@@ -5,7 +5,7 @@ module SurfaceMaster
       include MIDICodes
 
       def initialize(opts = nil)
-        @name = "Launchpad MK2"
+        @name = "Launchpad Mini MIDI 1"
         super(opts)
         reset! if output_enabled?
         raw         = (0..8)

The next error seemed to be more involved:

$ ruby -Ilib ./examples/launchpad_playground.rb 
D, [2018-01-21T09:14:44.335627 #17876] DEBUG -- : Initializing SurfaceMaster::Launchpad::Interaction#47420070064800 with {}
D, [2018-01-21T09:14:44.335871 #17876] DEBUG -- : writing messages to launchpad:
  {:message=>[176, 0, 0], :timestamp=>0}
D, [2018-01-21T09:14:44.336430 #17876] DEBUG -- : Setting response to :grid for state :both with nil
D, [2018-01-21T09:14:44.336508 #17876] DEBUG -- : Setting response to :scene1 for state :down with nil
D, [2018-01-21T09:14:44.336548 #17876] DEBUG -- : Setting response to :scene2 for state :down with nil
D, [2018-01-21T09:14:44.336602 #17876] DEBUG -- : Setting response to :scene3 for state :down with nil
D, [2018-01-21T09:14:44.336655 #17876] DEBUG -- : Setting response to :scene4 for state :down with nil
D, [2018-01-21T09:14:44.336689 #17876] DEBUG -- : Setting response to :mixer for state :down with nil
/home/mmorsi/workspace/lp/surface_master/lib/surface_master/interaction.rb:22:in `change': undefined method `change' for #<SurfaceMaster::Launchpad::Device:0x005641b0dcd320> (NoMethodError)
Did you mean?  changes
	from ./examples/launchpad_playground.rb:177:in `<main>'

I notice that this 'change' method is not defined in either of the launchpad or touch_osc device classes. This is where is stopped debugging.

Hope this helps!

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.