title03

MONOFLOP

Walkthrough No. 1

NOTE ! With Release 8.1 Maxon included a new Node in the collection of Xpresso Nodes, called Monoflop. This new node performs essentially the same function as the node described in this Walkthrough but with some new Ports giving new features. This Walkthrough therefore may still help you to understand how to use it. Indeed, you may prefer to use srek's simpler node (described below) in your project. Please see Maxon's file Addendum_81_US.pdf (or the version for your language) supplied as part of Release 8.1.

Monoflop

On Postforum Björn (Srek) has posted several hints and tricks, Xpresso Expressions etc. at his web site. One of these is a Monoflop Node. This does not do anything visual or exciting - it is a tool, in the form of a Node which can be included in an Expression where needed. It has two Input Ports and one Output Port.

When a Boolean True signal arrives at its On Input Port, its Output Port will deliver a Boolean True. Even if the True at the On Input Port returns to a False, the True at the Output Port will remain True for an extent which can be set either in the form of a number of Frames or for a period of time (the user can choose either of these two alternatives). The value of this extent must be delivered to its Time Input Port. In other words the output will latch and remain latched for a specified extent.

The first alternative - number of Frames: If Monoflop's Time Input Port is not Linked to another node it will interpret data arriving at its Time Input Port as the number of Frames during which the Output Port will remain True. This can be set by the user in Monoflop's Attributes : Parameter Button).

The second alternative - period of time: If Monoflop's Time Input Port is linked to another node it will interpret data arriving at its Time Input Port as the period of time in seconds during which the Output Port will remain True.

The Monoflop is useful when you want a part of your Xpresso Expression to record (for a set number of Frames or period of time) that an event has happened so that another event, perhaps occurring later during the animation, can make use of that information. For example, you might want a light to be capable of being switched to its on state (by another Node) only during a period of 5.3 seconds (say) 10 seconds after the start of the animation.

Incidentally, the two icons at the top right corner of a node like Monoflop indicate that it contains several Nodes that are packed into one. These can be unpacked if you want to see them but that is not for beginners.

Walkthrough

Now lets walk through the above Project file to study a simple demonstration of how Monoflop could be used. Download it and load it into Cinema. In the Object Manager locate the Null Object. On its right there is an Xpresso Tag. Double click on that and the Xpresso Editor window will open. This reveals the entire Xpresso Expression, one of whose Nodes is Monoflop, accompanied by other friendly Nodes. (An Xpresso Tag can be attached to any Object in the Object Manager - it doesn't matter - but a Null Object is usually most convenient.) If you need to move the whole collection of Nodes within the window to a more convenient position, click and drag the Move Icon at the top right of the Xpresso Editor window: moveicon If some of the Nodes are positioned outside the window, make them all fit in by doing Xpresso Editor window > Menu Bar > View > Show All.

None of the yellow Nodes are active. They are two types: Value Indicators and Remarks. Result Value Indicators display the value currently being produced by a Node or being delivered to a Node, depending on the Port to which the Indicator is Linked. A Spy Indicator simply displays the value being passed between the two nodes to which it is Linked. (A Spy is like a teenage boy receiving an instruction which goes in one ear and out the other with no effect whatever.) Indicators are useful when debugging. (Result and Spy Nodes do not show correct values while the animation is running.) Remark Nodes are there to add helpful information about what is going on. Additional remarks are sometimes included in the Node's Attributes (in the Attribute Manager) revealed after pressing the Basic button.

The first Node is the Time Node. A list of all the Output Ports that this Node can have is obtained by clicking on the red square in the node, but here we need only one - Frame. This produces, as an Integer, the current Frame of the animation. (The Time Node also has a Time Output Port which produces the current Frame Number - this is included in the Expression just for interest, monitoring and debugging.)

page2