Primitives that display signals in different ways or write the value of signal samples to files.
The primitives in this library have no output ports. They display signals in various ways, write output data sets to files or simply discard the input particles.
The following primitives use the pxgraph program to produce graphs. This program has many options, summarized in Modeling→Plots, graphs and animation→Visualization using 2D plotting system. The differences between primitives often amount to little more than the choice of default options. Some, however, preprocess the signal in useful ways before passing it to the pxgraph program.
- The Float output data set is written to a file. The default path is $MLD_USER/DmpNFloat.out. Optionally, a graph can be displayed by setting the ShowGraph parameter to TRUE.
- The Integer output data set is written to a file. The default path is $MLD_USER/DmpNInt.out.. Optionally, a graph can be displayed by setting the ShowGraph parameter to TRUE.
- This primitive writes a complex input to a file and an XYgraph. The dataset is stored in a data file which is specified using the parameter ods_OutData_FileName. The graph is displayed as a scatter diagram. In the data file the values of the signal elements are arranged as follows:
where k is the number of complex elements processed.
- Generate a generic single-signal plot with the pxgraph program.
- Generate a generic multi-signal plot.
- Generate an X-Y plot with the pxgraph program. The X data is on xInput and the Y data is on input.
- Generate a multi-trace plot with the pxgraph program. Successive traces are overlaid on one another.
- Generate a histogram with the pxgraph program. The parameter binWidth determines the bin width.
- Plot a series of traces in the style of a waterfall plot. This is a type of three-dimensional plot used to show the evolution of signals or spectra. Optionally, each plot can be made opaque, so that lines that would appear behind the plot are eliminated.
- Discards the input particles. This is exactly the same as terminating an output port via the context menu.
- Play an input stream on the speaker. The gain parameter (default 1.0) multiplies the input stream before it is mu-law compressed. The gain should be chosen to scale the input values in the range -32000.0 to 32000.0. The scaled input values are compressed from 16-bit linear amplitude format to sign magnitude mu-law 8-bit format and written to a file. When the wrapup method is called, a file of 8-bit mu-law will be played at the fixed sampling rate of 8000 samples/second by the ptplay program, which must be in your path.
- Play an Audio Interchange File Format (AIFF) input stream on the workstation speaker.
- Play a stereo AIFF input stream on the workstation speaker.
- Print out one sample from each input port per line. A fileName can be specified via the appropriate dialog; the options stdout and cout which specify the standard output stream, and stderr and cerr which specify the standard error stream, are also supported.