### 6.7.6.1 Outline of the node

Loads a data file created by SaveMatrixFrames into the Matrix<float> type or the Matrix<complex<float> > type per frame.

### 6.7.6.2 Necessary files

A data file in either text format (TEXT) or binary format (RAW) created by SaveMatrixFrames .

### 6.7.6.3 Usage

When to use

This node is used to restore data of frames saved in a file in advance by SaveMatrixFrames to either the Matrix<float> type or the Matrix<complex<float> > type so that the data in the file can be processed.

Typical connection

Figure 6.103 below shows a connection example using LoadMatrixFrames in a network. This sample network is for producing a wav file in the end from data of frames in the Matrix type saved in a data file. Since Synthesize accepts data only in the Map $<$int , Vector<complex<float> > $>$ type, MatrixToMap is needed between LoadMatrixFrames and Synthesize for data type conversion.

### 6.7.6.4 Input-output and property of the node

Input

No inputs.

Output

OUTPUT

: Matrix<float> or Matrix<complex<float> > of the Matrix<ObjectRef> types. Data of frames.

NOT_EOF

: bool type. A flag to indicate whether or not the end of file has been reached when a program is reading the data file. It is set to false when the program reaches the end of the data file. Then, the program will be terminated. Otherwise, it is being set to true.

Parameter

FILENAME

: string type. The name of the data file to load.

INPUT_TYPE

: string type. The file format and the data type of the data file to load. Select appropriate one from the drop-down menu. Four options are available as follows.

• TEXT_float

• RAW_float

• TEXT_complex_float

• RAW_complex_float

The default value is set to TEXT_float. If the wrong value is selected, the Network will not run successfully.

ROW_SIZE

: int type. The row size of the Matrix<ObjectRef> type in which data in the data file are to be restored. If the wrong value is specified, the network will not run successfully. Default value is 8.

COL_SIZE

: int type. The column size of the Matrix<ObjectRef> type in which data in the data file are to be restored. If the wrong value is specified, the network will not run successfully. Default value is 512.

Table 6.89: Parameter list of LoadMatrixFrames
 Parameter name Type Default value Unit Description FILENAME The name of the data file to load. INPUT_TYPE TEXT_float The file format and the data type of the data file. Select TEXT_float, RAW_float, TEXT_complex_float, or RAW_complex_float. ROW_SIZE 8 The row size of the Matrix type in which data in the data file are to be restored. COL_SIZE 512 The column size of the Matrix type in which data in the data file are to be restored.

To make the parameter value settings for LoadMatrixFrames easier, it is strongly recommended to use a special pattern, {tag:format}, aka a format string, when saving data in a file by SaveMatrixFrames . The file name will then contain the data type, the row size, and the column size of the Matrix<ObjectRef> type in which the data in the data file are to be restored.

The example format strings and the outputs are given below in the Table 6.90 below for each parameter except FILENAME. For more details on {tag:format}, refer to SaveMatrixFrames node reference specifically, Tag list of SaveMatrixFrames .

Table 6.90: Example format strings and the outputs for the Matrix<complex<float> > where the row size is 8 and the column size is 512
 Format String (FILENAME parameter value) Output (Formatted Filename) samplefile.dat samplefile.dat samplefile_{datatype}.txt samplefile_complex_float.txt samplefile_row{rowsize}.raw samplefile_row8.raw samplefile_col{colsize}.dat samplefile_col512.dat samplefile_dim{dim}.dat samplefile_dim2.dat samplefile_{datatype}_row{rowsize}_col{colsize}_dim{dim}.dat samplefile_complex_float_row8_col512_dim2.dat

Putting appropriate file extension will also be helpful to save the time to find out the file format. If not, the TEXT type is a text file and the RAW type is a binary file. In Ubuntu platform, RAW files cannot be accessed by text editors whereas they can be opened in Windows. In any case, RAW files are not "human-readable" unlike TEXT files.

### 6.7.6.5 Details of the node

LoadMatrixFrames reads a file generated by SaveMatrixFrames and then restore the data in the file to either the Matrix<float> type or the Matrix<complex<float> > type per frame. The iteration process for loading data into the Matrix<ObjectRef> type per frame will be conducted by following the parameter values specified in the INPUT_TYPE, the ROW_SIZE, and the COL_SIZE. Table 6.91 below shows the all available INPUT_TYPE parameter values and the corresponding output data types in LoadMatrixFrames .