MIDI interface for controls Ableton Push2 from Unity.
- No display control
- API cannot recognize MIDI IN devices individually. it means API can't identify what device sends MIDI message to Unity. (from Push2, or another one) so, e.g. connected Push2 and MIDI keyboard in same time, then you play keyboard, GetPad(Pad) should returns the value.
- API cannot switch Push2 mode (Live/User/Dual mode) itself. it means you can't run your project and Ableton Live in same time.
- touch strip configuration is not modifiable.
- Pad LED's color pallet is not modifiable.
- Polyphonic after touch is not supported.
- Unity-AbletonPush2 is depends on Nagitch/MIDIJack. download and import package from releases.
- download and import package Unity-AbletonPush2 from here.
Include namespace:
using AbletonPush2;API specification is based on Push2 interface official documentation.
and also parts/controls namings are referred Push2-map.json.
- Pad.S1T8 = the pad of top, right positioned.
- Pad.S8T1 = the pad of bottom, left corner positioned.
- Pad.S8T2 = the pad of bottom, left +1 right positioned.
-
Pad Push2.GetPad(Pad)
get pad's data, include pressure (between 0.0 to 1.0 value).
Padis entity of Push2 pad, and you can usePads.S1T1, Pads.S1T2...pre-defined indicator. like this:var pad = Push2.GetPad(Pads.S8T1); Debug.Log(pad.pressure); // between 0.0f - 1.0f
-
float Push2.GetPadPressure(Pad)
get just pad's pressure value.
-
float Push2.GetAfterTouchPressure()
get pad's after touch. this is
Channel Aftertouch, don't care for whitch pad is pressed. -
Button Push2.GetButton(Button)
get button's data, a sort of
GetPad(). also you can useButtons.Play, Buttons.TapTempo, ...pre-defined indicator.var button = Push2.GetButton(Buttons.Play); Debug.Log(button.pressed); // true as pressed
-
bool Push2.GetButton(Button)
get just button's pressed status.
trueas pressed. -
TouchStrip Push2.GetTouchStrip(TouchStrip)
get TouchStrip's data, include bend position.
var touchStrip = Push2.GetTouchStrip(Pads.S8T1); Debug.Log(touchStrip.position); // between -1.0f to 1.0f
-
float Push2.GetTouchStripPosition()
get just touch strip position. (between -1.0f to 1.0f)
-
RotaryEncoder Push2.GetEncoder(RotaryEncoder)
get RotaryEncoder's data, include rotation step. you can use
RotaryEncoders.TempoEncoder, RotaryEncoders.Track1Encoder, ...indicator.Note: encoder step is very small value around 0.01.
var encoder = Push2.GetEncoder(RotaryEncoders.Track1Encoder); Debug.Log(encoder.step); // between -1.0f to 1.0f, minus as left
-
float Push2.GetEncoderStep(RotaryEncoder)
get just encoder's rotation step. (between -1.0f to 1.0f, minus as left)
-
bool Push2.GetEncoderTouched(RotaryEncoder)
get encoder touched status.
Push2.GetEncoderTouched(RotaryEncoders.Track1Encoder); // true as touched
Their delegates are available.
- PadPressedDelegate(Pad, pressure)
- PadReleasedDelegate(Pad)
- ButtonPressedDelegate(Button)
- ButtonReleasedDelegate(Button)
- EncoderDelegate(Encoder, step)
- EncoderTouchedDelegate(Encoder)
- EncoderReleasedDelegate(Encoder)
- TouchStripTouchedDelegate(TouchStrip)
- TouchStripReleasedDelegate(TouchStrip)
- AfterTouchDelegate(pressure)
-
SetLED([Pad|Button], LED.Color, LED.Animation)
Turn LED on / off, with color and animation.
// Turn on all pad LEDs to white. SetLED(Pad.All, LED.Color.RGB.White); // Turn on pad of bottom, left corner positioned to Red, blinking 16 beat SetLED(Pad.S8T1, LED.Color.RGB.Red, LEDAnimation.Blinking16th); // turn off TapTempo button LED. LEDColor Black means turn off SetLED(Button.TapTempo, LED.Color.Mono.Black);
LEDColor.RGB.xxxis available only RGB LEDs. you can see what button/control has RGBLED in here. Push Interface documentand, you can indicate color number below, instead of LEDColor.RGB definitions. based on Push2 default color pallet.
LED.Animation is selectable below, from this section in Push2 spec document.
- LED.Animation.None (stop transition)
- LED.Animation.1shot24th
- LED.Animation.1shot16th
- LED.Animation.1shot8th
- LED.Animation.1shotQuarter
- LED.Animation.1shotHalf
- LED.Animation.Pulsing24th
- LED.Animation.Pulsing12th
- LED.Animation.Pulsing8th
- LED.Animation.PulsingQuarter
- LED.Animation.PulsingHalf
- LED.Animation.Blinking24th
- LED.Animation.Blinking16th
- LED.Animation.Blinking8th
- LED.Animation.BlinkingQuarter
- LED.Animation.Blinking24Half


