A "config" file is any file that contains textual commands that WhiteCap interprets as it runs. Configs are to WhiteCap as Nintendo cartridges are to the Nintendo unit. If you want to learn the language G-Force and WhiteCap use in their config files, you should have some familiarity with programming and/or script writing. The more programming or script experience you have, the easier you'll learn how WhiteCap works.
Submitting Your Configs
If you'd like a config you made yourself to permanently become part of WhiteCap,
please email it in. From there, it'll be evaluated and checked for possible
problems or faults. If you choose to redistribute your configs on you own and
do something improperly in them, you may cause other versions of WhiteCap to
crash or have problems. Further, sending in your configs centralizes the entire
process, guaranteeing your work to appear as soon as possible.
Documented Configs
The config "ArcticFox Memories" is a documented config (try using
a file search in your OS to find them easily). In other words, if you open this
config file in a text editor or word processor, then you'll find information
that will allow you to make and edit your own configs. Windows users should
use WordPad or Microsoft Word to open/edit config files (such apps properly
handle LFs and CRs present in MacOS text files). If you see a config in WhiteCap
you really like, don't be afraid to open it in order to see how it's doing it.
Config/Language Reference
The following is a list of the available functions in WhiteCap.
Trig (all angles in radians)
sin() | sine |
cos() | cosine |
tan() | tangent |
atan() | arctangent |
Common Functions
abs() | absolute value |
exp() | e to the x |
log() | natural logarithm |
sqr() | square |
sqrt() | square root |
Logical
pos(x) | x if x <= 0 and 0 otherwise |
sgn(x) | 1 if x <= 0 and -1 otherwise |
clip(x) | 0 when x < 0, 1 when x < 1, and x when 0 <= x &rt;= 1 |
sqwv(x) | 1 if abs(x) &rt;= 1.0 and 0 otherwise |
trwv(x) | triangle shape that passes thru (0,0), (1,1), (2,0) and repeats in both directions along the x axis |
seed(x) | seeds the random number generator based on the bits of x, returns x |
Miscellaneous
rnd(x) | a random real number from 0 to x |
trnc(x) | everything to the right of the decimal point in x is dropped |
flor(x) | the largest integer that is also less than x (ex, flor(3.2) == 3, flor(-2.7) == -3 ) |
wrap(x) | x - flor( x ) (ex: wrap( .3 ) == .3, wrap( 4.12 ) == .12, wrap( - 2.7 ) == .3 ) |
Operators
An operator is a something that joins to numbers, such as '+' and '-'. Operators are used to combine two values to make a new value, and the operators available are:
+ - | Add/Subtract |
* / | Multiply/Divide |
% | Modulo or "the integer remainder when A is divided by B" (ex, 8 % 4 == 0, 11 % 3 == 2) |
^ | "A raised to the B power" |
Audio Functions
fft() | Accesses the frequency transform/spectrum of the current audio |
BASS | Contains a value that approximates the overall beat |
Global Values
PI | 3.141592653 |
NUM_S_STEPS | The number of times the X, Y, Z, R, G, B and D expressions are evaluated per sample (set to NUM_FFT_BINS if not specified in a config). |
NUM_FFT_BINS | The number of bins/resolution composing fft() |
Things to remember...
Be Patient
Don't get discouraged if the math seems like a lot. It's simply a matter of
experience and it'll come much easier with just a little time--like riding a
bike. As you explore existing configs, you may want to try using a graphing
calculator to help see how a certain equations behave. A common way to learn
config programming is to alter existing configs and observe the effects of your
changes.
Testing Your Configs
When you're ready to test your config, you have to tell WhiteCap to load a fresh
copy it from the disk. Otherwise, if you switch to a config you've been editing,
WhiteCap won't load your changes (because it's using a cached copy of the config).
By default, the 'U' key will reload the currently displayed configs. In other
words, when you save changes to a config, press the U key to make WhiteCap load
a fresh copy from disk.