DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
Built in Toys

AnalogAlphaToy

Summary

This toy handles analog values (0-255) in a layer structure including alpha value (0=completely transparent, 255=fully opaque) and outputs the belended result of the layers on a single output.

Sample XML

A configuration section for AnalogAlphaToy might resemble the following structure:

<AnalogAlphaToy>
<Name>Name of AnalogAlphaToy</Name>
<OutputName>Name of Output</OutputName>
<FadingCurveName>Linear</FadingCurveName>
</AnalogAlphaToy>

Properties

AnalogAlphaToy has the following 3 configurable properties:

FadingCurveName

The name of the fading curve.

Name

The name of the item.

OutputName

The name of the output.

AnalogAlphaToyGroup

Summary

This toys allows the grouping of several AnalogAlpha toys (e.g. T:DirectOutput.Cab.Toys.Layer.AnalogAlphaToy or !:Lamp) into a matrix, which can be controlled by the matrix effects.

Note
Be sure to define this toy in the config file before the toys, which are listed in the ToyNames array.

Sample XML

A configuration section for AnalogAlphaToyGroup might resemble the following structure:

<AnalogAlphaToyGroup>
<Name>Name of AnalogAlphaToyGroup</Name>
<ToyNames>
<Row>
<Column>Item</Column>
<Column>Item</Column>
</Row>
<Row>
<Column>Item</Column>
<Column>Item</Column>
</Row>
<Row>
<Column>Item</Column>
<Column>Item</Column>
</Row>
</ToyNames>
<LayerOffset>0</LayerOffset>
</AnalogAlphaToyGroup>

Properties

AnalogAlphaToyGroup has the following 3 configurable properties:

LayerOffset

The layer offset which defines a fixed positive or negative offset to the layers which are controlled on the target toy..

Name

The name of the item.

ToyNames

The 2 dimensional array of RGBA toy names.

Nested Properties

The following nested propteries exist for ToyNames:

  • Capacity
    * Item

GearMotor

Summary

GearMotor toy supporting max. and min. power, max. runtime and kickstart settings.
The settings of this toy allow for a detailed definition of the behaviour of the connected motor.

  • The KickstartPower and the KickstartDurationMs property allow you to define a initial stronger impulse for the start of the motor. Some hardware, e.g. like the Wolfsoft shaker in my cab, do not start to rotate when they are started with low power, giving them a initial pulse and the reducing to the lower power on the other hand is no problem. These properties allow you to define this behaviour.
  • The MinPower and MaxPower properties allow you to define the range of values which are allowed for the motor power. As a example, the shaker in my cab doesn't rotate with powers lower than 50 and starts to rattle and shake my cab appart with powers above 100. The normal value range for motor powers (0-255) is scaled to the range defined by the MinPower and MaxPower properties, so a value of 1 will result the shaker to operate on MinPower and 255 will result in MaxPower.
  • The FadingCurveName property can be used to specify the name of a predefined or user defined fading curve. This allows for even better fine tuning of the shaker power for different input values. It is recommended to use either the fading curve Linear (default) and the MinPower/MaxPower settings or to use a fading curve and keep the MinPower/MaxPower settings on their defaults. If MinPower/MaxPower and a Fading Curve are combined, the power value for the motor will first be adjusted by the fading curve and the be scaled into the range of the MinPower/MaxPower settings.
  • MaxRunTimeMs allows you to define a maximum runtime for the motor before it is automatically turned off. To get reactivated after a runtime timeout the motor toy must first receive a power off (value=0), before it is reactivated.

Sample XML

A configuration section for GearMotor might resemble the following structure:

<GearMotor>
<Name>Name of GearMotor</Name>
<OutputName>Name of Output</OutputName>
<FadingCurveName>Linear</FadingCurveName>
<MaxRunTimeMs>300000</MaxRunTimeMs>
<KickstartPower>255</KickstartPower>
<KickstartDurationMs>100</KickstartDurationMs>
<MinPower>1</MinPower>
<MaxPower>255</MaxPower>
</GearMotor>

Properties

GearMotor has the following 8 configurable properties:

FadingCurveName

The name of the fading curve.

KickstartDurationMs

The kickstart duration in milliseconds.

KickstartPower

The kickstart power for the motor.

MaxPower

The max power for the toy.

MaxRunTimeMs

