|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kmk.MKontrol
public class MKontrol
MKontrol acts as an interface bridge between processing framework and Korg microKONTROL USB-MIDI keyboard/controller. This device counts 9 rotary encoders, 8 sliders, 16 pressure pads, a joystick, 9 8-chars alnum LCD displays and a three-octave mini keyboard.
This library uses native Korg mode, a way to get a full and blind access to every controller capability. This means that scenes are disabled and keystrokes have to be implemented on the software side. Mapped callbacks/events (to be defined on PApplet):
Field Summary | |
---|---|
static byte |
LCD_BG_GREEN
|
static byte |
LCD_BG_OFF
|
static byte |
LCD_BG_ORANGE
|
static byte |
LCD_BG_RED
|
static byte |
LED_BLINK
|
static byte |
LED_ENTER
|
static byte |
LED_EXIT
|
static byte |
LED_GT_GRN
|
static byte |
LED_GT_RED
|
static byte |
LED_HEX
|
static byte |
LED_LT_GRN
|
static byte |
LED_LT_RED
|
static byte |
LED_MESSAGE
|
static byte |
LED_OFF
|
static byte |
LED_ON
|
static byte |
LED_ONESHOT
|
static byte |
LED_PAD0
|
static byte |
LED_PAD1
|
static byte |
LED_PAD10
|
static byte |
LED_PAD11
|
static byte |
LED_PAD12
|
static byte |
LED_PAD13
|
static byte |
LED_PAD14
|
static byte |
LED_PAD15
|
static byte |
LED_PAD2
|
static byte |
LED_PAD3
|
static byte |
LED_PAD4
|
static byte |
LED_PAD5
|
static byte |
LED_PAD6
|
static byte |
LED_PAD7
|
static byte |
LED_PAD8
|
static byte |
LED_PAD9
|
static byte |
LED_SCENE
|
static byte |
LED_SETTING
|
static byte |
LED_TEMPO
|
static java.lang.String |
MKONTROL_VERSION
|
static byte |
T_ENCODER
|
static byte |
T_JOYSTICK
|
static byte |
T_PAD
|
static byte |
T_PEDAL
|
static byte |
T_SLIDER
|
static byte |
T_SWITCH
|
Constructor Summary | |
---|---|
MKontrol(java.lang.Object parent)
Constructor. |
Method Summary | |
---|---|
void |
dispose()
Called by PApplet: avoid any call to this method |
void |
dumpDevices()
Shows a list of the detected MIDI devices connected and online |
void |
init()
Starts an initialization of the MIDI subsystem that is going to handle bidirectional communication with the controller. |
void |
setDebugLevel(int newLevel)
Changes the runtime verbosity of the logger subsystem |
void |
setLCD(int lcdNum,
int bgColor,
java.lang.String label)
Writes a persistent label to one of the controller's LCD and sets a specific background color. |
void |
setLCD(int lcdNum,
java.lang.String label)
Writes a persistent label to one of the controller's LCD. |
void |
setLED(int ledNum,
boolean on)
Turns on or off one of the LED of the rubber pushbuttons |
void |
setLED(int ledNum,
byte ledStatus,
int timer)
Sets a specific status for one LED, not just turning it on or off |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MKONTROL_VERSION
public static final byte T_ENCODER
public static final byte T_SLIDER
public static final byte T_PAD
public static final byte T_PEDAL
public static final byte T_SWITCH
public static final byte T_JOYSTICK
public static final byte LED_OFF
public static final byte LED_ON
public static final byte LED_ONESHOT
public static final byte LED_BLINK
public static final byte LED_PAD0
public static final byte LED_PAD1
public static final byte LED_PAD2
public static final byte LED_PAD3
public static final byte LED_PAD4
public static final byte LED_PAD5
public static final byte LED_PAD6
public static final byte LED_PAD7
public static final byte LED_PAD8
public static final byte LED_PAD9
public static final byte LED_PAD10
public static final byte LED_PAD11
public static final byte LED_PAD12
public static final byte LED_PAD13
public static final byte LED_PAD14
public static final byte LED_PAD15
public static final byte LED_SETTING
public static final byte LED_MESSAGE
public static final byte LED_SCENE
public static final byte LED_EXIT
public static final byte LED_ENTER
public static final byte LED_HEX
public static final byte LED_TEMPO
public static final byte LED_GT_GRN
public static final byte LED_LT_GRN
public static final byte LED_GT_RED
public static final byte LED_LT_RED
public static final byte LCD_BG_OFF
public static final byte LCD_BG_RED
public static final byte LCD_BG_GREEN
public static final byte LCD_BG_ORANGE
Constructor Detail |
---|
public MKontrol(java.lang.Object parent)
parent
- ObjectMethod Detail |
---|
public void init()
public void setLCD(int lcdNum, java.lang.String label)
lcdNum
- ID of the LCD: 0-7 for 1-8, 8 for the main onelabel
- A string, trimmed at the eighth charpublic void setLCD(int lcdNum, int bgColor, java.lang.String label)
lcdNum
- ID of the LCD 0-7: deck 1-8; 8: mainbgColor
- One of the following: MKontrol.LCD_BG_OFF (means no light),
MKontrol.LCD_BG_RED, MKontrol.LCD_BG_GREEN,
MKontrol.LCD_BG_ORANGE.label
- A string, maximum length is 8 charspublic void setLED(int ledNum, boolean on)
ledNum
- ID of the LED 0-15: Pads 1-16; 16-22: SETTING,
MESSAGE, SCENE, EXIT, ENTER, HEX, Tempo;
24-25 > (Grn), < (Grn); 28-29: > (Red), < (Red)on
- true: turn it on, false: turn it offpublic void setLED(int ledNum, byte ledStatus, int timer)
ledNum
- ID of the LED 0-15: Pads 1-16; 16-22: SETTING,
MESSAGE, SCENE, EXIT, ENTER, HEX, Tempo;
24-25 > (Grn), < (Grn); 28-29: > (Red), < (Red)ledStatus
- One of the following: MKontrol.LED_OFF (turn it off),
MKontrol.LED_ON (turn it on), MKontrol.LED_ONESHOT
(toggles the actual status momentarily, based on 'timer'
variable), MKontrol.LED_BLINK (toggles between actual status and
back, with a period related to 'timer' variable)timer
- Used only with LED_ONESHOT and LED_BLINK, 0-31: 0-279mspublic void setDebugLevel(int newLevel)
newLevel
- MKLogLevel.ERROR, MKLogLevel.WARNING, MKLogLevel.NOTICE, MKLogLevel.INFO
MKLogLevel.DEBUGpublic void dumpDevices()
public void dispose()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |