Test Modules

OVERVIEW

These are a couple of very simple modules -- one 'Source' and one 'Filter' -- that can be coupled to form a trivial path in a diagram with data flowing. (See 'A Walk Through: Diagram Operations'.) The "data" in this case is just a flow of continuously incrementing integers, one per millisecond. There is no control, the source just generates them continuously, and the counter displays them.

You can of course have instances of these modules in the same diagram as MIDI or others. This demonstrates how Weaver modules pay attention only to data of relevance to them, ignoring the rest.

The Counter is actually a little more versatile than that, in that it will count any kind of Weaver packet that flows through it. See its description for details.

PacketSource

Each instance of this generates a continuous stream of packets, each containing a single integer. The integer value is incremented by one for each packet (initially from one, but not resettable). A new packet is transmitted every millisecond. There is no control panel.


Counter

This Filter accepts packets of the type generated by PacketSource and displays the contained value in its panel (if visible -- use the diagram element's popup menu item to open it, See 'Diagram Operations'.) The panel has no controls -- just the displayed value, shown in red if the last packet received was from a PacketSource.

In addition to showing the actual integer values of such packets, the Counter will count packets of any type. Each time it sees a packet of any type but PacketSource, it adds one to the currently displayed value and shows it in blue. Note that this is not independent of data received from a packet source -- it simply counts from the last integer that arrived (initially zero).

Counting packets can be useful to ensure that data is flowing when and where you expect it to (when you split a MIDI path for example), but be warned that the Counter was not built for speed. It simply holds on to the packet while it updates the window (although it doesn't necessarily update on every packet if they are arriving too fast). This means that perhaps you shouldn't expect glitch-free audio if you include a Counter (with an open panel) in the path.