Macros are used to retrieve metadata from programs and playlist items in Cinegy Air PRO to be substituted for the Cinegy Type text objects values.

This can be very useful for scenarios like "Coming next" or "Now playing".

Syntax

General Macro Syntax

The general macro code syntax is as follows:

${<source>`.<data>}

where:

<source> – specifies the container/item type to retrieve the specified metadata from. Playlist items and programs are currently supported.

<data> – specifies the metadata field to retrieve the data from. The following fields are supported: name, description, comment (for items), and start time.

For example:

${program.name}

The item or program start time macro is available in several variants:

${source.time} – show hours and minutes (the same macro as .time.hm)

${source.time.h} – show hours only

${source.time.hm} – show hours and minutes

${source.time.hms} – show hours, minutes, and seconds

It is possible to specify the relative number of the container/item, from which the data should be retrieved, in the following format:

<source+n>

where n is any positive number for programs. For items, this value can only equal 1.

Specifying the <source> parameter is not obligatory. When it is not specified, the data will be retrieved from the item.

For example:

${description}

In this case, the macro will return the item description.

Custom Metadata in Macros

Custom metadata fields are also supported. For example, to retrieve the value of the "Notes" custom field for the specified item, the syntax should be as follows:

${item.Notes}
Important
Refer to the Custom Metadata paragraph in the Cinegy Air Manual for more details on working with custom metadata fields.

Countdown Macros

The countdown macro links the start time of a countdown timer to a specific date and time (i.e. New Year).

For example, to show the countdown to January 1, 2017, the macro syntax is as follows:

${date(2017.01.01).countdown}

To show the countdown accurate within seconds, the macro syntax is as follows:

${date(2017.01.01 00:00:00).countdown}

The time format can be hh:mm:ss (the output is, for example, 27:43:01), mm:ss (i.e. 1663:01), or ss (i.e. 99781).

The step-by-step description of how to apply the countdown macros is given below.

Numeric Clock Macros

Cinegy Type provides a number of macros for customizing the clocks and countdowns display.

The following table contains macros that can be used for "Stopwatch", "Countdown", and "Countdown To Date" clock type:

Macro Description

{$yy}

displays the full number of years in the current value

{$dd}

displays the full number of days in the current value

{$d}

displays the truncated number of days (from 0 to 30)

{$MM}

displays the full number of months in the current value

{$M}

displays the truncated number of months (from 0 to 11)

{$hh}

displays the full number of hours in the current value

{$h}

displays the truncated number of hours (from 0 to 23)

{$mm}

displays the full number of minutes in the current value

{$m}

displays the truncated number of minutes (from 0 to 59)

{$ss}

displays the full number of seconds in the current value

{$s}

displays the truncated number of seconds (from 0 to 59)

For example: "{$dd} days are left until the Olympic Games" will be translated to "1023 days are left until the Olympic Games".

"{$hh} hours {$m} minutes {$s} seconds are left until the New Year!" will be translated to "285 hours 47 minutes 25 seconds are left until the New Year!".

"Time used by Team A: {$ss} seconds" will be translated to "Time used by Team A: 183 seconds".

The following table contains macros that can be used for "Day time" clock type:

Macro Description

{$h}

displays the current hours value without a preceding zero (from 0 to 23 or 1-12 AM/PM, depending on the settings)

{$hh}

displays the current hours value with a preceding zero (from 0 to 23 or 01-12 AM/PM, depending on the settings)

{$m}

displays the current minutes value without a preceding zero (from 0 to 59)

{$mm}

displays the current minutes value with a preceding zero (from 0 to 59)

{$s}

displays the current seconds value without a preceding zero (from 0 to 59)

{$ss}

displays the current seconds value with a preceding zero (from 0 to 59)

{$d}

displays the current day as a number with no preceding zero (1 to 31)

{$dd}

displays the current day as a number with a preceding zero (01 to 31)

{$ddd}

displays the abbreviated localized day name (e.g. 'Mon' to 'Sun'). The system locale is used for name localization.

{$dddd}

displays the long localized day name (e.g. 'Monday' to 'Sunday'). The system locale is used for name localization.

{$M}

displays the current month as a number with no preceding zero (1-12)

{$MM}

displays the current month as a number with a leading zero (01-12)

{$MMM}

displays the abbreviated localized month name (e.g. 'Jan' to 'Dec'). The system locale is used for name localization.

{$MMMM}

displays the long localized month name (e.g. 'January' to 'December'). The system locale is used for name localization.

{$yy}

displays the current year as a two digit number (00-99)

{$yyyy}

displays the current year as a four digit number

For example: "Today is: {$dddd} {$dd}.{$MM}.{$yyyy}" will be translated to "Today is: Wednesday 31.12.2016".

Additional macros for time:

{$AP} or {$A} - displays either "AM" or "PM";

{$ap} or {$a} - displays either "am" or "pm".

It is possible to combine macros, e.g. {$h:m:s AP} leads to "3:34:26 PM"; {$h ap} leads to "3 pm".

Note
Please use only "{$h ap}" instead of "{$h} {$ap}" if the system locale set to display hours in the 24-hour format; otherwise, it will lead to incorrect display for hours starting from 13, e.g. "15 pm".

Combination of the {$h}:{$m}:{$s} macros can be simplified to {$h:m:s}; both variants will lead to same time format display, for example: "15:34:26".

The step-by-step description of how to apply date/time macros in custom clocks is given below.

Applying General Macros

Macro code is entered in the text value of the text object in the Cinegy Type template.

To add a macro, follow the steps:

  1. Add a text object and in the "Text" field of the "Geometry" tab enter the macro code according to the general macro syntax described above.

    Macros_text_value
  2. Link this text to a new variable:

    Macros_text_linking
  3. Make this newly created variable available for export by selecting the "Export" checkbox:

    Macros_export_variable
  4. Edit the Type scene according to your needs and save it.

  5. Select the desired item in the Cinegy Air PRO playlist, and use the external commands panel context menu to assign a Cinegy Type CG scene display on the specified layer:

    Macros_add_CG_template
  6. In the "Type Template Browser" dialog box that appears, select your Type scene in the "Repository" field. The macro code in the "Template parameters" table will be changed to the corresponding field data value:

    Macros_in_template_brow_fmt

Applying Countdown Macros

Follow the steps to create the Cinegy Type template with the countdown to the specified date/time and enable its display in the Cinegy Air PRO playlist:

  1. Add the digital clock object and go to the "Effects" tab. In the "Generated Clock" settings section, select the "Countdown" option from the "Clock Type" drop-down list:

    Macros_countdown_to_date
  2. Specify the time dispay format in the "Count Format" field.

  3. Link the "Countdown Start Value" to the variable of text type. You can link it to the previously created text variable or link it to the new variable:

    Macros_countdown_to_date_link
  4. In the "Value" field of the "Variable" tab, write the macro according to the countdown macros syntax described above. Make this variable available for export by selecting the "Export" checkbox.

    Macros_countdown_variable
  5. Edit the Type scene according to your needs and save it.

  6. Select the desired item in the Cinegy Air PRO playlist, and use the external commands panel context menu to assign a Cinegy Type CG scene display on the specified layer.

  7. In the "Type Template Browser" dialog box that appears, select your Type scene in the "Repository" field. You can play the Cinegy Type template in the "Preview" screen and see how the countdown works.

Numeric Clock Customization

Follow the steps to set up a customized numeric clock display:

  1. Add the digital clock object and go to the "Effects" tab. In the "Generated Clock" settings section, select the desired clock type from the "Clock Type" drop-down list and choose the "User Format" option from the "Use the text as" drop-down list:

    Macros_numeric_clock
  2. Go to the "Geometry" tab and enter the desired text with macros according to the numeric clock macros syntax described above.

    Macros_numeric_clock_text
  3. Link this text to a new variable and make this variable available for export by selecting the "Export" checkbox:

    Macros_numeric_clock_variable
  4. Edit the Type scene according to your needs and save it.

  5. Select the desired item in the Cinegy Air PRO playlist, and use the external commands panel context menu to assign a Cinegy Type CG scene display on the specified layer.

  6. In the "Type Template Browser" dialog box that appears, select your Type scene in the "Repository" field. You can play the Cinegy Type template in the "Preview" screen.