From Multimedia File
A stream from a multimedia file.
blockType: From Multimedia File
Path in the library:
|
Description
Block From Multimedia File reads audio file data samples in the format .wav from a multimedia file and generates a signal with one of the following data types and amplitude ranges.
| Type of output data | Output amplitude range |
|---|---|
|
± |
|
± |
|
from before (from before |
|
from before |
Ports
Output
#
Audio
—
audio signal
scalar | matrix
Details
If the vector is not scalar, it is necessarily a matrix by , where is the number of channels.
| Data types |
|
| Complex numbers support |
No |
Parameters
Main
# File name — name of the multimedia file
Details
Specify the name of the multimedia file to read.
It is acceptable to specify the absolute path to the file (starting with /user), and relative. In this case, the relative path is determined from the current directory (pwd).
You can also specify only the file name. In this case, Engee will search for a file with that name first using the relative path (i.e., in the current directory), and then in the search paths.: Engee Path Editor.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Inherit sample time from file —
inheriting the sampling period from a file
Logical
Details
Enable this option so that the block inherits the sampling period from the input multimedia file.
Uncheck this option so that the block uses the sampling period specified in the parameter Desired sample time.
| Select this option when you do not know the estimated sampling rate of the multimedia file. |
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Desired sample time —
sampling period
SampleTime (real number / vector of two real numbers)
Details
Specify the sampling period of the block.
Dependencies
To use this option, uncheck the option. Inherit sample time from file.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Number of times to play file —
the number of media file plays
Real number
Details
Specify the number of times to play the input multimedia file.
Default value Inf This means that the block repeats the playback of the multimedia file until the simulation stops.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Read range —
audio sampling range
Array of real numbers
Details
Specify the range of samples to be read from as a two-element row vector in the form [StartSample EndSample], where StartSample – this is the countdown from which the reading of the file begins, and EndSample – the countdown at which the file reading stops.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Samples per audio channel —
audio channel counts
Integer
Details
Specify the number of counts per audio channel.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
Main
#
Audio output data type —
audio output data type
Float64 | Float32 | Int16 | UInt8
Details
Specify the data type for the audio samples output via the Audio port.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |