Coder Social home page Coder Social logo

launchpadx-sc's Introduction

LaunchpadX

See it in action

A simple interface for the Novation Launchpad X controller

A simple interface for the Novation Launchpad X controller, mostly for changing layouts and writing things on the RGB led's.

For more info on the interface exposed by Novation: click here.

Installation

Open up SuperCollider and evaluate the following line of code: Quarks.install("https://github.com/madskjeldgaard/launchpadx-sc")

Example

(
// Setup and connect
MIDIClient.init();
l = LaunchpadX.new();
l.connect();
)

// Write some scrolling text
l.textScroll("Hello World!", loop:0, speed: rrand(1,20), colourspec: rrand(0,100))

// If looping text scroll, disable it
l.disableTextScroll();

// Select a layout
l.selectLayout(4);

// Activate programmer mode (set to 0 to return to live mode)
l.setLiveModeSwitch(1);

// You can render arbitrary 8x8 images on it
(
var image = Image.new(8, 8);

image.pixels_(
    Int32Array.fill(image.width * image.height, {
        Image.colorToPixel(Color.new255(255.rand,127.rand,255.rand,255))
    })
);

l.renderPixelGrid(image, type: 2);
)

// Render one static char
l.renderChar($M, 2, 30);

// Go back to live mode
l.setLiveModeSwitch(0);

// Select a layout
l.selectLayout(3);

// Sleep (turn off LEDS)
l.setSleepMode(0);

// Unsleep
l.setSleepMode(1);

// Silly example: Display latest code you evaluated on the Launchpad X
// See the Interpreter help file for more info on using the preprocessor
(
this.preProcessor = {|text| 
    l.textScroll(text, loop:0, speed: rrand(1,20), colourspec: rrand(0,100))
}
)

launchpadx-sc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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