macros:example:playbackgroupcreateadd
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
macros:example:playbackgroupcreateadd [2021/06/12 16:28] – icke_siegen | macros:example:playbackgroupcreateadd [2021/06/13 14:53] (current) – icke_siegen | ||
---|---|---|---|
Line 11: | Line 11: | ||
Playback Groups were introduced with Titan v13, January 2020. This functionality is not available in earlier versions. | Playback Groups were introduced with Titan v13, January 2020. This functionality is not available in earlier versions. | ||
+ | |||
+ | Gregory Haynes' | ||
This example is meant to show how Playback Groups are created, how playbacks are added, how the various parameters are conveyed, and which caveats need to be taken care of. Particular attention should be paid to setting IEnureables. | This example is meant to show how Playback Groups are created, how playbacks are added, how the various parameters are conveyed, and which caveats need to be taken care of. Particular attention should be paid to setting IEnureables. | ||
Line 19: | Line 21: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
+ | * [[: | ||
* [[: | * [[: | ||
==== affected properties ==== | ==== affected properties ==== | ||
* [[: | * [[: | ||
- | * [[: | + | * [[: |
- | + | ||
- | ==== control structures ==== | + | |
- | * [[macros: | + | |
===== Code ===== | ===== Code ===== | ||
Line 32: | Line 32: | ||
<?xml version=" | <?xml version=" | ||
< | < | ||
+ | |||
+ | <!-- 1 --> | ||
+ | <!-- adding playbacks selected by location to a new playback group --> | ||
<macro id=" | <macro id=" | ||
Line 42: | Line 45: | ||
<!-- the new PBG is also current as in PlaybackGroups.CurrentPlaybackGroup --> | <!-- the new PBG is also current as in PlaybackGroups.CurrentPlaybackGroup --> | ||
+ | |||
+ | <!-- 2 --> | ||
+ | <!-- adding playbacks selected by user numbers (string notation) to the current playback group --> | ||
<macro id=" | <macro id=" | ||
Line 48: | Line 54: | ||
</ | </ | ||
</ | </ | ||
+ | | ||
+ | <!-- 3 --> | ||
+ | <!-- adding a playback selected by its user number to the current playback group --> | ||
+ | <!-- this requires Playbacks.FilterByPlaybackHandle() to make sure it is a playback handle --> | ||
| | ||
<macro id=" | <macro id=" | ||
Line 54: | Line 64: | ||
</ | </ | ||
</ | </ | ||
+ | | ||
+ | <!-- 4 --> | ||
+ | <!-- adding a playback selected by its user number to a specific playback group selected by its user number --> | ||
+ | <!-- this requires the handle cast with a string (handle:" | ||
<macro id=" | <macro id=" | ||
Line 60: | Line 74: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | <!-- 5 --> | ||
+ | <!-- adding a playback selected by its user number to a specific playback group selected by its user number --> | ||
+ | <!-- this time the playback group is selected by pointing PlaybackGroups.CurrentPlaybackGroup to the user number --> | ||
| | ||
<macro id=" | <macro id=" | ||
Line 67: | Line 85: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | <!-- 6 --> | ||
+ | <!-- adding playbacks identified by their TitanID to the current playback group --> | ||
+ | <!-- No practical use as the TitanIDs are not really accessible --> | ||
| | ||
<macro id=" | <macro id=" | ||
- | < | ||
< | < | ||
< | < | ||
Line 83: | Line 104: | ||
This explains the functional steps within the sequence. For all the other XML details please refer to [[: | This explains the functional steps within the sequence. For all the other XML details please refer to [[: | ||
- | tbd | + | These macros were created in order to show various ways to specify single or multiple playbacks. Basically '' |
+ | * playback groups live only in their special window, hence there is no location to identify their handle | ||
+ | * you cannot set the playback group' | ||
+ | * selecting a playback group by its user number requires extra casting | ||
+ | * there are some ways to pass handles as list to the required IEnumerable however some details need to be watched | ||
+ | |||
+ | ==== Macro 1 ==== | ||
+ | Here the playbacks to be added to a new group are selected via SetSourceHandleRange which takes a handle group (window) and index - this operates always on the current page of this window, the index being 0-based. the set SourceHandleRange is then referenced as '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''" | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== Macro 2 ==== | ||
+ | |||
+ | Two playbacks, identified by their user numbers __in string notation__, are added to the current playback group. Note that this relies on the current playback group being set previously (creating it in the macro above makes it current). | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''" | ||
+ | |||
+ | ==== Macro 3 ==== | ||
+ | |||
+ | A playback identified by its user number __in standard notation__ is added to the current playback group (e.g. still current from previously being created, see above). As the playback' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== Macro 4 ==== | ||
+ | |||
+ | A playback identified by its user number (see [[#Macro 3]]) is added to a specific playback group. This is denoted by its user number which requires additional casting. | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''" | ||
+ | |||
+ | ==== Macro 5 ==== | ||
+ | |||
+ | A playback identified by its user number (see [[#Macro 3]]) is added to a specific playback group. This is denoted by pointing PlaybackGroups.CurrentPlaybackGroup to the user number of the playback group - no additional casting required, and the property PlaybackGroups.CurrentPlaybackGroup is set for future operations as well. | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''" | ||
+ | |||
+ | ==== Macro 6 ==== | ||
+ | |||
+ | **This macro has not been tested.** | ||
+ | |||
+ | Similar to [[#Macro 2]]. Two playbacks, identified by their TitanIDs, are added to the current playback group. Note that this relies on the current playback group being set previously (creating it in the macro above makes it current). As the TitanID is an internal thing and cannot be set manually nor predicted reliably is of limited use here. | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''" | ||
===== How to use it ===== | ===== How to use it ===== | ||
- [[: | - [[: | ||
+ | - macros 1~5 have successfully been tested - simply create some playbacks with the relevant user number and fire the macros to see how they work. However these macros might be useful only in special cases, e.g. in setup macros which prepare the console for you following a fixed scheme. | ||
+ | - macro 6 has not been tested as using TitanIDs in macros is only of limited use - it's not easy to determine or predict the TitanID of a particular item. | ||
- | tbd | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ |
macros/example/playbackgroupcreateadd.1623515335.txt.gz · Last modified: 2021/06/12 16:28 (external edit)