Can the wheels itself be triggered?

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

icke_siegen
Posts: 1087
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Can the wheels itself be triggered?

Postby icke_siegen » 10 Apr 2019, 11:17

I tried to extend the trigger possibilities.

Various program buttons can be triggerd via a macro, like this:

Code: Select all

  <macro id="Macros.ButtonTrigger.Record" name="Button Record">
    <sequence>
      <step pause="0.001">Menu.InjectInput("OnButtonDown","Record.0","NoGroup",0)</step>
      <step pause="0.001">Menu.InjectInput("OnButtonUp","Record.0","NoGroup",0)</step>
    </sequence>
  </macro>


However, i cannot find a way to wardware-trigger the wheels. Here is what I am trying:

Code: Select all

  <macro id="Macros.Wheels0Trigger.Changed" name="Wheels 0 Changed">
    <sequence>
      <step pause="0.001">Menu.InjectInput("OnValueChanged","Wheels.0","NoGroup",0)</step>
    </sequence>
  </macro>
 
  <macro id="Macros.Wheels0Trigger.Previous" name="Wheels 0 Previous">
    <sequence>
      <step pause="0.001">Menu.InjectInput("OnStepPrevious","Wheels.0","NoGroup",0)</step>
    </sequence>
  </macro>
 
  <macro id="Macros.Wheels0Trigger.Next" name="Wheels 0 Next">
    <sequence>
      <step pause="0.001">Menu.InjectInput("OnStepNext","Wheels.0","NoGroup",0)</step>
    </sequence>
  </macro>


The first one at least tells the software that something 'touched the wheel'. But I cannot find a way to actually change a wheel's value with a macro. Is there a way to do this?
User avatar
mad-leo-kitten
Posts: 14
Joined: 19 Feb 2019, 21:46
Contact:

Re: Can the wheels itself be triggered?

Postby mad-leo-kitten » 10 Apr 2019, 11:37

Im using the inject inpit version for my Offset macro (reealy shaky :roll:) but it works in most of the cases :mrgreen:

Code: Select all

Menu.InjectInput("OnButtonDown","WheelView","At",2); Menu.InjectInput("OnButtonDown","NumericKeys","",9); Menu.InjectInput("OnButtonDown","NumericKeys","",0); Menu.InjectInput("OnSelect","Softkey","NoGroup",0);


does this help ^^?
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Can the wheels itself be triggered?

Postby Gregory » 10 Apr 2019, 15:56

If you want to simulate wheel inputs directly you can use the InjectValueChangeInput function:

Code: Select all

Menu.InjectValueChangeInput("Wheels.2", "NoGroup", 2, 0.5, 0.0)

In this this case both 2s are the wheel index (zero-based) and 0.5 is the amount the wheel has moved by, as far as I know this doesn't have any real world value and does not equate to the value change of the attribute etc. on the wheel.

For some wheel values you would need to also inject the OnStepNext or OnStepPrevious, one example of this would be shape spread:

Code: Select all

Menu.InjectInput("OnStepNext", "Wheels.1", "NoGroup", 1)

In this case it will step up or down a single value.

In some cases it might be better to call the function for the specific area, such as Editor.Shapes.IncrementWheelParameter, they pretty much all share the same name and there is a corresponding IncrementWheelParameterFast function for when the Avo button is pressed. Although these will still need a fixture/shape to be selected for editing.

It may be more reliable where possible to get values directly, rather than depend on shapes/fixtures/attributes being selected and on the expected wheels and use functions such as SetShapeProperty:

Code: Select all

Editor.Shapes.SetShapeProperty(1891, "Size", double:0.5)

This does depend on knowing the Titan ID for the shape. This has the potential to work for both values in the programmer and for values already recorded into playbacks and is less prone to problems related to running macros full speed.

Who is online

Users browsing this forum: No registered users and 17 guests