Saturday, 30 April 2016

Arduino MIDI Controller: Buttons

Push It!

In this installment of the MIDI for the Arduino Series, we will add Push Buttons to the Midi Controller we started building in the last chapter.

Before You Start

This tutorial will ONLY work with the Arduino UNO. (Please don't ask if it will work on other Arduino models.) I am using some direct port manipulation in the code that is currently specific to the UNO. I'll let you know if this changes in the future.

The Software

To make things simple, I have created a plug and play program that will allow you to customize your controller. All you need to do is tell the software the number of controls you will be using and how these controls should behave and the software will take care of the details. The video explains how to configure the software for your project.

Download the software HERE

Build It!

Watch this video for a step by step guide.

20 comments:

  1. Quick question, I am using an infrared distance sensor for a high filter pass, is there any way I can invert the signal so the number goes up as it gets closer instead of visa versa?

    ReplyDelete
    Replies
    1. is the signal out of your infrared sensor analogue? If it is, you may be able to use a transistor circuit to invert the signal like you say, but you may be able to also do that through the use of some code in your arduino.

      Delete
  2. this is really interesting, but I just bought a NANO :-( I have never programmed before and have no idea what direct port manipulation is but love the idea of creating my own custom controllers and this looks like a better way to do it than my NOCTURN

    ReplyDelete
    Replies
    1. 1)Read
      3)Practice
      2)Git gud
      there are lots of tutorials for everything, start with the Arduino IDE, free in the official website

      Delete
  3. Okay here is a question - can I use an Atmega 328P-PU chip with Arduino UNO boot Loader - essentially this would be an UNO ??? so I can build the whole thing a bit smaller? Thanks

    ReplyDelete
    Replies
    1. Hi Mark. Yes you can. I cover that topic in this article http://www.notesandvolts.com/2014/07/fun-with-arduino-arduino-on-proto-board.html

      Delete
  4. Hi, i have MEGA 2560. i have mailed you my issue please reply.... thanks

    ReplyDelete
  5. Hello, you could make a tutorial on how to put more analog and digital inputs and outputs to arduino? I'm doing a midi controller and I need more analog and digital connections. In the code that is shared programming but do not know how to connect and configure, you could help me with that?
      Thank you very much

    ReplyDelete
    Replies
    1. Hi Carlos. Use multiplexers like this http://www.notesandvolts.com/2016/07/arduino-midi-controller-multiplexers.html

      Delete
  6. hi,fantastic job,,,,is it possible to reduce the volume of the notes as I am using them to set off track play and stop buttons etc and i get this annoying note playing everytime i hit the switch

    ReplyDelete
    Replies
    1. Make sure that there are no other instruments or plug-ins set to the same Midi channel as you transport controls.

      Delete
  7. Hey Dave, is it posibel to use the code for sending over sreival/usb

    ReplyDelete
  8. Awsome Tutorials!! ive been looking for something like this for a long time. I started proototyping this weekand ran into a small problem, when i set the buttons to output CC data(cmd1 or 2) it works until i stop pressing the buttons for 2 or more seconds.

    It then somehow forgets to send midi.

    BUT strange thing, if i then press a note button the CC buttons work again until i stop pressing them for about 2 seconds. Any Help?

    ReplyDelete
  9. Hi,

    I used your code and my setup works fine. Thank you for that. I need a little MOD in the code that IF A BUTTON IS PRESSED IT GENERATES A NOTE AND WHEN RELEASED IT GENERATES ANOTHER NOTE.

    Please Help.

    Thank you.

    ReplyDelete
  10. Is there a way to get this to work with Photocell sensors?

    ReplyDelete
  11. please tell me ,how to create programme change button ?(ex Button BU1(9, 1, 0, 10, 1 );)

    ReplyDelete
  12. Hello Dave,
    Is possible to use only USB port to send CC notes to
    e.g. example Guitar Rig, without standard MIDI socket?

    Kind Regards
    Beardini

    ReplyDelete
  13. Pascal van Harten13 October 2017 at 12:48

    Hi man,

    Could i use piezo disks for this. I wanna make this by stepping on a 'button'.

    Kind regards

    ReplyDelete
  14. If AT ALL possible, could you post a video with this same concept but with a board like the Leonardo that will transmit Midi over USB? A LOT of people would really appreciate it!

    ReplyDelete