element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Hypothetically add Velocity to MIDI keyboard with single analog input?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 8 replies
  • Answers 2 answers
  • Subscribers 391 subscribers
  • Views 1121 views
  • Users 0 members are here
Related

Hypothetically add Velocity to MIDI keyboard with single analog input?

ernek
ernek over 7 years ago

I’m very new to electronics (still working on the Arduino Starter kit projects). My goal is to build a midi keyboard with velocity sensitivity. In every consumer design I’ve seen, this is done with two switches—with a slightly different travel distance—for every key by measuring the time between their closings.

All of these switches are read as distinct inputs with the help of multiplexing. It seemed to me that it might be redundant that both switches in each pair needs to be distinguished by individual key. I thought about this for a while, and thought about a way where the first switches would only tell the controller that a new key has been pressed, without revealing which one.

This might be done by wiring all of the first switches in parallel; each with its own resistor in series. The number of switches activated (likely <10) could be mapped to the current flowing to a single analog input. When this number rises by 1, a key has been pressed. The velocity and pitch could then be determined by the second switch.

I have no idea if this is feasible, or even if it would save more resources than a normal full diode matrix with double the amount of switches...?

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 7 years ago +2 verified
    This is possible, but some issues will need to be addressed. If the switches bounce, which is typical of mechanical switches, it will play havoc with recognizing a discrete state. he key to decent performance…
  • shabaz
    shabaz over 7 years ago in reply to dougw +2
    Hi Doug, With the switches effectively OR'd together (which is what I believe Ernie is suggesting by paralleling them), then it will not be possible to know the velocity of any key other than the first…
  • ernek
    ernek over 7 years ago in reply to shabaz +2
    Sorry if my wording was tangled up in my description. All of the primary sensors are hooked up in a parallel circuit, each with their own resistor of the same value. As the first key or additional keys…
Parents
  • dougw
    0 dougw over 7 years ago

    This is possible, but some issues will need to be addressed. If the switches bounce, which is typical of mechanical switches, it will play havoc with recognizing a discrete state. he key to decent performance will be how well you can debounce the switches.

    The first VCR I bought used this method on its wired remote controller. I bought it at a scratch-and-dent sale so it didn't come with a remote, but I sent away for the schematics (this was before the internet) and deduced that it used a resistor coding scheme (the remote was not included in the schematics). I built my own remote using a dozen of the cheapest switches I could find and a custom resistor network. It worked pretty well, but sometimes it would seem like the wrong button was pushed because the bounce in the switches would look like additional resistance.

    I have also built a MIDI input device with 64 inputs. It used 1 multiplexed analog channel per input to obtain the note, the velocity and the duration. I use piezo sensors with special signal conditioning, but there were issues with crosstalk when I cranked up the sensitivity.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • dougw
    0 dougw over 7 years ago

    This is possible, but some issues will need to be addressed. If the switches bounce, which is typical of mechanical switches, it will play havoc with recognizing a discrete state. he key to decent performance will be how well you can debounce the switches.

    The first VCR I bought used this method on its wired remote controller. I bought it at a scratch-and-dent sale so it didn't come with a remote, but I sent away for the schematics (this was before the internet) and deduced that it used a resistor coding scheme (the remote was not included in the schematics). I built my own remote using a dozen of the cheapest switches I could find and a custom resistor network. It worked pretty well, but sometimes it would seem like the wrong button was pushed because the bounce in the switches would look like additional resistance.

    I have also built a MIDI input device with 64 inputs. It used 1 multiplexed analog channel per input to obtain the note, the velocity and the duration. I use piezo sensors with special signal conditioning, but there were issues with crosstalk when I cranked up the sensitivity.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube