Liking cljdoc? Tell your friends :D

clj-launchpad-mk2.midi.core

Holds the functions which 'talk MIDI' to the Launchpad via messages in the javax.sound.midi package.

Holds the functions which 'talk MIDI' to the Launchpad via messages in the ```javax.sound.midi``` package.
raw docstring

CC_CURSOR_DOWNclj

Identifies the cursor down control button in messages sent to/from the Launchpad.

Identifies the cursor down control button in messages sent to/from the Launchpad.
raw docstring

CC_CURSOR_LEFTclj

Identifies the cursor left control button in messages sent to/from the Launchpad.

Identifies the cursor left control button in messages sent to/from the Launchpad.
raw docstring

CC_CURSOR_RIGHTclj

Identifies the cursor right control button in messages sent to/from the Launchpad.

Identifies the cursor right control button in messages sent to/from the Launchpad.
raw docstring

CC_CURSOR_UPclj

Identifies the cursor up control button in messages sent to/from the Launchpad.

Identifies the cursor up control button in messages sent to/from the Launchpad.
raw docstring

CC_MIXERclj

Identifies the "Mixer" control button in messages sent to/from the Launchpad.

Identifies the "Mixer" control button in messages sent to/from the Launchpad.
raw docstring

CC_SESSIONclj

Identifies the "Session" control button in messages sent to/from the Launchpad.

Identifies the "Session" control button in messages sent to/from the Launchpad.
raw docstring

CC_USER1clj

Identifies the "User 1" control button in messages sent to/from the Launchpad.

Identifies the "User 1" control button in messages sent to/from the Launchpad.
raw docstring

CC_USER2clj

Identifies the "User 2" control button in messages sent to/from the Launchpad.

Identifies the "User 2" control button in messages sent to/from the Launchpad.
raw docstring

closeclj

(close lpad)

close the launchpad device.

Examples:

(close lpad)
close the launchpad device.

Examples:
```
(close lpad)
```
raw docstring

decode-messageclj

(decode-message obj)

Decompose a com.sun.media.sound.FastShortMessage into a Launchpad-specific map.

Examples:

