In this example, the horizontal location of the mouse in the screen is used to determine whether to send a bang or not. The mouse moving from one side of the screen, passing the mid point to the other side of the screen, causes a bang to be sent to the gswitch2 object. 

Mouse click kslider

In this example, you can play notes by pressing the mouse on the kslider object, and when you release the mouse, the notes will be turned off. When the mouse button is released, that fact is reported by a 0 from the left outlet of the mousestate object.

The ‘alpha’ attribute of a picture

In digital images, each pixel contains color information (such as values describing intensity of red, green, and blue) and also contains a value for its opacity known as its ‘alpha’ value. An alpha value of 1 means totally opaque, and an alpha value of 0 means totally transparent. This value can be used for blending images, or for making all or part of an image totally transparent.

Linear mapping of ranges

To translate numbers that occupy a particular range into an equivalent set of numbers in a different range, one common and useful technique is "linear mapping". The term "mapping" refers to making conceptual connections between elements of one domain and elements of another, and "linear" mapping refers to using a mapping function that is a straight line––that is, such that numbers in one domain are mapped to an exactly equivalent position in the new domain. This is a very common and useful operation in media programming.