Programmer Guide/SPU Reference/PPM: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 29: Line 29:
;Description:
;Description:
The level meter value ''v''<sub>t</sub> (t = sample index) is computed for each value ''x''<sub>t</sub> of the input signal <var>X</var>. The last ''v''<sub>t</sub> of an evaluation cycle is used to update the outputs <var>Y</var> and <var>P</var>.
The level meter value ''v''<sub>t</sub> (t = sample index) is computed for each value ''x''<sub>t</sub> of the input signal <var>X</var>. The last ''v''<sub>t</sub> of an evaluation cycle is used to update the outputs <var>Y</var> and <var>P</var>.
:;<var>TYPE</var>=<code>0</code> or <code>HOLD</code>:
:{|class="einrahmen"
 
!<var>TYPE</var> !! computation of ''v''<sub>t</sub>
 
|-
:;<var>TYPE</var>=<code>1</code> or <code>EXPONENTIAL</code>:
|<code>0</code> or <code>HOLD</code>  
::<math>v_t = max(|x_t|, v_{t-1}.k)\mbox{, with: }k = \frac{1}{\sqrt[T]{2}}</math>
|
 
|-
:;<var>TYPE</var>=<code>2</code> or <code>RMS</code>:
|<code>1</code> or <code>EXPONENTIAL</code>
::<math>r_t = \frac{(r_{t-1}.(T-1)+x^2)}{T}</math>
|<math>v_t = max(|x_t|, v_{t-1}.k)\mbox{, with: }k = \frac{1}{\sqrt[T]{2}}</math>
::<math>v_t = \sqrt{2.r_t}</math>
|-
 
|<code>2</code> or <code>RMS</code>
The computed value ''v'' is converted to the selected <var>UNIT</var> and stored in the output <var>Y</var>.
|<math>r_t = \frac{(r_{t-1}.(T-1)+x^2)}{T}</math><BR><math>v_t = \sqrt{2.r_t}</math>
|}
The last value ''v''<sub>t</sub> of an evaluation cycle is converted to the selected <var>UNIT</var> and stored in the output <var>Y</var>.
:{|class="einrahmen"
:{|class="einrahmen"
!<var>UNIT</var> !! <var>Y</var>
!<var>UNIT</var> !! <var>Y</var>

Revision as of 09:37, 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 or HOLD
1 or EXPONENTIAL {\displaystyle v_{t}=max(|x_{t}|,v_{t-1}.k){\mbox{, with: }}k={\frac {1}{\sqrt[{T}]{2}}}}
2 or RMS {\displaystyle r_{t}={\frac {(r_{t-1}.(T-1)+x^{2})}{T}}}
{\displaystyle v_{t}={\sqrt {2.r_{t}}}}

The last value vt of an evaluation cycle is converted to the selected UNIT and stored in the output Y.

UNIT Y
0 or VALUE v
1 or SQUARE v2
2 or RATIO v / REF
3 or DB 20 * log10(v / REF)


The output M is the maximum of all computed v values converted to the selected output unit.


The output P is set to a value in range 0 to SIZE and can be used to display a level bar. The levels -140dB to 0dB are mapped to the values 0 to SIZE using a non-linear mapping function.

See also

<SP-atoms>

Navigation menu

Personal tools