Release playback from playback window and Change icon of the macro (Dynamic color grid)

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

Moderator: Moderators

Synergie
Posts: 5
Joined: 21 Jun 2018, 21:27

Release playback from playback window and Change icon of the macro (Dynamic color grid)

Postby Synergie » 21 Jun 2018, 22:12

Hey,

Got 2 questions at once.

got the following i want to do.

if i hit Macro A , then i release a playback in the playback window (lets call him 2) and activate pb 1, if i hit macro B i release playback 1 (from the playback window) and activate 2
got that recorded in the software and it came out working like this (i got 8 PB's in the playback window)

Macro A

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <!-- Automatically exported from test macro - Titan Mobile;Titan Console 11.0.51.5 (SYNERGIE) on 21/06/2018 21:35:49. -->
  <macro id="UserMacro.Macro8">
    <name>Spots Wit</name>
    <sequence>
      <step>Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1002)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1002)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1003)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1003)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1004)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1004)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1005)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1005)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1006)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1006)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1007)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1007)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1008)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1008)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1009)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1009)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1001)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1001)</step>
    </sequence>
  </macro>
</avolites.macros>


and macro B

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<avolites.macros>
  <!-- Automatically exported from test macro - Titan Mobile;Titan Console 11.0.51.5 (SYNERGIE) on 21/06/2018 21:35:49. -->
  <macro id="UserMacro.Macro8">
    <name>Spots Rood</name>
    <sequence>
      <step>Menu.Stack.PushOrReloadMenu("Primary", "Expert.Root.Program")</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1001)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1001)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1003)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1003)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1004)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1004)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1005)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1005)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1006)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1006)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1007)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1007)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1008)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1008)</step>
      <step>Menu.InjectInput("OnButtonDown","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonUp","Release.0","NoGroup",0)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1009)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1009)</step>
      <step>Menu.InjectInput("OnButtonDown","PlaybackTouch","PlaybackWindow",1002)</step>
      <step>Menu.InjectInput("OnButtonUp","PlaybackTouch","PlaybackWindow",1002)</step>
    </sequence>
  </macro>
</avolites.macros>


now i looked at the API and i know for sure this can be simplified with use of the API, i just cannot get a firm grasp on what to use where.
i'm searching in the direction of the following for releasing them.

Code: Select all

<step>Playbacks.ReleasePlaybacksByGroup(0, false, "PlaybackWindowUN=1001", ????? )</step>

Am i in the right direction or completely off?
and than i've no clue on how to activate the Playback i want

Now to stage 2 of my question.

is it possible to change the Picture legend (Icon) of those macro's i hit?

e.g. if i hit macro A then the picture changes on B and visa versa

i'm sure i need to use

Code: Select all

Handles.SetIcon(135)

but i can't figure out how to get the desired macro as the handle object to set the Icon


Anyhow to set this in perspective. i've given myself the challenge to make a dynamic color grid. i made one on MA2 and i'm convinced its also possible in avolites titan. well it for sure is but i'm just struggeling to get it as clean ass possible.
if you got any suggestion of the color grid or the methodology i'm tying to use , feel free to enlighten me with your knowledge :).

Thanks in advance !
Last edited by Synergie on 28 Jun 2018, 23:11, edited 1 time in total.
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro

Postby sideshowbond » 21 Jun 2018, 22:38

Code: Select all

    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, false)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, false)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, false)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, false)</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step>
   </sequence>

releases playbacks 1 to 4 in 0 seconds (false means it ignores the master release time, true seems to ignore it too...) and then fires PB1 (1 means at 100%, 50% would be 0.5, true means it would refire if it was running while firing the macro).

So much for stage 1.
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro

Postby sideshowbond » 21 Jun 2018, 23:31

not sure about pictures but you can highlight handles (the way they look like when being copied or moved) via macro

I like cascading macros so the way I'd combine the 2 looks like this

Code: Select all

<macro id="adb.Macros.test.firepb1" name="adb_test_fire PB1">
    <description>Releases 1-4, fires 1, highlights handle</description>
    <sequence>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.clearhandlehighlight")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step>
      <step>Handles.HighlightHandle(handle:"Location=PlaybackWindow,1,6")</step>
   </sequence>
</macro>

<macro id="adb.Macros.releaseplaybacks" name="adb_release Playbacks">
    <description>releases Playback 1-4</description>
    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, true)</step>
   </sequence>
</macro>

<macro id="adb.Macros.clearhandlehighlight" name="adb_clear handle highlight">
    <description>clears handle highlight</description>
    <sequence>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,6")</step>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,7")</step>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,8")</step>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,9")</step>
   </sequence>
