Well....I am an idiot! Its been a while since I downloaded an Arduino Teeny 2 32 pedal code controller and, due to ensuing computer crashes, I can't find the code. WORSE: the arduino board appears to be ruined...possibly as I fussed trying to rewire to a new pedal board.
So...I now have a new Teensy 2.
The code I uploaded issues that classic 'bounce file not recognized' (or something to that effect). The code has an 'include<bounce.h> in I believe the definitions area. And in the LOOP is the LIST of bounce keys I presume. Here is the code (yes. its a sketch...that may be the problem>)
// All in one Pedal board / Expression / Pistons encoder
// by Tim Howard, Jan 2014
// Freeware, may be freely copied as required.
// Thanks to Dennis Chan ( )
#include <Bounce.h>
//which MIDI channel to use
#define MIDICHANNEL 3
// MIDI value of low C
#define LOW_C 36
//how sensitive expression pedals are, reduce to make more sensitive
#define POTSENSE 10
// Pin assignments for Teensy 2.0 ++
//skipping LED pin and pin 3 in case we want LCD display later
//these are the pins for the 32 pedalboard notes
byte pedalBoardPins[33]={
0,1,2,4,5, 7,8,9,10,11, 12,13,14,15,16, 17,18,19,20,21, 22,23,24,25,26, 27,28,29,30,31, 32,33};
//these are the pins for pistons
//byte pistonPins[12]= {
//34,35,36,37, 38,39,40,41,42, 43,44,45};
//these are the pins for expression pedals
byte expressionPins[4] = {
42, 43,44,45};
//this determines which MIDI control Numbers to use
byte midicontrol[4] = {1,7,11,13}; //default to Modulation Wheel, Volume, and Expression
//to hold previous input from expression pedals
int lastpotvalue[4]= {
0,0,0,0};
//to hold currently scanned expression pedals value
int potValue=0;
//this is an array of Bounce pin handlers, not all of which will actually be used
Bounce bouncePins[46] = {
Bounce(0,5),
Bounce(1,5),
Bounce(2,5),
Bounce(3,5),
Bounce(4,5),
Bounce(5,5),
Bounce(6,5),
Bounce(7,5),
Bounce(8,5),
Bounce(9,5),
Bounce(10,5),
Bounce(11,5),
Bounce(12,5),
Bounce(13,5),
Bounce(14,5),
Bounce(15,5),
Bounce(16,5),
Bounce(17,5),
Bounce(18,5),
Bounce(19,5),
Bounce(20,5),
Bounce(21,5),
Bounce(22,5),
Bounce(23,5),
Bounce(24,5),
Bounce(25,5),
Bounce(26,5),
Bounce(27,5),
Bounce(28,5),
Bounce(29,5),
Bounce(30,5),
Bounce(31,5),
Bounce(32,5),
Bounce(33,5),
Bounce(34,5),
Bounce(35,5),
Bounce(36,5),
Bounce(37,5),
Bounce(38,5),
Bounce(39,5),
Bounce(40,5),
Bounce(41,5),
Bounce(42,5),
Bounce(43,5),
Bounce(44,5),
Bounce(45,5)
};
// void setup(){
//setup pin directions
// for (int i=0; i<33; i++) {
// pinMode(pedalBoardPins[i],INPUT_PULLUP);
// };
// void loop(){
//update pedalboard status
// for (int i=0; i<33; i++) {
// bouncePins[pedalBoardPins[i]].update();
// }
//update pistons status
//for (int i=0; i<12; i++) {
//bouncePins[pistonPins[i]].update();
//process pedalboard notes
// for (int i=0; i<33; i++) {
// if (bouncePins[pedalBoardPins[i]].fallingEdge()) {
// usbMIDI.sendNoteOn(LOW_C + i, 99, MIDICHANNEL);
// }
// else if (bouncePins[pedalBoardPins[i]].risingEdge()) {
// usbMIDI.sendNoteOff(LOW_C + i, 0, MIDICHANNEL);
// }
//process pistons
//for (int i=0; i<12; i++) {
//if (bouncePins[pistonPins[i]].fallingEdge()) {
// usbMIDI.sendProgramChange(i+1,MIDICHANNEL);
//}
//}
//process expression panels
// for (int i=0; i<4; i++) {
// potValue=analogRead(expressionPins[i]);
// if (abs(lastpotvalue[i] - potValue) > POTSENSE) {
//potvalue should be between 0 and 1024, we need a number between 0 and 127
// int midipotvalue=(potValue / 8)-1; //should result in max value of 127
// usbMIDI.sendControlChange( midicontrol[i] ,midipotvalue,MIDICHANNEL);
// lastpotvalue[i]=potValue;}
CAN SOME CONSIDERATE FORUM MEMBER PLEASE EMAIL HIS PEDAL CONTROL CODE TO MY ATTENTION?
So...I now have a new Teensy 2.
The code I uploaded issues that classic 'bounce file not recognized' (or something to that effect). The code has an 'include<bounce.h> in I believe the definitions area. And in the LOOP is the LIST of bounce keys I presume. Here is the code (yes. its a sketch...that may be the problem>)
// All in one Pedal board / Expression / Pistons encoder
// by Tim Howard, Jan 2014
// Freeware, may be freely copied as required.
// Thanks to Dennis Chan ( )
#include <Bounce.h>
//which MIDI channel to use
#define MIDICHANNEL 3
// MIDI value of low C
#define LOW_C 36
//how sensitive expression pedals are, reduce to make more sensitive
#define POTSENSE 10
// Pin assignments for Teensy 2.0 ++
//skipping LED pin and pin 3 in case we want LCD display later
//these are the pins for the 32 pedalboard notes
byte pedalBoardPins[33]={
0,1,2,4,5, 7,8,9,10,11, 12,13,14,15,16, 17,18,19,20,21, 22,23,24,25,26, 27,28,29,30,31, 32,33};
//these are the pins for pistons
//byte pistonPins[12]= {
//34,35,36,37, 38,39,40,41,42, 43,44,45};
//these are the pins for expression pedals
byte expressionPins[4] = {
42, 43,44,45};
//this determines which MIDI control Numbers to use
byte midicontrol[4] = {1,7,11,13}; //default to Modulation Wheel, Volume, and Expression
//to hold previous input from expression pedals
int lastpotvalue[4]= {
0,0,0,0};
//to hold currently scanned expression pedals value
int potValue=0;
//this is an array of Bounce pin handlers, not all of which will actually be used
Bounce bouncePins[46] = {
Bounce(0,5),
Bounce(1,5),
Bounce(2,5),
Bounce(3,5),
Bounce(4,5),
Bounce(5,5),
Bounce(6,5),
Bounce(7,5),
Bounce(8,5),
Bounce(9,5),
Bounce(10,5),
Bounce(11,5),
Bounce(12,5),
Bounce(13,5),
Bounce(14,5),
Bounce(15,5),
Bounce(16,5),
Bounce(17,5),
Bounce(18,5),
Bounce(19,5),
Bounce(20,5),
Bounce(21,5),
Bounce(22,5),
Bounce(23,5),
Bounce(24,5),
Bounce(25,5),
Bounce(26,5),
Bounce(27,5),
Bounce(28,5),
Bounce(29,5),
Bounce(30,5),
Bounce(31,5),
Bounce(32,5),
Bounce(33,5),
Bounce(34,5),
Bounce(35,5),
Bounce(36,5),
Bounce(37,5),
Bounce(38,5),
Bounce(39,5),
Bounce(40,5),
Bounce(41,5),
Bounce(42,5),
Bounce(43,5),
Bounce(44,5),
Bounce(45,5)
};
// void setup(){
//setup pin directions
// for (int i=0; i<33; i++) {
// pinMode(pedalBoardPins[i],INPUT_PULLUP);
// };
// void loop(){
//update pedalboard status
// for (int i=0; i<33; i++) {
// bouncePins[pedalBoardPins[i]].update();
// }
//update pistons status
//for (int i=0; i<12; i++) {
//bouncePins[pistonPins[i]].update();
//process pedalboard notes
// for (int i=0; i<33; i++) {
// if (bouncePins[pedalBoardPins[i]].fallingEdge()) {
// usbMIDI.sendNoteOn(LOW_C + i, 99, MIDICHANNEL);
// }
// else if (bouncePins[pedalBoardPins[i]].risingEdge()) {
// usbMIDI.sendNoteOff(LOW_C + i, 0, MIDICHANNEL);
// }
//process pistons
//for (int i=0; i<12; i++) {
//if (bouncePins[pistonPins[i]].fallingEdge()) {
// usbMIDI.sendProgramChange(i+1,MIDICHANNEL);
//}
//}
//process expression panels
// for (int i=0; i<4; i++) {
// potValue=analogRead(expressionPins[i]);
// if (abs(lastpotvalue[i] - potValue) > POTSENSE) {
//potvalue should be between 0 and 1024, we need a number between 0 and 127
// int midipotvalue=(potValue / 8)-1; //should result in max value of 127
// usbMIDI.sendControlChange( midicontrol[i] ,midipotvalue,MIDICHANNEL);
// lastpotvalue[i]=potValue;}
CAN SOME CONSIDERATE FORUM MEMBER PLEASE EMAIL HIS PEDAL CONTROL CODE TO MY ATTENTION?
Comment