Max patching festival: quantized mapping


    Feb 17 2007 | 6:34 pm
    One of the things I did during the last Cycling '74 Max beginner's workshops was to share one of the recent "How might I make a patch that does X?" questions with several different solutions as a way to demonstrate the Max adage, "There's always another way to do it." Some of the attendees found seeing all those answers together sufficiently constructive that they now ask me, "How *else* might I think about doing this?"
    The recent list question falls so elegantly into that category that I almost wish the workshop was *next* week.
    To that end, here's an interesting question about non-linear mapping that strikes me as an interesting possible candidate for demonstrating your elegant patching skills:
    The original question involved a patch that divides an output range into N units, and produces a "stepped" or "quantized" output across that range for any number you input [that is, if you specify a range of 0. - 1.0 and a quantization value of 4, then the step function will output only 0., .25, .5, or .75.
    I suggested that perhaps it'd be smarter to have a patch that outputs .25 .5 .75 and 1.0 instead, but I'm being annoying.
    Okay, Max heads. How many ways can you do this? Since our beginner's workshop only uses vanilla Max objects (with the exception of fiddle~) until the very last day, you might wish to demonstrate your prowess by using vanilla objects only. And we're not necessarily looking for the fewest objects - perhaps the most easily generalizable or graphically lovely?
    Accentuating the positive,
    gregory

    • Feb 17 2007 | 7:21 pm
      bit tougher then I thought it would be.
      heres what I have so far, though I feel like I did this much better in the past.. Ill have to sort through some old files and find it. 2 weird versions here.
    • Feb 17 2007 | 8:12 pm
    • Feb 17 2007 | 9:02 pm
    • Feb 17 2007 | 10:26 pm
    • Feb 17 2007 | 11:53 pm
      here's my solution. it's different than the others so far, probably because i was beginning to think
      about how to something similar in a patch i'm working on... anyway, enjoy.
      max v2;
      david
      ---------- Original Message ----------------------------------
      From: Gregory Taylor
      Date: Sat, 17 Feb 2007 11:34:11 -0700
      >
      >One of the things I did during the last Cycling '74 Max beginner's workshops was to share one of
      the recent "How might I make a patch that does X?" questions with several different solutions as a
      way to demonstrate the Max adage, "There's always another way to do it." Some of the attendees
      found seeing all those answers together sufficiently constructive that they now ask me, "How *else*
      might I think about doing this?"
      >
      >The recent list question falls so elegantly into that category that I almost wish the workshop was
      *next* week.
      >
      >To that end, here's an interesting question about non-linear mapping that strikes me as an
      interesting possible candidate for demonstrating your elegant patching skills:
      >
      >The original question involved a patch that divides an output range into N units, and produces a
      "stepped" or "quantized" output across that range for any number you input [that is, if you specify a
      range of 0. - 1.0 and a quantization value of 4, then the step function will output only 0., .25, .5, or .
      75.
      >
      >I suggested that perhaps it'd be smarter to have a patch that outputs .25 .5 .75 and 1.0 instead,
      but I'm being annoying.
      >
      >Okay, Max heads. How many ways can you do this? Since our beginner's workshop only uses vanilla
      Max objects (with the exception of fiddle~) until the very last day, you might wish to demonstrate
      your prowess by using vanilla objects only. And we're not necessarily looking for the fewest objects -
      perhaps the most easily generalizable or graphically lovely?
      >
      >Accentuating the positive,
      >gregory
      >
      >
      >--
      >knowledge is not enough/science is not enough/Love is dreaming this equation
      >
      Need personalized email and website? Look no further. It's easy
      with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
    • Feb 18 2007 | 4:11 am
      Part of the reason that this particular kind of question caught my attention was that I was curious to see whether or not anyone would think of the problem in other ways than using the expr object, opting for solutions that would be more akin to the "flow" of data than expressions....
    • Feb 18 2007 | 10:32 am
      It's always good to have an example of what not to do. Am I'm embarrasing myself by posting this?
    • Feb 18 2007 | 2:06 pm
      Or this?
      On 2/17/07 6:54 PM, "David Morneau" wrote:
      > max v2;
      >
      Cheers
      Gary Lee Nelson
      Oberlin College
      www.timara.oberlin.edu/GaryLeeNelson
    • Feb 18 2007 | 2:13 pm
      Oops. I saved way right in a large window. Here is is on the left.
      On 2/18/07 9:06 AM, "Gary Lee Nelson" wrote:
      >
      Cheers
      Gary Lee Nelson
      Oberlin College
      www.timara.oberlin.edu/GaryLeeNelson
    • Feb 18 2007 | 3:39 pm
      wow. i had completely forgotten about bline...
      ---------- Original Message ----------------------------------
      From: Gary Lee Nelson
      Date: Sun, 18 Feb 2007 09:13:15 -0500
      >Oops. I saved way right in a large window. Here is is on the left.
      >
      >#P window setfont "Sans Serif" 9.;
      >#P window linecount 1;
      >#P message 118 126 20 196617 $3;
      >#P message 62 66 46 196617 0. 1. 17;
      >#P message 45 42 46 196617 3. 7. 11;
      >#P message 101 167 83 196617 $1 , bang , $2 $3;
      >#P newex 45 165 40 196617 uzi;
      >#P newex 45 89 27 196617 t b l;
      >#P newex 45 232 32 196617 print;
      >#P newex 45 203 111 196617 bline;
      >#P fasten 2 1 4 0 67 136 106 136;
      >#P fasten 2 1 7 0 67 116 123 116;
      >#P connect 0 0 1 0;
      >#P connect 3 0 0 0;
      >#P connect 2 0 3 0;
      >#P connect 5 0 2 0;
      >#P connect 6 0 2 0;
      >#P fasten 7 0 3 1 123 153 80 153;
      >#P connect 4 0 0 0;
      >#P window clipboard copycount 8;
      >
      >
      >
      >On 2/18/07 9:06 AM, "Gary Lee Nelson" wrote:
      >
      >> #P window setfont "Sans Serif" 9.;
      >> #P window linecount 1;
      >> #P message 746 233 20 196617 $3;
      >> #P message 690 173 46 196617 0. 1. 17;
      >> #P message 673 149 46 196617 3. 7. 11;
      >> #P message 729 274 83 196617 $1 , bang , $2 $3;
      >> #P newex 673 272 40 196617 uzi;
      >> #P newex 673 196 27 196617 t b l;
      >> #P newex 673 339 32 196617 print;
      >> #P newex 673 310 111 196617 bline;
      >> #P fasten 2 1 4 0 695 243 734 243;
      >> #P fasten 2 1 7 0 695 223 751 223;
      >> #P connect 4 0 0 0;
      >> #P fasten 7 0 3 1 751 260 708 260;
      >> #P connect 6 0 2 0;
      >> #P connect 5 0 2 0;
      >> #P connect 2 0 3 0;
      >> #P connect 3 0 0 0;
      >> #P connect 0 0 1 0;
      >> #P window clipboard copycount 8;
      >
      >
      >Cheers
      >Gary Lee Nelson
      >Oberlin College
      >www.timara.oberlin.edu/GaryLeeNelson
      >
      >
      >
      Need personalized email and website? Look no further. It's easy
      with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
    • Feb 18 2007 | 4:24 pm
      But that is another wonderful thing about this list. Someone always
      remembers something I've forgotten. This little programming match reminded
      me that an integer in the left inlet of uzi fires that many bangs and defer
      can be used for recursive programming without overflowing the stack.
      On 2/18/07 10:40 AM, "David Morneau" wrote:
      > wow. i had completely forgotten about bline...
      Cheers
      Gary Lee Nelson
      Oberlin College
      www.timara.oberlin.edu/GaryLeeNelson
    • Feb 18 2007 | 4:33 pm
      And singing the generalization song again...
      Linterp by Peter Elsea. No example just look at the help file.
      Cheers
      Gary Lee Nelson
      Oberlin College
      www.timara.oberlin.edu/GaryLeeNelson
    • Feb 18 2007 | 4:46 pm
      Sorry...forgot we are quantizing
      On 2/18/07 11:33 AM, "Gary Lee Nelson" wrote:
      > And singing the generalization song again...
      >
      > Linterp by Peter Elsea. No example just look at the help file.
      >
      > Cheers
      > Gary Lee Nelson
      > Oberlin College
      > www.timara.oberlin.edu/GaryLeeNelson
      >
      >
      Cheers
      Gary Lee Nelson
      Oberlin College
      www.timara.oberlin.edu/GaryLeeNelson
    • Feb 19 2007 | 7:26 pm
      Gregory Taylor wrote:
      > solutions that would be more akin to the "flow" of data than
      > expressions....
      Two objects which seemed obvious for me didn't show up yet:
      scale and modulo...
      (won't work on Max 2.2, but scale is easy to haX... ;-)
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com