Can anyone explain why encoders aren't the same as buttons?
Results 1 to 7 of 7
  1. #1
    Tech Guru MiL0's Avatar
    Join Date
    May 2009
    Location
    Brighton / Bangkok
    Posts
    1,387

    Default Can anyone explain why encoders aren't the same as buttons?

    Seems to me that a step encoder is simply a knob that when turned in one direction (one click) it sends a digital (non-analogue) signal and vice-versa. Why is that a lot of midi brains can't accept encoders as simply two digital buttons? (or three buttons if the encoder has a momentary push button)

    Is it to do with the acceleration of when you turn an encoder quickly? I thought this was handled in software?

  2. #2
    DJTT Super Moderator midifidler's Avatar
    Join Date
    Mar 2008
    Location
    San Francisco
    Posts
    1,905

    Default

    Physically (electronically) there is no reason two digital buttons inputs cant read an encoder, however the code needs to be changed to decode the inputs correctly. So then the developer needs some way that the user can switch between the inputs being buttons and encoders, without adding much cost to the product, and also being easy for non-techs to understand. Those last two are the problems...

  3. #3
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

    Default

    this is what you (and i) are looking for

    http://www.mouser.com/catalog/specsheets/TW-700079.pdf

    "It's a pulse switch which only contacts in the direction of rotation.
    so now there is a solution to the 'Encoder' Problem. You can send either two repeated Keystrokes or repeat two seperate Joystick button Inputs.
    you get Repeated Joystick Button Presses based on the direction you turn the switch. Opens up all kinds of possibilities doesn't it."

    found here

    looks like these guys have the same problems has we have...

  4. #4
    Tech Mentor safefire's Avatar
    Join Date
    Aug 2010
    Posts
    260

    Default

    Most encoders spit out digital data in a form known as Grey Code.
    Grey Code is a kind of scalable digital format that, among other things, allows the receiving end to know where on the 360 rotation the encoder is facing.

    It's quite useful here and there, like for knowing where you left and encoding from one session to the next, etc.

    For most purposes though, especially ours, it's just a pain in the back.
    I guess one could fairly simply create a bit of logic to bypass this, though. I might look into, but business calls as always.
    Fixing stuff that isn't broken.

  5. #5
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

    Default

    have a look here

  6. #6
    Tech Mentor
    Join Date
    Feb 2011
    Location
    Southern Ontario, Canada
    Posts
    244

    Default

    Actually, the better explanation would be here:

    [ame="http://en.wikipedia.org/wiki/Rotary_encoder"]Rotary encoder - Wikipedia, the free encyclopedia@@AMEPARAM@@/wiki/File:Gray_code_rotary_encoder_13-track_opened.jpg" class="image"><img alt="" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Gray_code_rotary_encoder_13-track_opened.jpg/220px-Gray_code_rotary_encoder_13-track_opened.jpg"@@AMEPARAM@@commons/thumb/a/a8/Gray_code_rotary_encoder_13-track_opened.jpg/220px-Gray_code_rotary_encoder_13-track_opened.jpg[/ame]
    [ame="http://en.wikipedia.org/wiki/Gray_code"]Gray code - Wikipedia, the free encyclopedia@@AMEPARAM@@/wiki/File:Reflected_binary_Gray_2632058.png" class="image"><img alt="" src="http://upload.wikimedia.org/wikipedia/en/thumb/c/c4/Reflected_binary_Gray_2632058.png/220px-Reflected_binary_Gray_2632058.png"@@AMEPARAM@@en/thumb/c/c4/Reflected_binary_Gray_2632058.png/220px-Reflected_binary_Gray_2632058.png[/ame]


    Woah neat... I had no idea the forums would do this to the wikipedia links...

  7. #7
    Tech Mentor fbonito's Avatar
    Join Date
    Nov 2010
    Location
    lisbon
    Posts
    220

Posting Permissions

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