</macro>


Macro no 2&3 are being triggered by the first macro.
I'm not sure if you can highlight handles by user numbers.

As for SetIcon I don't know what iconId exactly refers to. It's probably a name of some sort but I'm not sure yet which exactly
icke_siegen
Posts: 1087
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Release playback from playback window and Change icon of the macro

Postby icke_siegen » 22 Jun 2018, 13:41

SetIcon() expects an integer ID of the icon (graphic legend) which is show-specific. Not really handy, I'd say.

Personally I'd go with Alex' solution and use highlightHandle(). Another option would be to set the halo, see http://www.avolites.de/wiki/macros:example:sethalo.
Synergie
Posts: 5
Joined: 21 Jun 2018, 21:27

Re: Release playback from playback window and Change icon of the macro

Postby Synergie » 22 Jun 2018, 23:04

sideshowbond wrote:not sure about pictures but you can highlight handles (the way they look like when being copied or moved) via macro

I like cascading macros so the way I'd combine the 2 looks like this

Code: Select all

<macro id="adb.Macros.test.firepb1" name="adb_test_fire PB1">
    <description>Releases 1-4, fires 1, highlights handle</description>
    <sequence>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.clearhandlehighlight")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step>
      <step>Handles.HighlightHandle(handle:"Location=PlaybackWindow,1,6")</step>
   </sequence>
</macro>

<macro id="adb.Macros.releaseplaybacks" name="adb_release Playbacks">
    <description>releases Playback 1-4</description>
    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, true)</step>
   </sequence>
</macro>

<macro id="adb.Macros.clearhandlehighlight" name="adb_clear handle highlight">
    <description>clears handle highlight</description>
    <sequence>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,6")</step>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,7")</step>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,8")</step>
      <step>Handles.ClearHighlight(handle:"Location=PlaybackWindow,1,9")</step>
   </sequence>
</macro>


Macro no 2&3 are being triggered by the first macro.
I'm not sure if you can highlight handles by user numbers.

As for SetIcon I don't know what iconId exactly refers to. It's probably a name of some sort but I'm not sure yet which exactly


You sir, are a genius, you opened a new world on to how to use the API :D Thanks
a small question tho, the - pause="0.001" - is it nessecary or why is it used here

icke_siegen wrote:SetIcon() expects an integer ID of the icon (graphic legend) which is show-specific. Not really handy, I'd say.

Personally I'd go with Alex' solution and use highlightHandle(). Another option would be to set the halo, see http://www.avolites.de/wiki/macros:example:sethalo.


I like the idea idea of using the halo's than the highlight, thanks Icke for the suggestion. Is it also possible i can *Highlight* the *active* macro by its UserNumber ? because i want to make this sequence for different fixture types (spots, washes, led strips , Video , ... ) and if i don't use a certain type i just move it out of view. but in the example of Alex it triggers on the place it is in the playback window

i've tried something but i think i'm off again. so the *released* playbacks/macro's have a black halo and the *active* pb/macro has a white one. so i have for the usernumbers pb -> 1,2,3,4 with my colors => and macro's -> 5,6,7,8 respectively

Code: Select all

<macro id="adb.Macros.test.firepb1" name="adb_test_fire PB1">
    <description>Releases 1-4, fires 1, highlights handle</description>
    <sequence>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.SetHaloBlack")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step>
      <step>UserMacros.SetCurrentMacroFromUserNumber(5)</step>
      <step>Handles.SetSourceHandleFromHandle("UserMacros.CurrentMacroId")</step>
      <step>Handles.SetPendingHaloToSystemColour("White")</step>
   </sequence>
</macro>

<macro id="adb.Macros.releaseplaybacks" name="adb_release Playbacks">
    <description>releases Playback 1-4</description>
    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, true)</step>
   </sequence>
</macro>

<macro id="adb.Macros.SetHaloBlack" name="adb_Set Halos Black">
    <description>clears handle highlight</description>
    <sequence>
          <step>UserMacros.SetCurrentMacroFromUserNumber(5)</step>
      <step>Handles.SetSourceHandleFromHandle("UserMacros.CurrentMacroId")</step>
      <step>Handles.SetPendingHaloToSystemColour("Black")</step>
      <step>UserMacros.SetCurrentMacroFromUserNumber(6)</step>
      <step>Handles.SetSourceHandleFromHandle("UserMacros.CurrentMacroId")</step>
      <step>Handles.SetPendingHaloToSystemColour("Black")</step>
      <step>UserMacros.SetCurrentMacroFromUserNumber(7)</step>
      <step>Handles.SetSourceHandleFromHandle("UserMacros.CurrentMacroId")</step>
      <step>Handles.SetPendingHaloToSystemColour("Black")</step>
      <step>UserMacros.SetCurrentMacroFromUserNumber(8)</step>
      <step>Handles.SetSourceHandleFromHandle("UserMacros.CurrentMacroId")</step>
      <step>Handles.SetPendingHaloToSystemColour("Black")</step>
   </sequence>
</macro>
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro

Postby sideshowbond » 23 Jun 2018, 02:57

two things before I go to bed, I'll have a closer look tomorrow:
- It appears that you need

Code: Select all

Handles.SetHalo()
(Set all the source handles to the pending halo) as well so it would be

Code: Select all

<step>Handles.SetPendingHaloToSystemColour("Black")</step>
      <step>Handles.SetHalo()("Black")</step>


Also there is a thread about SetSourceHandle...going with what I found it would be

Code: Select all

<step>Handles.SetSourceHandleFromHandle("macroHandleUN=5")</step>


so the whole code could look something like this

Code: Select all

<step>Handles.SetSourceHandleFromHandle("macroHandleUN=5")</step>
<step>Handles.SetPendingHaloToSystemColour("Black")</step>
<step>Handles.SetHalo()</step>


Not sure if this works, I'll try tomorrow (or later rather, it's 4am here) and see what happens
Synergie
Posts: 5
Joined: 21 Jun 2018, 21:27

Re: Release playback from playback window and Change icon of the macro

Postby Synergie » 23 Jun 2018, 08:19

sideshowbond wrote:two things before I go to bed, I'll have a closer look tomorrow:
- It appears that you need

Code: Select all

Handles.SetHalo()
(Set all the source handles to the pending halo) as well so it would be

Code: Select all

<step>Handles.SetPendingHaloToSystemColour("Black")</step>
      <step>Handles.SetHalo()("Black")</step>


Also there is a thread about SetSourceHandle...going with what I found it would be

Code: Select all

<step>Handles.SetSourceHandleFromHandle("macroHandleUN=5")</step>


so the whole code could look something like this

Code: Select all

<step>Handles.SetSourceHandleFromHandle("macroHandleUN=5")</step>
<step>Handles.SetPendingHaloToSystemColour("Black")</step>
<step>Handles.SetHalo()</step>


Not sure if this works, I'll try tomorrow (or later rather, it's 4am here) and see what happens

good night man :) big thanks for your help so far.
So something like this for the enitre macro than ?

Code: Select all


<macro id="adb.Macros.test.firepb1" name="adb_test_fire PB1">
    <description>Releases 1-4, fires 1, highlights handle</description>
    <sequence>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step pause="0.001">UserMacros.RecallMacroById("adb.Macros.SetHaloBlack")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=5")</step>
      <step>Handles.SetPendingHaloToSystemColour("White")</step>
      <step>Handles.SetHalo()</step>
       <step>Handles.ClearSelection()</step>
   </sequence>
</macro>

<macro id="adb.Macros.releaseplaybacks" name="adb_release Playbacks">
    <description>releases Playback 1-4</description>
    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, true)</step>
   </sequence>
</macro>

<macro id="adb.Macros.SetHaloBlack" name="adb_Set Halos Black">
    <description>clears handle highlight</description>
    <sequence>
       <step>Handles.SetSourceHandleFromHandle("macroHandleUN=5")</step>
   <step>Handles.SetPendingHaloToSystemColour("Black")</step>
   <step>Handles.SetHalo()</step>
   <step>Handles.SetSourceHandleFromHandle("macroHandleUN=6")</step>
   <step>Handles.SetPendingHaloToSystemColour("Black")</step>
   <step>Handles.SetHalo()</step>
   <step>Handles.SetSourceHandleFromHandle("macroHandleUN=7")</step>
   <step>Handles.SetPendingHaloToSystemColour("Black")</step>
   <step>Handles.SetHalo()</step>
   <step>Handles.SetSourceHandleFromHandle("macroHandleUN=8")</step>
   <step>Handles.SetPendingHaloToSystemColour("Black")</step>
   <step>Handles.SetHalo()</step>
   <step>Handles.ClearSelection()</step>
   </sequence>
</macro>

User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro

Postby sideshowbond » 23 Jun 2018, 11:25

right, so the code to change the halo

Code: Select all

    <sequence>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=6")</step>
      <step>Handles.SetPendingHaloToSystemColour("Yellow")</step>
      <step>Handles.ClearSelection()</step>
   </sequence>


use

Code: Select all

http://localhost:4430/titan/script/2/Handles/HaloSystemColours
to retrieve system colours from Titan. though they will be the same as these:
0 "Blue"
1 "Brown"
2 "Cyan"
3 "Green"
4 "Light Green"
5 "Orange"
6 "Red"
7 "Red Violet"
8 "Violet"
9 "Yellow"

No black or white which we will find out next how to set that
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro

Postby sideshowbond » 23 Jun 2018, 11:29

At the moment it is not possible to set the halo to a random RGB colour, as the halo property is of type AcwColour and there is no automatic conversion. Hence, the only option is to use the available system colours which are Red, Orange, Brown, Yellow, Green, Light Green, Blue, Cyan, Violet, Red Violet.
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro

Postby sideshowbond » 23 Jun 2018, 13:25

here we go

Code: Select all

<macro id="adb.Macros.solopb1" name="adb solo PB1">
    <description>Releases 1-4, fires 1, highlights handle</description>
    <sequence>
      <step>UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step>UserMacros.RecallMacroById("adb.Macros.removehalo")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 1, 1, true)</step> <!-- (User Number, level, always refire) -->
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=1")</step>
      <step>Handles.SetPendingHaloToSystemColour("Yellow")</step>
      <step>Handles.ClearSelection()</step>
      </sequence>
</macro>

<macro id="adb.Macros.solopb2" name="adb solo PB2">
    <description>Releases 1-4, fires 2, highlights handle</description>
    <sequence>
      <step>UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step>UserMacros.RecallMacroById("adb.Macros.removehalo")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 2, 1, true)</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=2")</step>
      <step>Handles.SetPendingHaloToSystemColour("Yellow")</step>
      <step>Handles.ClearSelection()</step>
      </sequence>
</macro>

<macro id="adb.Macros.solopb3" name="adb solo PB3">
    <description>Releases 1-4, fires pb3, highlights handle</description>
    <sequence>
      <step>UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step>UserMacros.RecallMacroById("adb.Macros.removehalo")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 3, 1, true)</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=3")</step>
      <step>Handles.SetPendingHaloToSystemColour("Yellow")</step>
      <step>Handles.ClearSelection()</step>
   </sequence>
</macro>

<macro id="adb.Macros.solopb4" name="adb solo PB4">
    <description>Releases 1-4, fires pb4, highlights handle</description>
    <sequence>
      <step>UserMacros.RecallMacroById("adb.Macros.releaseplaybacks")</step>
      <step>UserMacros.RecallMacroById("adb.Macros.removehalo")</step>
      <step>Playbacks.FirePlaybackAtLevel(userNumber: 4, 1, true)</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=4")</step>
      <step>Handles.SetPendingHaloToSystemColour("Yellow")</step>
      <step>Handles.ClearSelection()</step>
   </sequence>
</macro>

<macro id="adb.Macros.releaseplaybacks" name="adb release Playbacks">
    <description>releases Playback 1-4</description>
    <sequence>
      <step>Playbacks.ReleasePlayback(userNumber: 1, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 2, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 3, 0, true)</step>
      <step>Playbacks.ReleasePlayback(userNumber: 4, 0, true)</step>
   </sequence>
</macro>

<macro id="adb.Macros.removehalo" name="adb remove halo">
    <description>set halo</description>
    <sequence>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=1")</step>
      <step>Handles.RemoveHalo()</step>
      <step>Handles.ClearSelection()</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=2")</step>
      <step>Handles.RemoveHalo()</step>
      <step>Handles.ClearSelection()</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=3")</step>
      <step>Handles.RemoveHalo()</step>
      <step>Handles.ClearSelection()</step>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=4")</step>
      <step>Handles.RemoveHalo()</step>
      <step>Handles.ClearSelection()</step>
   </sequence>
</macro>

<macro id="adb.Macros.sethaloyellow" name="adb set halo yellow">
    <description>set halo</description>
      <!-- "Black" or "White" removes halos from handles, only system colours available -
      "Blue","Brown", "Cyan", "Green", "Light Green", "Orange", "Red", "Red Violet", "Violet", "Yellow" -->
    <sequence>
      <step>Handles.SetSourceHandleFromHandle("macroHandleUN=1")</step>
      <step>Handles.SetPendingHaloToSystemColour("Yellow")</step>
      <step>Handles.ClearSelection()</step>
   </sequence>
</macro>


If you want a different colour for unactive playbacks/macros just change the "remove halo" macro. Also I'd rename the whole lot ignoring the 'adb' bit. Tese are my initials and I only use them to find my own macros a little quicker :)

