Programmer Guide/SPU Reference/UCONV: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
Line 58: Line 58:
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|Convert frequency from Hertz to Barks. Uses the transformation published by Zwicker and Fastl (1990). The parameters a and <var>b</var> are ignored.
|Convert frequency from Hertz to Barks. Uses the transformation published by Zwicker and Fastl (1990). The parameters <var>A</var> and <var>B</var> are ignored.
|-
|-
|<code>4</code> or <code>BARK2HZ</code>
|<code>4</code> or <code>BARK2HZ</code>
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|<nowiki>-</nowiki>
|Convert frequency from Barks to Hertz. Uses an iteration method that minimizes the distance to the forward conversion algorithm. The parameters a and <var>b</var> are ignored.
|Convert frequency from Barks to Hertz. Uses an iteration method that minimizes the distance to the forward conversion algorithm. The parameters <var>A</var> and <var>B</var> are ignored.
|-
|-
|<code>5</code> or <code>LIN2LOG</code>
|<code>5</code> or <code>LIN2LOG</code>
Line 78: Line 78:
|<code>-</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>
|Convert from Hertz to Mel.The parameters a and <var>b</var> are ignored.
|Convert from Hertz to Mel. The parameters <var>A</var> and <var>B</var> are ignored.
|-
|-
|<code>8 or MEL2HZ</code>
|<code>8 or MEL2HZ</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>
|Convert from Mel to Hertz.The parameters a and <var>b</var> are ignored.
|Convert from Mel to Hertz. The parameters <var>A</var> and <var>B</var> are ignored.
|-
|-
|<code>9 or HZ2ERB</code>
|<code>9 or HZ2ERB</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>  
|Convert from Hertz to ERB (Equivalent Rectangular Bandwidth).The parameters a and <var>b</var> are ignored.
|Convert from Hertz to ERB (Equivalent Rectangular Bandwidth). The parameters <var>A</var> and <var>B</var> are ignored.
|-
|-
|<code>10 or ERB2HZ</code>
|<code>10 or ERB2HZ</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>
|<code>-</code>
|Convert from ERB (Equivalent Rectangular Bandwidth) to Hertz.The parameters a and <var>b</var> are ignored.
|Convert from ERB (Equivalent Rectangular Bandwidth) to Hertz. The parameters <var>A</var> and <var>B</var> are ignored.
|}
|}

Revision as of 14:09, 9 May 2011

UCONV - amp/frq value conversions

Usage:

UCONV x type a b

Inputs:
x number or vector to be converted
type type of conversion
a conversion parameter a
b conversion parameter b
Outputs:
y converted number or vector (same type as x)
Description

This atom performs a conversion of the input X (containing physical data) into another unit or domain. The type of conversion is controlled by the selection input TYPE and the parameter inputs A and B. The input data can be stored in a number or vector. If the input is a vector, the conversion is applied to all elements.

TYPE default
A
default
B
applied transformation /conversion
0 or LINEAR 1 0 Linear transformation. Parameter A is used as slope and parameter B as offset
Y=A.X+B
1 or HZ2CENT 1 0 Convert frequency from Hertz to Cents. Parameter a is used as reference frequency and b as offset in Cents:y=1200.log2(x/a)+b
2 or CENT2HZ 1 0 Convert frequency from Cents to Hertz. Parameter a is used as reference frequency and b as offset in Cents: y=a.2(x-b)/1200
3 or HZ2BARK - - Convert frequency from Hertz to Barks. Uses the transformation published by Zwicker and Fastl (1990). The parameters A and B are ignored.
4 or BARK2HZ - - Convert frequency from Barks to Hertz. Uses an iteration method that minimizes the distance to the forward conversion algorithm. The parameters A and B are ignored.
5 or LIN2LOG 1 20 Convert from linear to logarithmic scale. Parameter a is used as reference value and b as factor: y=b.log10(x/a)
6 or LOG2LIN 1 20 Convert from logarithmic to linear scale. Parameter a is used as reference value and b as factor: y=a.10x/b
7 or HZ2MEL - - Convert from Hertz to Mel. The parameters A and B are ignored.
8 or MEL2HZ - - Convert from Mel to Hertz. The parameters A and B are ignored.
9 or HZ2ERB - - Convert from Hertz to ERB (Equivalent Rectangular Bandwidth). The parameters A and B are ignored.
10 or ERB2HZ - - Convert from ERB (Equivalent Rectangular Bandwidth) to Hertz. The parameters A and B are ignored.

Navigation menu

Personal tools