WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
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:

1 <AnalogAlphaToy>
2  <Name>Name of AnalogAlphaToy</Name>
3  <OutputName>Name of Output</OutputName>
4  <FadingCurveName>Linear</FadingCurveName>
5 </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:

1 <AnalogAlphaToyGroup>
2  <Name>Name of AnalogAlphaToyGroup</Name>
3  <ToyNames>
4  <Row>
5  <Column>Item</Column>
6  <Column>Item</Column>
7  </Row>
8  <Row>
9  <Column>Item</Column>
10  <Column>Item</Column>
11  </Row>
12  <Row>
13  <Column>Item</Column>
14  <Column>Item</Column>
15  </Row>
16  </ToyNames>
17  <LayerOffset>0</LayerOffset>
18 </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:

1 <GearMotor>
2  <Name>Name of GearMotor</Name>
3  <OutputName>Name of Output</OutputName>
4  <FadingCurveName>Linear</FadingCurveName>
5  <MaxRunTimeMs>300000</MaxRunTimeMs>
6  <KickstartPower>255</KickstartPower>
7  <KickstartDurationMs>100</KickstartDurationMs>
8  <MinPower>1</MinPower>
9  <MaxPower>255</MaxPower>
10 </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:

1 <Lamp>
2  <Name>Name of Lamp</Name>
3  <OutputName>Name of Output</OutputName>
4  <FadingCurveName>Linear</FadingCurveName>
5 </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:

1 <LedStrip>
2  <Name>Name of LedStrip</Name>
3  <Width>1</Width>
4  <Height>1</Height>
5  <LedStripArrangement>LeftRightTopDown</LedStripArrangement>
6  <ColorOrder>RBG</ColorOrder>
7  <FirstLedNumber>1</FirstLedNumber>
8  <FadingCurveName>Linear</FadingCurveName>
9  <OutputControllerName>Name of OutputController</OutputControllerName>
10 </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.

LedStripArrangementEnum.jpg
Supported led string arrangements

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:

1 <LedWizEquivalent>
2  <Name>Name of LedWizEquivalent</Name>
3  <Outputs>
4  <LedWizEquivalentOutput>
5  <OutputName>Name of Output</OutputName>
6  <LedWizEquivalentOutputNumber>0</LedWizEquivalentOutputNumber>
7  </LedWizEquivalentOutput>
8  <LedWizEquivalentOutput>
9  <OutputName>Name of Output</OutputName>
10  <LedWizEquivalentOutputNumber>0</LedWizEquivalentOutputNumber>
11  </LedWizEquivalentOutput>
12  <LedWizEquivalentOutput>
13  <OutputName>Name of Output</OutputName>
14  <LedWizEquivalentOutputNumber>0</LedWizEquivalentOutputNumber>
15  </LedWizEquivalentOutput>
16  </Outputs>
17  <LedWizNumber>-1</LedWizNumber>
18 </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:

1 <Motor>
2  <Name>Name of Motor</Name>
3  <OutputName>Name of Output</OutputName>
4  <FadingCurveName>Linear</FadingCurveName>
5  <MaxRunTimeMs>300000</MaxRunTimeMs>
6  <KickstartPower>255</KickstartPower>
7  <KickstartDurationMs>100</KickstartDurationMs>
8  <MinPower>1</MinPower>
9  <MaxPower>255</MaxPower>
10 </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:

1 <RGBAToy>
2  <Name>Name of RGBAToy</Name>
3  <OutputNameRed>OutputNameRed string</OutputNameRed>
4  <OutputNameGreen>OutputNameGreen string</OutputNameGreen>
5  <OutputNameBlue>OutputNameBlue string</OutputNameBlue>
6  <FadingCurveName>Linear</FadingCurveName>
7 </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:

1 <RGBAToyGroup>
2  <Name>Name of RGBAToyGroup</Name>
3  <ToyNames>
4  <Row>
5  <Column>Item</Column>
6  <Column>Item</Column>
7  </Row>
8  <Row>
9  <Column>Item</Column>
10  <Column>Item</Column>
11  </Row>
12  <Row>
13  <Column>Item</Column>
14  <Column>Item</Column>
15  </Row>
16  </ToyNames>
17  <LayerOffset>0</LayerOffset>
18 </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:

1 <RGBLed>
2  <Name>Name of RGBLed</Name>
3  <OutputNameRed>OutputNameRed string</OutputNameRed>
4  <OutputNameGreen>OutputNameGreen string</OutputNameGreen>
5  <OutputNameBlue>OutputNameBlue string</OutputNameBlue>
6  <FadingCurveName>Linear</FadingCurveName>
7 </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:

1 <Shaker>
2  <Name>Name of Shaker</Name>
3  <OutputName>Name of Output</OutputName>
4  <FadingCurveName>Linear</FadingCurveName>
5  <MaxRunTimeMs>300000</MaxRunTimeMs>
6  <KickstartPower>255</KickstartPower>
7  <KickstartDurationMs>100</KickstartDurationMs>
8  <MinPower>1</MinPower>
9  <MaxPower>255</MaxPower>
10 </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.