You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ Utils to interface with [Ableton's Push 2](https://www.ableton.com/en/push/) fro
4
4
5
5
These utils follow Ableton's [Push 2 MIDI and Display Interface Manual](https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc) for comunicating with Push 2. I recommend reading Ableton's manual before using this tool.
6
6
7
-
So far I only implemented some utils to **interface with the display** and some utils for **basic interaction with pads, buttons, encoders and the touchstrip**. More detailed interaction with each of these elements (e.g. changing color palettes, support for led blinking, advanced touchstrip configuration, etc.) has not been implemented. Contributions are welcome :)
8
-
*EDIT*: customization of color palettes is now implemented!
7
+
So far I only implemented some utils to **interface with the display** and some utils for **interaction with pads, buttons, encoders and the touchstrip**. More detailed interaction with each of these elements (e.g. changing color palettes, support for led blinking, advanced touchstrip configuration, etc.) has not been implemented. Contributions are welcome :)
8
+
*EDIT*: customization of color palettes and led animations is now implemented!
9
9
10
10
I only testd the package in **Python 3** and **macOS**. Some things will not work on Python 2 but it should be easy to port. I don't know how it will work on Windows/Linux. ~~It is possible that MIDI port names (see [push2_python/constants.py](https://github.com/ffont/push2-python/blob/master/push2_python/constants.py#L12-L13)) need to be changed to correctly reach Push2 in Windows/Linux~~. **UPDATE**: MIDI port names should now be cross-platform, but I have not tested them on Linux/Windows.
11
11
@@ -156,6 +156,21 @@ All pads support RGB colors, and some buttons do as well. However, some buttons
156
156
For a list of avilable RGB colors check the `DEFAULT_COLOR_PALETTE` dictionary in [push2_python/constants.py](https://github.com/ffont/push2-python/blob/master/push2_python/constants.py). First item of each color entry corresponds to the RGB color name while second item corresponds to the BW color name. The color palette can be customized using the `set_color_palette_entry`, `update_rgb_color_palette_entry` and `reapply_color_palette` of Push2 object. See the documentation of these methods for more details.
157
157
158
158
159
+
### Set pad and button animations
160
+
161
+
Animations (e.g. led blinking) can be configured similarly to colors. To configiure an animation you need to define the *starting color* by sending a "set color" message with an animation code corresponding to "static", and then set the *second color* by sending another "set color" message with an animation code corresponding to the desired animation. For example, to condfigure the
162
+
play button with a pulsing animation from white to green:
By default, animations are synced to a clock of 120bpm. It is possible to change that tempo by sending MIDI clock messages to the Push2 device, but `push2-python` currently does not support that. Should be easy to implement though by sending MIDI clock messages using the `push.send_midi_to_push(msg)` method.
170
+
171
+
For a list of available animations, check the variables names `ANIMATION_*` dictionary in [push2_python/constants.py](https://github.com/ffont/push2-python/blob/master/push2_python/constants.py). Also, see the animations section of the [Push 2 MIDI and Display Interface Manual](https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc#268-led-animation) for more information about animations.
172
+
173
+
159
174
### Adjust pad sensitivity
160
175
161
176
`push2-python` implements methods to adjust Push2 pads sensitivity, in particualr it incorporates methods to adjust the velocity curve (which applies to
'color' must be a valid RGB or BW color name present in the color palette. See push2_python.constants.DEFAULT_COLOR_PALETTE for default color names.
39
39
If the button only acceps BW colors, the color name will be matched against the BW palette, otherwise it will be matched against RGB palette.
40
-
'animation' must be an existing key of push2_python.contants.ANIMATIONS dictionary.
40
+
'animation' must be a valid animation name from those defined in push2_python.contants.ANIMATION_*. Note that to configure an animation, both the 'start' and 'end'
41
+
colors of the animation need to be defined. The 'start' color is defined by setting a color with 'push2_python.contants.ANIMATION_STATIC' (the default).
42
+
The second color is set setting a color with whatever ANIMATION_* type is desired.
41
43
See https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc#setting-led-colors
"""Sets the color of all buttons in Push2 to the given color.
56
57
'color' must be a valid RGB or BW color name present in the color palette. See push2_python.constants.DEFAULT_COLOR_PALETTE for default color names.
57
58
If the button only acceps BW colors, the color name will be matched against the BW palette, otherwise it will be matched against RGB palette.
58
-
'animation' must be an existing key of push2_python.contants.ANIMATIONS dictionary.
59
+
'animation' must be a valid animation name from those defined in push2_python.contants.ANIMATION_*. Note that to configure an animation, both the 'start' and 'end'
60
+
colors of the animation need to be defined. The 'start' color is defined by setting a color with 'push2_python.contants.ANIMATION_STATIC' (the default).
61
+
The second color is set setting a color with whatever ANIMATION_* type is desired.
59
62
See https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc#setting-led-colors
"""Sets the color of the pad at the (i,j) coordinate.
102
102
'color' must be a valid RGB color name present in the color palette. See push2_python.constants.DEFAULT_COLOR_PALETTE for default color names.
103
-
'animation' must be an existing key of push2_python.contants.ANIMATIONS dictionary.
103
+
'animation' must be a valid animation name from those defined in push2_python.contants.ANIMATION_*. Note that to configure an animation, both the 'start' and 'end'
104
+
colors of the animation need to be defined. The 'start' color is defined by setting a color with 'push2_python.contants.ANIMATION_STATIC' (the default).
105
+
The second color is set setting a color with whatever ANIMATION_* type is desired.
106
+
104
107
This funtion will keep track of the latest color/animation values set for each specific pad. If 'optimize_num_messages' is
105
108
set to True, set_pad_color will only actually send the MIDI message to push if either the color or animation that should
106
109
be set differ from those stored in the state.
107
110
See https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc#261-setting-led-colors
'color' must be a valid RGB color name present in the color palette. See push2_python.constants.DEFAULT_COLOR_PALETTE for default color names.
143
+
'animation' must be a valid animation name from those defined in push2_python.contants.ANIMATION_*. Note that to configure an animation, both the 'start' and 'end'
144
+
colors of the animation need to be defined. The 'start' color is defined by setting a color with 'push2_python.contants.ANIMATION_STATIC' (the default).
145
+
The second color is set setting a color with whatever ANIMATION_* type is desired.
0 commit comments