diff --git a/README.md b/README.md index 57c103d..a886738 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# MIDIcontroller 2.3.4 +# MIDIcontroller 2.4.0 ### A library for creating Teensy MIDI controllers. ###### by Josh Nishikawa @@ -16,6 +16,10 @@ ___ ___ ### VERSION LOG: +2.4.0 +- The .4. is for the added inputRange() and setWaitTime() functions +- This update also (actually) fixes that MIDIdrum bug preventing high velocity + 2.3.4 - Added inputRange() to MIDIdrum. - Added an example for muxed input. diff --git a/examples/muxed_input/muxed_input.ino b/examples/muxedInput/muxedInput.ino similarity index 94% rename from examples/muxed_input/muxed_input.ino rename to examples/muxedInput/muxedInput.ino index 9a542b2..84f26d7 100644 --- a/examples/muxed_input/muxed_input.ino +++ b/examples/muxedInput/muxedInput.ino @@ -19,6 +19,8 @@ void setup(){ for(int i=0; i<8; i++){ // change to i<16 if using MUX-16 Pots[i] = new MIDIpot(mux_input_pin, 12+i); // CC 12~ are probably safe to use but you can use any CC number you like. + + Pots[i]->inputRange(15, 1000); // helps reach the full output range } } diff --git a/library.properties b/library.properties index 78ea727..1321787 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=MIDIcontroller -version=2.3.4 +version=2.4.0 author=Josh Nishikawa maintainer=Josh Nishikawa sentence=A library for creating Teensy MIDI controllers. -paragraph=Includes easy to follow examples for implementing velocity sensitive FSR, Piezo or Capacitive Touch inputs; momentary, latch or 'trigger' type MIDI buttons (also works with Cap Touch); stable analog to MIDI conversion for potentiometers and other sensors; stable Capacitive Touch to MIDI conversion for expression control; support for encoders; Min/Max output can be set (or inverted) for all MIDI; Min/Max input can also be set for analog input (maintaining stability in conversion) +paragraph=Includes easy to follow examples for implementing velocity sensitive FSR, Piezo or Capacitive Touch inputs - momentary, latch or trigger type MIDI buttons (also works with Cap Touch) - stable analog to MIDI conversion for potentiometers and other sensors - stable Capacitive Touch to MIDI conversion for expression control - support for encoders - Min/Max output can be set (or inverted) for all MIDI - Min/Max input can also be set for analog input (maintaining stability in conversion) category=Sensors url=https://github.com/joshnishikawa/MIDIcontroller architectures=avr diff --git a/src/MIDIdrum.cpp b/src/MIDIdrum.cpp index bc8bbde..e5a29b4 100644 --- a/src/MIDIdrum.cpp +++ b/src/MIDIdrum.cpp @@ -61,6 +61,7 @@ int MIDIdrum::read(){ newValue = -1; } else if (timer >= 10){ + newValue = constrain(peak, threshold, inHi); newValue = newValue >= inHi ? outHi : map(peak,threshold,inHi,outLo,outHi); state = 2; timer = 0;