The physical world is full of continuous movement. Think of the activity on a busy street corner: people walking by or stopping to talk, the flow of traffic, the swinging of shop doors, flapping flags, the rustle of wind in trees or the slow motion of clouds overhead. Many of our mathematical tools for describing these phenomena and reasoning about them rely on the continuity of real numbers. If we measure two different distances, there is always room for a third measurement that falls in between those two. Many of the mechanical or electrical devices that we use to control physical systems are also continuous. We expect a car to make any turn wider than its tightest turning radius and a stereo to provide any volume between off and its maximum output.

Sometimes it is pragmatic to act as if the world is not continuous, however. We say a light is either off or on, regardless of whether it seems to be drawing more or less power or perhaps flickering. Gates are open or closed, turns are right or left, organisms are alive or dead. We distinguish more states or shades of grey only when necessary. This ability to represent continuous phenomena as if they are in one of a number of discrete states underlies the technology of digital computers. As we use Max to make connections, we will find that we are often mapping continuous inputs in the world to discrete representations in the computer, and from those back to continuous outputs in the world.

Most of the Max objects that we’ve used so far have a limited number of states. Some, like button, toggle, and led, have only two: they’ve either been pressed, selected or lit, or they have not. An object like radiogroup can take on more discrete states, but it will lose its utility if you provide too many options. Max has other objects that are more useful for representing continuous phenomena, and some of these are introduced in the patch below. The raw code link is here.

When you are working with continuous values, it is often important to be able to set lower and upper limits, and to scale your values into a particular range. Some basic tools for working with continuous values are presented in the patch below. The raw code link is here.

Now that you’ve had a chance to experiment with dials, sliders and floating point numbers a bit, finish by working through Max Basic Tutorial 6: Simple Math in Max and Max Basic Tutorial 7: Numerical User Interfaces. The online help files for the new objects that we covered are listed below