converting absolute controllers to relative,

    Apr 06 2006 | 9:27 pm
    I'm about to build an object to convert absolute MIDI data to relative,
    but before I do, I just wanted to make sure no one else has already done
    this. A quick search of the forum and maxobjects tells me "no" - but you
    never know...
    Yes, it may seem strange to want to do this, but I have here the new
    faderfox LV1 and it has 13 modes of absolute rotary knobs set to
    absolute, which is silly, so I want to remap them to be relative [since
    its rotary encoders]

    • Apr 07 2006 | 9:01 am
      If an abstraction rather than an object is OK for you, have a look at
      this patcher...
      Roald Baudoux
      max v2;
      Roald Baudoux
    • Apr 07 2006 | 12:25 pm
      wow thats more than i was expecting! thanks!
      i especially like how you use the "bucket" object, elegant.
      however, its not this simple, since i need to go from:
      1+ = up
      127- = down
      and at the edges, when the rot knob is spinning in only one direction it initially sends values say from 127 down to 0 and then it just keeps sending 0's with every 'tick' in the left dir. Same thing with the updirection, great relative 2 bits until it hits 127 and then it just sends 127 out.
      My follow up question is; how can I measure the the rate of the knob spin [to translate it into an integer in "relative 2's compared" format] in an elegant manner?
      The only solution I can think of is to have a seperate clock/metro running which measures the rate at which the successive 0's or 127's enter to then translate that into a more meaningful value... but this doesn't feel right; too complicated.
      Would anyone have an alternative method for measuring "rate of change" at the edges?
      Once i've built the converter for the faderfox LV2 [incl. listeners for the correct midi cc, ch its set to], I'll post it so others can also use it.
      Here is what I have so far:
      Thanks again,
      S Chedal.
    • Apr 07 2006 | 6:40 pm
    • Apr 07 2006 | 6:49 pm
      I guess it has something to do with the mouse tracking. The 0s and 127s
      are there because you do not have a change of value for every mouse
      displacement. That's quite logical because you get only 128 values for
      something like 360 degrees. You can get rid of these values by
      inserting a change object at the output of the dial but I guess this
      wouldnt' happen with a slider or a real MIDI controller.
      However some jumps still happen...
      Roald Baudoux
    • Apr 07 2006 | 8:28 pm
      Thanks Roald Baudoux,
      Couple of things:
      1st: I resolved the issue by realizing that the faderfox has a feedback
      system so I don't need to transform the abs to relative anymore! doh!
      and: youpie!
      2nd: I have made a new feature for the LV2 called "auto track select on
      fader touch" - many other LV2 owners may find this useful, you can find
      the code at the bottom of this email.
      For the book, let me at least clarify what the issue was:
      Ok, I guess I was not very clear...
      Here is an example:
      When I turn the external abs controller to the right, it sends the
      following data:
      If I turn it fast to the right it could send something like this:
      In both cases, the code works because it moves a relative signed 2 bit
      controller in my software [Ableton live].
      However, in "case one" I am turning slowly, in case two I am turning
      fast. When i reach the end of the data range of the absolute controller
      it sends out "127" no mater how fast i am turning the knob; so I need
      some other mechanism to determine how fast I am turning otherwise I get
      a non-linear/unpredictable output. Hence my idea to use a counter to
      measure the rate at which the "127" data enters the system.
      The output of the system is either 1 or 127. But the way relative 2 bit
      works is that you can also have an output of 4 or 122. A "4" means move
      up 4 steps and a "122" means move down 128-122=6 steps. this makes it
      possible to "spin" these kinds of relative controllers quickly for rapid
      changes - a form of smart acceleration.
      What i was asking is if there was a smart / elegant way to measure a
      rate of change, or if the only way to measure rate is to use a
      time-control object; like metro?
      LV2 feature addition: Auto select track on fader touch: Connect the out
      port of your system back to the LV2 to have the LV2 auto-switch tracks
      when moving a fader! Enjoy!
    • Apr 08 2006 | 12:40 am
      If I understand correctly, you should be able to just trigger dec- or
      incrementation. If you're getting a stream of 127s, you should
      transform that into a stream of +1s, if that makes sense... assuming
      your controller does not skip values when used quickly. Otherwise it's
      For rate of change, off the top of my head, you might want to look into
      thresh and zl len. Haven't tried this one myself but it seems workable.
    • Apr 08 2006 | 4:36 am
      Here is a version I made that responds to rate of the input from a relative controller. It was made for the jog wheel of a US-224 so its input values ( inc and dec) may need to be changed for your purposes.
    • Apr 08 2006 | 6:38 am
      inforazor wrote:
      > My follow up question is; how can I measure the the rate of the knob
      > spin [to translate it into an integer in "relative 2's compared"
      > format] in an elegant manner?
      Have a look at my dialin objects @ cycling/share.
      [][] [][][] [][] [][][]
      Stefan Tiedje
      Electronic Composition
      \ /|() ()|
      ))))) )| | |( \
      /// _/)/ )))))
      ___/ ///
      --(_|_ ----|-----|-----()----
      -- _|_)----|-----()-----------
      14, Av. Pr. Franklin Roosevelt,
      94320 Thiais, France
      Phone at CCMIX +33-1-57 42 91 09