Any way to know the direction a fader is being moved?
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Tech Mentor
    Join Date
    Dec 2008
    Posts
    217

    Default Any way to know the direction a fader is being moved?

    It seems the faders are by default "absolute" in the sense that they go from 0 to 100 (left to right, invert) or 0 to 100 (top to bottom, invert).

    Anyone ever found a way to know the direction it's being pushed?

    Would love for Traktor to get some programming language

  2. #2
    Tech Mentor gfocus's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    130

    Default

    What exactly are you trying to do? Sounds like your planning something that would require the use of Bomes.

    And yes, some sort of scripting language instead of that crappy midi mapping dialog would rock.

  3. #3
    Tech Mentor
    Join Date
    Dec 2008
    Posts
    217

    Default

    Was trying to have one side of the cross-fader do something, and the other side something else? (mainly, different deck focus)

    Will look into Bomes, thanks!

  4. #4
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    Quote Originally Posted by freakerz View Post
    Anyone ever found a way to know the direction it's being pushed?

    To get the direction of movement, you need to take the difference between the current and previous value and, if the result is positive you're increasing, negative you're decreasing.

    Keeping a copy of the previous value is exactly what Bome's "global variables" are designed to do, and unfortunately Traktor has no ability to keep information around about the earlier state of a controller, so Bome's is your friend here.

    Interestingly, taking the difference between two values in a sequence is exactly the same as calculating the derivative of a discrete function ("discrete" because it comes in individual steps instead of being a continuous value). All the normal rules of Calculus can then be applied, so taking the difference will calculate the "velocity" (direction of change) of your movement and the difference between velocities will give you the "acceleration" (speed of change). This way you can tell not only which direction the controller moved, but also how "hard" you moved it.

    Might be useful for putting some expression into a knob movement - tweak the filter cutoff in proportion to the speed of a change will give you an interesting "blurp" on fast movements. Not a convincing example, but something to play with!
    Last edited by Fatlimey; 02-25-2009 at 12:40 PM.

  5. #5
    Dr. Bento BentoSan's Avatar
    Join Date
    Mar 2008
    Location
    Perth, Australia
    Posts
    6,383

    Default

    Ive actually already written code for this in Bomes, let me see if i can dig it up

  6. #6
    Dr. Bento BentoSan's Avatar
    Join Date
    Mar 2008
    Location
    Perth, Australia
    Posts
    6,383

    Default

    This was made for the VCI-100 crossfader, but it can be reworked to work with any fader

    Translator 1

    Incomming : B0 08 pp

    if g0<128 then skip next 2 rules
    g0=pp
    exit rules, skip Outgoing Action
    if pp<g0 then skip next rule
    Goto "Larger"
    Goto "Smaller"
    Label "Larger"
    g0=pp
    if g1==1 then exit rules, skip Outgoing Action
    g1=1
    pp=127
    oo=94
    exit rules, execute Outgoing Action
    Label "Smaller"
    g0=pp
    if g1==2 then exit rules, skip Outgoing Action
    g1=2
    pp=127
    oo=95
    exit rules, execute Outgoing Action

    Outgoing: 90 oo pp


    Translator 2

    Incomming: Project Opened

    Rules: g0=128

    Outgoing: None

    If you find this code useful think about making me a dontation because you have absolutely no idea how on the bones of my ass i am at the moment.

    Last edited by BentoSan; 02-25-2009 at 06:45 PM.

  7. #7
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    Quote Originally Posted by BentoSan View Post
    Incoming: Project Opened
    Rules: g0=128
    Outgoing: None
    He even includes the initial setup so there are no burps the first time you move the CC. That's quality code right there. Bravo!

  8. #8
    Tech Guru Monika.mhz's Avatar
    Join Date
    Dec 2008
    Location
    Portland, OR
    Posts
    987

    Default

    hah, Bento, your code looks almost exactly how I would recommend it. nice one bruva.
    Monika.mhz - I do things. Also stuff.
    -------------------
    Read the F.A.Q!
    Articles: Streamline Your Laptop for Djs(Windows)

  9. #9
    Dr. Bento BentoSan's Avatar
    Join Date
    Mar 2008
    Location
    Perth, Australia
    Posts
    6,383

    Default

    Quote Originally Posted by Fatlimey View Post
    He even includes the initial setup so there are no burps the first time you move the CC. That's quality code right there. Bravo!
    Thanks man, i pride myself on doing stuff properly

  10. #10
    Dr. Bento BentoSan's Avatar
    Join Date
    Mar 2008
    Location
    Perth, Australia
    Posts
    6,383

    Default

    btw, fatlimey that code you were talking about of also having the knob accelloration is an awesome idea, im gonna play with that concept.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •