/*! \page fundamentals STK Fundamentals The Synthesis ToolKit is implemented in the C++ programming language. STK does not attempt to provide a new programming environment or paradigm but rather provides a set of objects which can be used within a normal C++ programming framework. Therefore, it is expected that users of STK will have some familiarity with C/C++ programming concepts. That said, the STK classes do have some particular idiosyncrasies that we will mention here. \section Signal Computations: Audio and control signals throughout STK use a floating-point data type, StkFloat, the exact precision of which can be controlled via a typedef statement in Stk.h. By default, an StkFloat is a double-precision floating-point value. Thus, the ToolKit can use any normalization scheme desired. The base instruments and algorithms are implemented with a general audio sample dynamic maximum of +/-1.0. In general, the computation and/or passing of values is performed on a "single-sample" basis. For example, the Noise class outputs random floating-point numbers in the range +/-1.0. The computation of such values occurs in the Noise::tick() function. The following program will generate 20 random floating-point (StkFloat) values in the range -1.0 to +1.0: \code #include "Noise.h" int main() { StkFloat output; Noise noise; for ( unsigned int i=0; i<20; i++ ) { output = noise.tick(); std::cout << "i = " << i << " : output = " << output << std::endl; } return 0; } \endcode Nearly all STK classes implement tick() functions that take and/or return sample values. Within the tick() function, the fundamental sample calculations are performed for a given class. Most STK classes consume/generate a single sample per operation and their tick() method takes/returns each sample "by value". In addition, every class implementing a tick() function also provides one or more overloaded tick() functions which can be used for vectorized computations, as shown in the next example. \code #include "Noise.h" int main() { StkFrames output(20, 1); // initialize StkFrames to 20 frames and 1 channel (default: interleaved) Noise noise; noise.tick( output ); for ( unsigned int i=0; iMain tutorial page]   [Next tutorial] */