MC Recipe 02: SettingPlotter


    The Max Patch ...
    ... and the mc.plotscaler abstraction in detail.
    All recipes in this series: Recipe 00, Recipe 01, Recipe 02, Recipe 03

    MC Concepts

    • Use the deviate and spread messages with wrapped MC objects
    • Use the plot~ object to visualize generated MC results

    Commentary

    In the last two recipes, we targeted individual instances of MC objects to affect their actions. "Wrapped" MC object - MSP objects that are enclosed in an MC wrapper - respond to a number of messages that generate instance-specific behavior. The deviate and spread messages are two examples.
    In some cases, it can be difficult to understand exactly what is happening with these objects. To provide more insight, we create a scaling system that can produce a visualization of the generated results.

    Ingredients

    • mc.sig~ : An MC-wrapped static signal generator
    • deviate and spread messages : Messages that generate value variations
    • mc.snapshot~ : Creates messages from individual MC channels
    • mc.makelist : Assembles a list from multiple channel sources

    Things to Note:

    1. The deviate message produces values around a centerpoint with a defined deviation. In this case, the slider produces values between 0. and 1., and are sent to a message box which will cause a deviation of that value, centered around 1.0. This will cause the mc.sig~ to generate values from 0.0 to 2.0.
    2. An alternative generation message is the spread message, which will create an even range of values between a low and high value. In this part of the patch, we make simple calculations to create a spread evenly spaced around 1.0.
    3. The mc.plotscaler abstraction (included in the download) sets up a plot~ object, sets the number of points to the number of channels, and creates a display list from incoming MC signal values. The arguments sent to the abstraction defines the low and high end of the display range.
    4. You can change the number of channels that are calculated, but the actual number of channels flowing through the MC patchcords will not be altered until you turn the DSP off and on again. Use the attrui object to change the number of channels while DSP is running, then cycle the DSP switch to see the change in the patch.

    Additional Options

    Option-click (right-click on Windows) on a wrapped MC object to see the available options available for those objects. Among the details displayed in the help files, you will find a number of additional messages that can generate interesting value ranges.

    • Oct 24 2018 | 12:33 pm
      Raja,
      Thanks for the heads-up; the patches were supposed to be in there, but they were missed. I've taken care of that.
      Regarding the explicit @chans requirement - did you try flipping the DAC on and off again after changes? Toggling the DAC should cause the 'downhill' objects to adapt to the number of incoming channels.
      But I'm glad to hear you are experimenting with the patchings - some of the additional generators (like harmonic) are pretty amazing.
      [ddg]
    • Oct 26 2018 | 10:49 am
      HI
      if i input a "deviate" value which is greater than 1 I will, in the case of that patch with those values, have chances to generate values (frequencies of [cycle~] ) which will be negative (such as -0.6) - which is normal. In the case of a "normal" (non-mc) patch I would use a flonum with a set minimum (to, say, 0.01). in the case of MC how (with which object) could i set a "hard-floor" (or ceiling) ?
      kasper
    • Oct 26 2018 | 10:52 am
      kasper,
      You could use an mc.clip~ after the mc.sig~ in order to prevent out-of-range numbers. Or you could also manage the values on the input (the number going into the deviate).
      [ddg]
    • Oct 26 2018 | 11:04 am
      Mc.clip~ - of course ! thanks
      k