Move playback to original position/ID

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

Moderator: Moderators

daanvg98
Posts: 18
Joined: 08 Sep 2018, 13:46

Move playback to original position/ID

Postby daanvg98 » 20 Jan 2025, 10:23

Hi,

I've been struggling for a while to create a certain macro. I'll explain what I am trying to achieve.

I have let's say 5 different playbacks/cuelists which are located in my playback window. I have 1 fader free which I want to place those playbacks/cuelists on. I want to do this via a macro, so I can choose which playback/cuelist I want to have on this fader. Creating a macro that moves for example playback 1 to the fader isn't very difficult. But when I want to move the playback that is currently on the fader back to it's ORIGINAL position, that's when it gets diffecult.

I want to have a macro thats moves the playback that is stored on the fader, to it's original place/ID in the playback window.

Is this possible, or is there a different solution for this?

Thanks in advance!
icke_siegen
Posts: 1131
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Move playback to original position/ID

Postby icke_siegen » 20 Jan 2025, 15:45

Nice idea. I played a little bit with this but did not succeed - maybe Gregory can help.

- how do you identify the original playbacks? by their usernumber?
- maybe it's possible to adhere to some convention like 'the usernumber follows the location index' or so
- in any case there needs to be a way to get the location index (in order to store it somewhere), and get the usernumber (in order to use it as location index). But I didn't find a solution for both questions.
User avatar
Gregory
Posts: 1373
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Move playback to original position/ID

Postby Gregory » 23 Jan 2025, 21:59

Based on Sebastian's suggestion of identifying the original location with the user number I have come up with the following:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<avolites.macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Avolites.Menus.xsd">
  <macro id="Avolites.Macros.MoveBack" name="Move Back">
    <description>Move the playback from fader 10 back to the Playbacks window relative to its user number.</description>
    <sequence>
      <step condition="Handles.IsClaimed(location:('Playbacks', 10))">Handles.SetSourceHandleWithHighlight(location:("Playbacks", 10), false)</step>
      <step condition="Handles.IsClaimed(location:('Playbacks', 10))">Handles.MoveHandle(location:("Playbacks", 10), "PlaybackWindow", 0, int:string:Handles.CurrentUserNumber + 9, false)</step>
      <step>Handles.ClearSelection()</step>
    </sequence>
  </macro>
</avolites.macros>

This is based on playback fader 10 being the free fader that is used temporarily, change the location to whatever is required in your case. I had a memories starting with user number 1 on handle 11 (index: 10) onwards in the Playbacks window with the + 9 applying the desired offset i.e. index = userNumber + 9. If you had a much larger user number e.g. 101 you could subtract from that instead.

The Handles.SetSourceHandleWithHighlight() and corresponding Handles.ClearSelection() are just so that the Handles.CurrentUserNumber property is set to the user number of the playback we are interested in.

There isn't a straight cast conversion from user number to integer so instead it is being converted to a string first.

The Handles.IsClaimed(location:('Playbacks', 10)) isn't necessary but avoids an error occurring if playback fader 10 is empty. This might be useful if, instead of having this as a separate macro, these three steps were included at the beginning of a macro that was to move a playback onto fader 10 thus one macros could move whatever was currently there out of the way before moving something new (and not error out if the fader was empty).
daanvg98
Posts: 18
Joined: 08 Sep 2018, 13:46

Re: Move playback to original position/ID

Postby daanvg98 » 27 Jan 2025, 09:29

Hi,

Thanks for the reply. I'll test the macro when I've got the time.
daanvg98
Posts: 18
Joined: 08 Sep 2018, 13:46

Re: Move playback to original position/ID

Postby daanvg98 » 01 Feb 2025, 16:11

Hi guys,

The macro worked fantastic! Thank you for your help.
daanvg98
Posts: 18
Joined: 08 Sep 2018, 13:46

Re: Move playback to original position/ID

Postby daanvg98 » 01 Feb 2025, 17:53

Hi,

Is this also possible to do in the static playbacks and executors section? I use a Sapphire touch most of the time and want the same thing on the 19th button.

Who is online

Users browsing this forum: No registered users and 6 guests