I am trying to figure out the arguments on SetSourceHandleRange or SetSourceHandleRangeFromHandles . That would definitely make the release and remove halo macros a little bit more clearly laid out.

Also in theory you should be able to unassign the playback handles so they only appear in the library but not on any workspace window (they still keep their user number reference)

Have fun :)
Synergie
Posts: 5
Joined: 21 Jun 2018, 21:27

Re: Release playback from playback window and Change icon of the macro

Postby Synergie » 28 Jun 2018, 23:08

Hey guys,

First off all a big thanks for helping me with this. i managed to get this implemented and will do an update once i get it really dailed in the way i like ;)

Screen shot -> https://pasteboard.co/Hs2M4Hd.png

Anyhow i did a small show yesterday on these macro's and i noticed something weird, when i switch colors it promptly goes to white then the selected color, its just for half a second. it basically looks like a white flash in between color switch.
Wich can be super cool if you're working with only LED lights but for color wheel fixtures it looks weird if it tries to jump 5 colors too white and back to the color you choose.

For fixing this i think its just a matter of changing the order of steps and modify the release.

to give an example for 1 color for the spot fixture in steps.
1- remove Halo from the spots macro's (can be a cascaded macro)
2- fire selected playback
3- Release all other playbacks except the one you selected
4- set halo on playback

the cascading macro's @sideshowbond suggested are a really clean and neat. but i think the release all pb's first then next fire the new one. Is the problem causing the fixtures revert back to white in between the time of switching.
Lets call it a bug that translate to your rig , but a useful bug , if you want white flashes in between color change, so gonna definitely keep the V1 Macro for the more EDM/live DJ shows :D

once i get done how i want it i'll keep updating this , also if i run into Issues.



Side note:
you can see in the screenshot. i like to "dress up' my screen, is there a more clan way to do this without making empty playbacks for legends i designed?
icke_siegen
Posts: 1087
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Release playback from playback window and Change icon of the macro (Dynamic color grid)

Postby icke_siegen » 29 Jun 2018, 07:39

I guess you are totally right it's the release all -- do something else -- fire another playback which makes for this white flash. And you have made exactly the correct solution (fire this playback then release the others). Maybe you want to add one 'release all' macro, to release all these playbacks in the end.
Synergie
Posts: 5
Joined: 21 Jun 2018, 21:27

Re: Release playback from playback window and Change icon of the macro (Dynamic color grid)

Postby Synergie » 29 Jun 2018, 11:29

icke_siegen wrote:I guess you are totally right it's the release all -- do something else -- fire another playback which makes for this white flash. And you have made exactly the correct solution (fire this playback then release the others). Maybe you want to add one 'release all' macro, to release all these playbacks in the end.


Good suggestie to keep the release all.

Amy Idea in the "pump.my view" Idea. OR is Just empty playbacks with fancy legend the way to go here.

My MA 2 view looks something like This now. http://consoletraining.com/wp-content/u ... xample.jpg
Since i grow to like the avo desks more i really want to make IT my own :p any suggestions ?
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Release playback from playback window and Change icon of the macro (Dynamic color grid)

Postby sideshowbond » 29 Jun 2018, 23:05

funnily enough I am building a view like that in MA right now :)

No, on an Avo there is no window that you can manipulate like Layout View on the MA. Tha would be a thing for proper WebAPI. But seeing as that should theoretically internally work on a console too it could be done (on an external touch screen e.g.). There you could probably implement the changing of icons as well as you could code that outside of Titan. Saying that that is beyond my skills...

To be honest I only tried this with empty playbacks. Too lazy to program something in :)

If you were to switch the order around you fire a playback then release it straight after using 'release all'. One way could be using priorities. Setting a higher priority to the playback being fired and using a 'release by priority' instead of release all could do the trick. Ideally using low priority for the playbacks to be release in order not to release any other stuff that's running.

I'll get my head round it at some point, I have to finish my MA file first though.
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Release playback from playback window and Change icon of the macro (Dynamic color grid)

Postby kimwida » 23 Jan 2019, 16:25

Code: Select all

<step pause="0.01">Handles.SetSourceHandleFromHandle(handle:"Location=Colours,1,3")</step>
<step pause="0.01">Handles.SetIcon(Math.Cast.ToInteger(Handles.GetIconId(handle:"Location=Colours,1,1")))</step>
<step pause="0.01">Handles.ClearSelection()</step>


For your information, you can copy palette icon from 1 page 1 slot palette to 1 page 3 slot palette with this code.
It's very useful to make some dummy palettes for colour icon reference and to use them for icon copy.

Who is online

Users browsing this forum: No registered users and 16 guests