20. Juli 2017
Soundbild 2 alpha 0.3
Creating Styles
To get a new style, create a copy of any other style-folder and rename it.
Style set-up
On the one hand a Soundbild style consists of various item-nodes in tree-form, each with it's own set of properties. This data can be changed within the software-gui and is saved in "style.sb2". For example you can add a PictureNode, set it's size, position or picture-filename.
On the other hand there are scriptfiles which are used to init these nodes after the style is loaded or to update values during visualization. These .txt files are created by your own.
Each style has it's own folder in the Soundbild\styles folder. In Soundbild\projects it's the same but for video-rendering projects.
Because Soundbild grew to some extents in wrong directions during development, i'll write a helpfile about every single itemtype and it's properties after i sorted out which are useful and which aren't. So during alpha progress existing styles must be updated from time to time.
Item-tree
Every item needs it's own unique ID, make sure there aren't same entries.
Graphicbuffers can be used used as textures in other visual nodes:
fbT1_bufferName
See example 2 for more information.
Oh, currently, the dynamic resolution isn't working well with additional Framebuffers (i'll end this procrastination in the next bigger release).
Scriptfiles
There are some restrictions writing scriptcode because i implemented the parsing by myself.
All codeblocks of If- or For-Statements have to be in {} even it's just a single line. There's blank stripping, but not yet in all places.
You can concatenate strings and numbers by adding them, but don't use brakets or operator-signs within your strings.
All variables must be initialized, all elements of an array will be initialized with one value:
float someValues[5] = 1.75;
A for-loop can be used to init each of these values separately after the declaration line.
currently you can set either array values of a single item or single values of item-groups (via duplicate node).
todo: supporting duplicated items with array-values
Normal item.properties start with a "did_", shader variables with a "dic_".
The current list of functions (please contact me if you need other):
Basic functions:
float sin(float), float cos(float)
float smoothstep(float edge0, float edge1, float value)
float/vec2/3/4 mix(float/vec2/3/4, float/vec2/3/4, float a)
float min(float, float)
float max(float, float)
float clamp(float value, float min, float max)
float abs(float)
float ceil(float)
float floor(float)
float fract(float)
float pow(float, float)
float atan(float, float)
float exp(float)
float log(float)
Vector functions:
float length(vec2/3/4), vec2/3/4 normalize(vec2/3/4), vec3 cross(vec3, vec3)
Convert:
int toInt(float), float toFloat(int), vec2/3/4 toVec2/3/4(float, float, ..)
Get vector components:
float getX(vec2/3/4), float getY/Z/W R/G/B/A(vec2/3/4)
Random:
float random(float) returns a random float 0.0 - 1.0, use the float-parameter as an uint seed number to get the same random sequence or -1.0 for "real" randomness