The max run time in milliseconds.

MinPower

The minimal power for the toy. This property can be used to ensure that the motor will allways rotate when it is active and not getting stuck due to low power.

Name

The name of the item.

OutputName

The name of the output.

Lamp

Sample XML

A configuration section for Lamp might resemble the following structure:

<Name>Name of Lamp</Name>
<OutputName>Name of Output</OutputName>
<FadingCurveName>Linear</FadingCurveName>
</Lamp>

Properties

Lamp has the following 3 configurable properties:

FadingCurveName

The name of the fading curve.

Name

The name of the item.

OutputName

The name of the output.

LedStrip

Summary

Represents a adressable led strip.

The toy supports several layers and supports transparency/alpha channels for every single led.

Sample XML

A configuration section for LedStrip might resemble the following structure:

<LedStrip>
<Name>Name of LedStrip</Name>
<Width>1</Width>
<Height>1</Height>
<LedStripArrangement>LeftRightTopDown</LedStripArrangement>
<ColorOrder>RBG</ColorOrder>
<FirstLedNumber>1</FirstLedNumber>
<FadingCurveName>Linear</FadingCurveName>
<OutputControllerName>Name of OutputController</OutputControllerName>
</LedStrip>

Properties

LedStrip has the following 8 configurable properties:

ColorOrder

The color order of the leds on the strip.

The property ColorOrder accepts the following values:

  • RGB: Red-Green-Blue (usual color order)
  • RBG: Red - Blue - Green
  • GRB: Green - Red - Blue (WS2812 led chips are using the scheme)
  • WS2812: WS2812 led chip (uses green - red - blue color order)
  • GBR: Green - Blue - Red
  • BRG: Green - Blue - Red
  • BGR: Blue - Green - Red

FadingCurveName

The name of the fading curve.

FirstLedNumber

The number of the first led of the strip.

Height

The height of the led stripe.

LedStripArrangement

The strip arrangement value as defined in the LedStripArrangementEnum.

The property LedStripArrangement accepts the following values:

  • LeftRightTopDown
  • LeftRightBottomUp
  • RightLeftTopDown
  • RightLeftBottomUp
  • TopDownLeftRight
  • TopDownRightLeft
  • BottomUpLeftRight
  • BottomUpRightLeft
  • LeftRightAlternateTopDown
  • LeftRightAlternateBottomUp
  • RightLeftAlternateTopDown
  • RightLeftAlternateBottomUp
  • TopDownAlternateLeftRight
  • TopDownAlternateRightLeft
  • BottomUpAlternateLeftRight
  • BottomUpAlternateRightLeft

Name

The name of the item.

OutputControllerName

The name of the output controller.

Width

The width of the led stripe.

LedWizEquivalent

Summary

The LEDWizEquivalent toy is only used by the framework when ini files are used for the configuration to determine which outputs should be controled by the columns in the ini files.
Do not target this type of toy with any effects.

Sample XML

A configuration section for LedWizEquivalent might resemble the following structure:

<LedWizEquivalent>
<Name>Name of LedWizEquivalent</Name>
<Outputs>
<LedWizEquivalentOutput>
<OutputName>Name of Output</OutputName>
<LedWizEquivalentOutputNumber>0</LedWizEquivalentOutputNumber>
</LedWizEquivalentOutput>
<LedWizEquivalentOutput>
<OutputName>Name of Output</OutputName>
<LedWizEquivalentOutputNumber>0</LedWizEquivalentOutputNumber>
</LedWizEquivalentOutput>
<LedWizEquivalentOutput>
<OutputName>Name of Output</OutputName>
<LedWizEquivalentOutputNumber>0</LedWizEquivalentOutputNumber>
</LedWizEquivalentOutput>
</Outputs>
<LedWizNumber>-1</LedWizNumber>
</LedWizEquivalent>

Properties

LedWizEquivalent has the following 3 configurable properties:

LedWizNumber

The number of the virtual LedWiz resp. ini file to be matched with the LedWizEquivalentToy.

Name

The name of the item.

Outputs

The outputs of the LedWizEquivalent toy.

Nested Properties

The following nested propteries exist for Outputs:

  • LedWizEquivalentOutputNumber
    The number of the LedWizEquivalentOutput.
  • OutputName
    The name of the IOutput object beeing controlled by the LedWizEquivalenOutput.

