Reply to Library for super EASY Teensy MIDI programming
Library for super EASY Teensy MIDI programming Do you want to build your dream controller but don't have the know-how or just can't be bothered going through that complex process of programming? Not a problem at all, I have developed a library for Teensy that wraps up and hides the ugly process of reading pins and deciding whether to send MIDI signals or not, into couple of easy to use Classes. Just create an instance for each component of your controller, like Button, Potentiometer, LED etc and just with couple lines of code never bother again about the logic behind it. Here is a simple example for a fully functioning one button and fader controller: Code:
boolean debug=false; // print to serial instead of midi boolean secondary=true; // enable secondary midi messages int midiChannel=1; // midi channel number // declare all your components here Button but(17,midiChannel,1,secondary,debug); // button 1 on pin 17 Potentiometer pot(45,midiChannel,3,secondary,debug); // knob on pin 45 (A7) void setup(){ } void loop(){ // add here all the input component reads pot.read(); // read knob and send midi messages but.read(); // read buttons and send midi messages } Doc: http://tomashg.com/?p=854 | |
You need to login in order to write on our forum |
<< Cancel