Programmer Guide/SPU Reference/STEPS: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
====STEPS - scale generator====
Generate a equidistant or constant-Q scale.
 
==<code>[SPU STEPS <var>X DX N TYP</var> OUT <var>Y</var>]</code>==
=====Usage:=====
{|class="einrahmen"
 
!input !!description !!data type !!value type!!default value
<code>STEPS <var>X</var> <var>DX</var> <var>N</var> <var>TYPE</var></code>
 
=====Inputs:=====
 
{|
|-
|-
|X
|<var>X</var>||start value||number||variable ||
|1st x<nowiki>-</nowiki>value
|no default
|-
|-
|DX
|<var>DX</var>||increment or ratio||number||variable ||
|X increment or factor
|default = 0
|-
|-
|N
|<var>N</var>||output vector length||number, vector||constant||
|number of values
|default = 1
|-
|-
|TYPE
|<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
|}
 
=====Outputs:=====
 
{|
|-
|-
|<var>Y</var>
|<var>Y</var>||scale vector||vector||variable
|scale vector
|}
|}
 
Note:  
=====Function:=====
*If <var>N</var> is a vector, the output length is set to the length of <var>N</var>.
 
;Description:
This atom generates a series of N values, and stores it in the output vector <var>Y</var>. The main use of this function is the generation of the X-scale vectors of graph-items.
{|class="einrahmen"
 
!<var>TYP</var> !!<var>Y</var>
{|
|-
|<var>TYPE</var>=0 or <var>TYPE</var>=ARITHMETICAL
|<nowiki>-</nowiki>>
|Y[i] = <var>X</var> + i.<var>DX</var>
|-
|-
|TYPE=1 or <var>TYPE</var>=GEOMETRICAL
|<code>0</code> or <code>ARITHMETICAL</code>
|<nowiki>-</nowiki>>
|<var>Y</var>[i] = <var>X</var> + i*<var>DX</var>
|Y[i] = <var>X</var> . <var>DX</var>i
|-
|-
|with: i = 0, 1, .., N-1
|<code>1</code> or <code>GEOMETRICAL</code>
|  
|<var>Y</var>[i] = <var>X</var> *<var>DX</var><sup>i</sup>
|
|}
|}
with: 0 &le; i &lt; <var>N</var>

Revision as of 13:01, 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

Navigation menu

Personal tools