Help with max CC out?

  • Hi,

    I'm new to Max and looking for some help. I'm building a patch to take my encoder data and turn it into CC messages. I'm having a few problems with my patch. First, I can limit my controller value to 0 - 127 in a number box, but that only reflects in the display. in other words if I rotate the encoder 4 times, the number will display as 127, but to get back to 127 I will have to rotate the encoder back several times before the number decreases from 127. It's like the value is mch higher than 127 but only displayed as 127. I need to limit it to 127.

    Also, I'm not sure I'm using 'ctlout' properly. Live can see the MIDI, but cannot learn it with the midi learn function. I can see the little midi lights flash in the "MIDI from display, but live can't learn it.

    I'm using monomeserial .20 because I'm working with the encoders.

    Here is my patch

    Thanks for any help






  • Looks like I needed to select "Remote" in Ableton Live to allow it to learn the knobs. I still wonder how to limit the number objects to 0-127 ranges.

  • u should be able to do that in the object's inspector

  • is it possible your encoder is sending values outside of the 0-127 range? in that case u can use the scale object to scale your encoder values to 0-127.

  • Seems like the encode sends a 0 for clockwise, and then a 255 for anti-clockwise. Unless I throw it fast, then it can show like 0-5 for clock wise and 250-255 for anti.

    So I just increment or decrement it into a number, that I limited with the inspector, but decrement continues to decrement it even if the minimum is 0.

    Thanks,

    Jimmy

  • u need to set the inc/dec to 0 if < 0 or 127 if >127. i'm sure there's a better way to do this, but this should do.


    ----------begin_max5_patcher----------
    1188.3oc6Z1saihCEG+5jmBKzbY1VayGFVMZj161q1WfUiFQ.mFOBLHvzMcG
    Mu6KXC6jIK33TJtT08hVDNDy+yONmiOGG911MN6KNQqc.+J3OAa17ssa1HGp
    afM8muwIO9TRVbs7xb3z+pX+Wc1o9HA8jPNL6.3CLD3S.Dl.DGobPQi.KOil
    US69vguygBtnl82ztuWzcv9Q4M4LdFUHuKneLX6zLLJtezxXQxQF+guTQSDJ
    siB8ZmIfm5.xKPdfbGD749uDKUpyVs+KtvykBONWJEmeml8HUvRhA+AsgNbI
    p6u3oRp5N43rq8Ovm69zuuca2+1YH5xo00wOP+OrqlJ.e3VvCdT7flFOXrqD
    OpCt9R53OAcPyhNOKxn2o5i.3YtTPq5P4SjrBq2gB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krn
    dLAOX6sfN1nx2sWZvK1VfIzi8Vk3hJymHyiEauwX9fridLIUnEedYjdPQ1iO
    Al97B+LziZqCiKKejVU2OmRo3jG+0hptSC1sU8pznNUt4mNUzGYCWejbj3pj
    iLAMQzTo1JySgANa6tOee6+vTLya+
    -----------end_max5_patcher-----------

  • Thanks el quinto! I didn't know you could do that. I'll try it. I was thinking, If I turn the encoder left, I get 255, but is there a way to get signed ints? Because the 255 is probably not 255, right it must be a -1? Thanks

    Jimmy

  • check out the substitute object. u can sub the 255 with a -1

  • elquinto,

    Your patch works great, keeping the value between 0-127. Thanks very much.

    Now when I try to add back a bunch of midi notes (note.mxb) as bpatchers, they don't work.
    There is something I don't understand about how the note.mxb is meant to work.

    (How did you paste your patch right in the window?)

  • in max, you just cmd-a (select all) then choose 'copy compressed' from the menu.

  • I can't seem to paste it. I have to "copy compressed" then make a file then attach it here.

  • Figured out why my midi notes couldn't come from the buttons. There was a sub-patch there and it had a different route object inside.