Programmer Guide/SPU Reference/PPM: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 52: | Line 52: | ||
|- | |- | ||
|<code>3</code> or <code>DB</code> | |<code>3</code> or <code>DB</code> | ||
|<math>20.\ | |<math>20.\log_{10}(\frac{v_t}{REF})\!</math> | ||
|} | |} | ||
Revision as of 09:48, 9 May 2011
Level meter (PPM). This atom is used for the level display in the recorder application.
[SPU PPM X TYPE T UNIT REF SIZE OUT Y M P]
input | description | data type | value type | default value |
---|---|---|---|---|
X | input signal | number, vector | variable | |
TYPE | measurement method ( HOLD, EXPONENTIAL, RMS ) |
number (int.), string | constant | 0 (= HOLD )
|
T | measurement time constant in samples | number | constant | 100
|
UNIT | output value and unit ( VALUE, SQUARE, RATIO, DB ) |
number (int.), string | constant | 0 (=VALUE )
|
REF | reference value, used for UNIT values RATIO and DB |
number | constant | 0
|
SIZE | length of bar (graph) used for ppm display | number | constant | 100
|
output | description | data type | value type | comment |
Y | ppm value | number | variable | |
M | maximum Y | number | variable | |
P | ppm bar position, always computed for the ppm value in dB (independent of UNIT) | number | variable |
- Description
The level meter value vt (t = sample index) is computed for each value xt of the input signal X. The last vt of an evaluation cycle is used to update the outputs Y and P.
TYPE computation of vt 0
orHOLD
1
orEXPONENTIAL
2
orRMS
The last value vt of an evaluation cycle is converted to the selected UNIT and stored in the output Y.
UNIT Y 0
orVALUE
v 1
orSQUARE
v2 2
orRATIO
v / REF 3
orDB
The output P is set to a value in range 0 to SIZE and can be used to display a level bar. For P always the logarithmic value (level in dB) is used. The level interval -140dB to 0dB is mapped to the position interval 0 to SIZE using a non-linear mapping function.
The output M is the maximum of all computed v values converted to the selected output unit.
- See also
<SP-atoms>