The MC Wrapper lets you treat all the instances within it as a "space" that can be set to algorithmically generated values. There are a number of approaches you can use to generate a space of values including:
- the js object in conjunction with the message
- the mc.gen object using the mc_channel operator in conjunction with mc.target
Generating Random Values for All Wrapper Instances
To generate a random space of values for all wrapper instances, use the mc.cycle~ object. As the slider value is increased, the range of values ("width") increases. When the slider is set to 0, values generated will be 440 because the width is 0.message. The first argument to the message is the "width" of the deviation. The second argument is the center value. Here is an example of changing the frequency of all oscillators in an
Optionally, you can specify an attribute or message that will be used instead of a float or int. Here is lores~ object. It may help to think of the syntax of wrapper generation messages as follows: the first argument is the operating parameter (how, for example, will do its job), and everything that follows is the message that it will use to change the value of an instance.applied to the attribute of the
Generating a Range of Values for All Wrapper Instances
To set instances within the wrapper to a range of values, use themessage. This message follows the same syntactical pattern as the message. The first argument is the beginning of the range to generate, and the second argument is the end of the range. If the end is above the beginning, the first wrapper will receive the lowest value. If it's negative, the first instance will receive the highest value. The message has three variants that specify how the range is calculated. includes both the first and second values in the range. exclusives both the first and second values from the range. And includes the second value but not the first. By convention is the same as ; it includes the first value but not the second value. The following examples show the differences in these variations:
Generating Exponential Series
To generate an exponentially increasing or decreating series of values applied to all instances in the wrapper, use theor messages. The first argument is the value of the exponent in the series and the second argument is the base that is raised to the exponent. Negative exponents cause values to increase over the series while positive exponents cause values to approach zero. The variant divides values in the series by the number of instances in the wrapper, resulting in an overall range that is independent of the number of instances.
Generating Harmonic Series
To generate a harmonic series of values applied to all instances in the wrapper, use theand messages. Each message assigns the first instance in the wrapper to the first harmonic (or subharmonic), which is given by the second argument (the fundamental frequency) and subsequent harmonics or subharmonics to successive wrapper instances.
The first argument is a multiplier on the harmonic calculations, typically this is set to 1 for a harmonic series. As an example, here are the first harmonics and subharmonics for 500: