Programmer Guide/SPU Reference/STEPS: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
Generate a equidistant or constant-Q scale. | |||
==<code>[SPU STEPS <var>X DX N TYP</var> OUT <var>Y</var>]</code>== | |||
== | {|class="einrahmen" | ||
!input !!description !!data type !!value type!!default value | |||
<code>STEPS <var>X | |||
{| | |||
|- | |- | ||
| | |<var>X</var>||start value||number||variable || | ||
| | |||
|- | |- | ||
|DX | |<var>DX</var>||increment or ratio||number||variable || | ||
| | |||
| | |||
|- | |- | ||
|N | |<var>N</var>||output vector length||number, vector||constant|| | ||
|number | |||
| | |||
|- | |- | ||
| | |<var>TYP</var>||scale type<BR>(<code>ARITHMETICAL, GEOMETRICAL</code>)||number (int.), string||constant ||<code>0</code> (= <code>ARITHMETICAL</code>) | ||
|scale type | |- | ||
| | !output !!description !!data type !!value type!!comment | ||
| | |||
|- | |- | ||
|<var>Y</var> | |<var>Y</var>||scale vector||vector||variable | ||
|scale vector | |||
|} | |} | ||
Note: | |||
*If <var>N</var> is a vector, the output length is set to the length of <var>N</var>. | |||
;Description: | |||
{|class="einrahmen" | |||
!<var>TYP</var> !!<var>Y</var> | |||
| | |||
|- | |- | ||
| | |<code>0</code> or <code>ARITHMETICAL</code> | ||
|< | |<var>Y</var>[i] = <var>X</var> + i*<var>DX</var> | ||
|- | |- | ||
| | |<code>1</code> or <code>GEOMETRICAL</code> | ||
| | |<var>Y</var>[i] = <var>X</var> *<var>DX</var><sup>i</sup> | ||
|} | |} | ||
with: 0 ≤ i < <var>N</var> | |||
;See also: | |||
<[[../#Signal Processing Atoms|SP-atoms]]> | |||
<!-- AN, 2.5.2011 --> |
Latest revision as of 13:02, 9 May 2011
Generate a equidistant or constant-Q scale.
[SPU STEPS X DX N TYP OUT Y]
input | description | data type | value type | default value |
---|---|---|---|---|
X | start value | number | variable | |
DX | increment or ratio | number | variable | |
N | output vector length | number, vector | constant | |
TYP | scale type ( ARITHMETICAL, GEOMETRICAL ) |
number (int.), string | constant | 0 (= ARITHMETICAL )
|
output | description | data type | value type | comment |
Y | scale vector | vector | variable |
Note:
- If N is a vector, the output length is set to the length of N.
- Description
TYP | Y |
---|---|
0 or ARITHMETICAL
|
Y[i] = X + i*DX |
1 or GEOMETRICAL
|
Y[i] = X *DXi |
with: 0 ≤ i < N
- See also
<SP-atoms>