| RESPITE: The CASA Toolkit Page: Documentation: Block Library Index: ASCIIInputFile |
This is for reading files in which the data is stored in human readable form as a sequence of white space separated numbers in ASCII format. The file name is supplied as a parameter. A file path and file extension may also be supplied.
If SAMPLES_PER_FRAME is set to 1 then the data is treated as a simple signal (e.g. a sound signal). If SAMPLES_PER_FRAME is greater than 1 then the data is treated as a series of frames (e.g. a feature vector).
As with the BinaryInputFile, NOUTPUTS can be set to any value and the data is assumed to have this many channels with the samples or frames interleaved, e.g. if NOUTPUTS is set to two then the data is assumed to be stereo and the odd samples are sent to out1 and the even samples are sent to out2.
| Inputs | Meaning | Sample | 1-D frame | |
|---|---|---|---|---|
| No inputs | ||||
| Outputs | Meaning |
|---|---|
| out1 | signal channel 1 |
| ... | ... |
| out n | signal channel n |
| Parameters | Type | Default | Meaning |
|---|---|---|---|
| FILE_NAME | String | - | The file to open |
| FILE_PATH | String | "" | Directory path to prefix to filename |
| FILE_EXTENSION | String | "" | Extension to postfix to filename |
| SAMPLES_PER_FRAME | Integer | 1 | Number of samples per frame |
| SAMPLE_RATE | Float | - | The data sampling rate (samples/second) |
| DURATION | Integer | 0 (0=whole file) | Number of samples to read |
| NOUTPUTS | Integer | 1 | Number of channels |