Motor

Summary

Motor toy supporting max. and min. power, max. runtime and kickstart settings.
The settings of this toy allow for a detailed definition of the behaviour of the connected motor.

  • The KickstartPower and the KickstartDurationMs property allow you to define a initial stronger impulse for the start of the motor. Some hardware, e.g. like the Wolfsoft shaker in my cab, do not start to rotate when they are started with low power, giving them a initial pulse and the reducing to the lower power on the other hand is no problem. These properties allow you to define this behaviour.
  • The MinPower and MaxPower properties allow you to define the range of values which are allowed for the motor power. As a example, the shaker in my cab doesn't rotate with powers lower than 50 and starts to rattle and shake my cab appart with powers above 100. The normal value range for motor powers (0-255) is scaled to the range defined by the MinPower and MaxPower properties, so a value of 1 will result the shaker to operate on MinPower and 255 will result in MaxPower.
  • The FadingCurveName property can be used to specify the name of a predefined or user defined fading curve. This allows for even better fine tuning of the shaker power for different input values. It is recommended to use either the fading curve Linear (default) and the MinPower/MaxPower settings or to use a fading curve and keep the MinPower/MaxPower settings on their defaults. If MinPower/MaxPower and a Fading Curve are combined, the power value for the motor will first be adjusted by the fading curve and the be scaled into the range of the MinPower/MaxPower settings.
  • MaxRunTimeMs allows you to define a maximum runtime for the motor before it is automatically turned off. To get reactivated after a runtime timeout the motor toy must first receive a power off (value=0), before it is reactivated.

Sample XML

A configuration section for Motor might resemble the following structure:

<Motor>
<Name>Name of Motor</Name>
<OutputName>Name of Output</OutputName>
<FadingCurveName>Linear</FadingCurveName>
<MaxRunTimeMs>300000</MaxRunTimeMs>
<KickstartPower>255</KickstartPower>
<KickstartDurationMs>100</KickstartDurationMs>
<MinPower>1</MinPower>
<MaxPower>255</MaxPower>
</Motor>

Properties

Motor has the following 8 configurable properties:

FadingCurveName

The name of the fading curve.

KickstartDurationMs

The kickstart duration in milliseconds.

KickstartPower

The kickstart power for the motor.

MaxPower

The max power for the toy.

MaxRunTimeMs

The max run time in milliseconds.

MinPower

The minimal power for the toy. This property can be used to ensure that the motor will allways rotate when it is active and not getting stuck due to low power.

Name

The name of the item.

OutputName

The name of the output.

RGBAToy

Summary

Thie RGBAToy controls RGB leds and other gadgets displaying RGB colors.

The RGBAToy has multilayer support with alpha channels. This allows the effects targeting RGBAToys to send their data to different layers. Values in a layer do also have a alpha/transparency channel which will allow us to blend the colors/values in the various layers (e.g. if a bottom layer is blue and top is a semi transparent red, you will get some mix of both or if one of the two blinks you get changing colors).
The following picture might give you a clearer idea how the layers with their alpha channels work:

LayersRGBA.png
RGBA Layers

Sample XML

A configuration section for RGBAToy might resemble the following structure:

<RGBAToy>
<Name>Name of RGBAToy</Name>
<OutputNameRed>OutputNameRed string</OutputNameRed>
<OutputNameGreen>OutputNameGreen string</OutputNameGreen>
<OutputNameBlue>OutputNameBlue string</OutputNameBlue>
<FadingCurveName>Linear</FadingCurveName>
</RGBAToy>

Properties

RGBAToy has the following 5 configurable properties:

FadingCurveName

The name of the fading curve.

Name

The name of the item.

OutputNameBlue

Name of the IOutput for blue.

OutputNameGreen

Name of the IOutput for green.

OutputNameRed

Name of the IOutput for red.

RGBAToyGroup

Summary

This toys allows the grouping of several RGBA toys (e.g. T:DirectOutput.Cab.Toys.Layer.RGBAToy or !:RGBLed) into a matrix, which can be controlled by the matrix effects.

Note
Be sure to define this toy in the config file before the toys, which are listed in the ToyNames array.

Sample XML

A configuration section for RGBAToyGroup might resemble the following structure:

<RGBAToyGroup>
<Name>Name of RGBAToyGroup</Name>
<ToyNames>
<Row>
<Column>Item</Column>
<Column>Item</Column>
</Row>
<Row>
<Column>Item</Column>
<Column>Item</Column>
</Row>
<Row>
<Column>Item</Column>
<Column>Item</Column>
</Row>
</ToyNames>
<LayerOffset>0</LayerOffset>
</RGBAToyGroup>

Properties

RGBAToyGroup has the following 3 configurable properties:

LayerOffset

The layer offset which defines a fixed positive or negative offset to the layers which are controlled on the target toy..

Name

The name of the item.

ToyNames

The 2 dimensional array of RGBA toy names.

Nested Properties

The following nested propteries exist for ToyNames:

  • Capacity
    * Item

RGBLed

Summary

Toy controlling a RGB led.
This is just a simple wrapper around the T:DirectOutput.Cab.Toys.Layer.RGBAToy.

Sample XML

A configuration section for RGBLed might resemble the following structure:

<RGBLed>
<Name>Name of RGBLed</Name>
<OutputNameRed>OutputNameRed string</OutputNameRed>
<OutputNameGreen>OutputNameGreen string</OutputNameGreen>
<OutputNameBlue>OutputNameBlue string</OutputNameBlue>
<FadingCurveName>Linear</FadingCurveName>
</RGBLed>

Properties

RGBLed has the following 5 configurable properties:

FadingCurveName

The name of the fading curve.

Name

The name of the item.

OutputNameBlue

Name of the IOutput for blue.

OutputNameGreen

Name of the IOutput for green.

OutputNameRed

Name of the IOutput for red.

Shaker

Summary

Shaker toy with settings for minimum and maximum power, fading curves, max runtime and kickstart.

Shaker.jpg

The shaker toy is a simple wrapper around the Motor toy, so you can define your toy with the precise type.

The settings of this toy allow for a detailed definition of the behaviour of the connected motor.

  • The KickstartPower and the KickstartDurationMs property allow you to define a initial stronger impulse for the start of the motor. Some hardware, e.g. like the Wolfsoft shaker in my cab, do not start to rotate when they are started with low power, giving them a initial pulse and the reducing to the lower power on the other hand is no problem. These properties allow you to define this behaviour.
  • The MinPower and MaxPower properties allow you to define the range of values which are allowed for the motor power. As a example, the shaker in my cab doesn't rotate with powers lower than 50 and starts to rattle and shake my cab appart with powers above 100. The normal value range for motor powers (0-255) is scaled to the range defined by the MinPower and MaxPower properties, so a value of 1 will result the shaker to operate on MinPower and 255 will result in MaxPower.
  • The FadingCurveName property can be used to specify the name of a predefined or user defined fading curve. This allows for even better fine tuning of the shaker power for different input values. It is recommended to use either the fading curve Linear (default) and the MinPower/MaxPower settings or to use a fading curve and keep the MinPower/MaxPower settings on their defaults. If MinPower/MaxPower and a Fading Curve are combined, the power value for the motor will first be adjusted by the fading curve and the be scaled into the range of the MinPower/MaxPower settings.
  • MaxRunTimeMs allows you to define a maximum runtime for the motor before it is automatically turned off. To get reactivated after a runtime timeout the motor toy must first receive a power off (value=0), before it is reactivated.

Sample XML

A configuration section for Shaker might resemble the following structure:

<Shaker>
<Name>Name of Shaker</Name>
<OutputName>Name of Output</OutputName>
<FadingCurveName>Linear</FadingCurveName>
<MaxRunTimeMs>300000</MaxRunTimeMs>
<KickstartPower>255</KickstartPower>
<KickstartDurationMs>100</KickstartDurationMs>
<MinPower>1</MinPower>
<MaxPower>255</MaxPower>
</Shaker>

Properties

Shaker has the following 8 configurable properties:

FadingCurveName

The name of the fading curve.

KickstartDurationMs

The kickstart duration in milliseconds.

KickstartPower

The kickstart power for the motor.

MaxPower

The max power for the toy.

MaxRunTimeMs

The max run time in milliseconds.

MinPower

The minimal power for the toy. This property can be used to ensure that the motor will allways rotate when it is active and not getting stuck due to low power.

Name

The name of the item.

OutputName

The name of the output.