PPM

From STX Wiki
Jump to navigationJump to search

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 (=
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 selected data same type as A variable
Description
SEL Ynumber=f(Anumber,Bnumber) Yvector=f(Avector,Bnumber) Ynumber=f(Avector,Bvector)
0 or A Y = A Y[i] = A[i] Y[i] = A[i]
1 or B Y = B Y[i] = B Y[i] = B[i]
2 or minimum Y = min(A,B) Y[i] = min(A[i],B) Y[i] = min(A[i],B[i])
3 or maximum Y = max(A,B) Y[i] = max(A[i],B) Y[i] = max(A[i],B[i])

with: 0 ≤ i < length of Avector

See also

<SP-atoms>



PPM - signal peak measurement

Usage:

PPM X TYPE T UNIT REF

Inputs:
X signal (sample or frame)
TYPE type of measurement
T measurement interval, integration time (in samples)
UNIT output unit/mode
REF reference value for relative output units/modes
Outputs:
Y current peak value
M maximum peak value
Function:

This function implements a set of magnitude measurement methods. If input X is a number, a peak value for each sample is computed. If input X is a vector, only one peak value for the vector is computed.

The computed peak value is converted to the selected unit/mode before it is written to the output. For the relative output modes (UNIT equal 2 or 3) the value of input REF (>0) is used as the reference value.

The output M is set to the maximum of all computed Y values (M(t) = max(Y(0), Y(1), .., Y(t)).

Table: Peak magnitude measurement methods selected by input TYPE{| |- |value of TYPE |method (P = peak value) |- |0 or HOLD |The absolute peak magnitude is measured using a sample/hold circuit:if |X(t)| > P(t-1) or holdtime > T:P(t) = |X(t)|; holdtime is set to zerootherwise:P(t) = P(t-1); holdtime is incremented |- |1 or EXPONENTIAL |Use an exponential decay for peak measurement:P(t) = max(k . P(t-1), |X(t)|)The factor k is set to k=0.51/T . This means the ppm value falls to 50% after T samples, if input values are lower than the ppm output. |- |2 or RMS |Pseudo ppm measurement based on running rms magnitude (just for test purposes):(1) r(t) = ((T-1).r(t-1) + X2(t)) / T(2) P(t) = (2.r(t))1/2 |}

Table: Peak magnitude output formats selected by input UNIT{| |- |value of UNIT |conversion |- |0 or VALUE |Y(t) = P(t) |- |1 or SQUARE |Y(t) = P(t)2 |- |2 or RATIO |Y(t) = P(t) / REF |- |3 or DB |Y(t) = 20.log10(P(t) / REF) |}

Navigation menu

Personal tools