Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

launchpad_mk2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

launchpad_mk2

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= launchpad

{Build Status}[https://travis-ci.org/andeemarks/launchpad]

[https://github.com/andeemarks/launchpad/blob/master/launchpad-gem-overview.gif]

This gem provides a Ruby interface to access the {Novation Launchpad MK2}[https://global.novationmusic.com/launch/launchpad#] programmatically. The code started life as a clone of {Thomas Jachman's gem}[https://github.com/thomasjachmann/launchpad] and was subsequently updated to handle the MK2 version of the Launchpad. The mapping of buttons and specification of colours completely changed when the MK2 was released, so lots of the original code in these areas has been re-written, but the interaction code is still largely intact.

== More Info

== Requirements

== Compatibility

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

  • MRI 2.3.1

== Installation

The gem is hosted on RubyGems[https://rubygems.org/], so in order to use it, you're gonna gem install it:

gem install launchpad

== Usage

There are two main entry points:

  • require 'launchpad/device', providing Launchpad::Device, which handles all the basic input/output stuff
  • require 'launchpad/interaction' or just 'launchpad', additionally providing Launchpad::Interaction, which lets you respond to actions (button presses/releases)

This is a simple example (only requiring the device for output) that resets the launchpad and then lights the grid button at position 4/4 (from bottom left of 0/0).

require 'launchpad/device'

device = Launchpad::Device.new sleep 1 device.reset_all sleep 1 device.change :grid, :x => 4, :y => 4, :color => 72

This is an interaction example lighting all grid buttons in red when pressed and keeping them lit.

require 'launchpad'

interaction = Launchpad::Interaction.new interaction.response_to(:grid, :down) do |interaction, action| interaction.device.change(:grid, action.merge(:color => 72)) end interaction.response_to(:mixer, :down) do |interaction, action| interaction.stop end

interaction.start

For more details, see the examples. examples/color_picker.rb is the most complex example with interaction.

== To Do

  • Rename gem to avoid name clashes with original version
  • Ensure all examples are working
  • Update examples in README

== Copyright

Copyright (c) 2017 Andy Marks. See LICENSE for details.

FAQs

Package last updated on 16 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc