MIDI Elements Teensy Library V2

After quite some time, I finally found a chance to update the MIDI Elements library, improve some features and make a proper documentation for it.
After a lot of requests I added a class for endless encoders and RGB LED’s. Also added mapping features for the Potentiometer class that makes it easier to use with more unconventional sensors like infrared range finders, photoresistors, etc.

And planning to do some tutorial videos in the near future using each component.

*wink wink* donation button is to the right.

As before, you can download the library here github
To install extract the MIDIElements folder in your arduino/libraries directory.

Documentation can be found here.

6 comments for “MIDI Elements Teensy Library V2

  1. Brad
    June 5, 2014 at 5:51 am

    You’re awesome man!

  2. Maurice
    October 21, 2014 at 8:18 pm

    This is fantastic and saves so much time, let alone the simplicity it creates. Is it possible to provide a short writing with guidance on how to use the code for multiplexing, which is a big challenge for many I am sure.

    • Tomash
      November 4, 2014 at 8:35 pm

      Hi, to quickly answer your question, you can make multiple instances of lets say potentiometers, in an array, assigned to the same Analog Pin that the multiplexer is on, switch your multiplexer channels right before reading the next instance of a potentiometer in a loop.

      like this

      Potentiometer *pot[6];

      void setup(){
      // setup mux pins
      for(int i=0; i<6;i++){
      expPot[i]=new Potentiometer(A6,controlChannel,21+i,false,debug); // multiplexer on A6

      void loop(){
      for(int i=0; i<6;i++){
      setMux(i); // function that changes the multiplexer channels

  3. Jordan z
    November 17, 2014 at 1:33 pm

    Any chance of velocity sensitivity being included in the future for projects more akin to traditional drum controllers?

  4. Daniel Cunningham
    April 21, 2015 at 7:20 pm

    Hi Tomash,

    These libraries look amazing. I’m just getting started with using a Teensy 3.1 to build beginner midi hardware. I’m trying to get just a simple Rotary Encoder knob turn to read in something like Logic Pro to just rotate plugin knobs. I’m trying to use and understand your teensy encoder library to get that result. Would i add like a “usbMIDI.sendControlChange(B0, +1, 1);” in the event handlers, or do you maybe have a sample of a functional rotary encoder example?

    thanks again!


Leave a Reply

Your email address will not be published. Required fields are marked *