Understanding Push's button color codes
-
- Posts: 168
- Joined: Thu Oct 13, 2011 5:01 am
- Location: Anchorage, Alaska
- Contact:
Understanding Push's button color codes
I am trying to get a button to pulse smoothly from bright green to the darkest green, sort of like fading opacity. The problem is that there appears to be no rhyme or reason to the Push color codes, so I can't find a way to do this with math.
Does anyone understand how this works? I have tried reading the _Framework classes several times (and I am an experienced professional Python developer) but can't figure this part out.
Bottom line, what are the color codes to fade a color in and out?
Thanks!
Does anyone understand how this works? I have tried reading the _Framework classes several times (and I am an experienced professional Python developer) but can't figure this part out.
Bottom line, what are the color codes to fade a color in and out?
Thanks!
Web | Mobile | Audio
http://vedanamedia.com/
http://vedanamedia.com/
Re: Understanding Push's button color codes
I may be completely off here since you are talking about scripting and not simple MIDI output to the unit but isn't it a matter of note velocity?
-
- Posts: 168
- Joined: Thu Oct 13, 2011 5:01 am
- Location: Anchorage, Alaska
- Contact:
Re: Understanding Push's button color codes
I did reference the scripting framework classes, but this topic is for sending color values using M4L via the control surface API (which yes, is defined by Ableton's scripts).
Setting a button's color is easy, you just call send_value <row> <col> <color> to the button. The problem is that there is no consistency in the ordering of the color code values themselves. For example there appears to be several shades of red but they are scattered all over the integer range of 0-127 with no coherent pattern. For example, if all the reds were defined by the values 0-5 in order of opacity, and the greens 6-10 in order of opacity, fading a color would be simple addition or subtraction. But this is not the case.
I hope that clarifies.
Setting a button's color is easy, you just call send_value <row> <col> <color> to the button. The problem is that there is no consistency in the ordering of the color code values themselves. For example there appears to be several shades of red but they are scattered all over the integer range of 0-127 with no coherent pattern. For example, if all the reds were defined by the values 0-5 in order of opacity, and the greens 6-10 in order of opacity, fading a color would be simple addition or subtraction. But this is not the case.
I hope that clarifies.
Web | Mobile | Audio
http://vedanamedia.com/
http://vedanamedia.com/
-
- Posts: 9
- Joined: Thu Nov 22, 2012 3:45 pm
Re: Understanding Push's button color codes
Could you use 'dict' or something similar to create a library in the order you want? It would mean going through all the values for Push manually, but would only need doing once.
Re: Understanding Push's button color codes
I'd just use a jitter grid?
dict has remained beyond me to date, probably need a lesson
Cheers
D
dict has remained beyond me to date, probably need a lesson
Cheers
D
Re: Understanding Push's button color codes
This is from Mark Egloffs patchers!
<pre><code>
----------begin_max5_patcher----------
1341.3oc2Z00bZqCD8Y3WgG+3cRxXIaiM8MfPSYBIoWRxzgobGFC3l3FibFa
SZ5sS+uesjEeDBKr5ZienclTEKVc7QGoUq1M7q50zmD8peht1Gz9pVsZ+pds
Zht3cTS9bM84duNMzKQXl9zn4y8Yo5mj+Yo9ulJ5eP2yGwZcU6tCFwF1se+a
9xH1EC5185QrQr+5s+KyvYyzRdzalexGFwFS.sYRX.6o.1Cbq9lWRZVSRXzO
V91y9T+oQKXBJPLk8xVLOZQZnepfwFxd+VDKMI3e8ElZb1xtClInezjueJwV
eCaYdyE1p2JNvKTqcT3L80uf.1R7IxNe1Kc5iYTcbr+zzbEkZweOZDaJuwwc
0CZ+yxWT7CSDj7LCdG+tdc9+cBx0h49IIdO3+t0BCMCMg1OlHTskFjqJo+7Y
+b9oquhHuUyHn0rlvR1NUK5AUKSgX0zQHVM3ZUIqLTxQTOHjRTPLZJDApXii
sQgTDl+Ox326Djm8l9jFWULNlhBUQQw7v9TFVBeJh3A2xUTVvVIKIfxR.+Pv
UMPhjIdQxTQQ5vG7X233oQSiBC0N8zSaGzu64i6DEFECqUBEZ4O.JkEZkxsD
EplhSabk6obWqTxwvmlim4k5IUHoDw+.YXGp8IxtVZ1WEFtxzrO4I+eJ33Me
7iRFx68EuvERERtzTa4BytGdVL1wjcC.AO.aFAcKTnJfxFAV1BESrnr6gagl
DvSDazX.OMZfBCwUdfVUbTAh8LcbUBG3oTS73.rMyPAl.OeHDEfAd5PvseM+
5nfdNlJAx9lUVpgzdlX1JfD.DMTgL6YR4nBN6YJgaOr7Zq.XzTEL124bFJAD
7rhRvCD.BTEnxdlQlJ.ydlOatEV9qY3kGKLw6E+Yiyh.mE9brWZZbvjEo4YO
tYjQ+4S7EAqIxgWx2e+lNcasdKxw39pNk2c3sbWmSii0QKmFK5QTNrJO4f37
mQFMkXBM46P9CLelx6V54RTojMCT4qZ2uUmK0FwNu0fKGmcJ4PMQ4qFpk09k
O06ttYsYWWTi+r3ZIZqKyU+dW0USSVtqr1a+7fdWewH1c2O3uu+ld2xGamgs
tlaysWNTfg3Prr118uWL1aFz4S8NeD6pVWz856ZIr4y8t9Rd66pM1tJf1X5H
1NKKFsvkEypjKKlk0Y1aUULZCyRqpXGHg0AWztZSWkXTx5GwvXyjVM9ejzpU
C7IsJbMJRZqq7oJRpqviG2EnDNwGk7UsKZRUMK9k8wME3GTUna4uu6whaYL+
rQ.HvojqNVE.EbxI+.YfsC3DyrSxAFONsTDA.nBH3zRdrC..voj4Ac.f.mLJ
iWA3YfSI4w4..von0EqDJhCxZdbfpLXg1CEDhRHCZjYal6kBBRC07Sgvwz.s
mJHDVX8UAQvEu2JDFVTz9qfPzPAOVHPrMTwmEDEKzdsfP3h1ukV7JmRKTQFk
9szBUINgeKsDpZEsPk2Q52BAhih9s.3XRv62BAgMZ+VHDZpfeK.FVl38agfv
QE+V.PrIJ42BghMd+VHHZdbK+mHCEQ5oa8cNQjkCu+2lWWRzh3oKyJS90MPa
cdNYY+lFv7RChXaXC+Oj5FF8XvrY9rMS4cVPh2jvbRt6DLwRGWLzISq44nTA
zwACcpLwghfMVY1PpD1H1UPO.cbqLwYqMo6YqSExGBF9TQKWX18v+x1TU7w.
AepNOcBR1XTYrgffMjJiMGxQeqkS7zIOBl2yO+hebhDSASzm688nX9ihRqoO
Ofk+nnPd5w9uDrzdWQOdwSeLHMKV5h37BB9ZCK8572yuq+ePwkVkX
-----------end_max5_patcher-----------
</code></pre>
<pre><code>
----------begin_max5_patcher----------
1341.3oc2Z00bZqCD8Y3WgG+3cRxXIaiM8MfPSYBIoWRxzgobGFC3l3FibFa
SZ5sS+uesjEeDBKr5ZienclTEKVc7QGoUq1M7q50zmD8peht1Gz9pVsZ+pds
Zht3cTS9bM84duNMzKQXl9zn4y8Yo5m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U
C7IsJbMJRZqq7oJRpqviG2EnDNwGk7UsKZRUMK9k8wME3GTUna4uu6whaYL+
rQ.HvojqNVE.EbxI+.YfsC3DyrSxAFONsTDA.nBH3zRdrC..voj4Ac.f.mLJ
iWA3YfSI4w4..von0EqDJhCxZdbfpLXg1CEDhRHCZjYal6kBBRC07Sgvwz.s
mJHDVX8UAQvEu2JDFVTz9qfPzPAOVHPrMTwmEDEKzdsfP3h1ukV7JmRKTQFk
9szBUINgeKsDpZEsPk2Q52BAhih9s.3XRv62BAgMZ+VHDZpfeK.FVl38agfv
QE+V.PrIJ42BghMd+VHHZdbK+mHCEQ5oa8cNQjkCu+2lWWRzh3oKyJS90MPa
cdNYY+lFv7RChXaXC+Oj5FF8XvrY9rMS4cVPh2jvbRt6DLwRGWLzISq44nTA
zwACcpLwghfMVY1PpD1H1UPO.cbqLwYqMo6YqSExGBF9TQKWX18v+x1TU7w.
AepNOcBR1XTYrgffMjJiMGxQeqkS7zIOBl2yO+hebhDSASzm688nX9ihRqoO
Ofk+nnPd5w9uDrzdWQOdwSeLHMKV5h37BB9ZCK8572yuq+ePwkVkX
-----------end_max5_patcher-----------
</code></pre>
-
- Posts: 168
- Joined: Thu Oct 13, 2011 5:01 am
- Location: Anchorage, Alaska
- Contact:
Re: Understanding Push's button color codes
That's the closest thing I've found for this yet! Although I'm not sure what to do with these "fast" "slow" and "blink" values since just sending them to the grid as is will not produce animations. Where did you find this, and is there anything else that goes with it? I am having trouble finding contact info for Mark himself.S4racen wrote:This is from Mark Egloffs patchers!
<pre><code>
----------begin_max5_patcher----------
1341.3oc2Z00bZqCD8Y3WgG+3cRxXIaiM8MfPSYBIoWRxzgobGFC3l3FibFa
SZ5sS+uesjEeDBKr5ZienclTEKVc7QGoUq1M7q50zmD8peht1Gz9pVsZ+pds
Zht3cTS9bM84duNMzKQXl9zn4y8Yo5mj+Yo9ulJ5eP2yGwZcU6tCFwF1se+a
9xH1EC5185QrQr+5s+KyvYyzRdzalexGFwFS.sYRX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VE.EbxI+.YfsC3DyrSxAFONsTDA.nBH3zRdrC..voj4Ac.f.mLJ
iWA3YfSI4w4..von0EqDJhCxZdbfpLXg1CEDhRHCZjYal6kBBRC07Sgvwz.s
mJHDVX8UAQvEu2JDFVTz9qfPzPAOVHPrMTwmEDEKzdsfP3h1ukV7JmRKTQFk
9szBUINgeKsDpZEsPk2Q52BAhih9s.3XRv62BAgMZ+VHDZpfeK.FVl38agfv
QE+V.PrIJ42BghMd+VHHZdbK+mHCEQ5oa8cNQjkCu+2lWWRzh3oKyJS90MPa
cdNYY+lFv7RChXaXC+Oj5FF8XvrY9rMS4cVPh2jvbRt6DLwRGWLzISq44nTA
zwACcpLwghfMVY1PpD1H1UPO.cbqLwYqMo6YqSExGBF9TQKWX18v+x1TU7w.
AepNOcBR1XTYrgffMjJiMGxQeqkS7zIOBl2yO+hebhDSASzm688nX9ihRqoO
Ofk+nnPd5w9uDrzdWQOdwSeLHMKV5h37BB9ZCK8572yuq+ePwkVkX
-----------end_max5_patcher-----------
</code></pre>
Web | Mobile | Audio
http://vedanamedia.com/
http://vedanamedia.com/
-
- Posts: 36
- Joined: Thu Jun 18, 2009 11:29 am
- Location: Germany
- Contact:
Re: Understanding Push's button color codes
For slow blinking (pulsating) you need to send the color(note) on midi channel 10.patrickstinson wrote:I am trying to get a button to pulse smoothly from bright green to the darkest green, sort of like fading opacity.
For fast blinking you need to send the note on midi channel 14.
Before that you need to send the base color on midi channel 0.
Found that out by experimenting. You can also take a look at my Bitwig script: https://github.com/git-moss/Push4Bitwig/
See the files Grid.js and Colors.js
-
- Posts: 168
- Joined: Thu Oct 13, 2011 5:01 am
- Location: Anchorage, Alaska
- Contact:
Re: Understanding Push's button color codes
darth_fader wrote:For slow blinking (pulsating) you need to send the color(note) on midi channel 10.patrickstinson wrote:I am trying to get a button to pulse smoothly from bright green to the darkest green, sort of like fading opacity.
For fast blinking you need to send the note on midi channel 14.
Before that you need to send the base color on midi channel 0.
Found that out by experimenting. You can also take a look at my Bitwig script: https://github.com/git-moss/Push4Bitwig/
See the files Grid.js and Colors.js
Woah, cool. I'll check out your code. So sending a code over midi implies that the fading and blinking functionality is built into Push or it's python script? I assume these values don't apply when using the control_surfaces Button_Matrix interface when using M4L (which is what I'm using)?
Again, I am surprised and impressed to get such feedback, I've been messing with this for months!
Web | Mobile | Audio
http://vedanamedia.com/
http://vedanamedia.com/
Re: Understanding Push's button color codes
The Mark Egloff pataches were from the Cycling 74 website from memory...
Cheers
D
Cheers
D
-
- Posts: 36
- Joined: Thu Jun 18, 2009 11:29 am
- Location: Germany
- Contact:
Re: Understanding Push's button color codes
It is in the Hardware.patrickstinson wrote: Woah, cool. I'll check out your code. So sending a code over midi implies that the fading and blinking functionality is built into Push or it's python script?
Only had a quick look some time ago. I guess they do the same internally.patrickstinson wrote: I assume these values don't apply when using the control_surfaces Button_Matrix interface when using M4L (which is what I'm using)?