clj-launchpad-mk2.core

clear-cell

(clear-cell lpad x y)

set the specified button off.

  • x can be 0 to 8 inclusive (8 is for the top buttons)
  • y can be 0 to 8 inclusive (8 is for the most right buttons)

Examples:

(clear-cell lpad 0 2)

clear-grid

(clear-grid lpad)

close

(close lpad)

close the launchpad device.

See midi.core/close.

Examples:

(close lpad)

flash

(flash lpad x y color-description)

flash the specified button between the current color and specified color

  • x can be 0 to 8 inclusive (8 is for the top buttons)
  • y can be 0 to 8 inclusive (8 is for the most right buttons)
  • color-description must be 0 to 127 inclusive

Examples:

(flash lpad 1 2 127)
(flash lpad 1 2 0)

light-cc

(light-cc lpad cc-ref color-description)

set a top row control button to the specified color.

  • cc-ref is the integer/hex number identifying the button (see CC_ constants in midi/core.clj).
  • color-description must be 0 to 127 inclusive

Examples:

(light-cc lpad CC_CURSOR_RIGHT 78)

light-cell

(light-cell lpad x y color-description)

set a cell grid on or off.

  • x can be 0 to 8 inclusive (8 is for the top buttons)
  • y can be 0 to 8 inclusive (8 is for the most right buttons)
  • color-description must be 0 to 127 inclusive

Examples:

(light-cell lpad 1 2 127)
(light-cell lpad 1 2 0)

light-column

(light-column lpad x color-description)

Set all the buttons in the specified column to the specified color.

  • x can be 0 to 8 inclusive (8 is for the most right buttons)
  • color-description must be 0 to 127 inclusive

Examples:

(light-column lpad 3 12)

light-grid

(light-grid lpad color-description)

Set all the buttons on the grid to the specified color.

  • color-description must be 0 to 127 inclusive

Examples:

(light-grid lpad 52)

light-row

(light-row lpad y color-description)

Set all the buttons in the specified row to the specified color.

  • y can be 0 to 8 inclusive (8 is for the most right buttons)
  • color-description must be 0 to 127 inclusive

Examples:

(light-row lpad 0 43)

open

(open)

open a connection to the launchpad and return a launchpad object suitable for the calls of this library.

See midi.core/open.

pulse

(pulse lpad x y color-description)

pulse (i.e., vary the brightness) the specified button from off to the specified color

  • x can be 0 to 8 inclusive (8 is for the top buttons)
  • y can be 0 to 8 inclusive (8 is for the most right buttons)
  • color-description must be 0 to 127 inclusive

Examples:

(pulse lpad 1 2 127)

rgb

(rgb lpad x y red green blue)

Set the specified buttons to the specified combination of red, green and blue.

  • x can be 0 to 8 inclusive (8 is for the most right buttons)
  • y can be 0 to 8 inclusive (8 is for the most right buttons)
  • red is the brightness of the red component of the button’s LED (0-63 inclusive)
  • green is the brightness of the green component of the button’s LED (0-63 inclusive)
  • blue is the brightness of the blue component of the button’s LED (0-63 inclusive)

Examples:

(rgb lpad 3 2 63 0 24)

scroll-stop

(scroll-stop lpad)

Stop any currently scrolling text.

Examples:

(scroll-stop lpad)

scroll-text

(scroll-text lpad text color-description)

Scroll (right->left) the specified text continually. The text will be displayed in the specified color.

  • text is the text to scroll.
  • color-description is the integer code for the text color (0-127 inclusive).

Examples:

(scroll-text lpad "Hello, world!" 54)

scroll-text-once

(scroll-text-once lpad text color-description)

Scroll (right->left) the specified text once only. The text will be displayed in the specified color.

  • text is the text to scroll.
  • color-description is the integer code for the text color (0-127 inclusive).

Examples:

(scroll-text-once lpad "Hello, world!" 54)