RSS Twitter Facebook
g200kg > JKnobMan Online Help > 11.Dynamic Texts

JKnobMan Online Help


11.Dynamic Texts

Dynamic Texts

[ Japanese | English ]

In the 'Text' type primitive, the text is specified by the 'Text' field. It can contain two special syntax for dynamic changing texts between frames.

comma separated texts
if the text has multiple parts separated by comma( , ), for example "A,B,C", the A and B and C will be assigned between frames.

ex) "Sin,Tri,Sqr,Saw,Noise"

contiguous numbers
if the text has following format, it will be expand to the sequence of the numbers.

(<FromNumber>:<ToNumber>[:StepNumber] [:FormatString][:FomulaString])

Parameters after <ToNumber> can be omitted. The most simple form is (1:100). If add the step number, it will be (1:100:10), or add formatstrig (1:100:%03d). You can also add the FomulaString (0:100:%.2f:pow(2,x/100)). Note that you cannot omit the FormatString if you use FomulaString. If all parameter used (0:100:1:%3.1f:pow(10,x/100)).

For example, the default text of the text primitive is (1:99), it will be expand to "1,2,3,4,......98,99". If the last value is less than the first value, the sequence will be decremental. In addition, the first or last value can be negatve.

If you need detail formatting, the C-like format string can be added. for example "(0:99:%02d)",

Format String:
format string can be following form


+ add '+' sign if the value is positive (optional)
0padding by '0' (optional)
widthminimum number of output width (optional)
.precision the number of the decimal portion digits. used for the 'f' type(optional)
type c a character by ascii code
dsigned decimal
xhexadecimal lower case
Xhexadecimal upper case
ffloating point

format string examples

  • "%d" -99 / 0 / 99
  • "%+d" -99 / +0 / +99
  • "%02d" 00 / 49 / 99
  • "%02X 00 / 7F / FF
  • "%.1f" 0.0 / 0.5 / 1.0

In almost case, 'f' type is used with a fraction number step. ex) "0:1:0.1:%.1f" will be expanded to 0.0 to 1.0 with 0.1 step : 0.0,0.1,0.2,0.3...1.0

If no format string is specified, it is equivalent to "%d".

Formula String:

The Formula String allow the complex value definition by mathematical formula. In this formula, the original value are represented by 'x' and converted with operators/built-in functions. Available operators and built-in functions are bellow.

Functionlog(x)logarithm (base e)
log10(x)logarithm (base 10)
pow(x,y)x power of y
sqrt(x)square root

For example, if you need exponential curved values from 10 to 1000, the text-string is


The formula "10*pow(100,x/100)" is the Formula String that convert the range 0-100 to 10-1000 exponentialy.

comma separated texts and contiguous numbers can be used in the combination. following is a 'Pan Control' sample.


it will be expand to