(def lp-msg (decode-message raw-msg))
(println (:x lp-msg) (:y lp-msg))
(println (:button-up? lp-msg))
(println (:velocity lp-msg))
(= (:note lp-msg) (:getData1 raw-msg))
Decompose a [com.sun.media.sound.FastShortMessage](http://www.docjar.com/docs/api/com/sun/media/sound/FastShortMessage.html) into a Launchpad-specific map.

Examples:

```
(def lp-msg (decode-message raw-msg))
(println (:x lp-msg) (:y lp-msg))
(println (:button-up? lp-msg))
(println (:velocity lp-msg))
(= (:note lp-msg) (:getData1 raw-msg))
```
raw docstring

openclj

(open name)

find the launchpad by name in the available midi devices and return a launchpad object suitable for the calls of this library

Examples:

(open "MK2 [hw:2,0,0]")
find the launchpad by name in the available midi devices and return a launchpad object suitable for the calls of this library

* `name` should be the string returned from [MidiSystem/getMidiDeviceInfo](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/MidiSystem.html)

Examples:
```
(open "MK2 [hw:2,0,0]")
```
raw docstring

remove-button-press-handlerclj

(remove-button-press-handler {:keys [in]})

Remove any event handlers.

Examples:

(remove-button-press-handler lpad)
Remove any event handlers.

* the first argument should be a map containing an `in` key which returns a [javax.sound.midi.Transmitter](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/Transmitter.html).

Examples:
```
(remove-button-press-handler lpad)
```
raw docstring

send-midiclj

(send-midi {:keys [out]} & args)

Sends a javax.sound.midi.ShortMessage to the specified device.

  • the first argument should be a map containing an out key which returns a javax.sound.midi.Receiver.
  • args should be a three element sequence containing the status, data1 and data2 components of the message respectively.

Examples:

(send-midi lpad 0x90 11 43)
Sends a [javax.sound.midi.ShortMessage](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/ShortMessage.html) to the specified device.

* the first argument should be a map containing an `out` key which returns a [javax.sound.midi.Receiver](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/Receiver.html).
* `args` should be a three element sequence containing the `status`, `data1` and `data2` components of the message respectively.

Examples:
```
(send-midi lpad 0x90 11 43)
```
raw docstring

send-midi-sysexclj

(send-midi-sysex {:keys [out]} & args)

Sends a javax.sound.midi.SysexMessage to the specified device.

Examples:

(send-midi-sysex lpad 13 4 43)
Sends a [javax.sound.midi.SysexMessage](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/SysexMessage.html) to the specified device.

* the first argument should be a map containing an `out` key which returns a [javax.sound.midi.Receiver](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/Receiver.html).
* `args` should be an arbitary length sequence which will be wrapped by [[SYSEX_HEADER]] and [[SYSEX_FOOTER]] information and converted to a byte array.

Examples:
```
(send-midi-sysex lpad 13 4 43)
```
raw docstring

send-midi-sysex-scrollclj

(send-midi-sysex-scroll {:keys [out]} text & args)

Sends a javax.sound.midi.SysexMessage to the specified device to produce scrolling text.

  • the first argument should be a map containing an out key which returns a javax.sound.midi.Receiver.
  • text should be a sequence of integers representing the letters of the text to scroll (e.g., (map #(int (char %)) "Hello").
  • args should be an arbitary length sequence which will be wrapped by SYSEX_HEADER, text and SYSEX_FOOTER information and converted to a byte array.

Examples:

(send-midi-sysex-scroll lpad (72 101 108 108 111) 20 45 0)
Sends a [javax.sound.midi.SysexMessage](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/SysexMessage.html) to the specified device to produce scrolling text.

* the first argument should be a map containing an `out` key which returns a [javax.sound.midi.Receiver](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/Receiver.html).
* `text` should be a sequence of integers representing the letters of the text to scroll (e.g., `(map #(int (char %)) "Hello")`.
* `args` should be an arbitary length sequence which will be wrapped by [[SYSEX_HEADER]], text and [[SYSEX_FOOTER]] information and converted to a byte array.

Examples:

```
(send-midi-sysex-scroll lpad (72 101 108 108 111) 20 45 0)
```
raw docstring

set-button-press-handlerclj

(set-button-press-handler {:keys [in]} handler-fn)

Specify a single handler that will receive all midi events from the input device.

  • the first argument should be a map containing an in key which returns a javax.sound.midi.Transmitter.
  • handler should be a function that accepts a single parameter - a decoded version of the event.

Examples:

(set-button-press-handler
  lpad    
  (fn [msg]
    (light-cell 
      lpad 
      (:x msg) 
      (:y msg) 
      (- 127 (+ (:x msg) (:y msg))))))
Specify a single handler that will receive all midi events from the input device.

* the first argument should be a map containing an `in` key which returns a [javax.sound.midi.Transmitter](https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/Transmitter.html).
* handler should be a function that accepts a single parameter - a decoded version of the event.

Examples:
```
(set-button-press-handler
  lpad    
  (fn [msg]
    (light-cell 
      lpad 
      (:x msg) 
      (:y msg) 
      (- 127 (+ (:x msg) (:y msg))))))
```
raw docstring

The common set of footer bytes sent with each Sysex message

The common set of footer bytes sent with each Sysex message
raw docstring

SYSEX_HEADERclj

The common set of header bytes sent with each Sysex message

The common set of header bytes sent with each Sysex message
raw docstring

SYSEX_LIGHT_COLUMN_STATUSclj

The status byte for a light column Sysex message

The status byte for a light column Sysex message
raw docstring

SYSEX_LIGHT_GRID_STATUSclj

The status byte for a light grid Sysex message

The status byte for a light grid Sysex message
raw docstring

SYSEX_LIGHT_ROW_STATUSclj

The status byte for a light row Sysex message

The status byte for a light row Sysex message
raw docstring

SYSEX_RGB_STATUSclj

The status byte for a RGB Sysex message

The status byte for a RGB Sysex message
raw docstring

SYSEX_SCROLL_STATUSclj

The status byte for a scroll text Sysex message

The status byte for a scroll text Sysex message
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close