These objects used to be in a separate library called MarkEx, but they have now been folded into GEM.
counter - count the number of bangs
average - average a series of numbers together
change - only output when there is a change in
the number
invert - invert a number
randomF/randF - floating point random number
tripleLine - line object for 3 values
tripleRand - three random numbers
vector objects - process a series of numbers
hsv2rgb and rgb2hsv - convert between RGB and
HSV color space
The inlets are:
bang (increment or decrement the counter)
set direction (1 = count up, 2 = count down, 3 = count up and down)
set low value
set hight value
The outlet is the current count.
So in this case, the top counter will count up from 1 to 10. The bottom counter will count up from 2 to 5.
The counter also accepts the messages reset and clear. Reset immediately sets the counter to its low value and outputs the value. The clear message means that the next bang will set the counter to its low value.
The average object also accepts the messages clear and reset. Clear will immediately set all of the values that the object has been storing for averaging to 0. With the reset message, you must pass in a number to set all of the values.
This object is very useful for the == object and others like it, since they send a 0 or a 1 every time they do a comparision, and you usually only care when the state actually changes.
When the left inlet gets a bang, randomF outputs a random number between 0 and the given range. The range can be set with a number to the right inlet.
randF is just an alternate name for randomF.
The line object is really great for dealing with a single number. To do a line with 3 values, like an RGB color value, means that you have to unpack, do a line, then repack the number. Not only is it a pain, but it expensive computationally.
tripleLine behaves just like the line object, only it accepts three numbers to interpolate between. In the example, tripleLine will interpolate from the current values to 1., .2, .4 over 1000 milliseconds. The default output resolution is 50 milliseconds, which is the same default rendering time. Going faster with GEM objects will not produce any benefit, unless you increase the frames per second.
Just as using tripleLine makes it easier to interpolate between 3 values at once, tripleRand makes it easy to generate three random values. In the above example, when the bang is sent, tripleRand will create three values and output them, with the first between 0 - 1, the second between 0 - .5, and the third from 0 - .8.
There are two other objects which are also useful.
The first is vectorabs or vabs. It computes the absolute value on a list of numbers.
The second object is vectorpack or vpack. vpack accepts a list of numbers in the left inlet and a single number into the right inlet. The output is a single list of numbers that is the vector with the single number appended to the end. This is very useful when you want to change the time for a tripleLine without unpacking and repacking all of the data.
You can get some really nice effects by varying the hue of a color, because the brightness will not change while you do it.