APCmini:
Filter:
APCmini/Classes (extension) | Undocumented classes

APCmini
ExtensionExtension

wrapper for the APCmini midi controller

Description

This is a wrapper class for the Akai APCmini controller. It provides internal state customization, pad hold/switch functionality, visual slider mode and a nice starting animation, making the controller properly usable for any purpose. For the moment only tested for GNU/Linux.

(C) 2015 Andrés Pérez López // www.andresperezlopez.com // contact@andresperezlopez.com

Class Methods

.new

Instance Methods

Internal State

Get the state of the pads (padInternalState) and Buttons (horizontal: horInternalState, vertical: verInternalState)

.padInternalState

.horInternalState

.verInternalState

Working Mode

Pads and buttons can work in two different modes: \hold or \switch

.setPadMode

.setPadModeAll

.setButtonMode

Arguments:

type

\hor or \ver

.setButtonModeAll

Arguments:

mode

Hold mode

In hold mode, the state will be ON only during the time pressing the pad/button. Pads can customize the ON color of the hold mode (but the state will be always the same: 1). Color can be one of the following symbols: \black (no light), \red, \blinkRed, \green, \blinkGreen, \orange or \blinkOrange.

.setPadHoldColor

.setPadHoldColorAll

Switch Mode

In switch mode, the state will be maintained until a new press is performed. Furthermore, pads allow for up to 4 different states, represented by different colours.

.setNumStates

Set the number of states for a given pad

.setNumStatesAll

.setColorsOfStates

Arguments:

array

An Array in the form [0, colorString0, 1, colorString1...]

.setColorsOfStatesAll

Arguments:

array

An Array in the form [0, colorString0, 1, colorString1...]

.padSwitchNumStates

Get the number of states for each pad

.padColorsOfStates

Get a Dictionary with the state->color association for each pad

Functions

For each pad/button state, a Function can be passed and evaluated.

.setPadFunction

.setButtonFunction

Arguments:

type

\hor or \ver

num

Button index

.setSliderFunction

In the case of the sliders, the function will be passed the slider index and the value.

Arguments:

num

Slider index

Slider Mode

The code provides the option of using the pads for display the sliders value. That's called "slider mode". Slider mode can be toggled by the Shift pad, or by the following methods. During slider mode, any action in the pads or buttons won't have any effect.

.sliderMode

Other

.playAnimation

Play the startup animation

.verbose

Examples