ttelsal Posted June 8, 2019 Share Posted June 8, 2019 Excuse me if this is very obvious, but it isn't for me. In composer it allows for a command to be issued form both the press and release of a custom button. When you press, don't you always eventually release the button as well?. what does release mean? Quote Link to comment Share on other sites More sharing options...
C4 User Posted June 8, 2019 Share Posted June 8, 2019 Command is executed upon release rather than upon press. Quote Link to comment Share on other sites More sharing options...
ttelsal Posted June 8, 2019 Author Share Posted June 8, 2019 Thank you. I have done all my programming on the basis of Press. I don't understand why there is a press and release option? Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted June 8, 2019 Share Posted June 8, 2019 I’m not convinced that it is very useful for custom buttons (never tested to see how reliable pressing and holding is on a touchscreen) but I use this quite a bit on physical buttons (and one could theoretically do the same on custom buttons). My use case is to start a 3 second timer on press, stop it on hold and only activate the code when the timer expires. This can be used to give the button extra functionality or to stop inadvertent presses doing something you don’t want (e.g, setting off a panic signal). Quote Link to comment Share on other sites More sharing options...
ttelsal Posted June 8, 2019 Author Share Posted June 8, 2019 Got it thanks. I don't have physical buttons as I have control4 over a C Bus system. Also note you point re a timer. Interested in views on how this functionality has been best utilized. Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted June 8, 2019 Share Posted June 8, 2019 Press and release can be useful for doing things such as ramping volume. You can program it to start ramping up the volume when button pressed and then stop ramping up when button released. This gives you press and hold functionality rather than having to repeatedly hit the same button to raise the volume by several increments. Quote Link to comment Share on other sites More sharing options...
jlemonakis Posted June 13, 2019 Share Posted June 13, 2019 The other thing it could be used for other than stopping loops or executing is for UI reasons like changing the color of a button back to what it was or to the target color etc. Single tap executes on the release since it's defined as a press followed by a release. If you want something to be processed as fast as possible for example you would use on press so that it doesn't have to wait for the subsequent release to execute. Quote Link to comment Share on other sites More sharing options...
lukas.polivka Posted June 13, 2019 Share Posted June 13, 2019 I have actually used this in a private cinema to control adjustable (motorized) seats easily from their iPad. Two custom buttons - Up/Down. Up pressed → close Up relay → start moving; Up released → open Up relay → stop moving and so on. In their second cinema years later I used the 2 Relay Blind (OS2.9+) driver with Use Levels enabled so they can now set the seat position with 0-100% sliders without having to press & hold buttons. (The downside is that the controls are hidden under Shades.) Quote Link to comment Share on other sites More sharing options...
Cyknight Posted June 14, 2019 Share Posted June 14, 2019 On 6/8/2019 at 12:04 AM, South Africa C4 user said: never tested to see how reliable pressing and holding is on a touchscreen Works quite well actually, though it'll be device dependent as well of course. In basic terms, Lukas' example is probably the best. In general terms, prees and release are used to START something on press, then STOP that same thing upon release. Basic examples are aplenty above. Another options it to indeed make something require a 'press and hold for x seconds' setup. Example: Timer is 2 seconds not repeating WHEN button is pressed START timer WHEN button is released IF timer IS NOT running Execute scene ALL LIGHTS OFF This would be used to ensure you have to press and hold a button for 2 seconds to shut off all the lights (preventing accidental shut-offs) Quote Link to comment Share on other sites More sharing options...
ttelsal Posted June 14, 2019 Author Share Posted June 14, 2019 Thank you everybody I have found all the examples very useful. As a further query, as I don’t have physical buttons (ie Control 4 over CBus) and hence all my switching control has to be performed by the dealer, are there any ideas or examples on how I could replicate the press and release capability on my current switches. Ie using Light State or other variable. Trust I’ve explained that clearly enough. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.