TPC Button activate/release

Hello all,

Trying to program my TPC. FOr now I have one issue:

My page has three buttons: A, B and C. It should not be possible to activate 2 buttons at the same time. The property "Actuation" is set to "Maintened" for all buttons.

 

Example:

User presses Button A.

Button A is active, timeline A starts.
User presses Button B.
Button A and timeline A should release automatically.
Button B is active, timeline B starts

I can start and stop the timeline using the triggers and scripts. What should I do to release the buttons?

Thanks in advance,

Dennis

 

  • First of all, you want the "Momentary" actuation.

    "Momentary" means "Do a thing when button is pressed"
    "Maintained" means "Do Thing A when the buttons is pressed the first time, and Thing B when it is pressed the second time".

    Secondly, to indicate status of things like Timelines you want to change the "State" of the button.
    To do this, create a trigger that uses the "Set TPC Control State" action.

    Eg Button 001 drives Timeline A.
    Create three triggers:

    1. TPC Button > "Button001" is clicked > Start Timeline A, Release Timeline B, Release Timeline C
    2. Timeline Started > "Timeline A" > Set TPC Control State "Button001" state "Red"
    3. Timeline Released > "Timeline A" > Set TPC Control State "Button001" state Default

    Now repeat for the other three timelines, making sure to change which button is used to start them and which button changes "Control State" when the timeline starts or stops.

  • Richard is spot on on  this. There is a slightly easier way to track button status though. We have to make an assumption here first though.  The key field for the button in TouchEditor is "key" here. By default TouchEditor uses the following syntax for button keys: The word "button" followed by a three digit number.

    Now the  assumption that we have to make is that the following is true

    • button001 controls Timeline 1
    • button002 controls Timeline 2
    • button003 controls Timeline 3
    • button004 controls Timeline 4

    and so on.

    once this relationship is established we can to the following:

    1. Create a Timeline Started trigger
    2. Set Timeline in the Parameters section to Any
    3. Add a Set TPC Control State action
    4. Set the Controller to 1 (typically)
    5. In the Control field in the Parameters section type the following: button<3d>
    6. Set the State drop down to your preferred On color (typically green or red)
    7. Create a Timeline Released trigger
    8. Set Timeline in the Parameters section to Any
    9. Add a Set TPC Control State action
    10. Set the Controller to 1 (typically)
    11. In the Control field in the Parameters section type the following: button<3d>
    12. Set the State drop down to your preferred Off color (typically default)

    Now whenever a timeline is turned on the associated button will turn on and then the timeline in released it will turn off.

    So what is this actually doing?

    1. Anytime a timeline is started or stopped one of these triggers will be fired
    2. When that trigger is fired a number will be captured as a variable.
      1. For example if Timeline 15 is fired the number 015 will be captured
    3. That number is then injected into our Set TPC Control State action using button<3d>
      1. following our example: button<3d> becomes button015

          

Related