Programmer Guide/SPU Reference/ADSET2: Difference between revisions
From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 59: | Line 59: | ||
:RES1[*,i] - the RMS energy track of band i (=0..<var>M</var>-1) in dB. | :RES1[*,i] - the RMS energy track of band i (=0..<var>M</var>-1) in dB. | ||
;See also: | |||
<[[../#Signal Processing Atoms|SP-atoms]]> | |||
<!-- AN, 2.5.2011 --> |
Latest revision as of 09:53, 16 November 2015
ADSET2 - compute rms tracks of 3rd octave bands
For each spectrum the RMS energy of the M bands is computed and stored in the output array. If HTH equals 1
, the hearing threshold is applied to spectrum before the energies are computed. The boundary frequencies of the bands are defined by the inputs FMIN and TYPE and the band index i (=0..M-1).
Where TYPE=0
:
flowi =
FMIN * q^i
, fhighi =
FMIN * q^(i+1); q = 2^(1/3)
Where TYPE=1:
flowi = Bark2Hertz(
FMIN + i)
, fhighi = Bark2Hertz(
FMIN + i+1)
This SPAtom was developed for the NOIDESc project in 2006.
Usage:
ADSET2 N A AREF HTH DF FMIN M TYPE
Inputs:
- N
- The number of output vectors (frames) .
- A
- The fft amplitude spectrum (linear).
- AREF
- The reference amplitude (linear).
- HTH
- Apply the hearing threshold (
0
=no,1
=yes).
- DF
- The fft frequency resolution in Hz.
- FMIN
- The lower boundary of the 1st band in Hertz (if TYPE=
0
) or Bark (if TYPE=1
)
- M
- The number of bands.
- TYPE
- The type of bands:
0
= 1/3 octave,1
= Bark.
Outputs:
- RES1
- The output array (N x M) containing the computed RMS values.
- RES1[*,i] - the RMS energy track of band i (=0..M-1) in dB.
- See also
<SP-atoms>