diff --git a/NuEVI.ino b/NuEVI.ino index 25f9432..ead4e65 100644 --- a/NuEVI.ino +++ b/NuEVI.ino @@ -1,12 +1,17 @@ #include #include +#include +#include +#include +#include /* NAME: NuEVI WRITTEN BY: JOHAN BERGLUND -DATE: 2017-08-08 +DATE: 2017-08-26 FILE SAVED AS: NuEVI.ino -FOR: PJRC Teensy LC or 3.2 and a MPR121 capactive touch sensor board +FOR: PJRC Teensy LC or 3.2 and a MPR121 capactive touch sensor board. + Uses an SSD1306 controlled OLED dispaly communicating over I2C. PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath sensor and capacitive touch keys. Output to both USB MIDI and DIN MIDI. @@ -14,12 +19,9 @@ PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath //_______________________________________________________________________________________________ DECLARATIONS -#define ON_Thr 370 // Set threshold level before switching ON + #define ON_Delay 20 // Set Delay after ON threshold before velocity is checked (wait for tounging peak) -#define breath_max 1023 // Maximum breath level -#define PB_sens 8191 // Pitch Bend sensitivity 0 to 8191 where 8191 is full pb range, 4095 half range -#define VIB_depth 1023 // Vibrato depth 0 to 8191 -#define touch_Thr 1800 // sensitivity for Teensy touch sensors +#define touch_Thr 800 // sensitivity for Teensy touch sensors #define CCN_Port 5 // Controller number for portamento level #define CCN_PortOnOff 65// Controller number for portamento on/off @@ -28,7 +30,8 @@ PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath // milliseconds #define CC_INTERVAL 5 -// The three states of our state machine + +// The three states of our main state machine // No note is sounding #define NOTE_OFF 1 @@ -42,36 +45,286 @@ PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath #define NOTE_ON 3 +//display states +#define DISPLAYOFF_IDL 0 +#define MAIN_MENU 1 +#define PATCH_VIEW 2 +#define BREATH_ADJ_IDL 10 +#define BREATH_ADJ_THR 11 +#define BREATH_ADJ_MAX 12 +#define PORTAM_ADJ_IDL 20 +#define PORTAM_ADJ_THR 21 +#define PORTAM_ADJ_MAX 22 +#define PITCHB_ADJ_IDL 30 +#define PITCHB_ADJ_THR 31 +#define PITCHB_ADJ_MAX 32 +#define EXTRAC_ADJ_IDL 40 +#define EXTRAC_ADJ_THR 41 +#define EXTRAC_ADJ_MAX 42 +#define VIBRAT_ADJ_IDL 50 +#define VIBRAT_ADJ_THR 51 +#define VIBRAT_ADJ_DPT 52 +#define SETUP_BR_MENU 80 +#define SETUP_CT_MENU 90 + +// EEPROM addresses for settings +#define VERSION_ADDR 0 +#define BREATH_THR_ADDR 2 +#define BREATH_MAX_ADDR 4 +#define PORTAM_THR_ADDR 6 +#define PORTAM_MAX_ADDR 8 +#define PITCHB_THR_ADDR 10 +#define PITCHB_MAX_ADDR 12 +#define TRANSP_ADDR 14 +#define MIDI_ADDR 16 +#define BREATH_CC_ADDR 18 +#define BREATH_AT_ADDR 20 +#define VELOCITY_ADDR 22 +#define PORTAM_ADDR 24 +#define PB_ADDR 26 +#define EXTRA_ADDR 28 +#define VIBRATO_ADDR 30 +#define DEGLITCH_ADDR 32 +#define EXTRAC_THR_ADDR 34 +#define EXTRAC_MAX_ADDR 36 +#define PATCH_ADDR 38 +#define OCTAVE_ADDR 40 + +//"factory" values for settings +#define VERSION 13 +#define BREATH_THR_FACTORY 350 +#define BREATH_MAX_FACTORY 1000 +#define PORTAM_THR_FACTORY 1730 +#define PORTAM_MAX_FACTORY 3300 +#define PITCHB_THR_FACTORY 1200 +#define PITCHB_MAX_FACTORY 2400 +#define EXTRAC_THR_FACTORY 1200 +#define EXTRAC_MAX_FACTORY 2400 +#define TRANSP_FACTORY 12 // 12 is 0 transpose +#define MIDI_FACTORY 1 // 1-16 +#define BREATH_CC_FACTORY 1 //thats CC#2, see ccList +#define BREATH_AT_FACTORY 0 //aftertouch default off +#define VELOCITY_FACTORY 0 // 0 is dynamic/breath controlled velocity +#define PORTAM_FACTORY 2 // 0 - OFF, 1 - ON, 2 - SW +#define PB_FACTORY 1 // 0 - OFF, 1 - 12 +#define EXTRA_FACTORY 1 // 0 - OFF, 1 - ON->Modulation, 2 - Sustain +#define VIBRATO_FACTORY 3 // 0 - OFF, 1 - 7 depth +#define DEGLITCH_FACTORY 20 // 0 - OFF, 5 to 70 ms in steps of 5 +#define PATCH_FACTORY 1 // MIDI program change 1-128 +#define OCTAVE_FACTORY 3 // 3 is 0 octave change + +#define OLED_RESET 4 +Adafruit_SSD1306 display(OLED_RESET); + +#define LOGO16_GLCD_HEIGHT 16 +#define LOGO16_GLCD_WIDTH 16 + + // 'NuEVI' logo +static const unsigned char PROGMEM nuevi_logo_bmp[] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x07, 0x73, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x0e, 0xe3, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x60, 0x00, 0x1d, 0xc3, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x3b, 0x83, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x77, 0x03, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x00, 0xee, 0x03, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x01, 0xdc, 0x03, 0x60, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x03, 0xb8, 0x03, 0x60, 0x00, +0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x07, 0x70, 0x03, 0x60, 0x00, +0x00, 0x00, 0x00, 0x60, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x0e, 0xe0, 0x03, 0x60, 0x00, +0x00, 0x00, 0x00, 0x60, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x1d, 0xc0, 0x03, 0x60, 0x00, +0x00, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x60, 0x3b, 0x80, 0x03, 0x60, 0x00, +0x00, 0x03, 0x00, 0xe0, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x77, 0x00, 0x03, 0x60, 0x00, +0x00, 0x03, 0x00, 0xc0, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0xee, 0x00, 0x03, 0x60, 0x00, +0x00, 0x03, 0x80, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x61, 0xdc, 0x00, 0x03, 0x60, 0x00, +0x00, 0x07, 0x80, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x63, 0xb8, 0x00, 0x03, 0x60, 0x00, +0x00, 0x07, 0xc0, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x67, 0x70, 0x00, 0x03, 0x60, 0x00, +0x00, 0x06, 0xc0, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x6e, 0xe0, 0x00, 0x03, 0x60, 0x00, +0x00, 0x06, 0x60, 0xc1, 0x01, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x7d, 0xc0, 0x00, 0x03, 0x60, 0x00, +0x00, 0x06, 0x30, 0xc3, 0x03, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x7b, 0x80, 0x00, 0x03, 0x60, 0x00, +0x00, 0x0c, 0x30, 0xc3, 0x07, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x77, 0x00, 0x00, 0x03, 0x60, 0x00, +0x00, 0x0c, 0x1c, 0xc3, 0x06, 0x01, 0x80, 0x00, 0x00, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x60, 0x00, +0x00, 0x0c, 0x0c, 0xc2, 0x0e, 0x01, 0xff, 0xff, 0xff, 0xe3, 0xfc, 0x00, 0x00, 0x03, 0x60, 0x00, +0x00, 0x0c, 0x0e, 0xc6, 0x1e, 0x01, 0xff, 0xff, 0xff, 0xe3, 0xf8, 0x00, 0x00, 0x03, 0x60, 0x00, +0x00, 0x0c, 0x07, 0xc6, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x03, 0xc6, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x01, 0xc7, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x00, 0xc7, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +#if (SSD1306_LCDHEIGHT != 64) +#error("Height incorrect, please fix Adafruit_SSD1306.h!"); +#endif + + //variables setup -int state; // The state of the state machine -unsigned long ccSendTime = 0L; // The last time we sent CC values -unsigned long breath_on_time = 0L; // Time when breath sensor value went over the ON threshold -int initial_breath_value; // The breath value at the time we observed the transition +unsigned short breathThrVal;// = 350; +unsigned short breathMaxVal;// = 1000; +unsigned short portamThrVal;// = 1730; +unsigned short portamMaxVal;// = 3300; +unsigned short pitchbThrVal;// = 1200; +unsigned short pitchbMaxVal;// = 2400; +unsigned short extracThrVal;// = 1200; +unsigned short extracMaxVal;// = 2400; +unsigned short transpose; +unsigned short MIDIchannel; +unsigned short breathCC; +unsigned short breathAT; +unsigned short velocity; +unsigned short portamento;// switching on cc65? just cc5 enabled? SW:ON:OFF +unsigned short PBdepth; // OFF:1-12 divider +unsigned short extraCT; // OFF:MOD +unsigned short vibrato; // OFF:1-7 +unsigned short deglitch; // 0-70 ms in steps of 5 +unsigned short patch; // 1-128 +unsigned short octave; // + +int breathLoLimit = 0; +int breathHiLimit = 1023; +int portamLoLimit = 1000; +int portamHiLimit = 5000; +int pitchbLoLimit = 500; +int pitchbHiLimit = 4000; +int extracLoLimit = 500; +int extracHiLimit = 4000; + +int breathStep; +int portamStep; +int pitchbStep; +int extracStep; + +int minOffset = 50; + +byte dPin = 3; +byte ePin = 4; +byte uPin = 5; +byte mPin = 6; + +int deumButtons = 0; +int lastDeumButtons = 0; +int deumButtonState = 0; +byte buttonPressedAndNotUsed = 0; + +byte mainMenuCursor = 1; +byte setupBrMenuCursor = 1; +byte setupCtMenuCursor = 1; + +byte state = 0; +byte stateFirstRun = 1; + +byte subTranspose = 0; +byte subOctave = 0; +byte subMIDI = 0; +byte subBreathCC = 0; +byte subBreathAT = 0; +byte subVelocity = 0; +byte subPort = 0; +byte subPB = 0; +byte subExtra = 0; +byte subVibrato = 0; +byte subDeglitch = 0; + +byte ccList[4] = {0,2,7,11}; // OFF, Breath, Volume, Expression +int pbDepthList[13] = {0,8192,4096,2731,2048,1638,1365,1170,1024,910,819,744,683}; + +byte cursorNow; + +int pos1; +int pos2; + +// the following variables are unsigned longs because the time, measured in +// milliseconds, will quickly become a bigger number than can be stored in an int. +unsigned long lastDebounceTime = 0; // the last time the output pin was toggled +unsigned long debounceDelay = 20; // the debounce time; increase if the output flickers +unsigned long buttonRepeatTime = 0; +unsigned long buttonPressedTime = 0; +unsigned long buttonRepeatInterval = 50; +unsigned long buttonRepeatDelay = 400; +unsigned long pixelUpdateTime = 0; +unsigned long pixelUpdateInterval = 100; +unsigned long cursorBlinkTime = 0; // the last time the cursor was toggled +unsigned long cursorBlinkInterval = 300; // the cursor blink toggle interval time +unsigned long patchViewTime = 0; +unsigned long patchViewTimeUp = 2000; // ms until patch view shuts off +unsigned long menuTime = 0; +unsigned long menuTimeUp = 60000; // menu shuts off after one minute of button inactivity +unsigned long lastDeglitchTime = 0; // The last time the fingering was changed +unsigned long ccSendTime = 0L; // The last time we sent CC values +unsigned long breath_on_time = 0L; // Time when breath sensor value went over the ON threshold -unsigned long lastDebounceTime = 0;// The last time the fingering was changed -unsigned long debounceDelay = 10; // The debounce time; increase if the output flickers int lastFingering = 0; // Keep the last fingering value for debouncing -byte MIDIchannel=1; // MIDI channel 1 +int mainState; // The state of the main state machine + +int initial_breath_value; // The breath value at the time we observed the transition + +byte activeMIDIchannel=1; // MIDI channel +byte activePatch=0; +byte doPatchUpdate=1; int breathLevel=0; // breath level (smoothed) not mapped to CC value int oldbreath=0; int pressureSensor; // pressure data from breath sensor, for midi breath cc and breath threshold checks -byte velocity; // remapped midi velocity from breath sensor +int lastPressure; +byte velocitySend; // remapped midi velocity from breath sensor (or set to static value if selected) int biteSensor=0; // capacitance data from bite sensor, for midi cc and threshold checks byte portIsOn=0; // keep track and make sure we send CC with 0 value when off threshold -int biteThr=1730; // Set threshold level before switching ON (value to use if no pots installed) -int biteMax=3300; // Upper limit for pressure (value to use if no pots installed) +int oldport=0; +int lastBite=0; + +int exSensor=0; +byte extracIsOn=0; +int oldextrac=0; +int lastEx=0; int pitchBend=0; int oldpb=8192; -int pbThr=1200; -int pbMax=2400; +int pbUp=0; +int pbDn=0; +int lastPbUp=0; +int lastPbDn=0; -int vibThr=1800; +int vibDepth[7] = {0,127,254,511,1023,2047,4095}; // these values need too be looked over + +int vibThr=1900; int oldvibRead=0; byte dirUp=0; // direction of first vibrato wave @@ -79,14 +332,96 @@ int fingeredNote; // note calculated from fingering (switches), transpose and byte activeNote; // note playing byte startNote=36; // set startNote to C (change this value in steps of 12 to start in other octaves) +byte halfPitchBendKey; +byte specialKey; + Adafruit_MPR121 touchSensor = Adafruit_MPR121(); // This is the 12-input touch sensor //_______________________________________________________________________________________________ SETUP void setup() { + // if stored settings are not for current version, they are replaced by factory settings + if (readSetting(VERSION_ADDR) != VERSION){ + writeSetting(VERSION_ADDR,VERSION); + writeSetting(BREATH_THR_ADDR,BREATH_THR_FACTORY); + writeSetting(BREATH_MAX_ADDR,BREATH_MAX_FACTORY); + writeSetting(PORTAM_THR_ADDR,PORTAM_THR_FACTORY); + writeSetting(PORTAM_MAX_ADDR,PORTAM_MAX_FACTORY); + writeSetting(PITCHB_THR_ADDR,PITCHB_THR_FACTORY); + writeSetting(PITCHB_MAX_ADDR,PITCHB_MAX_FACTORY); + writeSetting(TRANSP_ADDR,TRANSP_FACTORY); + writeSetting(MIDI_ADDR,MIDI_FACTORY); + writeSetting(BREATH_CC_ADDR,BREATH_CC_FACTORY); + writeSetting(BREATH_AT_ADDR,BREATH_AT_FACTORY); + writeSetting(VELOCITY_ADDR,VELOCITY_FACTORY); + writeSetting(PORTAM_ADDR,PORTAM_FACTORY); + writeSetting(PB_ADDR,PB_FACTORY); + writeSetting(EXTRA_ADDR,EXTRA_FACTORY); + writeSetting(VIBRATO_ADDR,VIBRATO_FACTORY); + writeSetting(DEGLITCH_ADDR,DEGLITCH_FACTORY); + writeSetting(EXTRAC_THR_ADDR,EXTRAC_THR_FACTORY); + writeSetting(EXTRAC_MAX_ADDR,EXTRAC_MAX_FACTORY); + writeSetting(PATCH_ADDR,PATCH_FACTORY); + writeSetting(OCTAVE_ADDR,OCTAVE_FACTORY); + } + // read settings from EEPROM + breathThrVal = readSetting(BREATH_THR_ADDR); + breathMaxVal = readSetting(BREATH_MAX_ADDR); + portamThrVal = readSetting(PORTAM_THR_ADDR); + portamMaxVal = readSetting(PORTAM_MAX_ADDR); + pitchbThrVal = readSetting(PITCHB_THR_ADDR); + pitchbMaxVal = readSetting(PITCHB_MAX_ADDR); + transpose = readSetting(TRANSP_ADDR); + MIDIchannel = readSetting(MIDI_ADDR); + breathCC = readSetting(BREATH_CC_ADDR); + breathAT = readSetting(BREATH_AT_ADDR); + velocity = readSetting(VELOCITY_ADDR); + portamento = readSetting(PORTAM_ADDR); + PBdepth = readSetting(PB_ADDR); + extraCT = readSetting(EXTRA_ADDR); + vibrato = readSetting(VIBRATO_ADDR); + deglitch = readSetting(DEGLITCH_ADDR); + extracThrVal = readSetting(EXTRAC_THR_ADDR); + extracMaxVal = readSetting(EXTRAC_MAX_ADDR); + patch = readSetting(PATCH_ADDR); + octave = readSetting(OCTAVE_ADDR); + + breathStep = (breathHiLimit - breathLoLimit)/92; // 92 is the number of pixels in the settings bar + portamStep = (portamHiLimit - portamLoLimit)/92; + pitchbStep = (pitchbHiLimit - pitchbLoLimit)/92; + extracStep = (extracHiLimit - extracLoLimit)/92; + + pinMode(dPin, INPUT_PULLUP); + pinMode(ePin, INPUT_PULLUP); + pinMode(uPin, INPUT_PULLUP); + pinMode(mPin, INPUT_PULLUP); - state = NOTE_OFF; // initialize state machine + // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) + display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64) + // init done + + // Show image buffer on the display hardware. + // Since the buffer is intialized with an Adafruit splashscreen + // internally, this will display the splashscreen. + + display.clearDisplay(); + display.drawBitmap(0,0,nuevi_logo_bmp,128,64,1); + display.display(); + + //auto-calibrate the vibrato threshold while showing splash screen + int cv1=touchRead(15); + delay(1000); + int cv2=touchRead(15); + delay(1000); + int cv3=touchRead(15); + delay(1000); + int cv4=touchRead(15); + vibThr=(cv1+cv2+cv3+cv4)/4-70; + + delay(1000); + state = DISPLAYOFF_IDL; + mainState = NOTE_OFF; // initialize main state machine if (!touchSensor.begin(0x5A)) { while (1); // Touch sensor initialization failed - stop doing stuff } @@ -100,70 +435,83 @@ void setup() { void loop() { pressureSensor = analogRead(A0); // Get the pressure sensor reading from analog pin A0 - if (state == NOTE_OFF) { - if (pressureSensor > ON_Thr) { + if (mainState == NOTE_OFF) { + if (activeMIDIchannel != MIDIchannel) activeMIDIchannel = MIDIchannel; // only switch channel if no active note + if ((activePatch != patch) && doPatchUpdate){ + activePatch = patch; + usbMIDI.sendProgramChange(activePatch-1,activeMIDIchannel); + dinMIDIsendProgramChange(activePatch-1,activeMIDIchannel); + doPatchUpdate = 0; + } + if (pressureSensor > breathThrVal) { // Value has risen above threshold. Move to the ON_Delay // state. Record time and initial breath value. breath_on_time = millis(); initial_breath_value = pressureSensor; - state = RISE_WAIT; // Go to next state + mainState = RISE_WAIT; // Go to next state } - } else if (state == RISE_WAIT) { - if (pressureSensor > ON_Thr) { + } else if (mainState == RISE_WAIT) { + if (pressureSensor > breathThrVal) { // Has enough time passed for us to collect our second // sample? if (millis() - breath_on_time > ON_Delay) { // Yes, so calculate MIDI note and velocity, then send a note on event readSwitches(); //fingeredNote = startNote + 24; - // We should be at tonguing peak, so set velocity based on current pressureSensor value + // We should be at tonguing peak, so set velocity based on current pressureSensor value unless fixed velocity is set // If initial value is greater than value after delay, go with initial value, constrain input to keep mapped output within 1 to 127 - velocity = map(constrain(max(pressureSensor,initial_breath_value),ON_Thr,breath_max),ON_Thr,breath_max,1,127); - breathLevel=constrain(max(pressureSensor,initial_breath_value),ON_Thr,breath_max); + if (!velocity) { + velocitySend = map(constrain(max(pressureSensor,initial_breath_value),breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,1,127); + } else velocitySend = velocity; + breathLevel=constrain(max(pressureSensor,initial_breath_value),breathThrVal,breathMaxVal); breath(); // send breath data + fingeredNote=noteValueCheck(fingeredNote); if ((fingeredNote >= 0) and (fingeredNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOn(fingeredNote, velocity, MIDIchannel); // send Note On message for new note - dinMIDIsendNoteOn(fingeredNote, velocity, MIDIchannel - 1); + usbMIDI.sendNoteOn(fingeredNote, velocitySend, activeMIDIchannel); // send Note On message for new note + dinMIDIsendNoteOn(fingeredNote, velocitySend, activeMIDIchannel - 1); } activeNote=fingeredNote; - state = NOTE_ON; + mainState = NOTE_ON; } } else { // Value fell below threshold before ON_Delay passed. Return to // NOTE_OFF state (e.g. we're ignoring a short blip of breath) - state = NOTE_OFF; + mainState = NOTE_OFF; } - } else if (state == NOTE_ON) { - if (pressureSensor < ON_Thr) { + } else if (mainState == NOTE_ON) { + if (pressureSensor < breathThrVal) { // Value has fallen below threshold - turn the note off + activeNote=noteValueCheck(activeNote); if ((activeNote >= 0) and (activeNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOff(activeNote, velocity, MIDIchannel); // send Note Off message - dinMIDIsendNoteOff(activeNote, velocity, MIDIchannel - 1); + usbMIDI.sendNoteOff(activeNote, velocitySend, activeMIDIchannel); // send Note Off message + dinMIDIsendNoteOff(activeNote, velocitySend, activeMIDIchannel - 1); } breathLevel=0; - state = NOTE_OFF; + mainState = NOTE_OFF; } else { readSwitches(); //fingeredNote = startNote + 24; if (fingeredNote != lastFingering){ // // reset the debouncing timer - lastDebounceTime = millis(); + lastDeglitchTime = millis(); } - if ((millis() - lastDebounceTime) > debounceDelay) { + if ((millis() - lastDeglitchTime) > deglitch) { // whatever the reading is at, it's been there for longer // than the debounce delay, so take it as the actual current state - if (fingeredNote != activeNote) { + if (noteValueCheck(fingeredNote) != activeNote) { // Player has moved to a new fingering while still blowing. // Send a note off for the current note and a note on for // the new note. - velocity = map(constrain(pressureSensor,ON_Thr,breath_max),ON_Thr,breath_max,7,127); // set new velocity value based on current pressure sensor level + velocity = map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,7,127); // set new velocity value based on current pressure sensor level + fingeredNote=noteValueCheck(fingeredNote); if ((fingeredNote >= 0) and (fingeredNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOn(fingeredNote, velocity, MIDIchannel); // send Note On message for new note - dinMIDIsendNoteOn(fingeredNote, velocity, MIDIchannel - 1); + usbMIDI.sendNoteOn(fingeredNote, velocitySend, activeMIDIchannel); // send Note On message for new note + dinMIDIsendNoteOn(fingeredNote, velocitySend, activeMIDIchannel - 1); } + activeNote=noteValueCheck(activeNote); if ((activeNote >= 0) and (activeNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOff(activeNote, 0, MIDIchannel); // send Note Off message for previous note (legato) - dinMIDIsendNoteOff(activeNote, 0, MIDIchannel - 1); + usbMIDI.sendNoteOff(activeNote, 0, activeMIDIchannel); // send Note Off message for previous note (legato) + dinMIDIsendNoteOff(activeNote, 0, activeMIDIchannel - 1); } activeNote=fingeredNote; } @@ -172,18 +520,38 @@ void loop() { } // Is it time to send more CC data? if (millis() - ccSendTime > CC_INTERVAL) { + // Read touch pads (Teensy built in) and put value in variables + specialKey=(touchRead(0) > touch_Thr); //S2 + halfPitchBendKey=(touchRead(1) > touch_Thr); //S1 // deal with Breath, Pitch Bend and Modulation breath(); pitch_bend(); - portamento(); + portamento_(); + extraController(); ccSendTime = millis(); } + if (millis() - pixelUpdateTime > pixelUpdateInterval){ + drawSensorPixels(); + pixelUpdateTime = millis(); + } lastFingering=fingeredNote; + //do menu stuff + menu(); } //_______________________________________________________________________________________________ FUNCTIONS +// MIDI note value check with out of range octave repeat +int noteValueCheck(int note){ + if (note > 127){ + note = 115+(note-127)%12; + } else if (note < 0) { + note = 12-abs(note)%12; + } + return note; +} + // Send a three byte din midi message -void midiSend(byte midistatus, byte data1, byte data2) { +void midiSend3B(byte midistatus, byte data1, byte data2) { Serial3.write(midistatus); Serial3.write(data1); Serial3.write(data2); @@ -191,91 +559,167 @@ void midiSend(byte midistatus, byte data1, byte data2) { //************************************************************** +// Send a two byte din midi message +void midiSend2B(byte midistatus, byte data) { + Serial3.write(midistatus); + Serial3.write(data); +} + +//************************************************************** + // Send din pitchbend void dinMIDIsendPitchBend(int pb, byte ch) { int pitchLSB = pb & 0x007F; int pitchMSB = (pb >>7) & 0x007F; - midiSend((0xE0 | ch), pitchLSB, pitchMSB); + midiSend3B((0xE0 | ch), pitchLSB, pitchMSB); } //************************************************************** // Send din control change void dinMIDIsendControlChange(byte ccNumber, int cc, byte ch) { - midiSend((0xB0 | ch), ccNumber, cc); + midiSend3B((0xB0 | ch), ccNumber, cc); } //************************************************************** // Send din note on void dinMIDIsendNoteOn(byte note, int vel, byte ch) { - midiSend((0x90 | ch), note, vel); + midiSend3B((0x90 | ch), note, vel); } //************************************************************** // Send din note off void dinMIDIsendNoteOff(byte note, int vel, byte ch) { - midiSend((0x80 | ch), note, vel); + midiSend3B((0x80 | ch), note, vel); +} + +//************************************************************** + +// Send din aftertouch +void dinMIDIsendAfterTouch(byte value, byte ch) { + midiSend2B((0xD0 | ch), value); +} + +//************************************************************** + +// Send din program change +void dinMIDIsendProgramChange(byte value, byte ch) { + midiSend2B((0xC0 | ch), value); } //************************************************************** void breath(){ - int breathCC; + int breathCCval; breathLevel = breathLevel*0.8+pressureSensor*0.2; // smoothing of breathLevel value - breathCC = map(constrain(breathLevel,ON_Thr,breath_max),ON_Thr,breath_max,0,127); - if (breathCC != oldbreath){ // only send midi data if breath has changed from previous value - usbMIDI.sendControlChange(2, breathCC, MIDIchannel); - dinMIDIsendControlChange(2, breathCC, MIDIchannel - 1); - oldbreath = breathCC; + breathCCval = map(constrain(breathLevel,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,0,127); + if (breathCCval != oldbreath){ // only send midi data if breath has changed from previous value + if (breathCCval){ + // send midi cc + usbMIDI.sendControlChange(ccList[breathCC], breathCCval, activeMIDIchannel); + dinMIDIsendControlChange(ccList[breathCC], breathCCval, activeMIDIchannel - 1); + } + if (breathAT){ + // send aftertouch + usbMIDI.sendAfterTouch(breathCCval, activeMIDIchannel); + dinMIDIsendAfterTouch(breathCCval, activeMIDIchannel); + } + oldbreath = breathCCval; } } //************************************************************** void pitch_bend(){ - int pbUp = touchRead(23); - int pbDn = touchRead(22); - int vibRead = touchRead(1); - if ((vibRead > vibThr)&&(vibRead > (oldvibRead+7))){ - if (dirUp){ - pitchBend=oldpb*0.7+0.3*(8192 + VIB_depth); + int calculatedPBdepth; + byte vibratoMoved = 0; + pbUp = touchRead(23); + pbDn = touchRead(22); + int vibRead = touchRead(15); // SENSOR PIN 15 + if ((vibRead < vibThr)&&(vibRead > (oldvibRead+7))){ + if (!dirUp){ + pitchBend=oldpb*0.7+0.3*(8192 + vibDepth[vibrato]); + vibratoMoved = 1; } else { - pitchBend=oldpb*0.7+0.3*(8191 - VIB_depth); + pitchBend=oldpb*0.7+0.3*(8191 - vibDepth[vibrato]); + vibratoMoved = 1; } - } else if ((vibRead > vibThr)&&(vibRead < (oldvibRead-7))){ - if (dirUp){ - pitchBend=oldpb*0.7+0.3*(8191 - VIB_depth); + } else if ((vibRead < vibThr)&&(vibRead < (oldvibRead-7))){ + if (!dirUp ){ + pitchBend=oldpb*0.7+0.3*(8191 - vibDepth[vibrato]); + vibratoMoved = 1; } else { - pitchBend=oldpb*0.7+0.3*(8192 + VIB_depth); + pitchBend=oldpb*0.7+0.3*(8192 + vibDepth[vibrato]); + vibratoMoved = 1; } } else { - pitchBend = oldpb*0.7+8192*0.3; // released, so smooth your way back to zero - if ((pitchBend > 8187) && (pitchBend < 8197)) pitchBend = 8192; // 8192 is 0 pitch bend, don't miss it bc of smoothing + vibratoMoved = 0; } oldvibRead = vibRead; - if (pbUp > pbThr){ - pitchBend=pitchBend*0.8+0.2*map(constrain(pbUp,pbThr,pbMax),pbThr,pbMax,8192,(8192 + PB_sens)); - } else if (pbDn > pbThr){ - pitchBend=pitchBend*0.8+0.2*map(constrain(pbDn,pbThr,pbMax),pbThr,pbMax,8192,(8191 - PB_sens)); - } else if (oldvibRead < vibThr){ - pitchBend = pitchBend*0.8+8192*0.2; // released, so smooth your way back to zero + if (PBdepth){ + calculatedPBdepth = pbDepthList[PBdepth]; + if (halfPitchBendKey) calculatedPBdepth = calculatedPBdepth*0.5; + } + if ((pbUp > pitchbThrVal) && PBdepth){ + pitchBend=pitchBend*0.6+0.4*map(constrain(pbUp,pitchbThrVal,pitchbMaxVal),pitchbThrVal,pitchbMaxVal,8192,(8193 + calculatedPBdepth)); + } else if ((pbDn > pitchbThrVal) && PBdepth){ + pitchBend=pitchBend*0.6+0.4*map(constrain(pbDn,pitchbThrVal,pitchbMaxVal),pitchbThrVal,pitchbMaxVal,8192,(8192 - calculatedPBdepth)); + } else if (oldvibRead > vibThr){ + pitchBend = pitchBend*0.6+8192*0.4; // released, so smooth your way back to zero + if ((pitchBend > 8187) && (pitchBend < 8197)) pitchBend = 8192; // 8192 is 0 pitch bend, don't miss it bc of smoothing + } else if (!vibratoMoved){ + pitchBend = oldpb*0.7+8192*0.3; // released, so smooth your way back to zero if ((pitchBend > 8187) && (pitchBend < 8197)) pitchBend = 8192; // 8192 is 0 pitch bend, don't miss it bc of smoothing } pitchBend=constrain(pitchBend, 0, 16383); if (pitchBend != oldpb){// only send midi data if pitch bend has changed from previous value - usbMIDI.sendPitchBend(pitchBend, MIDIchannel); - dinMIDIsendPitchBend(pitchBend, MIDIchannel - 1); + usbMIDI.sendPitchBend(pitchBend, activeMIDIchannel); + dinMIDIsendPitchBend(pitchBend, activeMIDIchannel - 1); oldpb=pitchBend; } } //*********************************************************** -void portamento(){ - biteSensor=biteSensor*0.6+0.4*touchRead(0); // get sensor data, do some smoothing - if (biteSensor >= biteThr) { // if we are over the threshold, send portamento +void extraController(){ + exSensor=exSensor*0.6+0.4*touchRead(16); // get sensor data, do some smoothing - SENSOR PIN 16 + if (extraCT && (exSensor >= extracThrVal)) { // if we are enabled and over the threshold, send data + if (!extracIsOn) { + extracIsOn=1; + if (extraCT == 2){ //Sustain ON + usbMIDI.sendControlChange(64,127, activeMIDIchannel); + dinMIDIsendControlChange(64,127, activeMIDIchannel - 1); + } + } + if (extraCT == 1){ //Send modulation + int extracCC = map(constrain(exSensor,extracThrVal,extracMaxVal),extracThrVal,extracMaxVal,1,127); + if (extracCC != oldextrac){ + usbMIDI.sendControlChange(1,extracCC, activeMIDIchannel); + dinMIDIsendControlChange(1,extracCC, activeMIDIchannel - 1); + } + oldextrac = extracCC; + } + } else if (extracIsOn) { // we have just gone below threshold, so send zero value + extracIsOn=0; + if (extraCT == 1){ //MOD + //send modulation 0 + usbMIDI.sendControlChange(1,0, activeMIDIchannel); + dinMIDIsendControlChange(1,0, activeMIDIchannel - 1); + oldextrac = 0; + } else if (extraCT == 2){ //SUS + //send sustain off + usbMIDI.sendControlChange(64,0, activeMIDIchannel); + dinMIDIsendControlChange(64,0, activeMIDIchannel - 1); + } + } +} + +//*********************************************************** +void portamento_(){ + biteSensor=biteSensor*0.6+0.4*touchRead(17); // get sensor data, do some smoothing - SENSOR PIN 17 + if (portamento && (biteSensor >= portamThrVal)) { // if we are enabled and over the threshold, send portamento if (!portIsOn) { portOn(); } @@ -288,8 +732,10 @@ void portamento(){ //*********************************************************** void portOn(){ - usbMIDI.sendControlChange(CCN_PortOnOff, 127, MIDIchannel); - dinMIDIsendControlChange(CCN_PortOnOff, 127, MIDIchannel - 1); + if (portamento == 2){ // if portamento midi switching is enabled + usbMIDI.sendControlChange(CCN_PortOnOff, 127, activeMIDIchannel); + dinMIDIsendControlChange(CCN_PortOnOff, 127, activeMIDIchannel - 1); + } portIsOn=1; } @@ -297,19 +743,25 @@ void portOn(){ void port(){ int portCC; - portCC = map(constrain(biteSensor,biteThr,biteMax),biteThr,biteMax,1,127); - usbMIDI.sendControlChange(CCN_Port, portCC, MIDIchannel); - dinMIDIsendControlChange(CCN_Port, portCC, MIDIchannel - 1); + portCC = map(constrain(biteSensor,portamThrVal,portamMaxVal),portamThrVal,portamMaxVal,0,127); + if (portCC!=oldport){ + usbMIDI.sendControlChange(CCN_Port, portCC, activeMIDIchannel); + dinMIDIsendControlChange(CCN_Port, portCC, activeMIDIchannel - 1); + } + oldport = portCC; } //*********************************************************** void portOff(){ - usbMIDI.sendControlChange(CCN_Port, 0, MIDIchannel); - dinMIDIsendControlChange(CCN_Port, 0, MIDIchannel - 1); - usbMIDI.sendControlChange(CCN_PortOnOff, 0, MIDIchannel); - dinMIDIsendControlChange(CCN_PortOnOff, 0, MIDIchannel - 1); + usbMIDI.sendControlChange(CCN_Port, 0, activeMIDIchannel); + dinMIDIsendControlChange(CCN_Port, 0, activeMIDIchannel - 1); + if (portamento == 2){ // if portamento midi switching is enabled + usbMIDI.sendControlChange(CCN_PortOnOff, 0, activeMIDIchannel); + dinMIDIsendControlChange(CCN_PortOnOff, 0, activeMIDIchannel - 1); + } portIsOn=0; + oldport = 0; } //*********************************************************** @@ -331,28 +783,2159 @@ void readSwitches(){ uint16_t touchValue = touchSensor.touched(); // Octave rollers - if (((touchValue >> 2) & 0x01) && ((touchValue >> 4) & 0x01)) octaveR = 6; //R6 = R5 && R3 - else if ((touchValue >> 4) & 0x01) octaveR = 5; //R5 - else if ((touchValue >> 3) & 0x01) octaveR = 4; //R4 - else if ((touchValue >> 2) & 0x01) octaveR = 3; //R3 - else if ((touchValue >> 1) & 0x01) octaveR = 2; //R2 - else if ((touchValue >> 0) & 0x01) octaveR = 1; //R1 + if (((touchValue >> 6) & 0x01) && ((touchValue >> 8) & 0x01)) octaveR = 6; //R6 = R5 && R3 + else if ((touchValue >> 6) & 0x01) octaveR = 5; //R5 + else if ((touchValue >> 9) & 0x01) octaveR = 4; //R4 + else if ((touchValue >> 8) & 0x01) octaveR = 3; //R3 + else if ((touchValue >> 11) & 0x01) octaveR = 2; //R2 + else if ((touchValue >> 10) & 0x01) octaveR = 1; //R1 // Valves and trill keys - K4=((touchValue >> 5) & 0x01); - K1=((touchValue >> 6) & 0x01); - K2=((touchValue >> 7) & 0x01); - K3=((touchValue >> 8) & 0x01); - K5=((touchValue >> 9) & 0x01); - K6=((touchValue >> 10) & 0x01); - K7=((touchValue >> 11) & 0x01); + K4=((touchValue >> 7) & 0x01); + K1=((touchValue >> 4) & 0x01); + K2=((touchValue >> 5) & 0x01); + K3=((touchValue >> 2) & 0x01); + K5=((touchValue >> 3) & 0x01); + K6=((touchValue >> 0) & 0x01); + K7=((touchValue >> 1) & 0x01); - // Read touch pads (Teensy built in) and put value in variables - //K4=touchRead(15) > touch_Thr; // Calculate midi note number from pressed keys - fingeredNote=startNote-2*K1-K2-3*K3-5*K4+2*K5+K6+4*K7+octaveR*12; + fingeredNote=startNote-2*K1-K2-3*K3-5*K4+2*K5+K6+4*K7+octaveR*12+(octave-3)*12+transpose-12; } + + + + + + + +// MENU STUFF FROM THIS POINT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + + + + + + + + + + +void menu() { + + // read the state of the switches + deumButtons = !digitalRead(dPin)+2*!digitalRead(ePin)+4*!digitalRead(uPin)+8*!digitalRead(mPin); + + // check to see if you just pressed the button + // (i.e. the input went from LOW to HIGH), and you've waited long enough + // since the last press to ignore any noise: + + // If the switch changed, due to noise or pressing: + if (deumButtons != lastDeumButtons) { + // reset the debouncing timer + lastDebounceTime = millis(); + } + + if ((millis() - lastDebounceTime) > debounceDelay) { + // whatever the reading is at, it's been there for longer than the debounce + // delay, so take it as the actual current state: + + // if the button state has changed: + if (deumButtons != deumButtonState) { + deumButtonState = deumButtons; + menuTime = millis(); + Serial.println(deumButtonState); + buttonPressedAndNotUsed = 1; + buttonPressedTime = millis(); + } + + if (((deumButtons == 1) || (deumButtons == 4)) && (millis() - buttonPressedTime > buttonRepeatDelay) && (millis() - buttonRepeatTime > buttonRepeatInterval)){ + buttonPressedAndNotUsed = 1; + buttonRepeatTime = millis(); + } + + } + + + // save the reading. Next time through the loop, it'll be the lastButtonState: + lastDeumButtons = deumButtons; + + if (state && ((millis() - menuTime) > menuTimeUp)) { // shut off menu system if not used for a while + state = DISPLAYOFF_IDL; + stateFirstRun = 1; + subTranspose = 0; + subMIDI = 0; + subBreathCC = 0; + subBreathAT = 0; + subVelocity = 0; + subPort = 0; + subPB = 0; + subExtra = 0; + subVibrato = 0; + subDeglitch = 0; + } + + + + if (state == DISPLAYOFF_IDL){ + if (stateFirstRun) { + display.ssd1306_command(SSD1306_DISPLAYOFF); + stateFirstRun = 0; + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + display.ssd1306_command(SSD1306_DISPLAYON); + state = PATCH_VIEW; + buttonPressedAndNotUsed = 1; + stateFirstRun = 1; + break; + case 2: + // enter + display.ssd1306_command(SSD1306_DISPLAYON); + state = PATCH_VIEW; + stateFirstRun = 1; + break; + case 4: + // up + display.ssd1306_command(SSD1306_DISPLAYON); + state = PATCH_VIEW; + buttonPressedAndNotUsed = 1; + stateFirstRun = 1; + break; + case 8: + // menu + display.ssd1306_command(SSD1306_DISPLAYON); + state = MAIN_MENU; + stateFirstRun = 1; + break; + } + } + } else if (state == PATCH_VIEW){ + if (stateFirstRun) { + drawPatchView(); + patchViewTime = millis(); + stateFirstRun = 0; + } + if ((millis() - patchViewTime) > patchViewTimeUp) { + state = DISPLAYOFF_IDL; + stateFirstRun = 1; + doPatchUpdate = 1; + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (patch > 1){ + patch--; + } else patch = 128; + drawPatchView(); + patchViewTime = millis(); + break; + case 2: + // enter + patchViewTime = millis(); + break; + case 4: + // up + if (patch < 128){ + patch++; + } else patch = 1; + drawPatchView(); + patchViewTime = millis(); + break; + case 8: + // menu + state = DISPLAYOFF_IDL; + stateFirstRun = 1; + doPatchUpdate = 1; + break; + } + } + } else if (state == MAIN_MENU){ // MAIN MENU HERE <<<<<<<<<<<<<<< + if (stateFirstRun) { + drawMenuScreen(); + stateFirstRun = 0; + } + if (subTranspose){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotTranspose(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (transpose > 0){ + plotTranspose(BLACK); + transpose--; + plotTranspose(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotTranspose(WHITE); + cursorNow = BLACK; + display.display(); + subTranspose = 0; + if (readSetting(TRANSP_ADDR) != transpose) writeSetting(TRANSP_ADDR,transpose); + break; + case 4: + // up + if (transpose < 24){ + plotTranspose(BLACK); + transpose++; + plotTranspose(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotTranspose(WHITE); + cursorNow = BLACK; + display.display(); + subTranspose = 0; + if (readSetting(TRANSP_ADDR) != transpose) writeSetting(TRANSP_ADDR,transpose); + break; + } + } + } else if (subOctave){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotOctave(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (octave > 0){ + plotOctave(BLACK); + octave--; + plotOctave(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotOctave(WHITE); + cursorNow = BLACK; + display.display(); + subOctave = 0; + if (readSetting(OCTAVE_ADDR) != octave) writeSetting(OCTAVE_ADDR,octave); + break; + case 4: + // up + if (octave < 6){ + plotOctave(BLACK); + octave++; + plotOctave(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotOctave(WHITE); + cursorNow = BLACK; + display.display(); + subOctave = 0; + if (readSetting(OCTAVE_ADDR) != octave) writeSetting(OCTAVE_ADDR,octave); + break; + } + } + } else if (subMIDI) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotMIDI(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (MIDIchannel > 1){ + plotMIDI(BLACK); + MIDIchannel--; + plotMIDI(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotMIDI(WHITE); + cursorNow = BLACK; + display.display(); + subMIDI = 0; + if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); + break; + case 4: + // up + if (MIDIchannel < 16){ + plotMIDI(BLACK); + MIDIchannel++; + plotMIDI(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotMIDI(WHITE); + cursorNow = BLACK; + display.display(); + subMIDI = 0; + if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); + break; + } + } + } else { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawMenuCursor(mainMenuCursor, cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (mainMenuCursor < 6){ + drawMenuCursor(mainMenuCursor, BLACK); + mainMenuCursor++; + drawMenuCursor(mainMenuCursor, WHITE); + cursorNow = BLACK; + clearSub(); + display.display(); + } + break; + case 2: + // enter + selectMainMenu(); + break; + case 4: + // up + if (mainMenuCursor > 1){ + drawMenuCursor(mainMenuCursor, BLACK); + mainMenuCursor--; + drawMenuCursor(mainMenuCursor, WHITE); + cursorNow = BLACK; + clearSub(); + display.display(); + } + break; + case 8: + // menu + state = DISPLAYOFF_IDL; + stateFirstRun = 1; + break; + } + } + } + } else if (state == BREATH_ADJ_IDL){ + if (stateFirstRun) { + drawBreathScreen(); + stateFirstRun = 0; + } + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawAdjCursor(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + state = PORTAM_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(BREATH_THR_ADDR) != breathThrVal) writeSetting(BREATH_THR_ADDR,breathThrVal); + if (readSetting(BREATH_MAX_ADDR) != breathMaxVal) writeSetting(BREATH_MAX_ADDR,breathMaxVal); + break; + case 2: + // enter + state = BREATH_ADJ_THR; + break; + case 4: + // up + state = EXTRAC_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(BREATH_THR_ADDR) != breathThrVal) writeSetting(BREATH_THR_ADDR,breathThrVal); + if (readSetting(BREATH_MAX_ADDR) != breathMaxVal) writeSetting(BREATH_MAX_ADDR,breathMaxVal); + break; + case 8: + // menu + state = MAIN_MENU; + stateFirstRun = 1; + if (readSetting(BREATH_THR_ADDR) != breathThrVal) writeSetting(BREATH_THR_ADDR,breathThrVal); + if (readSetting(BREATH_MAX_ADDR) != breathMaxVal) writeSetting(BREATH_MAX_ADDR,breathMaxVal); + break; + } + } + } else if (state == BREATH_ADJ_THR){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos1,20,pos1,26,cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (breathThrVal - breathStep > breathLoLimit){ + breathThrVal -= breathStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(breathThrVal, breathLoLimit, breathHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = BREATH_ADJ_MAX; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + case 4: + // up + if (breathThrVal + breathStep < breathHiLimit){ + breathThrVal += breathStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(breathThrVal, breathLoLimit, breathHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = BREATH_ADJ_IDL; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + } + } + } else if (state == BREATH_ADJ_MAX){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos2,50,pos2,57,cursorNow);; + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if ((breathMaxVal - breathStep) > (breathThrVal + minOffset)){ + breathMaxVal -= breathStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(breathMaxVal, breathLoLimit, breathHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = BREATH_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + case 4: + // up + if (breathMaxVal + breathStep < breathHiLimit){ + breathMaxVal += breathStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(breathMaxVal, breathLoLimit, breathHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = BREATH_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + } + } + } else if (state == PORTAM_ADJ_IDL){ + if (stateFirstRun) { + drawPortamScreen(); + stateFirstRun = 0; + } + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawAdjCursor(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + state = PITCHB_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(PORTAM_THR_ADDR) != portamThrVal) writeSetting(PORTAM_THR_ADDR,portamThrVal); + if (readSetting(PORTAM_MAX_ADDR) != portamMaxVal) writeSetting(PORTAM_MAX_ADDR,portamMaxVal); + break; + case 2: + // enter + state = PORTAM_ADJ_THR; + break; + case 4: + // up + state = BREATH_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(PORTAM_THR_ADDR) != portamThrVal) writeSetting(PORTAM_THR_ADDR,portamThrVal); + if (readSetting(PORTAM_MAX_ADDR) != portamMaxVal) writeSetting(PORTAM_MAX_ADDR,portamMaxVal); + break; + case 8: + // menu + state = MAIN_MENU; + stateFirstRun = 1; + if (readSetting(PORTAM_THR_ADDR) != portamThrVal) writeSetting(PORTAM_THR_ADDR,portamThrVal); + if (readSetting(PORTAM_MAX_ADDR) != portamMaxVal) writeSetting(PORTAM_MAX_ADDR,portamMaxVal); + break; + } + } + } else if (state == PORTAM_ADJ_THR){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos1,20,pos1,26,cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (portamThrVal - portamStep > portamLoLimit){ + portamThrVal -= portamStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(portamThrVal, portamLoLimit, portamHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = PORTAM_ADJ_MAX; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + case 4: + // up + if (portamThrVal + portamStep < portamHiLimit){ + portamThrVal += portamStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(portamThrVal, portamLoLimit, portamHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = PORTAM_ADJ_IDL; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + } + } + } else if (state == PORTAM_ADJ_MAX){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos2,50,pos2,57,cursorNow);; + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if ((portamMaxVal - portamStep) > (portamThrVal + minOffset)){ + portamMaxVal -= portamStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(portamMaxVal, portamLoLimit, portamHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = PORTAM_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + case 4: + // up + if (portamMaxVal + portamStep < portamHiLimit){ + portamMaxVal += portamStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(portamMaxVal, portamLoLimit, portamHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = PORTAM_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + } + } + } else if (state == PITCHB_ADJ_IDL){ + if (stateFirstRun) { + drawPitchbScreen(); + stateFirstRun = 0; + } + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawAdjCursor(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + state = EXTRAC_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(PITCHB_THR_ADDR) != pitchbThrVal) writeSetting(PITCHB_THR_ADDR,pitchbThrVal); + if (readSetting(PITCHB_MAX_ADDR) != pitchbMaxVal) writeSetting(PITCHB_MAX_ADDR,pitchbMaxVal); + break; + case 2: + // enter + state = PITCHB_ADJ_THR; + break; + case 4: + // up + state = PORTAM_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(PITCHB_THR_ADDR) != pitchbThrVal) writeSetting(PITCHB_THR_ADDR,pitchbThrVal); + if (readSetting(PITCHB_MAX_ADDR) != pitchbMaxVal) writeSetting(PITCHB_MAX_ADDR,pitchbMaxVal); + break; + case 8: + // menu + state = MAIN_MENU; + stateFirstRun = 1; + if (readSetting(PITCHB_THR_ADDR) != pitchbThrVal) writeSetting(PITCHB_THR_ADDR,pitchbThrVal); + if (readSetting(PITCHB_MAX_ADDR) != pitchbMaxVal) writeSetting(PITCHB_MAX_ADDR,pitchbMaxVal); + break; + } + } + } else if (state == PITCHB_ADJ_THR){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos1,20,pos1,26,cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (pitchbThrVal - pitchbStep > pitchbLoLimit){ + pitchbThrVal -= pitchbStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(pitchbThrVal, pitchbLoLimit, pitchbHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = PITCHB_ADJ_MAX; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + case 4: + // up + if (pitchbThrVal + pitchbStep < pitchbHiLimit){ + pitchbThrVal += pitchbStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(pitchbThrVal, pitchbLoLimit, pitchbHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = PITCHB_ADJ_IDL; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + } + } + } else if (state == PITCHB_ADJ_MAX){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos2,50,pos2,57,cursorNow);; + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if ((pitchbMaxVal - pitchbStep) > (pitchbThrVal + minOffset)){ + pitchbMaxVal -= pitchbStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(pitchbMaxVal, pitchbLoLimit, pitchbHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = PITCHB_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + case 4: + // up + if (pitchbMaxVal + pitchbStep < pitchbHiLimit){ + pitchbMaxVal += pitchbStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(pitchbMaxVal, pitchbLoLimit, pitchbHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = PITCHB_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + } + } + + } else if (state == EXTRAC_ADJ_IDL){ + if (stateFirstRun) { + drawExtracScreen(); + stateFirstRun = 0; + } + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawAdjCursor(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + state = BREATH_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(EXTRAC_THR_ADDR) != extracThrVal) writeSetting(EXTRAC_THR_ADDR,extracThrVal); + if (readSetting(EXTRAC_MAX_ADDR) != extracMaxVal) writeSetting(EXTRAC_MAX_ADDR,extracMaxVal); + break; + case 2: + // enter + state = EXTRAC_ADJ_THR; + break; + case 4: + // up + state = PITCHB_ADJ_IDL; + stateFirstRun = 1; + if (readSetting(EXTRAC_THR_ADDR) != extracThrVal) writeSetting(EXTRAC_THR_ADDR,extracThrVal); + if (readSetting(EXTRAC_MAX_ADDR) != extracMaxVal) writeSetting(EXTRAC_MAX_ADDR,extracMaxVal); + break; + case 8: + // menu + state = MAIN_MENU; + stateFirstRun = 1; + if (readSetting(EXTRAC_THR_ADDR) != extracThrVal) writeSetting(EXTRAC_THR_ADDR,extracThrVal); + if (readSetting(EXTRAC_MAX_ADDR) != extracMaxVal) writeSetting(EXTRAC_MAX_ADDR,extracMaxVal); + break; + } + } + } else if (state == EXTRAC_ADJ_THR){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos1,20,pos1,26,cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (extracThrVal - extracStep > extracLoLimit){ + extracThrVal -= extracStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(extracThrVal, extracLoLimit, extracHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = EXTRAC_ADJ_MAX; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + case 4: + // up + if (extracThrVal + extracStep < extracHiLimit){ + extracThrVal += extracStep; + display.drawLine(pos1,20,pos1,26,BLACK); + pos1 = map(extracThrVal, extracLoLimit, extracHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = EXTRAC_ADJ_IDL; + display.drawLine(pos1,20,pos1,26,WHITE); + display.display(); + break; + } + } + } else if (state == EXTRAC_ADJ_MAX){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + display.drawLine(pos2,50,pos2,57,cursorNow);; + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if ((extracMaxVal - extracStep) > (extracThrVal + minOffset)){ + extracMaxVal -= extracStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(extracMaxVal, extracLoLimit, extracHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 2: + // enter + state = EXTRAC_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + case 4: + // up + if (extracMaxVal + extracStep < extracHiLimit){ + extracMaxVal += extracStep; + display.drawLine(pos2,50,pos2,57,BLACK); + pos2 = map(extracMaxVal, extracLoLimit, extracHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + cursorBlinkTime = millis(); + cursorNow = BLACK; + } + break; + case 8: + // menu + state = EXTRAC_ADJ_IDL; + display.drawLine(pos2,50,pos2,57,WHITE); + display.display(); + break; + } + } + + + + } else if (state == SETUP_BR_MENU) { // SETUP BREATH MENU HERE <<<<<<<<<<<<<< + if (stateFirstRun) { + drawSetupBrMenuScreen(); + stateFirstRun = 0; + } + if (subBreathCC){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotBreathCC(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (breathCC > 0){ + plotBreathCC(BLACK); + breathCC--; + plotBreathCC(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } else { + plotBreathCC(BLACK); + breathCC = 3; + plotBreathCC(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotBreathCC(WHITE); + cursorNow = BLACK; + display.display(); + subBreathCC = 0; + if (readSetting(BREATH_CC_ADDR) != breathCC) writeSetting(BREATH_CC_ADDR,breathCC); + break; + case 4: + // up + if (breathCC < 3){ + plotBreathCC(BLACK); + breathCC++; + plotBreathCC(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } else { + plotBreathCC(BLACK); + breathCC = 0; + plotBreathCC(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotBreathCC(WHITE); + cursorNow = BLACK; + display.display(); + subBreathCC = 0; + if (readSetting(BREATH_CC_ADDR) != breathCC) writeSetting(BREATH_CC_ADDR,breathCC); + break; + } + } + } else if (subBreathAT) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotBreathAT(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + plotBreathAT(BLACK); + breathAT=!breathAT; + plotBreathAT(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 2: + // enter + plotBreathAT(WHITE); + cursorNow = BLACK; + display.display(); + subBreathAT = 0; + if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); + break; + case 4: + // up + plotBreathAT(BLACK); + breathAT=!breathAT; + plotBreathAT(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 8: + // menu + plotBreathAT(WHITE); + cursorNow = BLACK; + display.display(); + subBreathAT = 0; + if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); + break; + } + } + } else if (subVelocity) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotVelocity(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + plotVelocity(BLACK); + if (velocity > 0){ + velocity--; + } else velocity = 127; + plotVelocity(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 2: + // enter + plotVelocity(WHITE); + cursorNow = BLACK; + display.display(); + subVelocity = 0; + if (readSetting(VELOCITY_ADDR) != velocity) writeSetting(VELOCITY_ADDR,velocity); + break; + case 4: + // up + plotVelocity(BLACK); + if (velocity < 127){ + velocity++; + } else velocity = 0; + plotVelocity(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 8: + // menu + plotVelocity(WHITE); + cursorNow = BLACK; + display.display(); + subVelocity = 0; + if (readSetting(VELOCITY_ADDR) != velocity) writeSetting(VELOCITY_ADDR,velocity); + break; + } + } + } else { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawMenuCursor(setupBrMenuCursor, cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (setupBrMenuCursor < 3){ + drawMenuCursor(setupBrMenuCursor, BLACK); + setupBrMenuCursor++; + drawMenuCursor(setupBrMenuCursor, WHITE); + cursorNow = BLACK; + clearSub(); + display.display(); + } + break; + case 2: + // enter + selectSetupBrMenu(); + break; + case 4: + // up + if (setupBrMenuCursor > 1){ + drawMenuCursor(setupBrMenuCursor, BLACK); + setupBrMenuCursor--; + drawMenuCursor(setupBrMenuCursor, WHITE); + cursorNow = BLACK; + clearSub(); + display.display(); + } + break; + case 8: + // menu + state = MAIN_MENU; + stateFirstRun = 1; + break; + } + } + } + + + } else if (state == SETUP_CT_MENU) { // SETUP CONTROLLERS MENU HERE <<<<<<<<<<<<< + if (stateFirstRun) { + drawSetupCtMenuScreen(); + stateFirstRun = 0; + } + if (subPort){ + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotPort(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + plotPort(BLACK); + if (portamento > 0){ + portamento--; + } else portamento = 2; + plotPort(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 2: + // enter + plotPort(WHITE); + cursorNow = BLACK; + display.display(); + subPort = 0; + if (readSetting(PORTAM_ADDR) != portamento) writeSetting(PORTAM_ADDR,portamento); + break; + case 4: + // up + plotPort(BLACK); + if (portamento < 2){ + portamento++; + } else portamento = 0; + plotPort(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 8: + // menu + plotPort(WHITE); + cursorNow = BLACK; + display.display(); + subPort = 0; + if (readSetting(PORTAM_ADDR) != portamento) writeSetting(PORTAM_ADDR,portamento); + break; + } + } + } else if (subPB) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotPB(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (PBdepth > 0){ + plotPB(BLACK); + PBdepth--; + plotPB(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotPB(WHITE); + cursorNow = BLACK; + display.display(); + subPB = 0; + if (readSetting(PB_ADDR) != PBdepth) writeSetting(PB_ADDR,PBdepth); + break; + case 4: + // up + if (PBdepth < 12){ + plotPB(BLACK); + PBdepth++; + plotPB(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotPB(WHITE); + cursorNow = BLACK; + display.display(); + subPB = 0; + if (readSetting(PB_ADDR) != PBdepth) writeSetting(PB_ADDR,PBdepth); + break; + } + } + } else if (subExtra) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotExtra(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + plotExtra(BLACK); + if (extraCT > 0){ + extraCT--; + } else extraCT = 2; + plotExtra(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 2: + // enter + plotExtra(WHITE); + cursorNow = BLACK; + display.display(); + subExtra = 0; + if (readSetting(EXTRA_ADDR) != extraCT) writeSetting(EXTRA_ADDR,extraCT); + break; + case 4: + // up + plotExtra(BLACK); + if (extraCT < 2){ + extraCT++; + } else extraCT = 0; + plotExtra(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + break; + case 8: + // menu + plotExtra(WHITE); + cursorNow = BLACK; + display.display(); + subExtra = 0; + if (readSetting(EXTRA_ADDR) != extraCT) writeSetting(EXTRA_ADDR,extraCT); + break; + } + } + } else if (subVibrato) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotVibrato(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (vibrato > 0){ + plotVibrato(BLACK); + vibrato--; + plotVibrato(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotVibrato(WHITE); + cursorNow = BLACK; + display.display(); + subVibrato = 0; + if (readSetting(VIBRATO_ADDR) != vibrato) writeSetting(VIBRATO_ADDR,vibrato); + break; + case 4: + // up + if (vibrato < 6){ + plotVibrato(BLACK); + vibrato++; + plotVibrato(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotVibrato(WHITE); + cursorNow = BLACK; + display.display(); + subVibrato = 0; + if (readSetting(VIBRATO_ADDR) != vibrato) writeSetting(VIBRATO_ADDR,vibrato); + break; + } + } + } else if (subDeglitch) { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + plotDeglitch(cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (deglitch > 0){ + plotDeglitch(BLACK); + deglitch-=5; + plotDeglitch(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 2: + // enter + plotDeglitch(WHITE); + cursorNow = BLACK; + display.display(); + subDeglitch = 0; + if (readSetting(DEGLITCH_ADDR) != deglitch) writeSetting(DEGLITCH_ADDR,deglitch); + break; + case 4: + // up + if (deglitch < 70){ + plotDeglitch(BLACK); + deglitch+=5; + plotDeglitch(WHITE); + cursorNow = BLACK; + display.display(); + cursorBlinkTime = millis(); + } + break; + case 8: + // menu + plotDeglitch(WHITE); + cursorNow = BLACK; + display.display(); + subDeglitch = 0; + if (readSetting(DEGLITCH_ADDR) != deglitch) writeSetting(DEGLITCH_ADDR,deglitch); + break; + } + } + } else { + if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { + if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; + drawMenuCursor(setupCtMenuCursor, cursorNow); + display.display(); + cursorBlinkTime = millis(); + } + if (buttonPressedAndNotUsed){ + buttonPressedAndNotUsed = 0; + switch (deumButtonState){ + case 1: + // down + if (setupCtMenuCursor < 5){ + drawMenuCursor(setupCtMenuCursor, BLACK); + setupCtMenuCursor++; + drawMenuCursor(setupCtMenuCursor, WHITE); + cursorNow = BLACK; + clearSub(); + display.display(); + } + break; + case 2: + // enter + selectSetupCtMenu(); + break; + case 4: + // up + if (setupCtMenuCursor > 1){ + drawMenuCursor(setupCtMenuCursor, BLACK); + setupCtMenuCursor--; + drawMenuCursor(setupCtMenuCursor, WHITE); + cursorNow = BLACK; + clearSub(); + display.display(); + } + break; + case 8: + // menu + state = MAIN_MENU; + stateFirstRun = 1; + break; + } + } + } + } + +} + +void selectMainMenu(){ + switch (mainMenuCursor){ + case 1: + subTranspose = 1; + drawMenuCursor(mainMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubTranspose(); + break; + case 2: + subOctave = 1; + drawMenuCursor(mainMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubOctave(); + break; + case 3: + subMIDI = 1; + drawMenuCursor(mainMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubMIDI(); + break; + case 4: + state = BREATH_ADJ_IDL; + stateFirstRun = 1; + break; + case 5: + state = SETUP_BR_MENU; + stateFirstRun = 1; + break; + case 6: + state = SETUP_CT_MENU; + stateFirstRun = 1; + break; + } +} + +void selectSetupBrMenu(){ + switch (setupBrMenuCursor){ + case 1: + subBreathCC = 1; + drawMenuCursor(setupBrMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubBreathCC(); + break; + case 2: + subBreathAT = 1; + drawMenuCursor(setupBrMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubBreathAT(); + break; + case 3: + subVelocity = 1; + drawMenuCursor(setupBrMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubVelocity(); + } +} + +void selectSetupCtMenu(){ + switch (setupCtMenuCursor){ + case 1: + subPort = 1; + drawMenuCursor(setupCtMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubPort(); + break; + case 2: + subPB = 1; + drawMenuCursor(setupCtMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubPB(); + break; + case 3: + subExtra = 1; + drawMenuCursor(setupCtMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubExtra(); + break; + case 4: + subVibrato = 1; + drawMenuCursor(setupCtMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubVibrato(); + break; + case 5: + subDeglitch = 1; + drawMenuCursor(setupCtMenuCursor, WHITE); + display.display(); + cursorBlinkTime = millis(); + drawSubDeglitch(); + } +} +void drawBreathScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(25,2); + display.println("BREATH"); + //display.drawLine(0,10,127,10,WHITE); + display.setCursor(0,20); + display.println("THR"); + display.drawLine(25,17,120,17,WHITE); + display.drawLine(25,18,25,19,WHITE); + display.drawLine(120,18,120,19,WHITE); + display.drawLine(25,29,120,29,WHITE); + display.drawLine(25,27,25,28,WHITE); + display.drawLine(120,27,120,28,WHITE); + display.setCursor(0,35); + display.println("SNS"); + //display.drawLine(25,38,120,38,WHITE); + display.drawLine(25,36,25,40,WHITE); + display.drawLine(120,36,120,40,WHITE); + display.setCursor(0,50); + display.println("MAX"); + display.drawLine(25,47,120,47,WHITE); + display.drawLine(25,48,25,49,WHITE); + display.drawLine(120,48,120,49,WHITE); + display.drawLine(25,60,120,60,WHITE); + display.drawLine(25,58,25,59,WHITE); + display.drawLine(120,58,120,59,WHITE); + + //display.drawLine(38,20,38,26,WHITE); // indikation thr + pos1 = map(breathThrVal, breathLoLimit, breathHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + cursorNow = WHITE; + //display.drawLine(115,50,115,57,WHITE); // indikation max + pos2 = map(breathMaxVal, breathLoLimit, breathHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + //display.drawPixel(34, 38, WHITE); + drawAdjCursor(WHITE); + display.display(); +} + +void drawPortamScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(25,2); + display.println("PORTAMENTO"); + //display.drawLine(0,10,127,10,WHITE); + display.setCursor(0,20); + display.println("THR"); + display.drawLine(25,17,120,17,WHITE); + display.drawLine(25,18,25,19,WHITE); + display.drawLine(120,18,120,19,WHITE); + display.drawLine(25,29,120,29,WHITE); + display.drawLine(25,27,25,28,WHITE); + display.drawLine(120,27,120,28,WHITE); + display.setCursor(0,35); + display.println("SNS"); + //display.drawLine(25,38,120,38,WHITE); + display.drawLine(25,36,25,40,WHITE); + display.drawLine(120,36,120,40,WHITE); + display.setCursor(0,50); + display.println("MAX"); + display.drawLine(25,47,120,47,WHITE); + display.drawLine(25,48,25,49,WHITE); + display.drawLine(120,48,120,49,WHITE); + display.drawLine(25,60,120,60,WHITE); + display.drawLine(25,58,25,59,WHITE); + display.drawLine(120,58,120,59,WHITE); + + //display.drawLine(38,20,38,26,WHITE); // indikation thr + pos1 = map(portamThrVal, portamLoLimit, portamHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + cursorNow = WHITE; + //display.drawLine(115,50,115,57,WHITE); // indikation max + pos2 = map(portamMaxVal, portamLoLimit, portamHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + //display.drawPixel(34, 38, WHITE); + drawAdjCursor(WHITE); + display.display(); +} + +void drawPitchbScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(25,2); + display.println("PITCH BEND"); + //display.drawLine(0,10,127,10,WHITE); + display.setCursor(0,20); + display.println("THR"); + display.drawLine(25,17,120,17,WHITE); + display.drawLine(25,18,25,19,WHITE); + display.drawLine(120,18,120,19,WHITE); + display.drawLine(25,29,120,29,WHITE); + display.drawLine(25,27,25,28,WHITE); + display.drawLine(120,27,120,28,WHITE); + display.setCursor(0,35); + display.println("SNS"); + //display.drawLine(25,38,120,38,WHITE); + display.drawLine(25,36,25,40,WHITE); + display.drawLine(120,36,120,40,WHITE); + display.setCursor(0,50); + display.println("MAX"); + display.drawLine(25,47,120,47,WHITE); + display.drawLine(25,48,25,49,WHITE); + display.drawLine(120,48,120,49,WHITE); + display.drawLine(25,60,120,60,WHITE); + display.drawLine(25,58,25,59,WHITE); + display.drawLine(120,58,120,59,WHITE); + + //display.drawLine(38,20,38,26,WHITE); // indikation thr + pos1 = map(pitchbThrVal, pitchbLoLimit, pitchbHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + cursorNow = WHITE; + //display.drawLine(115,50,115,57,WHITE); // indikation max + pos2 = map(pitchbMaxVal, pitchbLoLimit, pitchbHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + //display.drawPixel(34, 38, WHITE); + drawAdjCursor(WHITE); + display.display(); +} + +void drawExtracScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(25,2); + display.println("EXTRA CONTROLLER"); + //display.drawLine(0,10,127,10,WHITE); + display.setCursor(0,20); + display.println("THR"); + display.drawLine(25,17,120,17,WHITE); + display.drawLine(25,18,25,19,WHITE); + display.drawLine(120,18,120,19,WHITE); + display.drawLine(25,29,120,29,WHITE); + display.drawLine(25,27,25,28,WHITE); + display.drawLine(120,27,120,28,WHITE); + display.setCursor(0,35); + display.println("SNS"); + //display.drawLine(25,38,120,38,WHITE); + display.drawLine(25,36,25,40,WHITE); + display.drawLine(120,36,120,40,WHITE); + display.setCursor(0,50); + display.println("MAX"); + display.drawLine(25,47,120,47,WHITE); + display.drawLine(25,48,25,49,WHITE); + display.drawLine(120,48,120,49,WHITE); + display.drawLine(25,60,120,60,WHITE); + display.drawLine(25,58,25,59,WHITE); + display.drawLine(120,58,120,59,WHITE); + + //display.drawLine(38,20,38,26,WHITE); // indikation thr + pos1 = map(extracThrVal, extracLoLimit, extracHiLimit, 27, 119); + display.drawLine(pos1,20,pos1,26,WHITE); + cursorNow = WHITE; + //display.drawLine(115,50,115,57,WHITE); // indikation max + pos2 = map(extracMaxVal, extracLoLimit, extracHiLimit, 27, 119); + display.drawLine(pos2,50,pos2,57,WHITE); + //display.drawPixel(34, 38, WHITE); + drawAdjCursor(WHITE); + display.display(); +} + +void drawMenuCursor(byte itemNo, byte color){ + byte xmid = 6 + 9 * itemNo; + display.drawTriangle(57,xmid,61,xmid+2,61,xmid-2,color); +} + +void drawAdjCursor(byte color){ + display.drawTriangle(16,4,20,4,18,1,color); + display.drawTriangle(16,6,20,6,18,9,color); +} + +void drawMenuScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(0,0); + display.println("MENU"); + display.drawLine(0,9,127,9,WHITE); + display.setCursor(0,12); + display.println("TRANSPOSE"); + display.setCursor(0,21); + display.println("OCTAVE"); + display.setCursor(0,30); + display.println("MIDI CH"); + display.setCursor(0,39); + display.println("ADJUST"); + display.setCursor(0,48); + display.println("SETUP BR"); + display.setCursor(0,57); + display.println("SETUP CTL"); + drawMenuCursor(mainMenuCursor, WHITE); + display.display(); +} + +void drawPatchView(){ + display.clearDisplay(); + display.setTextColor(WHITE); + display.setTextSize(6); + if (patch < 10){ + // 1-9 + display.setCursor(48,10); + } else if (patch < 100){ + // 10-99 + display.setCursor(31,10); + } else { + // 99-128 + display.setCursor(10,10); + } + display.println(patch); + display.display(); +} + +void clearSub(){ + display.fillRect(63,11,64,52,BLACK); +} + +void drawSubTranspose(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(68,15); + display.println("TRANSPOSE"); + plotTranspose(WHITE); + display.display(); +} + +void plotTranspose(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(80,33); + if ((transpose-12) > -1){ + display.println("+"); + display.setCursor(93,33); + display.println(transpose-12); + } else { + display.println("-"); + display.setCursor(93,33); + display.println(abs(transpose-12)); + } +} + +void drawSubOctave(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(74,15); + display.println("OCTAVE"); + plotOctave(WHITE); + display.display(); +} + +void plotOctave(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(80,33); + if ((octave-3) > -1){ + display.println("+"); + display.setCursor(93,33); + display.println(octave-3); + } else { + display.println("-"); + display.setCursor(93,33); + display.println(abs(octave-3)); + } +} + +void drawSubMIDI(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(68,15); + display.println("MIDI CHNL"); + plotMIDI(WHITE); + display.display(); +} + +void plotMIDI(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(90,33); + display.println(MIDIchannel); +} + +void drawSubBreathCC(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(68,15); + display.println("BREATH CC"); + plotBreathCC(WHITE); + display.display(); +} + +void plotBreathCC(int color){ + display.setTextColor(color); + display.setTextSize(2); + if (breathCC){ + display.setCursor(90,33); + display.println(ccList[breathCC]); + } else { + display.setCursor(79,33); + display.println("OFF"); + } +} + +void drawSubBreathAT(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(68,15); + display.println("BREATH AT"); + plotBreathAT(WHITE); + display.display(); +} + +void plotBreathAT(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(79,33); + if (breathAT){ + display.println("ON"); + } else { + display.println("OFF"); + } +} + +void drawSubVelocity(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(71,15); + display.println("VELOCITY"); + plotVelocity(WHITE); + display.display(); +} + +void plotVelocity(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(79,33); + if (velocity){ + display.println(velocity); + } else { + display.println("DYN"); + } +} + +void drawSubPort(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(71,15); + display.println("PORT/GLD"); + plotPort(WHITE); + display.display(); +} + +void plotPort(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(79,33); + if (portamento == 1){ + display.println("ON"); + } else if (portamento == 2){ + display.println("SW"); + } else { + display.println("OFF"); + } +} + +void drawSubPB(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(68,15); + display.println("PITCHBEND"); + plotPB(WHITE); + display.display(); +} + +void plotPB(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(76,33); + if (PBdepth){ + display.println("1/"); + display.setCursor(101,33); + display.println(PBdepth); + } else { + display.println("OFF"); + } +} + +void drawSubExtra(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(68,15); + display.println("EXTRA CTR"); + plotExtra(WHITE); + display.display(); +} + +void plotExtra(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(79,33); + if (extraCT == 1){ + display.println("MOD"); + } else if (extraCT == 2){ + display.println("SUS"); + } else { + display.println("OFF"); + } +} + +void drawSubVibrato(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(74,15); + display.println("VIBRATO"); + plotVibrato(WHITE); + display.display(); +} + +void plotVibrato(int color){ + display.setTextColor(color); + display.setTextSize(2); + if (vibrato){ + display.setCursor(90,33); + display.println(vibrato); + } else { + display.setCursor(79,33); + display.println("OFF"); + } +} + +void drawSubDeglitch(){ + display.fillRect(63,11,64,52,BLACK); + display.drawRect(63,11,64,52,WHITE); + display.setTextColor(WHITE); + display.setTextSize(1); + display.setCursor(71,15); + display.println("DEGLITCH"); + plotDeglitch(WHITE); + display.display(); +} + +void plotDeglitch(int color){ + display.setTextColor(color); + display.setTextSize(2); + display.setCursor(79,33); + if (deglitch){ + display.println(deglitch); + display.setCursor(105,40); + display.setTextSize(1); + display.println("ms"); + } else { + display.println("OFF"); + } +} + +void drawSetupBrMenuScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(0,0); + display.println("SETUP BREATH"); + display.drawLine(0,9,127,9,WHITE); + display.setCursor(0,12); + display.println("BREATH CC"); + display.setCursor(0,21); + display.println("BREATH AT"); + display.setCursor(0,30); + display.println("VELOCITY"); + display.setCursor(0,39); + display.println(""); + display.setCursor(0,48); + display.println(""); + display.setCursor(0,57); + display.println(""); + + display.display(); +} + +void drawSetupCtMenuScreen(){ + // Clear the buffer. + display.clearDisplay(); + + display.setTextSize(1); + display.setTextColor(WHITE); + display.setCursor(0,0); + display.println("SETUP CTRLS"); + display.drawLine(0,9,127,9,WHITE); + display.setCursor(0,12); + display.println("PORT/GLD"); + display.setCursor(0,21); + display.println("PITCHBEND"); + display.setCursor(0,30); + display.println("EXTRA CTR"); + display.setCursor(0,39); + display.println("VIBRATO"); + display.setCursor(0,48); + display.println("DEGLITCH"); + display.setCursor(0,57); + display.println(""); + + display.display(); +} + +void drawSensorPixels(){ + int pos,oldpos; + int redraw=0; + if ((state == BREATH_ADJ_IDL) || (state == BREATH_ADJ_THR) || (state == BREATH_ADJ_MAX)){ + pos = map(constrain(pressureSensor, breathLoLimit, breathHiLimit), breathLoLimit, breathHiLimit, 28, 118); + oldpos = map(constrain(lastPressure, breathLoLimit, breathHiLimit), breathLoLimit, breathHiLimit, 28, 118); + if (pos!=oldpos){ + display.drawPixel(oldpos, 38, BLACK); + display.drawPixel(pos, 38, WHITE); + display.display(); + } + lastPressure=pressureSensor; + } + if ((state == PORTAM_ADJ_IDL) || (state == PORTAM_ADJ_THR) || (state == PORTAM_ADJ_MAX)){ + pos = map(constrain(biteSensor,portamLoLimit,portamHiLimit), portamLoLimit, portamHiLimit, 28, 118); + oldpos = map(constrain(lastBite,portamLoLimit,portamHiLimit), portamLoLimit, portamHiLimit, 28, 118); + if (pos!=oldpos){ + display.drawPixel(oldpos, 38, BLACK); + display.drawPixel(pos, 38, WHITE); + display.display(); + } + lastBite=biteSensor; + } + if ((state == PITCHB_ADJ_IDL) || (state == PITCHB_ADJ_THR) || (state == PITCHB_ADJ_MAX)){ + pos = map(constrain(pbUp, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); + oldpos = map(constrain(lastPbUp, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); + if (pos!=oldpos){ + display.drawPixel(oldpos, 38, BLACK); + display.drawPixel(pos, 38, WHITE); + redraw=1; + } + pos = map(constrain(pbDn, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); + oldpos = map(constrain(lastPbDn, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); + if (pos!=oldpos){ + display.drawPixel(oldpos, 38, BLACK); + display.drawPixel(pos, 38, WHITE); + redraw=1; + } + if (redraw){ + display.display(); + redraw=0; + } + lastPbUp=pbUp; + lastPbDn=pbDn; + } + if ((state == EXTRAC_ADJ_IDL) || (state == EXTRAC_ADJ_THR) || (state == EXTRAC_ADJ_MAX)){ + pos = map(constrain(exSensor, extracLoLimit, extracHiLimit), extracLoLimit, extracHiLimit, 28, 118); + oldpos = map(constrain(lastEx, extracLoLimit, extracHiLimit), extracLoLimit, extracHiLimit, 28, 118); + if (pos!=oldpos){ + display.drawPixel(oldpos, 38, BLACK); + display.drawPixel(pos, 38, WHITE); + display.display(); + } + lastEx=exSensor; + } +} + +void writeSetting(byte address, unsigned short value){ + union { + byte v[2]; + unsigned short val; + } data; + data.val = value; + EEPROM.write(address, data.v[0]); + EEPROM.write(address+1, data.v[1]); +} + +unsigned short readSetting(byte address){ + union { + byte v[2]; + unsigned short val; + } data; + data.v[0] = EEPROM.read(address); + data.v[1] = EEPROM.read(address+1); + return data.val; +} + + diff --git a/hardware/final-all-in-one-board/NuEVI.brd b/hardware/final-all-in-one-board/NuEVI.brd new file mode 100644 index 0000000..8139682 --- /dev/null +++ b/hardware/final-all-in-one-board/NuEVI.brd @@ -0,0 +1,3131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +TEENSY ++ +- +S +G ++ +MIDI +GND +47 +47 +A6 +A7 +Vcc +GND +MPR121 +TOUCH +PWR +NuEVI main board + + + + +Johan Berglund 2017 +12 + + + + + + + +BITE +EC +VIBRATO +VUSB +R1 +R2 +R3 +R4 +R5 +R6 +K1 +K2 +K3 +K5 +K6 +K7 +S1 +S2 +Pu +Pd +OLED +GND +Vcc +SCL +SDA +M +U +E +D +NAV + + + + + + +BATT + + +USB +103 +105 +471 +MP3V5004GP +11 +LED +B +P +GND +100 +100 +AUX +AUX +K4 +GND + + + +<b>Pin Header Connectors</b><p> +<author>Created by librarian@cadsoft.de</author> + + +<b>PIN HEADER</b> + + + + + + + + + +>NAME +>VALUE + + + + + +<b>Resistors, Capacitors, Inductors</b><p> +Based on the previous libraries: +<ul> +<li>r.lbr +<li>cap.lbr +<li>cap-fe.lbr +<li>captant.lbr +<li>polcap.lbr +<li>ipc-smd.lbr +</ul> +All SMD packages are defined according to the IPC specifications and CECC<p> +<author>Created by librarian@cadsoft.de</author><p> +<p> +for Electrolyt Capacitors see also :<p> +www.bccomponents.com <p> +www.panasonic.com<p> +www.kemet.com<p> +<p> +for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> + +<map name="nav_main"> +<area shape="rect" coords="0,1,140,23" href="../military_specs.asp" title=""> +<area shape="rect" coords="0,24,140,51" href="../about.asp" title=""> +<area shape="rect" coords="1,52,140,77" href="../rfq.asp" title=""> +<area shape="rect" coords="0,78,139,103" href="../products.asp" title=""> +<area shape="rect" coords="1,102,138,128" href="../excess_inventory.asp" title=""> +<area shape="rect" coords="1,129,138,150" href="../edge.asp" title=""> +<area shape="rect" coords="1,151,139,178" href="../industry_links.asp" title=""> +<area shape="rect" coords="0,179,139,201" href="../comments.asp" title=""> +<area shape="rect" coords="1,203,138,231" href="../directory.asp" title=""> +<area shape="default" nohref> +</map> + +<html> + +<title></title> + + <LINK REL="StyleSheet" TYPE="text/css" HREF="style-sheet.css"> + +<body bgcolor="#ffffff" text="#000000" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"> +<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0 height="55%"> +<tr valign="top"> + +</td> +<! <td width="10">&nbsp;</td> +<td width="90%"> + +<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> +<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> + <TR> + <TD COLSPAN=8> + <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> + </B> + </TD><TD>&nbsp;</TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > + 3005P<BR> + 3006P<BR> + 3006W<BR> + 3006Y<BR> + 3009P<BR> + 3009W<BR> + 3009Y<BR> + 3057J<BR> + 3057L<BR> + 3057P<BR> + 3057Y<BR> + 3059J<BR> + 3059L<BR> + 3059P<BR> + 3059Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 89P<BR> + 89W<BR> + 89X<BR> + 89PH<BR> + 76P<BR> + 89XH<BR> + 78SLT<BR> + 78L&nbsp;ALT<BR> + 56P&nbsp;ALT<BR> + 78P&nbsp;ALT<BR> + T8S<BR> + 78L<BR> + 56P<BR> + 78P<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + T18/784<BR> + 783<BR> + 781<BR> + -<BR> + -<BR> + -<BR> + 2199<BR> + 1697/1897<BR> + 1680/1880<BR> + 2187<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 8035EKP/CT20/RJ-20P<BR> + -<BR> + RJ-20X<BR> + -<BR> + -<BR> + -<BR> + 1211L<BR> + 8012EKQ&nbsp;ALT<BR> + 8012EKR&nbsp;ALT<BR> + 1211P<BR> + 8012EKJ<BR> + 8012EKL<BR> + 8012EKQ<BR> + 8012EKR<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 2101P<BR> + 2101W<BR> + 2101Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 2102L<BR> + 2102S<BR> + 2102Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVMCOG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 43P<BR> + 43W<BR> + 43Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 40L<BR> + 40P<BR> + 40Y<BR> + 70Y-T602<BR> + 70L<BR> + 70P<BR> + 70Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + RT/RTR12<BR> + RT/RTR12<BR> + RT/RTR12<BR> + -<BR> + RJ/RJR12<BR> + RJ/RJR12<BR> + RJ/RJR12<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3250L<BR> + 3250P<BR> + 3250W<BR> + 3250X<BR> + 3252P<BR> + 3252W<BR> + 3252X<BR> + 3260P<BR> + 3260W<BR> + 3260X<BR> + 3262P<BR> + 3262W<BR> + 3262X<BR> + 3266P<BR> + 3266W<BR> + 3266X<BR> + 3290H<BR> + 3290P<BR> + 3290W<BR> + 3292P<BR> + 3292W<BR> + 3292X<BR> + 3296P<BR> + 3296W<BR> + 3296X<BR> + 3296Y<BR> + 3296Z<BR> + 3299P<BR> + 3299W<BR> + 3299X<BR> + 3299Y<BR> + 3299Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + -<BR> + 64W&nbsp;ALT<BR> + -<BR> + 64P&nbsp;ALT<BR> + 64W&nbsp;ALT<BR> + 64X&nbsp;ALT<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66P<BR> + 66W<BR> + 66X<BR> + 67P<BR> + 67W<BR> + 67X<BR> + 67Y<BR> + 67Z<BR> + 68P<BR> + 68W<BR> + 68X<BR> + 67Y&nbsp;ALT<BR> + 67Z&nbsp;ALT<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 5050<BR> + 5091<BR> + 5080<BR> + 5087<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + T63YB<BR> + T63XB<BR> + -<BR> + -<BR> + -<BR> + 5887<BR> + 5891<BR> + 5880<BR> + -<BR> + -<BR> + -<BR> + T93Z<BR> + T93YA<BR> + T93XA<BR> + T93YB<BR> + T93XB<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 8026EKP<BR> + 8026EKW<BR> + 8026EKM<BR> + 8026EKP<BR> + 8026EKB<BR> + 8026EKM<BR> + 1309X<BR> + 1309P<BR> + 1309W<BR> + 8024EKP<BR> + 8024EKW<BR> + 8024EKN<BR> + RJ-9P/CT9P<BR> + RJ-9W<BR> + RJ-9X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3105P/3106P<BR> + 3105W/3106W<BR> + 3105X/3106X<BR> + 3105Y/3106Y<BR> + 3105Z/3105Z<BR> + 3102P<BR> + 3102W<BR> + 3102X<BR> + 3102Y<BR> + 3102Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMCBG<BR> + EVMCCG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 55-1-X<BR> + 55-4-X<BR> + 55-3-X<BR> + 55-2-X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 50-2-X<BR> + 50-4-X<BR> + 50-3-X<BR> + -<BR> + -<BR> + -<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 64Y<BR> + 64Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3323P<BR> + 3323S<BR> + 3323W<BR> + 3329H<BR> + 3329P<BR> + 3329W<BR> + 3339H<BR> + 3339P<BR> + 3339W<BR> + 3352E<BR> + 3352H<BR> + 3352K<BR> + 3352P<BR> + 3352T<BR> + 3352V<BR> + 3352W<BR> + 3362H<BR> + 3362M<BR> + 3362P<BR> + 3362R<BR> + 3362S<BR> + 3362U<BR> + 3362W<BR> + 3362X<BR> + 3386B<BR> + 3386C<BR> + 3386F<BR> + 3386H<BR> + 3386K<BR> + 3386M<BR> + 3386P<BR> + 3386S<BR> + 3386W<BR> + 3386X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 25P<BR> + 25S<BR> + 25RX<BR> + 82P<BR> + 82M<BR> + 82PA<BR> + -<BR> + -<BR> + -<BR> + 91E<BR> + 91X<BR> + 91T<BR> + 91B<BR> + 91A<BR> + 91V<BR> + 91W<BR> + 25W<BR> + 25V<BR> + 25P<BR> + -<BR> + 25S<BR> + 25U<BR> + 25RX<BR> + 25X<BR> + 72XW<BR> + 72XL<BR> + 72PM<BR> + 72RX<BR> + -<BR> + 72PX<BR> + 72P<BR> + 72RXW<BR> + 72RXL<BR> + 72X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + T7YB<BR> + T7YA<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + TXD<BR> + TYA<BR> + TYP<BR> + -<BR> + TYD<BR> + TX<BR> + -<BR> + 150SX<BR> + 100SX<BR> + 102T<BR> + 101S<BR> + 190T<BR> + 150TX<BR> + 101<BR> + -<BR> + -<BR> + 101SX<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ET6P<BR> + ET6S<BR> + ET6X<BR> + RJ-6W/8014EMW<BR> + RJ-6P/8014EMP<BR> + RJ-6X/8014EMX<BR> + TM7W<BR> + TM7P<BR> + TM7X<BR> + -<BR> + 8017SMS<BR> + -<BR> + 8017SMB<BR> + 8017SMA<BR> + -<BR> + -<BR> + CT-6W<BR> + CT-6H<BR> + CT-6P<BR> + CT-6R<BR> + -<BR> + CT-6V<BR> + CT-6X<BR> + -<BR> + -<BR> + 8038EKV<BR> + -<BR> + 8038EKX<BR> + -<BR> + -<BR> + 8038EKP<BR> + 8038EKZ<BR> + 8038EKW<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 3321H<BR> + 3321P<BR> + 3321N<BR> + 1102H<BR> + 1102P<BR> + 1102T<BR> + RVA0911V304A<BR> + -<BR> + RVA0911H413A<BR> + RVG0707V100A<BR> + RVA0607V(H)306A<BR> + RVA1214H213A<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3104B<BR> + 3104C<BR> + 3104F<BR> + 3104H<BR> + -<BR> + 3104M<BR> + 3104P<BR> + 3104S<BR> + 3104W<BR> + 3104X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + EVMQ0G<BR> + EVMQIG<BR> + EVMQ3G<BR> + EVMS0G<BR> + EVMQ0G<BR> + EVMG0G<BR> + -<BR> + -<BR> + -<BR> + EVMK4GA00B<BR> + EVM30GA00B<BR> + EVMK0GA00B<BR> + EVM38GA00B<BR> + EVMB6<BR> + EVLQ0<BR> + -<BR> + EVMMSG<BR> + EVMMBG<BR> + EVMMAG<BR> + -<BR> + -<BR> + EVMMCS<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMM1<BR> + -<BR> + -<BR> + EVMM0<BR> + -<BR> + -<BR> + EVMM3<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 62-3-1<BR> + 62-1-2<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67R<BR> + -<BR> + 67P<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67X<BR> + 63V<BR> + 63S<BR> + 63M<BR> + -<BR> + -<BR> + 63H<BR> + 63P<BR> + -<BR> + -<BR> + 63X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P>&nbsp;<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> + <TR> + <TD COLSPAN=7> + <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> + <P> + <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3224G<BR> + 3224J<BR> + 3224W<BR> + 3269P<BR> + 3269W<BR> + 3269X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 44G<BR> + 44J<BR> + 44W<BR> + 84P<BR> + 84W<BR> + 84X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST63Z<BR> + ST63Y<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST5P<BR> + ST5W<BR> + ST5X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=7>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=7> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3314G<BR> + 3314J<BR> + 3364A/B<BR> + 3364C/D<BR> + 3364W/X<BR> + 3313G<BR> + 3313J<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 23B<BR> + 23A<BR> + 21X<BR> + 21W<BR> + -<BR> + 22B<BR> + 22A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST5YL/ST53YL<BR> + ST5YJ/5T53YJ<BR> + ST-23A<BR> + ST-22B<BR> + ST-22<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST-4B<BR> + ST-4A<BR> + -<BR> + -<BR> + -<BR> + ST-3B<BR> + ST-3A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVM-6YS<BR> + EVM-1E<BR> + EVM-1G<BR> + EVM-1D<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + G4B<BR> + G4A<BR> + TR04-3S1<BR> + TRG04-2S1<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + DVR-43A<BR> + CVR-42C<BR> + CVR-42A/C<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P> +<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> +<P> + +&nbsp; +<P> +</td> +</tr> +</table> +</BODY></HTML> + + +<b>RESISTOR</b><p> +type 0207, grid 7.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Switches</b><p> +Marquardt, Siemens, C&K, ITT, and others<p> +<author>Created by librarian@cadsoft.de</author> + + +<b>TINY SWITCH</b><p> +Source: http://www2.produktinfo.conrad.com/datenblaetter/700000-724999/705152-da-01-de-Subminiaturschalter_TL_36YO.pdf + + + + + + + + + + + + +>NAME +>VALUE + + + + +<h1>Freescale Semiconductor MPX series pressure sensors</h1> + +<p>Created by <a href="mailto:bkilian@interia.pl">bkilian@interia.pl</a> (Poland)</p> + + +Small Outline Package 1369-01 Side Port + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Resistors, Capacitors, Inductors</b><p> +Based on the previous libraries: +<ul> +<li>r.lbr +<li>cap.lbr +<li>cap-fe.lbr +<li>captant.lbr +<li>polcap.lbr +<li>ipc-smd.lbr +</ul> +All SMD packages are defined according to the IPC specifications and CECC<p> +<author>Created by librarian@cadsoft.de</author><p> +<p> +for Electrolyt Capacitors see also :<p> +www.bccomponents.com <p> +www.panasonic.com<p> +www.kemet.com<p> +http://www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf <b>(SANYO)</b> +<p> +for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> + +<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0> +<tr valign="top"> + +<! <td width="10">&nbsp;</td> +<td width="90%"> + +<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> +<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> + <TR> + <TD COLSPAN=8> + <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> + </B> + </TD><TD>&nbsp;</TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > + 3005P<BR> + 3006P<BR> + 3006W<BR> + 3006Y<BR> + 3009P<BR> + 3009W<BR> + 3009Y<BR> + 3057J<BR> + 3057L<BR> + 3057P<BR> + 3057Y<BR> + 3059J<BR> + 3059L<BR> + 3059P<BR> + 3059Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 89P<BR> + 89W<BR> + 89X<BR> + 89PH<BR> + 76P<BR> + 89XH<BR> + 78SLT<BR> + 78L&nbsp;ALT<BR> + 56P&nbsp;ALT<BR> + 78P&nbsp;ALT<BR> + T8S<BR> + 78L<BR> + 56P<BR> + 78P<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + T18/784<BR> + 783<BR> + 781<BR> + -<BR> + -<BR> + -<BR> + 2199<BR> + 1697/1897<BR> + 1680/1880<BR> + 2187<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 8035EKP/CT20/RJ-20P<BR> + -<BR> + RJ-20X<BR> + -<BR> + -<BR> + -<BR> + 1211L<BR> + 8012EKQ&nbsp;ALT<BR> + 8012EKR&nbsp;ALT<BR> + 1211P<BR> + 8012EKJ<BR> + 8012EKL<BR> + 8012EKQ<BR> + 8012EKR<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 2101P<BR> + 2101W<BR> + 2101Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 2102L<BR> + 2102S<BR> + 2102Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVMCOG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 43P<BR> + 43W<BR> + 43Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 40L<BR> + 40P<BR> + 40Y<BR> + 70Y-T602<BR> + 70L<BR> + 70P<BR> + 70Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + RT/RTR12<BR> + RT/RTR12<BR> + RT/RTR12<BR> + -<BR> + RJ/RJR12<BR> + RJ/RJR12<BR> + RJ/RJR12<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3250L<BR> + 3250P<BR> + 3250W<BR> + 3250X<BR> + 3252P<BR> + 3252W<BR> + 3252X<BR> + 3260P<BR> + 3260W<BR> + 3260X<BR> + 3262P<BR> + 3262W<BR> + 3262X<BR> + 3266P<BR> + 3266W<BR> + 3266X<BR> + 3290H<BR> + 3290P<BR> + 3290W<BR> + 3292P<BR> + 3292W<BR> + 3292X<BR> + 3296P<BR> + 3296W<BR> + 3296X<BR> + 3296Y<BR> + 3296Z<BR> + 3299P<BR> + 3299W<BR> + 3299X<BR> + 3299Y<BR> + 3299Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + -<BR> + 64W&nbsp;ALT<BR> + -<BR> + 64P&nbsp;ALT<BR> + 64W&nbsp;ALT<BR> + 64X&nbsp;ALT<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66P<BR> + 66W<BR> + 66X<BR> + 67P<BR> + 67W<BR> + 67X<BR> + 67Y<BR> + 67Z<BR> + 68P<BR> + 68W<BR> + 68X<BR> + 67Y&nbsp;ALT<BR> + 67Z&nbsp;ALT<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 5050<BR> + 5091<BR> + 5080<BR> + 5087<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + T63YB<BR> + T63XB<BR> + -<BR> + -<BR> + -<BR> + 5887<BR> + 5891<BR> + 5880<BR> + -<BR> + -<BR> + -<BR> + T93Z<BR> + T93YA<BR> + T93XA<BR> + T93YB<BR> + T93XB<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 8026EKP<BR> + 8026EKW<BR> + 8026EKM<BR> + 8026EKP<BR> + 8026EKB<BR> + 8026EKM<BR> + 1309X<BR> + 1309P<BR> + 1309W<BR> + 8024EKP<BR> + 8024EKW<BR> + 8024EKN<BR> + RJ-9P/CT9P<BR> + RJ-9W<BR> + RJ-9X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3105P/3106P<BR> + 3105W/3106W<BR> + 3105X/3106X<BR> + 3105Y/3106Y<BR> + 3105Z/3105Z<BR> + 3102P<BR> + 3102W<BR> + 3102X<BR> + 3102Y<BR> + 3102Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMCBG<BR> + EVMCCG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 55-1-X<BR> + 55-4-X<BR> + 55-3-X<BR> + 55-2-X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 50-2-X<BR> + 50-4-X<BR> + 50-3-X<BR> + -<BR> + -<BR> + -<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 64Y<BR> + 64Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3323P<BR> + 3323S<BR> + 3323W<BR> + 3329H<BR> + 3329P<BR> + 3329W<BR> + 3339H<BR> + 3339P<BR> + 3339W<BR> + 3352E<BR> + 3352H<BR> + 3352K<BR> + 3352P<BR> + 3352T<BR> + 3352V<BR> + 3352W<BR> + 3362H<BR> + 3362M<BR> + 3362P<BR> + 3362R<BR> + 3362S<BR> + 3362U<BR> + 3362W<BR> + 3362X<BR> + 3386B<BR> + 3386C<BR> + 3386F<BR> + 3386H<BR> + 3386K<BR> + 3386M<BR> + 3386P<BR> + 3386S<BR> + 3386W<BR> + 3386X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 25P<BR> + 25S<BR> + 25RX<BR> + 82P<BR> + 82M<BR> + 82PA<BR> + -<BR> + -<BR> + -<BR> + 91E<BR> + 91X<BR> + 91T<BR> + 91B<BR> + 91A<BR> + 91V<BR> + 91W<BR> + 25W<BR> + 25V<BR> + 25P<BR> + -<BR> + 25S<BR> + 25U<BR> + 25RX<BR> + 25X<BR> + 72XW<BR> + 72XL<BR> + 72PM<BR> + 72RX<BR> + -<BR> + 72PX<BR> + 72P<BR> + 72RXW<BR> + 72RXL<BR> + 72X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + T7YB<BR> + T7YA<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + TXD<BR> + TYA<BR> + TYP<BR> + -<BR> + TYD<BR> + TX<BR> + -<BR> + 150SX<BR> + 100SX<BR> + 102T<BR> + 101S<BR> + 190T<BR> + 150TX<BR> + 101<BR> + -<BR> + -<BR> + 101SX<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ET6P<BR> + ET6S<BR> + ET6X<BR> + RJ-6W/8014EMW<BR> + RJ-6P/8014EMP<BR> + RJ-6X/8014EMX<BR> + TM7W<BR> + TM7P<BR> + TM7X<BR> + -<BR> + 8017SMS<BR> + -<BR> + 8017SMB<BR> + 8017SMA<BR> + -<BR> + -<BR> + CT-6W<BR> + CT-6H<BR> + CT-6P<BR> + CT-6R<BR> + -<BR> + CT-6V<BR> + CT-6X<BR> + -<BR> + -<BR> + 8038EKV<BR> + -<BR> + 8038EKX<BR> + -<BR> + -<BR> + 8038EKP<BR> + 8038EKZ<BR> + 8038EKW<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 3321H<BR> + 3321P<BR> + 3321N<BR> + 1102H<BR> + 1102P<BR> + 1102T<BR> + RVA0911V304A<BR> + -<BR> + RVA0911H413A<BR> + RVG0707V100A<BR> + RVA0607V(H)306A<BR> + RVA1214H213A<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3104B<BR> + 3104C<BR> + 3104F<BR> + 3104H<BR> + -<BR> + 3104M<BR> + 3104P<BR> + 3104S<BR> + 3104W<BR> + 3104X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + EVMQ0G<BR> + EVMQIG<BR> + EVMQ3G<BR> + EVMS0G<BR> + EVMQ0G<BR> + EVMG0G<BR> + -<BR> + -<BR> + -<BR> + EVMK4GA00B<BR> + EVM30GA00B<BR> + EVMK0GA00B<BR> + EVM38GA00B<BR> + EVMB6<BR> + EVLQ0<BR> + -<BR> + EVMMSG<BR> + EVMMBG<BR> + EVMMAG<BR> + -<BR> + -<BR> + EVMMCS<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMM1<BR> + -<BR> + -<BR> + EVMM0<BR> + -<BR> + -<BR> + EVMM3<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 62-3-1<BR> + 62-1-2<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67R<BR> + -<BR> + 67P<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67X<BR> + 63V<BR> + 63S<BR> + 63M<BR> + -<BR> + -<BR> + 63H<BR> + 63P<BR> + -<BR> + -<BR> + 63X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P>&nbsp;<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> + <TR> + <TD COLSPAN=7> + <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> + <P> + <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3224G<BR> + 3224J<BR> + 3224W<BR> + 3269P<BR> + 3269W<BR> + 3269X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 44G<BR> + 44J<BR> + 44W<BR> + 84P<BR> + 84W<BR> + 84X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST63Z<BR> + ST63Y<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST5P<BR> + ST5W<BR> + ST5X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=7>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=7> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3314G<BR> + 3314J<BR> + 3364A/B<BR> + 3364C/D<BR> + 3364W/X<BR> + 3313G<BR> + 3313J<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 23B<BR> + 23A<BR> + 21X<BR> + 21W<BR> + -<BR> + 22B<BR> + 22A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST5YL/ST53YL<BR> + ST5YJ/5T53YJ<BR> + ST-23A<BR> + ST-22B<BR> + ST-22<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST-4B<BR> + ST-4A<BR> + -<BR> + -<BR> + -<BR> + ST-3B<BR> + ST-3A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVM-6YS<BR> + EVM-1E<BR> + EVM-1G<BR> + EVM-1D<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + G4B<BR> + G4A<BR> + TR04-3S1<BR> + TRG04-2S1<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + DVR-43A<BR> + CVR-42C<BR> + CVR-42A/C<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P> +<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> +<P> + +&nbsp; +<P> +</td> +</tr> +</table> + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 2.4 x 4.4 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + +<b>EAGLE Design Rules</b> +<p> +Die Standard-Design-Rules sind so gewählt, dass sie für +die meisten Anwendungen passen. Sollte ihre Platine +besondere Anforderungen haben, treffen Sie die erforderlichen +Einstellungen hier und speichern die Design Rules unter +einem neuen Namen ab. +<b>EAGLE Design Rules</b> +<p> +The default Design Rules have been set to cover +a wide range of applications. Your particular design +may have different requirements, so please make the +necessary adjustments and save your customized +design rules under a new name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hardware/final-all-in-one-board/NuEVI.sch b/hardware/final-all-in-one-board/NuEVI.sch new file mode 100644 index 0000000..eba6e37 --- /dev/null +++ b/hardware/final-all-in-one-board/NuEVI.sch @@ -0,0 +1,8900 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Pin Header Connectors</b><p> +<author>Created by librarian@cadsoft.de</author> + + +<b>PIN HEADER</b> + + + + + + + + + +>NAME +>VALUE + + + + + + + + + +>NAME +>VALUE + + + + + +<b>PIN HEADER</b> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Resistors, Capacitors, Inductors</b><p> +Based on the previous libraries: +<ul> +<li>r.lbr +<li>cap.lbr +<li>cap-fe.lbr +<li>captant.lbr +<li>polcap.lbr +<li>ipc-smd.lbr +</ul> +All SMD packages are defined according to the IPC specifications and CECC<p> +<author>Created by librarian@cadsoft.de</author><p> +<p> +for Electrolyt Capacitors see also :<p> +www.bccomponents.com <p> +www.panasonic.com<p> +www.kemet.com<p> +<p> +for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> + +<map name="nav_main"> +<area shape="rect" coords="0,1,140,23" href="../military_specs.asp" title=""> +<area shape="rect" coords="0,24,140,51" href="../about.asp" title=""> +<area shape="rect" coords="1,52,140,77" href="../rfq.asp" title=""> +<area shape="rect" coords="0,78,139,103" href="../products.asp" title=""> +<area shape="rect" coords="1,102,138,128" href="../excess_inventory.asp" title=""> +<area shape="rect" coords="1,129,138,150" href="../edge.asp" title=""> +<area shape="rect" coords="1,151,139,178" href="../industry_links.asp" title=""> +<area shape="rect" coords="0,179,139,201" href="../comments.asp" title=""> +<area shape="rect" coords="1,203,138,231" href="../directory.asp" title=""> +<area shape="default" nohref> +</map> + +<html> + +<title></title> + + <LINK REL="StyleSheet" TYPE="text/css" HREF="style-sheet.css"> + +<body bgcolor="#ffffff" text="#000000" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"> +<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0 height="55%"> +<tr valign="top"> + +</td> +<! <td width="10">&nbsp;</td> +<td width="90%"> + +<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> +<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> + <TR> + <TD COLSPAN=8> + <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> + </B> + </TD><TD>&nbsp;</TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > + 3005P<BR> + 3006P<BR> + 3006W<BR> + 3006Y<BR> + 3009P<BR> + 3009W<BR> + 3009Y<BR> + 3057J<BR> + 3057L<BR> + 3057P<BR> + 3057Y<BR> + 3059J<BR> + 3059L<BR> + 3059P<BR> + 3059Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 89P<BR> + 89W<BR> + 89X<BR> + 89PH<BR> + 76P<BR> + 89XH<BR> + 78SLT<BR> + 78L&nbsp;ALT<BR> + 56P&nbsp;ALT<BR> + 78P&nbsp;ALT<BR> + T8S<BR> + 78L<BR> + 56P<BR> + 78P<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + T18/784<BR> + 783<BR> + 781<BR> + -<BR> + -<BR> + -<BR> + 2199<BR> + 1697/1897<BR> + 1680/1880<BR> + 2187<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 8035EKP/CT20/RJ-20P<BR> + -<BR> + RJ-20X<BR> + -<BR> + -<BR> + -<BR> + 1211L<BR> + 8012EKQ&nbsp;ALT<BR> + 8012EKR&nbsp;ALT<BR> + 1211P<BR> + 8012EKJ<BR> + 8012EKL<BR> + 8012EKQ<BR> + 8012EKR<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 2101P<BR> + 2101W<BR> + 2101Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 2102L<BR> + 2102S<BR> + 2102Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVMCOG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 43P<BR> + 43W<BR> + 43Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 40L<BR> + 40P<BR> + 40Y<BR> + 70Y-T602<BR> + 70L<BR> + 70P<BR> + 70Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + RT/RTR12<BR> + RT/RTR12<BR> + RT/RTR12<BR> + -<BR> + RJ/RJR12<BR> + RJ/RJR12<BR> + RJ/RJR12<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3250L<BR> + 3250P<BR> + 3250W<BR> + 3250X<BR> + 3252P<BR> + 3252W<BR> + 3252X<BR> + 3260P<BR> + 3260W<BR> + 3260X<BR> + 3262P<BR> + 3262W<BR> + 3262X<BR> + 3266P<BR> + 3266W<BR> + 3266X<BR> + 3290H<BR> + 3290P<BR> + 3290W<BR> + 3292P<BR> + 3292W<BR> + 3292X<BR> + 3296P<BR> + 3296W<BR> + 3296X<BR> + 3296Y<BR> + 3296Z<BR> + 3299P<BR> + 3299W<BR> + 3299X<BR> + 3299Y<BR> + 3299Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + -<BR> + 64W&nbsp;ALT<BR> + -<BR> + 64P&nbsp;ALT<BR> + 64W&nbsp;ALT<BR> + 64X&nbsp;ALT<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66P<BR> + 66W<BR> + 66X<BR> + 67P<BR> + 67W<BR> + 67X<BR> + 67Y<BR> + 67Z<BR> + 68P<BR> + 68W<BR> + 68X<BR> + 67Y&nbsp;ALT<BR> + 67Z&nbsp;ALT<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 5050<BR> + 5091<BR> + 5080<BR> + 5087<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + T63YB<BR> + T63XB<BR> + -<BR> + -<BR> + -<BR> + 5887<BR> + 5891<BR> + 5880<BR> + -<BR> + -<BR> + -<BR> + T93Z<BR> + T93YA<BR> + T93XA<BR> + T93YB<BR> + T93XB<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 8026EKP<BR> + 8026EKW<BR> + 8026EKM<BR> + 8026EKP<BR> + 8026EKB<BR> + 8026EKM<BR> + 1309X<BR> + 1309P<BR> + 1309W<BR> + 8024EKP<BR> + 8024EKW<BR> + 8024EKN<BR> + RJ-9P/CT9P<BR> + RJ-9W<BR> + RJ-9X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3105P/3106P<BR> + 3105W/3106W<BR> + 3105X/3106X<BR> + 3105Y/3106Y<BR> + 3105Z/3105Z<BR> + 3102P<BR> + 3102W<BR> + 3102X<BR> + 3102Y<BR> + 3102Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMCBG<BR> + EVMCCG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 55-1-X<BR> + 55-4-X<BR> + 55-3-X<BR> + 55-2-X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 50-2-X<BR> + 50-4-X<BR> + 50-3-X<BR> + -<BR> + -<BR> + -<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 64Y<BR> + 64Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3323P<BR> + 3323S<BR> + 3323W<BR> + 3329H<BR> + 3329P<BR> + 3329W<BR> + 3339H<BR> + 3339P<BR> + 3339W<BR> + 3352E<BR> + 3352H<BR> + 3352K<BR> + 3352P<BR> + 3352T<BR> + 3352V<BR> + 3352W<BR> + 3362H<BR> + 3362M<BR> + 3362P<BR> + 3362R<BR> + 3362S<BR> + 3362U<BR> + 3362W<BR> + 3362X<BR> + 3386B<BR> + 3386C<BR> + 3386F<BR> + 3386H<BR> + 3386K<BR> + 3386M<BR> + 3386P<BR> + 3386S<BR> + 3386W<BR> + 3386X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 25P<BR> + 25S<BR> + 25RX<BR> + 82P<BR> + 82M<BR> + 82PA<BR> + -<BR> + -<BR> + -<BR> + 91E<BR> + 91X<BR> + 91T<BR> + 91B<BR> + 91A<BR> + 91V<BR> + 91W<BR> + 25W<BR> + 25V<BR> + 25P<BR> + -<BR> + 25S<BR> + 25U<BR> + 25RX<BR> + 25X<BR> + 72XW<BR> + 72XL<BR> + 72PM<BR> + 72RX<BR> + -<BR> + 72PX<BR> + 72P<BR> + 72RXW<BR> + 72RXL<BR> + 72X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + T7YB<BR> + T7YA<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + TXD<BR> + TYA<BR> + TYP<BR> + -<BR> + TYD<BR> + TX<BR> + -<BR> + 150SX<BR> + 100SX<BR> + 102T<BR> + 101S<BR> + 190T<BR> + 150TX<BR> + 101<BR> + -<BR> + -<BR> + 101SX<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ET6P<BR> + ET6S<BR> + ET6X<BR> + RJ-6W/8014EMW<BR> + RJ-6P/8014EMP<BR> + RJ-6X/8014EMX<BR> + TM7W<BR> + TM7P<BR> + TM7X<BR> + -<BR> + 8017SMS<BR> + -<BR> + 8017SMB<BR> + 8017SMA<BR> + -<BR> + -<BR> + CT-6W<BR> + CT-6H<BR> + CT-6P<BR> + CT-6R<BR> + -<BR> + CT-6V<BR> + CT-6X<BR> + -<BR> + -<BR> + 8038EKV<BR> + -<BR> + 8038EKX<BR> + -<BR> + -<BR> + 8038EKP<BR> + 8038EKZ<BR> + 8038EKW<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 3321H<BR> + 3321P<BR> + 3321N<BR> + 1102H<BR> + 1102P<BR> + 1102T<BR> + RVA0911V304A<BR> + -<BR> + RVA0911H413A<BR> + RVG0707V100A<BR> + RVA0607V(H)306A<BR> + RVA1214H213A<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3104B<BR> + 3104C<BR> + 3104F<BR> + 3104H<BR> + -<BR> + 3104M<BR> + 3104P<BR> + 3104S<BR> + 3104W<BR> + 3104X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + EVMQ0G<BR> + EVMQIG<BR> + EVMQ3G<BR> + EVMS0G<BR> + EVMQ0G<BR> + EVMG0G<BR> + -<BR> + -<BR> + -<BR> + EVMK4GA00B<BR> + EVM30GA00B<BR> + EVMK0GA00B<BR> + EVM38GA00B<BR> + EVMB6<BR> + EVLQ0<BR> + -<BR> + EVMMSG<BR> + EVMMBG<BR> + EVMMAG<BR> + -<BR> + -<BR> + EVMMCS<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMM1<BR> + -<BR> + -<BR> + EVMM0<BR> + -<BR> + -<BR> + EVMM3<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 62-3-1<BR> + 62-1-2<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67R<BR> + -<BR> + 67P<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67X<BR> + 63V<BR> + 63S<BR> + 63M<BR> + -<BR> + -<BR> + 63H<BR> + 63P<BR> + -<BR> + -<BR> + 63X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P>&nbsp;<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> + <TR> + <TD COLSPAN=7> + <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> + <P> + <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3224G<BR> + 3224J<BR> + 3224W<BR> + 3269P<BR> + 3269W<BR> + 3269X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 44G<BR> + 44J<BR> + 44W<BR> + 84P<BR> + 84W<BR> + 84X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST63Z<BR> + ST63Y<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST5P<BR> + ST5W<BR> + ST5X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=7>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=7> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3314G<BR> + 3314J<BR> + 3364A/B<BR> + 3364C/D<BR> + 3364W/X<BR> + 3313G<BR> + 3313J<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 23B<BR> + 23A<BR> + 21X<BR> + 21W<BR> + -<BR> + 22B<BR> + 22A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST5YL/ST53YL<BR> + ST5YJ/5T53YJ<BR> + ST-23A<BR> + ST-22B<BR> + ST-22<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST-4B<BR> + ST-4A<BR> + -<BR> + -<BR> + -<BR> + ST-3B<BR> + ST-3A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVM-6YS<BR> + EVM-1E<BR> + EVM-1G<BR> + EVM-1D<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + G4B<BR> + G4A<BR> + TR04-3S1<BR> + TRG04-2S1<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + DVR-43A<BR> + CVR-42C<BR> + CVR-42A/C<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P> +<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> +<P> + +&nbsp; +<P> +</td> +</tr> +</table> +</BODY></HTML> + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> wave soldering<p> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +wave soldering + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b> wave soldering<p> +Source: http://download.siliconexpert.com/pdfs/2005/02/24/Semi_Ap/2/VSH/Resistor/dcrcwfre.pdf + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.10 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.12 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.10 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.12 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +MELF 0.25 W + + + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +type 0204, grid 5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0204, grid 7.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0204, grid 2.5 mm + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0207, grid 10 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0207, grid 12 mm + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<b>RESISTOR</b><p> +type 0207, grid 15mm + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<b>RESISTOR</b><p> +type 0207, grid 2.5 mm + + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0207, grid 5 mm + + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0207, grid 7.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0309, grid 10mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0309, grid 12.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0309, grid 2.5 mm + + + + + + +>NAME +>VALUE + + + + + +<b>RESISTOR</b><p> +type 0411, grid 12.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0411, grid 15 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0411, grid 3.81 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0414, grid 15 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0414, grid 5 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0617, grid 17.5 mm + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0617, grid 22.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0617, grid 5 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0922, grid 22.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<b>RESISTOR</b><p> +type 0613, grid 5 mm + + + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b><p> +type 0613, grid 15 mm + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type 0817, grid 22.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE +0817 + + + + +<b>RESISTOR</b><p> +type 0817, grid 6.35 mm + + + + + + +>NAME +>VALUE +0817 + + + +<b>RESISTOR</b><p> +type V234, grid 12.5 mm + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type V235, grid 17.78 mm + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>RESISTOR</b><p> +type V526-0, grid 2.5 mm + + + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC2211</b> Reflow Soldering<p> +source Beyschlag + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC2211</b> Wave Soldering<p> +source Beyschlag + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC3715</b> Reflow Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC3715</b> Wave Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC6123</b> Reflow Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>CECC Size RC6123</b> Wave Soldering<p> +source Beyschlag + + + + + + + + +>NAME +>VALUE + + +<b>RESISTOR</b><p> +type 0922, grid 7.5 mm + + + + + + +>NAME +>VALUE +0922 + + + +<b>RESISTOR</b><p> +type RDH, grid 15 mm + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE +RDH + + + + +<b>Mini MELF 0102 Axial</b> + + + + +>NAME +>VALUE + + + +<b>RESISTOR</b> chip<p> +Source: http://www.vishay.com/docs/20008/dcrcw.pdf + + +>NAME +>VALUE + + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR52<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR53<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR54<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR55<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RBR56<br> +Source: VISHAY .. vta56.pdf + + + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RNC55<br> +Source: VISHAY .. vta56.pdf + + + + + + + + +>NAME +>VALUE + + + + +<b>Bulk Metal® Foil Technology</b>, Tubular Axial Lead Resistors, Meets or Exceeds MIL-R-39005 Requirements<p> +MIL SIZE RNC60<br> +Source: VISHAY .. vta56.pdf + + + + + + + + +>NAME +>VALUE + + + + +<b>Package 4527</b><p> +Source: http://www.vishay.com/docs/31059/wsrhigh.pdf + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + +>NAME +>VALUE + + +<b>Wirewound Resistors, Precision Power</b><p> +Source: VISHAY wscwsn.pdf + + + + + + +>NAME +>VALUE + + +<b>CRCW1218 Thick Film, Rectangular Chip Resistors</b><p> +Source: http://www.vishay.com .. dcrcw.pdf + + + + +>NAME +>VALUE + + + + +<b>Chip Monolithic Ceramic Capacitors</b> Medium Voltage High Capacitance for General Use<p> +Source: http://www.murata.com .. GRM43DR72E224KW01.pdf + + + + + + +>NAME +>VALUE + + + + +<b>PRL1632 are realized as 1W for 3.2 × 1.6mm(1206)</b><p> +Source: http://www.mouser.com/ds/2/392/products_18-2245.pdf + + + + +>NAME +>VALUE + + + + + + +>NAME +>VALUE + + + + + + + + + + + + +>NAME +>VALUE + + + + + + +<B>RESISTOR</B>, European symbol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Switches</b><p> +Marquardt, Siemens, C&K, ITT, and others<p> +<author>Created by librarian@cadsoft.de</author> + + +<b>TINY SWITCH</b><p> +Source: http://www2.produktinfo.conrad.com/datenblaetter/700000-724999/705152-da-01-de-Subminiaturschalter_TL_36YO.pdf + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + +>NAME +>VALUE + + + + + + + +<b>TINY SWITCH</b> ON - ON<p> +Source: http://www2.produktinfo.conrad.com/datenblaetter/700000-724999/705152-da-01-de-Subminiaturschalter_TL_36YO.pdf + + + + + + + + + + + + + + + + + + + +<h1>Freescale Semiconductor MPX series pressure sensors</h1> + +<p>Created by <a href="mailto:bkilian@interia.pl">bkilian@interia.pl</a> (Poland)</p> + + +Super Small Outline Package 1317-04 + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Super Small Outline Package 1317A-03 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package 1351-01 Dual Port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package 1368-01 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package 1369-01 Side Port + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package 482-01 + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package 482A-01 + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package Through-Hole 482B-03 + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Small Outline Package Through-Hole 482C-03 + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Basic Element Unibody Package 867-08 +<br>Horizontal Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Basic Element Unibody Package 867-08 +<br>Vertical Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Pressure Side Ported (AP, GP) Unibody Package 867B-04 +<br>Horizontal Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +Pressure Side Ported (AP, GP) Unibody Package 867B-04 +<br>Vertical Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Pressure Side Ported (DP) Unibody Package 867C-05 +<br>Horizontal Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +Pressure Side Ported (DP) Unibody Package 867C-05 +<br>Vertical Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Pressure Side Ported (AP, GP) Unibody Package 867E-03 +<br>Horizontal Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Pressure Side Ported (AP, GP) Unibody Package 867E-03 +<br>Vertical Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +Pressure Top Ported Unibody Package 867F-03 +<br>Horizontal Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +Pressure Top Ported Unibody Package 867F-03 +<br>Vertical Mount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + +>NAME +>VALUE + + + + + + + + + + + + + + + +Generic MPX pressure sensor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<b>Resistors, Capacitors, Inductors</b><p> +Based on the previous libraries: +<ul> +<li>r.lbr +<li>cap.lbr +<li>cap-fe.lbr +<li>captant.lbr +<li>polcap.lbr +<li>ipc-smd.lbr +</ul> +All SMD packages are defined according to the IPC specifications and CECC<p> +<author>Created by librarian@cadsoft.de</author><p> +<p> +for Electrolyt Capacitors see also :<p> +www.bccomponents.com <p> +www.panasonic.com<p> +www.kemet.com<p> +http://www.secc.co.jp/pdf/os_e/2004/e_os_all.pdf <b>(SANYO)</b> +<p> +for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> + +<table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0> +<tr valign="top"> + +<! <td width="10">&nbsp;</td> +<td width="90%"> + +<b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> +<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> + <TR> + <TD COLSPAN=8> + <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> + </B> + </TD> + <TD ALIGN=CENTER> + <B> + <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> + </B> + </TD><TD>&nbsp;</TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > + 3005P<BR> + 3006P<BR> + 3006W<BR> + 3006Y<BR> + 3009P<BR> + 3009W<BR> + 3009Y<BR> + 3057J<BR> + 3057L<BR> + 3057P<BR> + 3057Y<BR> + 3059J<BR> + 3059L<BR> + 3059P<BR> + 3059Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 89P<BR> + 89W<BR> + 89X<BR> + 89PH<BR> + 76P<BR> + 89XH<BR> + 78SLT<BR> + 78L&nbsp;ALT<BR> + 56P&nbsp;ALT<BR> + 78P&nbsp;ALT<BR> + T8S<BR> + 78L<BR> + 56P<BR> + 78P<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + T18/784<BR> + 783<BR> + 781<BR> + -<BR> + -<BR> + -<BR> + 2199<BR> + 1697/1897<BR> + 1680/1880<BR> + 2187<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 8035EKP/CT20/RJ-20P<BR> + -<BR> + RJ-20X<BR> + -<BR> + -<BR> + -<BR> + 1211L<BR> + 8012EKQ&nbsp;ALT<BR> + 8012EKR&nbsp;ALT<BR> + 1211P<BR> + 8012EKJ<BR> + 8012EKL<BR> + 8012EKQ<BR> + 8012EKR<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 2101P<BR> + 2101W<BR> + 2101Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 2102L<BR> + 2102S<BR> + 2102Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVMCOG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 43P<BR> + 43W<BR> + 43Y<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 40L<BR> + 40P<BR> + 40Y<BR> + 70Y-T602<BR> + 70L<BR> + 70P<BR> + 70Y<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + RT/RTR12<BR> + RT/RTR12<BR> + RT/RTR12<BR> + -<BR> + RJ/RJR12<BR> + RJ/RJR12<BR> + RJ/RJR12<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3250L<BR> + 3250P<BR> + 3250W<BR> + 3250X<BR> + 3252P<BR> + 3252W<BR> + 3252X<BR> + 3260P<BR> + 3260W<BR> + 3260X<BR> + 3262P<BR> + 3262W<BR> + 3262X<BR> + 3266P<BR> + 3266W<BR> + 3266X<BR> + 3290H<BR> + 3290P<BR> + 3290W<BR> + 3292P<BR> + 3292W<BR> + 3292X<BR> + 3296P<BR> + 3296W<BR> + 3296X<BR> + 3296Y<BR> + 3296Z<BR> + 3299P<BR> + 3299W<BR> + 3299X<BR> + 3299Y<BR> + 3299Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66X&nbsp;ALT<BR> + -<BR> + 64W&nbsp;ALT<BR> + -<BR> + 64P&nbsp;ALT<BR> + 64W&nbsp;ALT<BR> + 64X&nbsp;ALT<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 66X&nbsp;ALT<BR> + 66P&nbsp;ALT<BR> + 66W&nbsp;ALT<BR> + 66P<BR> + 66W<BR> + 66X<BR> + 67P<BR> + 67W<BR> + 67X<BR> + 67Y<BR> + 67Z<BR> + 68P<BR> + 68W<BR> + 68X<BR> + 67Y&nbsp;ALT<BR> + 67Z&nbsp;ALT<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 5050<BR> + 5091<BR> + 5080<BR> + 5087<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + T63YB<BR> + T63XB<BR> + -<BR> + -<BR> + -<BR> + 5887<BR> + 5891<BR> + 5880<BR> + -<BR> + -<BR> + -<BR> + T93Z<BR> + T93YA<BR> + T93XA<BR> + T93YB<BR> + T93XB<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 8026EKP<BR> + 8026EKW<BR> + 8026EKM<BR> + 8026EKP<BR> + 8026EKB<BR> + 8026EKM<BR> + 1309X<BR> + 1309P<BR> + 1309W<BR> + 8024EKP<BR> + 8024EKW<BR> + 8024EKN<BR> + RJ-9P/CT9P<BR> + RJ-9W<BR> + RJ-9X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + 3103P<BR> + 3103Y<BR> + 3103Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3105P/3106P<BR> + 3105W/3106W<BR> + 3105X/3106X<BR> + 3105Y/3106Y<BR> + 3105Z/3105Z<BR> + 3102P<BR> + 3102W<BR> + 3102X<BR> + 3102Y<BR> + 3102Z<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMCBG<BR> + EVMCCG<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 55-1-X<BR> + 55-4-X<BR> + 55-3-X<BR> + 55-2-X<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 50-2-X<BR> + 50-4-X<BR> + 50-3-X<BR> + -<BR> + -<BR> + -<BR> + 64P<BR> + 64W<BR> + 64X<BR> + 64Y<BR> + 64Z<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RT/RTR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RJ/RJR22<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RT/RTR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RJ/RJR26<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RT/RTR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + RJ/RJR24<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=8>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=8> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> + </TD> + <TD ALIGN=CENTER> + <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3323P<BR> + 3323S<BR> + 3323W<BR> + 3329H<BR> + 3329P<BR> + 3329W<BR> + 3339H<BR> + 3339P<BR> + 3339W<BR> + 3352E<BR> + 3352H<BR> + 3352K<BR> + 3352P<BR> + 3352T<BR> + 3352V<BR> + 3352W<BR> + 3362H<BR> + 3362M<BR> + 3362P<BR> + 3362R<BR> + 3362S<BR> + 3362U<BR> + 3362W<BR> + 3362X<BR> + 3386B<BR> + 3386C<BR> + 3386F<BR> + 3386H<BR> + 3386K<BR> + 3386M<BR> + 3386P<BR> + 3386S<BR> + 3386W<BR> + 3386X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 25P<BR> + 25S<BR> + 25RX<BR> + 82P<BR> + 82M<BR> + 82PA<BR> + -<BR> + -<BR> + -<BR> + 91E<BR> + 91X<BR> + 91T<BR> + 91B<BR> + 91A<BR> + 91V<BR> + 91W<BR> + 25W<BR> + 25V<BR> + 25P<BR> + -<BR> + 25S<BR> + 25U<BR> + 25RX<BR> + 25X<BR> + 72XW<BR> + 72XL<BR> + 72PM<BR> + 72RX<BR> + -<BR> + 72PX<BR> + 72P<BR> + 72RXW<BR> + 72RXL<BR> + 72X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + T7YB<BR> + T7YA<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + TXD<BR> + TYA<BR> + TYP<BR> + -<BR> + TYD<BR> + TX<BR> + -<BR> + 150SX<BR> + 100SX<BR> + 102T<BR> + 101S<BR> + 190T<BR> + 150TX<BR> + 101<BR> + -<BR> + -<BR> + 101SX<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ET6P<BR> + ET6S<BR> + ET6X<BR> + RJ-6W/8014EMW<BR> + RJ-6P/8014EMP<BR> + RJ-6X/8014EMX<BR> + TM7W<BR> + TM7P<BR> + TM7X<BR> + -<BR> + 8017SMS<BR> + -<BR> + 8017SMB<BR> + 8017SMA<BR> + -<BR> + -<BR> + CT-6W<BR> + CT-6H<BR> + CT-6P<BR> + CT-6R<BR> + -<BR> + CT-6V<BR> + CT-6X<BR> + -<BR> + -<BR> + 8038EKV<BR> + -<BR> + 8038EKX<BR> + -<BR> + -<BR> + 8038EKP<BR> + 8038EKZ<BR> + 8038EKW<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 3321H<BR> + 3321P<BR> + 3321N<BR> + 1102H<BR> + 1102P<BR> + 1102T<BR> + RVA0911V304A<BR> + -<BR> + RVA0911H413A<BR> + RVG0707V100A<BR> + RVA0607V(H)306A<BR> + RVA1214H213A<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 3104B<BR> + 3104C<BR> + 3104F<BR> + 3104H<BR> + -<BR> + 3104M<BR> + 3104P<BR> + 3104S<BR> + 3104W<BR> + 3104X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + EVMQ0G<BR> + EVMQIG<BR> + EVMQ3G<BR> + EVMS0G<BR> + EVMQ0G<BR> + EVMG0G<BR> + -<BR> + -<BR> + -<BR> + EVMK4GA00B<BR> + EVM30GA00B<BR> + EVMK0GA00B<BR> + EVM38GA00B<BR> + EVMB6<BR> + EVLQ0<BR> + -<BR> + EVMMSG<BR> + EVMMBG<BR> + EVMMAG<BR> + -<BR> + -<BR> + EVMMCS<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + EVMM1<BR> + -<BR> + -<BR> + EVMM0<BR> + -<BR> + -<BR> + EVMM3<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + 62-3-1<BR> + 62-1-2<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67R<BR> + -<BR> + 67P<BR> + -<BR> + -<BR> + -<BR> + -<BR> + 67X<BR> + 63V<BR> + 63S<BR> + 63M<BR> + -<BR> + -<BR> + 63H<BR> + 63P<BR> + -<BR> + -<BR> + 63X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + RJ/RJR50<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P>&nbsp;<P> +<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> + <TR> + <TD COLSPAN=7> + <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> + <P> + <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3224G<BR> + 3224J<BR> + 3224W<BR> + 3269P<BR> + 3269W<BR> + 3269X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 44G<BR> + 44J<BR> + 44W<BR> + 84P<BR> + 84W<BR> + 84X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST63Z<BR> + ST63Y<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + ST5P<BR> + ST5W<BR> + ST5X<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> + <TR> + <TD COLSPAN=7>&nbsp; + </TD> + </TR> + <TR> + <TD COLSPAN=7> + <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> + </TD> + </TR> + <TR> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> + </TD> + <TD> + <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> + </TD> + </TR> + <TR> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 3314G<BR> + 3314J<BR> + 3364A/B<BR> + 3364C/D<BR> + 3364W/X<BR> + 3313G<BR> + 3313J<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + 23B<BR> + 23A<BR> + 21X<BR> + 21W<BR> + -<BR> + 22B<BR> + 22A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST5YL/ST53YL<BR> + ST5YJ/5T53YJ<BR> + ST-23A<BR> + ST-22B<BR> + ST-22<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + ST-4B<BR> + ST-4A<BR> + -<BR> + -<BR> + -<BR> + ST-3B<BR> + ST-3A<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + EVM-6YS<BR> + EVM-1E<BR> + EVM-1G<BR> + EVM-1D<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + G4B<BR> + G4A<BR> + TR04-3S1<BR> + TRG04-2S1<BR> + -<BR> + -<BR> + -<BR></FONT> + </TD> + <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> + -<BR> + -<BR> + DVR-43A<BR> + CVR-42C<BR> + CVR-42A/C<BR> + -<BR> + -<BR></FONT> + </TD> + </TR> +</TABLE> +<P> +<FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> +<P> + +&nbsp; +<P> +</td> +</tr> +</table> + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b><p> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b> + + + + + + + + +>NAME +>VALUE + + + + + +<b>CAPACITOR</b><p> +grid 2.5 mm, outline 2.4 x 4.4 mm + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 mm, outline 2.5 x 5 mm + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 mm, outline 3 x 5 mm + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 mm, outline 4 x 5 mm + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 mm, outline 5 x 5 mm + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 mm, outline 6 x 5 mm + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 mm + 5 mm, outline 2.4 x 7 mm + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 + 5 mm, outline 2.5 x 7.5 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 + 5 mm, outline 3.5 x 7.5 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 + 5 mm, outline 4.5 x 7.5 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 2.5 + 5 mm, outline 5.5 x 7.5 mm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 2.4 x 4.4 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 2.5 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 4.5 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 3 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 5 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 5.5 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 7.5 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +Horizontal, grid 5 mm, outline 7.5 x 7.5 mm + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + + + +<b>CAPACITOR</b><p> +grid 7.5 mm, outline 3.2 x 10.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 7.5 mm, outline 4.2 x 10.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 7.5 mm, outline 5.2 x 10.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 10.2 mm, outline 4.3 x 13.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 10.2 mm, outline 5.4 x 13.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 10.2 mm, outline 6.4 x 13.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 10.2 mm + 15.2 mm, outline 6.2 x 18.4 mm + + + + + + + + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 15 mm, outline 5.4 x 18.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 15 mm, outline 6.4 x 18.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 15 mm, outline 7.2 x 18.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 15 mm, outline 8.4 x 18.3 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 15 mm, outline 9.1 x 18.2 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 22.5 mm, outline 6.2 x 26.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 22.5 mm, outline 7.4 x 26.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 22.5 mm, outline 8.7 x 26.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 22.5 mm, outline 10.8 x 26.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 22.5 mm, outline 11.3 x 26.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 27.5 mm, outline 9.3 x 31.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 27.5 mm, outline 11.3 x 31.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 27.5 mm, outline 13.4 x 31.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 27.5 mm, outline 20.5 x 31.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 32.5 mm, outline 13.7 x 37.4 mm + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 32.5 mm, outline 16.2 x 37.4 mm + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 32.5 mm, outline 18.2 x 37.4 mm + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 37.5 mm, outline 19.2 x 41.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 37.5 mm, outline 20.3 x 41.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 5 mm, outline 3.5 x 7.5 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 37.5 mm, outline 15.5 x 41.8 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 7.5 mm, outline 6.3 x 10.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 27.5 mm, outline 15.4 x 31.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>CAPACITOR</b><p> +grid 27.5 mm, outline 17.3 x 31.6 mm + + + + + + + + + + + + + + + + +>NAME +>VALUE + + +<b>Ceramic Chip Capacitor KEMET 0204 reflow solder</b><p> +Metric Code Size 1005 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 0603 reflow solder</b><p> +Metric Code Size 1608 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 0805 reflow solder</b><p> +Metric Code Size 2012 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 1206 reflow solder</b><p> +Metric Code Size 3216 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 1210 reflow solder</b><p> +Metric Code Size 3225 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 1812 reflow solder</b><p> +Metric Code Size 4532 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 1825 reflow solder</b><p> +Metric Code Size 4564 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 2220 reflow solder</b><p>Metric Code Size 5650 + + + + +>NAME +>VALUE + + + + +<b>Ceramic Chip Capacitor KEMET 2225 reflow solder</b><p>Metric Code Size 5664 + + + + +>NAME +>VALUE + + + + +<b> </b><p> +Source: http://www.vishay.com/docs/10129/hpc0201a.pdf + + +>NAME +>VALUE + + + +Source: http://www.avxcorp.com/docs/catalogs/cx5r.pdf + + +>NAME +>VALUE + + + + + + +<b>CAPACITOR</b><p> +Source: AVX .. aphvc.pdf + + + + +>NAME +>VALUE + + + + +<b>CAPACITOR</b><p> +Source: AVX .. aphvc.pdf + + + + +>NAME +>VALUE + + + + +<b>CAPACITOR</b> + + + +>NAME +>VALUE + + + + + + + + + + +>NAME +>VALUE + + + + + + + + +<B>CAPACITOR</B>, European symbol + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/untested/NuEVI-merged/NuEVI-merged.ino b/untested/NuEVI-merged/NuEVI-merged.ino deleted file mode 100644 index 62a8642..0000000 --- a/untested/NuEVI-merged/NuEVI-merged.ino +++ /dev/null @@ -1,2941 +0,0 @@ -#include -#include -#include -#include -#include -#include - -/* -NAME: NuEVI -WRITTEN BY: JOHAN BERGLUND -DATE: 2017-08-26 -FILE SAVED AS: NuEVI.ino -FOR: PJRC Teensy LC or 3.2 and a MPR121 capactive touch sensor board. - Uses an SSD1306 controlled OLED dispaly communicating over I2C. -PROGRAMME FUNCTION: EVI Wind Controller using the Freescale MP3V5004GP breath sensor - and capacitive touch keys. Output to both USB MIDI and DIN MIDI. - -*/ - -//_______________________________________________________________________________________________ DECLARATIONS - - -#define ON_Delay 20 // Set Delay after ON threshold before velocity is checked (wait for tounging peak) -#define touch_Thr 800 // sensitivity for Teensy touch sensors -#define CCN_Port 5 // Controller number for portamento level -#define CCN_PortOnOff 65// Controller number for portamento on/off - - -// Send CC data no more than every CC_INTERVAL -// milliseconds -#define CC_INTERVAL 5 - - -// The three states of our main state machine - -// No note is sounding -#define NOTE_OFF 1 - -// We've observed a transition from below to above the -// threshold value. We wait a while to see how fast the -// breath velocity is increasing -#define RISE_WAIT 2 - -// A note is sounding -#define NOTE_ON 3 - - -//display states -#define DISPLAYOFF_IDL 0 -#define MAIN_MENU 1 -#define PATCH_VIEW 2 -#define BREATH_ADJ_IDL 10 -#define BREATH_ADJ_THR 11 -#define BREATH_ADJ_MAX 12 -#define PORTAM_ADJ_IDL 20 -#define PORTAM_ADJ_THR 21 -#define PORTAM_ADJ_MAX 22 -#define PITCHB_ADJ_IDL 30 -#define PITCHB_ADJ_THR 31 -#define PITCHB_ADJ_MAX 32 -#define EXTRAC_ADJ_IDL 40 -#define EXTRAC_ADJ_THR 41 -#define EXTRAC_ADJ_MAX 42 -#define VIBRAT_ADJ_IDL 50 -#define VIBRAT_ADJ_THR 51 -#define VIBRAT_ADJ_DPT 52 -#define SETUP_BR_MENU 80 -#define SETUP_CT_MENU 90 - -// EEPROM addresses for settings -#define VERSION_ADDR 0 -#define BREATH_THR_ADDR 2 -#define BREATH_MAX_ADDR 4 -#define PORTAM_THR_ADDR 6 -#define PORTAM_MAX_ADDR 8 -#define PITCHB_THR_ADDR 10 -#define PITCHB_MAX_ADDR 12 -#define TRANSP_ADDR 14 -#define MIDI_ADDR 16 -#define BREATH_CC_ADDR 18 -#define BREATH_AT_ADDR 20 -#define VELOCITY_ADDR 22 -#define PORTAM_ADDR 24 -#define PB_ADDR 26 -#define EXTRA_ADDR 28 -#define VIBRATO_ADDR 30 -#define DEGLITCH_ADDR 32 -#define EXTRAC_THR_ADDR 34 -#define EXTRAC_MAX_ADDR 36 -#define PATCH_ADDR 38 -#define OCTAVE_ADDR 40 - -//"factory" values for settings -#define VERSION 13 -#define BREATH_THR_FACTORY 350 -#define BREATH_MAX_FACTORY 1000 -#define PORTAM_THR_FACTORY 1730 -#define PORTAM_MAX_FACTORY 3300 -#define PITCHB_THR_FACTORY 1200 -#define PITCHB_MAX_FACTORY 2400 -#define EXTRAC_THR_FACTORY 1200 -#define EXTRAC_MAX_FACTORY 2400 -#define TRANSP_FACTORY 12 // 12 is 0 transpose -#define MIDI_FACTORY 1 // 1-16 -#define BREATH_CC_FACTORY 1 //thats CC#2, see ccList -#define BREATH_AT_FACTORY 0 //aftertouch default off -#define VELOCITY_FACTORY 0 // 0 is dynamic/breath controlled velocity -#define PORTAM_FACTORY 2 // 0 - OFF, 1 - ON, 2 - SW -#define PB_FACTORY 1 // 0 - OFF, 1 - 12 -#define EXTRA_FACTORY 1 // 0 - OFF, 1 - ON->Modulation, 2 - Sustain -#define VIBRATO_FACTORY 3 // 0 - OFF, 1 - 7 depth -#define DEGLITCH_FACTORY 20 // 0 - OFF, 5 to 70 ms in steps of 5 -#define PATCH_FACTORY 1 // MIDI program change 1-128 -#define OCTAVE_FACTORY 3 // 3 is 0 octave change - -#define OLED_RESET 4 -Adafruit_SSD1306 display(OLED_RESET); - -#define LOGO16_GLCD_HEIGHT 16 -#define LOGO16_GLCD_WIDTH 16 - - // 'NuEVI' logo -static const unsigned char PROGMEM nuevi_logo_bmp[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x07, 0x73, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x0e, 0xe3, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x60, 0x00, 0x1d, 0xc3, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x3b, 0x83, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x00, 0x77, 0x03, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x00, 0xee, 0x03, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x01, 0xdc, 0x03, 0x60, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x03, 0xb8, 0x03, 0x60, 0x00, -0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x60, 0x07, 0x70, 0x03, 0x60, 0x00, -0x00, 0x00, 0x00, 0x60, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x0e, 0xe0, 0x03, 0x60, 0x00, -0x00, 0x00, 0x00, 0x60, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x1d, 0xc0, 0x03, 0x60, 0x00, -0x00, 0x03, 0x00, 0x60, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0x60, 0x3b, 0x80, 0x03, 0x60, 0x00, -0x00, 0x03, 0x00, 0xe0, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0x77, 0x00, 0x03, 0x60, 0x00, -0x00, 0x03, 0x00, 0xc0, 0x00, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x60, 0xee, 0x00, 0x03, 0x60, 0x00, -0x00, 0x03, 0x80, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x61, 0xdc, 0x00, 0x03, 0x60, 0x00, -0x00, 0x07, 0x80, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x63, 0xb8, 0x00, 0x03, 0x60, 0x00, -0x00, 0x07, 0xc0, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x67, 0x70, 0x00, 0x03, 0x60, 0x00, -0x00, 0x06, 0xc0, 0xc0, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x6e, 0xe0, 0x00, 0x03, 0x60, 0x00, -0x00, 0x06, 0x60, 0xc1, 0x01, 0x01, 0xb0, 0x00, 0x00, 0x03, 0x7d, 0xc0, 0x00, 0x03, 0x60, 0x00, -0x00, 0x06, 0x30, 0xc3, 0x03, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x7b, 0x80, 0x00, 0x03, 0x60, 0x00, -0x00, 0x0c, 0x30, 0xc3, 0x07, 0x01, 0xbf, 0xff, 0xff, 0xe3, 0x77, 0x00, 0x00, 0x03, 0x60, 0x00, -0x00, 0x0c, 0x1c, 0xc3, 0x06, 0x01, 0x80, 0x00, 0x00, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x60, 0x00, -0x00, 0x0c, 0x0c, 0xc2, 0x0e, 0x01, 0xff, 0xff, 0xff, 0xe3, 0xfc, 0x00, 0x00, 0x03, 0x60, 0x00, -0x00, 0x0c, 0x0e, 0xc6, 0x1e, 0x01, 0xff, 0xff, 0xff, 0xe3, 0xf8, 0x00, 0x00, 0x03, 0x60, 0x00, -0x00, 0x0c, 0x07, 0xc6, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x03, 0xc6, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x01, 0xc7, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x00, 0xc7, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - -#if (SSD1306_LCDHEIGHT != 64) -#error("Height incorrect, please fix Adafruit_SSD1306.h!"); -#endif - - -//variables setup - -unsigned short breathThrVal;// = 350; -unsigned short breathMaxVal;// = 1000; -unsigned short portamThrVal;// = 1730; -unsigned short portamMaxVal;// = 3300; -unsigned short pitchbThrVal;// = 1200; -unsigned short pitchbMaxVal;// = 2400; -unsigned short extracThrVal;// = 1200; -unsigned short extracMaxVal;// = 2400; -unsigned short transpose; -unsigned short MIDIchannel; -unsigned short breathCC; -unsigned short breathAT; -unsigned short velocity; -unsigned short portamento;// switching on cc65? just cc5 enabled? SW:ON:OFF -unsigned short PBdepth; // OFF:1-12 divider -unsigned short extraCT; // OFF:MOD -unsigned short vibrato; // OFF:1-7 -unsigned short deglitch; // 0-70 ms in steps of 5 -unsigned short patch; // 1-128 -unsigned short octave; // - -int breathLoLimit = 0; -int breathHiLimit = 1023; -int portamLoLimit = 1000; -int portamHiLimit = 5000; -int pitchbLoLimit = 500; -int pitchbHiLimit = 4000; -int extracLoLimit = 500; -int extracHiLimit = 4000; - -int breathStep; -int portamStep; -int pitchbStep; -int extracStep; - -int minOffset = 50; - -byte dPin = 3; -byte ePin = 4; -byte uPin = 5; -byte mPin = 6; - -int deumButtons = 0; -int lastDeumButtons = 0; -int deumButtonState = 0; -byte buttonPressedAndNotUsed = 0; - -byte mainMenuCursor = 1; -byte setupBrMenuCursor = 1; -byte setupCtMenuCursor = 1; - -byte state = 0; -byte stateFirstRun = 1; - -byte subTranspose = 0; -byte subOctave = 0; -byte subMIDI = 0; -byte subBreathCC = 0; -byte subBreathAT = 0; -byte subVelocity = 0; -byte subPort = 0; -byte subPB = 0; -byte subExtra = 0; -byte subVibrato = 0; -byte subDeglitch = 0; - -byte ccList[4] = {0,2,7,11}; // OFF, Breath, Volume, Expression -int pbDepthList[13] = {0,8192,4096,2731,2048,1638,1365,1170,1024,910,819,744,683}; - -byte cursorNow; - -int pos1; -int pos2; - -// the following variables are unsigned longs because the time, measured in -// milliseconds, will quickly become a bigger number than can be stored in an int. -unsigned long lastDebounceTime = 0; // the last time the output pin was toggled -unsigned long debounceDelay = 20; // the debounce time; increase if the output flickers -unsigned long buttonRepeatTime = 0; -unsigned long buttonPressedTime = 0; -unsigned long buttonRepeatInterval = 50; -unsigned long buttonRepeatDelay = 400; -unsigned long pixelUpdateTime = 0; -unsigned long pixelUpdateInterval = 100; -unsigned long cursorBlinkTime = 0; // the last time the cursor was toggled -unsigned long cursorBlinkInterval = 300; // the cursor blink toggle interval time -unsigned long patchViewTime = 0; -unsigned long patchViewTimeUp = 2000; // ms until patch view shuts off -unsigned long menuTime = 0; -unsigned long menuTimeUp = 60000; // menu shuts off after one minute of button inactivity -unsigned long lastDeglitchTime = 0; // The last time the fingering was changed -unsigned long ccSendTime = 0L; // The last time we sent CC values -unsigned long breath_on_time = 0L; // Time when breath sensor value went over the ON threshold - -int lastFingering = 0; // Keep the last fingering value for debouncing - -int mainState; // The state of the main state machine - -int initial_breath_value; // The breath value at the time we observed the transition - -byte activeMIDIchannel=1; // MIDI channel -byte activePatch=0; -byte doPatchUpdate=1; - -int breathLevel=0; // breath level (smoothed) not mapped to CC value -int oldbreath=0; - -int pressureSensor; // pressure data from breath sensor, for midi breath cc and breath threshold checks -int lastPressure; -byte velocitySend; // remapped midi velocity from breath sensor (or set to static value if selected) - -int biteSensor=0; // capacitance data from bite sensor, for midi cc and threshold checks -byte portIsOn=0; // keep track and make sure we send CC with 0 value when off threshold -int oldport=0; -int lastBite=0; - -int exSensor=0; -byte extracIsOn=0; -int oldextrac=0; -int lastEx=0; - -int pitchBend=0; -int oldpb=8192; -int pbUp=0; -int pbDn=0; -int lastPbUp=0; -int lastPbDn=0; - -int vibDepth[8] = {0,31,63,127,254,1023,2047,4095}; // these values need too be looked over - -int vibThr=1800; -int oldvibRead=0; -byte dirUp=0; // direction of first vibrato wave - -int fingeredNote; // note calculated from fingering (switches), transpose and octave settings -byte activeNote; // note playing -byte startNote=36; // set startNote to C (change this value in steps of 12 to start in other octaves) - -byte halfPitchBendKey; -byte specialKey; - -Adafruit_MPR121 touchSensor = Adafruit_MPR121(); // This is the 12-input touch sensor - - -//_______________________________________________________________________________________________ SETUP - -void setup() { - // if stored settings are not for current version, they are replaced by factory settings - if (readSetting(VERSION_ADDR) != VERSION){ - writeSetting(VERSION_ADDR,VERSION); - writeSetting(BREATH_THR_ADDR,BREATH_THR_FACTORY); - writeSetting(BREATH_MAX_ADDR,BREATH_MAX_FACTORY); - writeSetting(PORTAM_THR_ADDR,PORTAM_THR_FACTORY); - writeSetting(PORTAM_MAX_ADDR,PORTAM_MAX_FACTORY); - writeSetting(PITCHB_THR_ADDR,PITCHB_THR_FACTORY); - writeSetting(PITCHB_MAX_ADDR,PITCHB_MAX_FACTORY); - writeSetting(TRANSP_ADDR,TRANSP_FACTORY); - writeSetting(MIDI_ADDR,MIDI_FACTORY); - writeSetting(BREATH_CC_ADDR,BREATH_CC_FACTORY); - writeSetting(BREATH_AT_ADDR,BREATH_AT_FACTORY); - writeSetting(VELOCITY_ADDR,VELOCITY_FACTORY); - writeSetting(PORTAM_ADDR,PORTAM_FACTORY); - writeSetting(PB_ADDR,PB_FACTORY); - writeSetting(EXTRA_ADDR,EXTRA_FACTORY); - writeSetting(VIBRATO_ADDR,VIBRATO_FACTORY); - writeSetting(DEGLITCH_ADDR,DEGLITCH_FACTORY); - writeSetting(EXTRAC_THR_ADDR,EXTRAC_THR_FACTORY); - writeSetting(EXTRAC_MAX_ADDR,EXTRAC_MAX_FACTORY); - writeSetting(PATCH_ADDR,PATCH_FACTORY); - writeSetting(OCTAVE_ADDR,OCTAVE_FACTORY); - } - // read settings from EEPROM - breathThrVal = readSetting(BREATH_THR_ADDR); - breathMaxVal = readSetting(BREATH_MAX_ADDR); - portamThrVal = readSetting(PORTAM_THR_ADDR); - portamMaxVal = readSetting(PORTAM_MAX_ADDR); - pitchbThrVal = readSetting(PITCHB_THR_ADDR); - pitchbMaxVal = readSetting(PITCHB_MAX_ADDR); - transpose = readSetting(TRANSP_ADDR); - MIDIchannel = readSetting(MIDI_ADDR); - breathCC = readSetting(BREATH_CC_ADDR); - breathAT = readSetting(BREATH_AT_ADDR); - velocity = readSetting(VELOCITY_ADDR); - portamento = readSetting(PORTAM_ADDR); - PBdepth = readSetting(PB_ADDR); - extraCT = readSetting(EXTRA_ADDR); - vibrato = readSetting(VIBRATO_ADDR); - deglitch = readSetting(DEGLITCH_ADDR); - extracThrVal = readSetting(EXTRAC_THR_ADDR); - extracMaxVal = readSetting(EXTRAC_MAX_ADDR); - patch = readSetting(PATCH_ADDR); - octave = readSetting(OCTAVE_ADDR); - - breathStep = (breathHiLimit - breathLoLimit)/92; // 92 is the number of pixels in the settings bar - portamStep = (portamHiLimit - portamLoLimit)/92; - pitchbStep = (pitchbHiLimit - pitchbLoLimit)/92; - extracStep = (extracHiLimit - extracLoLimit)/92; - - pinMode(dPin, INPUT_PULLUP); - pinMode(ePin, INPUT_PULLUP); - pinMode(uPin, INPUT_PULLUP); - pinMode(mPin, INPUT_PULLUP); - - // by default, we'll generate the high voltage from the 3.3v line internally! (neat!) - display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64) - // init done - - // Show image buffer on the display hardware. - // Since the buffer is intialized with an Adafruit splashscreen - // internally, this will display the splashscreen. - - display.clearDisplay(); - display.drawBitmap(0,0,nuevi_logo_bmp,128,64,1); - display.display(); - delay(5000); - state = DISPLAYOFF_IDL; - mainState = NOTE_OFF; // initialize main state machine - if (!touchSensor.begin(0x5A)) { - while (1); // Touch sensor initialization failed - stop doing stuff - } - Serial3.begin(31250); // start serial with midi baudrate 31250 - Serial3.flush(); - -} - -//_______________________________________________________________________________________________ MAIN LOOP - -void loop() { - pressureSensor = analogRead(A0); // Get the pressure sensor reading from analog pin A0 - - if (mainState == NOTE_OFF) { - if (activeMIDIchannel != MIDIchannel) activeMIDIchannel = MIDIchannel; // only switch channel if no active note - if ((activePatch != patch) && doPatchUpdate){ - activePatch = patch; - usbMIDI.sendProgramChange(activePatch-1,activeMIDIchannel); - dinMIDIsendProgramChange(activePatch-1,activeMIDIchannel); - doPatchUpdate = 0; - } - if (pressureSensor > breathThrVal) { - // Value has risen above threshold. Move to the ON_Delay - // state. Record time and initial breath value. - breath_on_time = millis(); - initial_breath_value = pressureSensor; - mainState = RISE_WAIT; // Go to next state - } - } else if (mainState == RISE_WAIT) { - if (pressureSensor > breathThrVal) { - // Has enough time passed for us to collect our second - // sample? - if (millis() - breath_on_time > ON_Delay) { - // Yes, so calculate MIDI note and velocity, then send a note on event - readSwitches(); - //fingeredNote = startNote + 24; - // We should be at tonguing peak, so set velocity based on current pressureSensor value unless fixed velocity is set - // If initial value is greater than value after delay, go with initial value, constrain input to keep mapped output within 1 to 127 - if (!velocity) { - velocitySend = map(constrain(max(pressureSensor,initial_breath_value),breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,1,127); - } else velocitySend = velocity; - breathLevel=constrain(max(pressureSensor,initial_breath_value),breathThrVal,breathMaxVal); - breath(); // send breath data - fingeredNote=noteValueCheck(fingeredNote); - if ((fingeredNote >= 0) and (fingeredNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOn(fingeredNote, velocitySend, activeMIDIchannel); // send Note On message for new note - dinMIDIsendNoteOn(fingeredNote, velocitySend, activeMIDIchannel - 1); - } - activeNote=fingeredNote; - mainState = NOTE_ON; - } - } else { - // Value fell below threshold before ON_Delay passed. Return to - // NOTE_OFF state (e.g. we're ignoring a short blip of breath) - mainState = NOTE_OFF; - } - } else if (mainState == NOTE_ON) { - if (pressureSensor < breathThrVal) { - // Value has fallen below threshold - turn the note off - activeNote=noteValueCheck(activeNote); - if ((activeNote >= 0) and (activeNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOff(activeNote, velocitySend, activeMIDIchannel); // send Note Off message - dinMIDIsendNoteOff(activeNote, velocitySend, activeMIDIchannel - 1); - } - breathLevel=0; - mainState = NOTE_OFF; - } else { - readSwitches(); - //fingeredNote = startNote + 24; - if (fingeredNote != lastFingering){ // - // reset the debouncing timer - lastDeglitchTime = millis(); - } - if ((millis() - lastDeglitchTime) > deglitch) { - // whatever the reading is at, it's been there for longer - // than the debounce delay, so take it as the actual current state - if (noteValueCheck(fingeredNote) != activeNote) { - // Player has moved to a new fingering while still blowing. - // Send a note off for the current note and a note on for - // the new note. - velocity = map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,7,127); // set new velocity value based on current pressure sensor level - fingeredNote=noteValueCheck(fingeredNote); - if ((fingeredNote >= 0) and (fingeredNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOn(fingeredNote, velocitySend, activeMIDIchannel); // send Note On message for new note - dinMIDIsendNoteOn(fingeredNote, velocitySend, activeMIDIchannel - 1); - } - activeNote=noteValueCheck(activeNote); - if ((activeNote >= 0) and (activeNote <= 127)){ // don't send midi out of range - usbMIDI.sendNoteOff(activeNote, 0, activeMIDIchannel); // send Note Off message for previous note (legato) - dinMIDIsendNoteOff(activeNote, 0, activeMIDIchannel - 1); - } - activeNote=fingeredNote; - } - } - } - } - // Is it time to send more CC data? - if (millis() - ccSendTime > CC_INTERVAL) { - // Read touch pads (Teensy built in) and put value in variables - specialKey=(touchRead(0) > touch_Thr); //S2 - halfPitchBendKey=(touchRead(1) > touch_Thr); //S1 - // deal with Breath, Pitch Bend and Modulation - breath(); - pitch_bend(); - portamento_(); - extraController(); - ccSendTime = millis(); - } - if (millis() - pixelUpdateTime > pixelUpdateInterval){ - drawSensorPixels(); - pixelUpdateTime = millis(); - } - lastFingering=fingeredNote; - //do menu stuff - menu(); -} -//_______________________________________________________________________________________________ FUNCTIONS - -// MIDI note value check with out of range octave repeat -int noteValueCheck(int note){ - if (note > 127){ - note = 115+(note-127)%12; - } else if (note < 0) { - note = 12-abs(note)%12; - } - return note; -} - -// Send a three byte din midi message -void midiSend3B(byte midistatus, byte data1, byte data2) { - Serial3.write(midistatus); - Serial3.write(data1); - Serial3.write(data2); -} - -//************************************************************** - -// Send a two byte din midi message -void midiSend2B(byte midistatus, byte data) { - Serial3.write(midistatus); - Serial3.write(data); -} - -//************************************************************** - -// Send din pitchbend -void dinMIDIsendPitchBend(int pb, byte ch) { - int pitchLSB = pb & 0x007F; - int pitchMSB = (pb >>7) & 0x007F; - midiSend3B((0xE0 | ch), pitchLSB, pitchMSB); -} - -//************************************************************** - -// Send din control change -void dinMIDIsendControlChange(byte ccNumber, int cc, byte ch) { - midiSend3B((0xB0 | ch), ccNumber, cc); -} - -//************************************************************** - -// Send din note on -void dinMIDIsendNoteOn(byte note, int vel, byte ch) { - midiSend3B((0x90 | ch), note, vel); -} - -//************************************************************** - -// Send din note off -void dinMIDIsendNoteOff(byte note, int vel, byte ch) { - midiSend3B((0x80 | ch), note, vel); -} - -//************************************************************** - -// Send din aftertouch -void dinMIDIsendAfterTouch(byte value, byte ch) { - midiSend2B((0xD0 | ch), value); -} - -//************************************************************** - -// Send din program change -void dinMIDIsendProgramChange(byte value, byte ch) { - midiSend2B((0xC0 | ch), value); -} - -//************************************************************** - -void breath(){ - int breathCCval; - breathLevel = breathLevel*0.8+pressureSensor*0.2; // smoothing of breathLevel value - breathCCval = map(constrain(breathLevel,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,0,127); - if (breathCCval != oldbreath){ // only send midi data if breath has changed from previous value - if (breathCCval){ - // send midi cc - usbMIDI.sendControlChange(ccList[breathCC], breathCCval, activeMIDIchannel); - dinMIDIsendControlChange(ccList[breathCC], breathCCval, activeMIDIchannel - 1); - } - if (breathAT){ - // send aftertouch - usbMIDI.sendAfterTouch(breathCCval, activeMIDIchannel); - dinMIDIsendAfterTouch(breathCCval, activeMIDIchannel); - } - oldbreath = breathCCval; - } -} - -//************************************************************** - -void pitch_bend(){ - int calculatedPBdepth; - pbUp = touchRead(23); - pbDn = touchRead(22); - int vibRead = touchRead(15); - if ((vibRead > vibThr)&&(vibRead > (oldvibRead+7))){ - if (dirUp){ - pitchBend=oldpb*0.7+0.3*(8192 + vibDepth[vibrato]); - } else { - pitchBend=oldpb*0.7+0.3*(8191 - vibDepth[vibrato]); - } - } else if ((vibRead > vibThr)&&(vibRead < (oldvibRead-7))){ - if (dirUp ){ - pitchBend=oldpb*0.7+0.3*(8191 - vibDepth[vibrato]); - } else { - pitchBend=oldpb*0.7+0.3*(8192 + vibDepth[vibrato]); - } - } else { - // pitchBend = oldpb*0.7+8192*0.3; // released, so smooth your way back to zero - // if ((pitchBend > 8187) && (pitchBend < 8197)) pitchBend = 8192; // 8192 is 0 pitch bend, don't miss it bc of smoothing - } - oldvibRead = vibRead; - if (PBdepth){ - calculatedPBdepth = pbDepthList[PBdepth]; - if (halfPitchBendKey) calculatedPBdepth = calculatedPBdepth*0.5; - } - if ((pbUp > pitchbThrVal) && PBdepth){ - pitchBend=pitchBend*0.6+0.4*map(constrain(pbUp,pitchbThrVal,pitchbMaxVal),pitchbThrVal,pitchbMaxVal,8192,(8193 + calculatedPBdepth)); - } else if ((pbDn > pitchbThrVal) && PBdepth){ - pitchBend=pitchBend*0.6+0.4*map(constrain(pbDn,pitchbThrVal,pitchbMaxVal),pitchbThrVal,pitchbMaxVal,8192,(8192 - calculatedPBdepth)); - } else if (oldvibRead < vibThr){ - pitchBend = pitchBend*0.6+8192*0.4; // released, so smooth your way back to zero - if ((pitchBend > 8187) && (pitchBend < 8197)) pitchBend = 8192; // 8192 is 0 pitch bend, don't miss it bc of smoothing - } - pitchBend=constrain(pitchBend, 0, 16383); - if (pitchBend != oldpb){// only send midi data if pitch bend has changed from previous value - usbMIDI.sendPitchBend(pitchBend, activeMIDIchannel); - dinMIDIsendPitchBend(pitchBend, activeMIDIchannel - 1); - oldpb=pitchBend; - } -} - -//*********************************************************** - -void extraController(){ - exSensor=exSensor*0.6+0.4*touchRead(16); // get sensor data, do some smoothing - if (extraCT && (exSensor >= extracThrVal)) { // if we are enabled and over the threshold, send data - if (!extracIsOn) { - extracIsOn=1; - if (extraCT == 2){ //Sustain ON - usbMIDI.sendControlChange(64,127, activeMIDIchannel); - dinMIDIsendControlChange(64,127, activeMIDIchannel - 1); - } - } - if (extraCT == 1){ //Send modulation - int extracCC = map(constrain(exSensor,extracThrVal,extracMaxVal),extracThrVal,extracMaxVal,1,127); - if (extracCC != oldextrac){ - usbMIDI.sendControlChange(1,extracCC, activeMIDIchannel); - dinMIDIsendControlChange(1,extracCC, activeMIDIchannel - 1); - } - oldextrac = extracCC; - } - } else if (extracIsOn) { // we have just gone below threshold, so send zero value - extracIsOn=0; - if (extraCT == 1){ //MOD - //send modulation 0 - usbMIDI.sendControlChange(1,0, activeMIDIchannel); - dinMIDIsendControlChange(1,0, activeMIDIchannel - 1); - oldextrac = 0; - } else if (extraCT == 2){ //SUS - //send sustain off - usbMIDI.sendControlChange(64,0, activeMIDIchannel); - dinMIDIsendControlChange(64,0, activeMIDIchannel - 1); - } - } -} - -//*********************************************************** -void portamento_(){ - biteSensor=biteSensor*0.6+0.4*touchRead(17); // get sensor data, do some smoothing - if (portamento && (biteSensor >= portamThrVal)) { // if we are enabled and over the threshold, send portamento - if (!portIsOn) { - portOn(); - } - port(); - } else if (portIsOn) { // we have just gone below threshold, so send zero value - portOff(); - } -} - -//*********************************************************** - -void portOn(){ - if (portamento == 2){ // if portamento midi switching is enabled - usbMIDI.sendControlChange(CCN_PortOnOff, 127, activeMIDIchannel); - dinMIDIsendControlChange(CCN_PortOnOff, 127, activeMIDIchannel - 1); - } - portIsOn=1; -} - -//*********************************************************** - -void port(){ - int portCC; - portCC = map(constrain(biteSensor,portamThrVal,portamMaxVal),portamThrVal,portamMaxVal,0,127); - if (portCC!=oldport){ - usbMIDI.sendControlChange(CCN_Port, portCC, activeMIDIchannel); - dinMIDIsendControlChange(CCN_Port, portCC, activeMIDIchannel - 1); - } - oldport = portCC; -} - -//*********************************************************** - -void portOff(){ - usbMIDI.sendControlChange(CCN_Port, 0, activeMIDIchannel); - dinMIDIsendControlChange(CCN_Port, 0, activeMIDIchannel - 1); - if (portamento == 2){ // if portamento midi switching is enabled - usbMIDI.sendControlChange(CCN_PortOnOff, 0, activeMIDIchannel); - dinMIDIsendControlChange(CCN_PortOnOff, 0, activeMIDIchannel - 1); - } - portIsOn=0; - oldport = 0; -} - -//*********************************************************** - -void readSwitches(){ - - // Key variables, TRUE (1) for pressed, FALSE (0) for not pressed - byte K1; // Valve 1 (pitch change -2) - byte K2; // Valve 2 (pitch change -1) - byte K3; // Valve 3 (pitch change -3) - byte K4; // Left Hand index finger (pitch change -5) - byte K5; // Trill key 1 (pitch change +2) - byte K6; // Trill key 2 (pitch change +1) - byte K7; // Trill key 3 (pitch change +4) - - byte octaveR = 0; - - // Read touch pads (MPR121) and put value in variables - uint16_t touchValue = touchSensor.touched(); - - // Octave rollers - if (((touchValue >> 6) & 0x01) && ((touchValue >> 8) & 0x01)) octaveR = 6; //R6 = R5 && R3 - else if ((touchValue >> 6) & 0x01) octaveR = 5; //R5 - else if ((touchValue >> 9) & 0x01) octaveR = 4; //R4 - else if ((touchValue >> 8) & 0x01) octaveR = 3; //R3 - else if ((touchValue >> 11) & 0x01) octaveR = 2; //R2 - else if ((touchValue >> 10) & 0x01) octaveR = 1; //R1 - - // Valves and trill keys - K4=((touchValue >> 7) & 0x01); - K1=((touchValue >> 4) & 0x01); - K2=((touchValue >> 5) & 0x01); - K3=((touchValue >> 2) & 0x01); - K5=((touchValue >> 3) & 0x01); - K6=((touchValue >> 0) & 0x01); - K7=((touchValue >> 1) & 0x01); - - - // Calculate midi note number from pressed keys - fingeredNote=startNote-2*K1-K2-3*K3-5*K4+2*K5+K6+4*K7+octaveR*12+(octave-3)*12+transpose-12; -} - - - - - - - - - - -// MENU STUFF FROM THIS POINT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - - - - - - - - - - -void menu() { - /* - display.drawPixel(34, 38, BLACK); - display.drawPixel(35, 38, WHITE); - display.display(); - //delay(500); - display.drawPixel(35, 38, BLACK); - display.drawPixel(36, 38, WHITE); - display.display(); - //delay(500); - display.drawPixel(36, 38, BLACK); - display.drawPixel(35, 38, WHITE); - display.display(); - //delay(500); - display.drawPixel(35, 38, BLACK); - display.drawPixel(34, 38, WHITE); - display.display(); - //delay(500); - */ - - // read the state of the switches - deumButtons = !digitalRead(dPin)+2*!digitalRead(ePin)+4*!digitalRead(uPin)+8*!digitalRead(mPin); - - // check to see if you just pressed the button - // (i.e. the input went from LOW to HIGH), and you've waited long enough - // since the last press to ignore any noise: - - // If the switch changed, due to noise or pressing: - if (deumButtons != lastDeumButtons) { - // reset the debouncing timer - lastDebounceTime = millis(); - } - - if ((millis() - lastDebounceTime) > debounceDelay) { - // whatever the reading is at, it's been there for longer than the debounce - // delay, so take it as the actual current state: - - // if the button state has changed: - if (deumButtons != deumButtonState) { - deumButtonState = deumButtons; - menuTime = millis(); - Serial.println(deumButtonState); - buttonPressedAndNotUsed = 1; - buttonPressedTime = millis(); - } - - if (((deumButtons == 1) || (deumButtons == 4)) && (millis() - buttonPressedTime > buttonRepeatDelay) && (millis() - buttonRepeatTime > buttonRepeatInterval)){ - buttonPressedAndNotUsed = 1; - buttonRepeatTime = millis(); - } - - } - - - // save the reading. Next time through the loop, it'll be the lastButtonState: - lastDeumButtons = deumButtons; - - if (state && ((millis() - menuTime) > menuTimeUp)) { // shut off menu system if not used for a while - state = DISPLAYOFF_IDL; - stateFirstRun = 1; - subTranspose = 0; - subMIDI = 0; - subBreathCC = 0; - subBreathAT = 0; - subVelocity = 0; - subPort = 0; - subPB = 0; - subExtra = 0; - subVibrato = 0; - subDeglitch = 0; - } - - - - if (state == DISPLAYOFF_IDL){ - if (stateFirstRun) { - display.ssd1306_command(SSD1306_DISPLAYOFF); - stateFirstRun = 0; - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - display.ssd1306_command(SSD1306_DISPLAYON); - state = PATCH_VIEW; - buttonPressedAndNotUsed = 1; - stateFirstRun = 1; - break; - case 2: - // enter - display.ssd1306_command(SSD1306_DISPLAYON); - state = PATCH_VIEW; - stateFirstRun = 1; - break; - case 4: - // up - display.ssd1306_command(SSD1306_DISPLAYON); - state = PATCH_VIEW; - buttonPressedAndNotUsed = 1; - stateFirstRun = 1; - break; - case 8: - // menu - display.ssd1306_command(SSD1306_DISPLAYON); - state = MAIN_MENU; - stateFirstRun = 1; - break; - } - } - } else if (state == PATCH_VIEW){ - if (stateFirstRun) { - drawPatchView(); - patchViewTime = millis(); - stateFirstRun = 0; - } - if ((millis() - patchViewTime) > patchViewTimeUp) { - state = DISPLAYOFF_IDL; - stateFirstRun = 1; - doPatchUpdate = 1; - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (patch > 1){ - patch--; - } else patch = 128; - drawPatchView(); - patchViewTime = millis(); - break; - case 2: - // enter - patchViewTime = millis(); - break; - case 4: - // up - if (patch < 128){ - patch++; - } else patch = 1; - drawPatchView(); - patchViewTime = millis(); - break; - case 8: - // menu - state = DISPLAYOFF_IDL; - stateFirstRun = 1; - doPatchUpdate = 1; - break; - } - } - } else if (state == MAIN_MENU){ // MAIN MENU HERE <<<<<<<<<<<<<<< - if (stateFirstRun) { - drawMenuScreen(); - stateFirstRun = 0; - } - if (subTranspose){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotTranspose(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (transpose > 0){ - plotTranspose(BLACK); - transpose--; - plotTranspose(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotTranspose(WHITE); - cursorNow = BLACK; - display.display(); - subTranspose = 0; - if (readSetting(TRANSP_ADDR) != transpose) writeSetting(TRANSP_ADDR,transpose); - break; - case 4: - // up - if (transpose < 24){ - plotTranspose(BLACK); - transpose++; - plotTranspose(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotTranspose(WHITE); - cursorNow = BLACK; - display.display(); - subTranspose = 0; - if (readSetting(TRANSP_ADDR) != transpose) writeSetting(TRANSP_ADDR,transpose); - break; - } - } - } else if (subOctave){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotOctave(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (octave > 0){ - plotOctave(BLACK); - octave--; - plotOctave(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotOctave(WHITE); - cursorNow = BLACK; - display.display(); - subOctave = 0; - if (readSetting(OCTAVE_ADDR) != octave) writeSetting(OCTAVE_ADDR,octave); - break; - case 4: - // up - if (octave < 6){ - plotOctave(BLACK); - octave++; - plotOctave(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotOctave(WHITE); - cursorNow = BLACK; - display.display(); - subOctave = 0; - if (readSetting(OCTAVE_ADDR) != octave) writeSetting(OCTAVE_ADDR,octave); - break; - } - } - } else if (subMIDI) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotMIDI(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (MIDIchannel > 1){ - plotMIDI(BLACK); - MIDIchannel--; - plotMIDI(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotMIDI(WHITE); - cursorNow = BLACK; - display.display(); - subMIDI = 0; - if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); - break; - case 4: - // up - if (MIDIchannel < 16){ - plotMIDI(BLACK); - MIDIchannel++; - plotMIDI(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotMIDI(WHITE); - cursorNow = BLACK; - display.display(); - subMIDI = 0; - if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); - break; - } - } - } else { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawMenuCursor(mainMenuCursor, cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (mainMenuCursor < 6){ - drawMenuCursor(mainMenuCursor, BLACK); - mainMenuCursor++; - drawMenuCursor(mainMenuCursor, WHITE); - cursorNow = BLACK; - clearSub(); - display.display(); - } - break; - case 2: - // enter - selectMainMenu(); - break; - case 4: - // up - if (mainMenuCursor > 1){ - drawMenuCursor(mainMenuCursor, BLACK); - mainMenuCursor--; - drawMenuCursor(mainMenuCursor, WHITE); - cursorNow = BLACK; - clearSub(); - display.display(); - } - break; - case 8: - // menu - state = DISPLAYOFF_IDL; - stateFirstRun = 1; - break; - } - } - } - } else if (state == BREATH_ADJ_IDL){ - if (stateFirstRun) { - drawBreathScreen(); - stateFirstRun = 0; - } - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawAdjCursor(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - state = PORTAM_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(BREATH_THR_ADDR) != breathThrVal) writeSetting(BREATH_THR_ADDR,breathThrVal); - if (readSetting(BREATH_MAX_ADDR) != breathMaxVal) writeSetting(BREATH_MAX_ADDR,breathMaxVal); - break; - case 2: - // enter - state = BREATH_ADJ_THR; - break; - case 4: - // up - state = EXTRAC_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(BREATH_THR_ADDR) != breathThrVal) writeSetting(BREATH_THR_ADDR,breathThrVal); - if (readSetting(BREATH_MAX_ADDR) != breathMaxVal) writeSetting(BREATH_MAX_ADDR,breathMaxVal); - break; - case 8: - // menu - state = MAIN_MENU; - stateFirstRun = 1; - if (readSetting(BREATH_THR_ADDR) != breathThrVal) writeSetting(BREATH_THR_ADDR,breathThrVal); - if (readSetting(BREATH_MAX_ADDR) != breathMaxVal) writeSetting(BREATH_MAX_ADDR,breathMaxVal); - break; - } - } - } else if (state == BREATH_ADJ_THR){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos1,20,pos1,26,cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (breathThrVal - breathStep > breathLoLimit){ - breathThrVal -= breathStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(breathThrVal, breathLoLimit, breathHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = BREATH_ADJ_MAX; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - case 4: - // up - if (breathThrVal + breathStep < breathHiLimit){ - breathThrVal += breathStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(breathThrVal, breathLoLimit, breathHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = BREATH_ADJ_IDL; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - } - } - } else if (state == BREATH_ADJ_MAX){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos2,50,pos2,57,cursorNow);; - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if ((breathMaxVal - breathStep) > (breathThrVal + minOffset)){ - breathMaxVal -= breathStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(breathMaxVal, breathLoLimit, breathHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = BREATH_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - case 4: - // up - if (breathMaxVal + breathStep < breathHiLimit){ - breathMaxVal += breathStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(breathMaxVal, breathLoLimit, breathHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = BREATH_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - } - } - } else if (state == PORTAM_ADJ_IDL){ - if (stateFirstRun) { - drawPortamScreen(); - stateFirstRun = 0; - } - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawAdjCursor(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - state = PITCHB_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(PORTAM_THR_ADDR) != portamThrVal) writeSetting(PORTAM_THR_ADDR,portamThrVal); - if (readSetting(PORTAM_MAX_ADDR) != portamMaxVal) writeSetting(PORTAM_MAX_ADDR,portamMaxVal); - break; - case 2: - // enter - state = PORTAM_ADJ_THR; - break; - case 4: - // up - state = BREATH_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(PORTAM_THR_ADDR) != portamThrVal) writeSetting(PORTAM_THR_ADDR,portamThrVal); - if (readSetting(PORTAM_MAX_ADDR) != portamMaxVal) writeSetting(PORTAM_MAX_ADDR,portamMaxVal); - break; - case 8: - // menu - state = MAIN_MENU; - stateFirstRun = 1; - if (readSetting(PORTAM_THR_ADDR) != portamThrVal) writeSetting(PORTAM_THR_ADDR,portamThrVal); - if (readSetting(PORTAM_MAX_ADDR) != portamMaxVal) writeSetting(PORTAM_MAX_ADDR,portamMaxVal); - break; - } - } - } else if (state == PORTAM_ADJ_THR){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos1,20,pos1,26,cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (portamThrVal - portamStep > portamLoLimit){ - portamThrVal -= portamStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(portamThrVal, portamLoLimit, portamHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = PORTAM_ADJ_MAX; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - case 4: - // up - if (portamThrVal + portamStep < portamHiLimit){ - portamThrVal += portamStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(portamThrVal, portamLoLimit, portamHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = PORTAM_ADJ_IDL; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - } - } - } else if (state == PORTAM_ADJ_MAX){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos2,50,pos2,57,cursorNow);; - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if ((portamMaxVal - portamStep) > (portamThrVal + minOffset)){ - portamMaxVal -= portamStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(portamMaxVal, portamLoLimit, portamHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = PORTAM_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - case 4: - // up - if (portamMaxVal + portamStep < portamHiLimit){ - portamMaxVal += portamStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(portamMaxVal, portamLoLimit, portamHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = PORTAM_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - } - } - } else if (state == PITCHB_ADJ_IDL){ - if (stateFirstRun) { - drawPitchbScreen(); - stateFirstRun = 0; - } - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawAdjCursor(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - state = EXTRAC_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(PITCHB_THR_ADDR) != pitchbThrVal) writeSetting(PITCHB_THR_ADDR,pitchbThrVal); - if (readSetting(PITCHB_MAX_ADDR) != pitchbMaxVal) writeSetting(PITCHB_MAX_ADDR,pitchbMaxVal); - break; - case 2: - // enter - state = PITCHB_ADJ_THR; - break; - case 4: - // up - state = PORTAM_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(PITCHB_THR_ADDR) != pitchbThrVal) writeSetting(PITCHB_THR_ADDR,pitchbThrVal); - if (readSetting(PITCHB_MAX_ADDR) != pitchbMaxVal) writeSetting(PITCHB_MAX_ADDR,pitchbMaxVal); - break; - case 8: - // menu - state = MAIN_MENU; - stateFirstRun = 1; - if (readSetting(PITCHB_THR_ADDR) != pitchbThrVal) writeSetting(PITCHB_THR_ADDR,pitchbThrVal); - if (readSetting(PITCHB_MAX_ADDR) != pitchbMaxVal) writeSetting(PITCHB_MAX_ADDR,pitchbMaxVal); - break; - } - } - } else if (state == PITCHB_ADJ_THR){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos1,20,pos1,26,cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (pitchbThrVal - pitchbStep > pitchbLoLimit){ - pitchbThrVal -= pitchbStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(pitchbThrVal, pitchbLoLimit, pitchbHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = PITCHB_ADJ_MAX; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - case 4: - // up - if (pitchbThrVal + pitchbStep < pitchbHiLimit){ - pitchbThrVal += pitchbStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(pitchbThrVal, pitchbLoLimit, pitchbHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = PITCHB_ADJ_IDL; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - } - } - } else if (state == PITCHB_ADJ_MAX){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos2,50,pos2,57,cursorNow);; - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if ((pitchbMaxVal - pitchbStep) > (pitchbThrVal + minOffset)){ - pitchbMaxVal -= pitchbStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(pitchbMaxVal, pitchbLoLimit, pitchbHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = PITCHB_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - case 4: - // up - if (pitchbMaxVal + pitchbStep < pitchbHiLimit){ - pitchbMaxVal += pitchbStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(pitchbMaxVal, pitchbLoLimit, pitchbHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = PITCHB_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - } - } - - } else if (state == EXTRAC_ADJ_IDL){ - if (stateFirstRun) { - drawExtracScreen(); - stateFirstRun = 0; - } - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawAdjCursor(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - state = BREATH_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(EXTRAC_THR_ADDR) != extracThrVal) writeSetting(EXTRAC_THR_ADDR,extracThrVal); - if (readSetting(EXTRAC_MAX_ADDR) != extracMaxVal) writeSetting(EXTRAC_MAX_ADDR,extracMaxVal); - break; - case 2: - // enter - state = EXTRAC_ADJ_THR; - break; - case 4: - // up - state = PITCHB_ADJ_IDL; - stateFirstRun = 1; - if (readSetting(EXTRAC_THR_ADDR) != extracThrVal) writeSetting(EXTRAC_THR_ADDR,extracThrVal); - if (readSetting(EXTRAC_MAX_ADDR) != extracMaxVal) writeSetting(EXTRAC_MAX_ADDR,extracMaxVal); - break; - case 8: - // menu - state = MAIN_MENU; - stateFirstRun = 1; - if (readSetting(EXTRAC_THR_ADDR) != extracThrVal) writeSetting(EXTRAC_THR_ADDR,extracThrVal); - if (readSetting(EXTRAC_MAX_ADDR) != extracMaxVal) writeSetting(EXTRAC_MAX_ADDR,extracMaxVal); - break; - } - } - } else if (state == EXTRAC_ADJ_THR){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos1,20,pos1,26,cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (extracThrVal - extracStep > extracLoLimit){ - extracThrVal -= extracStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(extracThrVal, extracLoLimit, extracHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = EXTRAC_ADJ_MAX; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - case 4: - // up - if (extracThrVal + extracStep < extracHiLimit){ - extracThrVal += extracStep; - display.drawLine(pos1,20,pos1,26,BLACK); - pos1 = map(extracThrVal, extracLoLimit, extracHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = EXTRAC_ADJ_IDL; - display.drawLine(pos1,20,pos1,26,WHITE); - display.display(); - break; - } - } - } else if (state == EXTRAC_ADJ_MAX){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - display.drawLine(pos2,50,pos2,57,cursorNow);; - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if ((extracMaxVal - extracStep) > (extracThrVal + minOffset)){ - extracMaxVal -= extracStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(extracMaxVal, extracLoLimit, extracHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 2: - // enter - state = EXTRAC_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - case 4: - // up - if (extracMaxVal + extracStep < extracHiLimit){ - extracMaxVal += extracStep; - display.drawLine(pos2,50,pos2,57,BLACK); - pos2 = map(extracMaxVal, extracLoLimit, extracHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - cursorBlinkTime = millis(); - cursorNow = BLACK; - } - break; - case 8: - // menu - state = EXTRAC_ADJ_IDL; - display.drawLine(pos2,50,pos2,57,WHITE); - display.display(); - break; - } - } - - - - } else if (state == SETUP_BR_MENU) { // SETUP BREATH MENU HERE <<<<<<<<<<<<<< - if (stateFirstRun) { - drawSetupBrMenuScreen(); - stateFirstRun = 0; - } - if (subBreathCC){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotBreathCC(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (breathCC > 0){ - plotBreathCC(BLACK); - breathCC--; - plotBreathCC(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } else { - plotBreathCC(BLACK); - breathCC = 3; - plotBreathCC(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotBreathCC(WHITE); - cursorNow = BLACK; - display.display(); - subBreathCC = 0; - if (readSetting(BREATH_CC_ADDR) != breathCC) writeSetting(BREATH_CC_ADDR,breathCC); - break; - case 4: - // up - if (breathCC < 3){ - plotBreathCC(BLACK); - breathCC++; - plotBreathCC(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } else { - plotBreathCC(BLACK); - breathCC = 0; - plotBreathCC(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotBreathCC(WHITE); - cursorNow = BLACK; - display.display(); - subBreathCC = 0; - if (readSetting(BREATH_CC_ADDR) != breathCC) writeSetting(BREATH_CC_ADDR,breathCC); - break; - } - } - } else if (subBreathAT) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotBreathAT(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - plotBreathAT(BLACK); - breathAT=!breathAT; - plotBreathAT(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 2: - // enter - plotBreathAT(WHITE); - cursorNow = BLACK; - display.display(); - subBreathAT = 0; - if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); - break; - case 4: - // up - plotBreathAT(BLACK); - breathAT=!breathAT; - plotBreathAT(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 8: - // menu - plotBreathAT(WHITE); - cursorNow = BLACK; - display.display(); - subBreathAT = 0; - if (readSetting(MIDI_ADDR) != MIDIchannel) writeSetting(MIDI_ADDR,MIDIchannel); - break; - } - } - } else if (subVelocity) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotVelocity(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - plotVelocity(BLACK); - if (velocity > 0){ - velocity--; - } else velocity = 127; - plotVelocity(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 2: - // enter - plotVelocity(WHITE); - cursorNow = BLACK; - display.display(); - subVelocity = 0; - if (readSetting(VELOCITY_ADDR) != velocity) writeSetting(VELOCITY_ADDR,velocity); - break; - case 4: - // up - plotVelocity(BLACK); - if (velocity < 127){ - velocity++; - } else velocity = 0; - plotVelocity(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 8: - // menu - plotVelocity(WHITE); - cursorNow = BLACK; - display.display(); - subVelocity = 0; - if (readSetting(VELOCITY_ADDR) != velocity) writeSetting(VELOCITY_ADDR,velocity); - break; - } - } - } else { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawMenuCursor(setupBrMenuCursor, cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (setupBrMenuCursor < 3){ - drawMenuCursor(setupBrMenuCursor, BLACK); - setupBrMenuCursor++; - drawMenuCursor(setupBrMenuCursor, WHITE); - cursorNow = BLACK; - clearSub(); - display.display(); - } - break; - case 2: - // enter - selectSetupBrMenu(); - break; - case 4: - // up - if (setupBrMenuCursor > 1){ - drawMenuCursor(setupBrMenuCursor, BLACK); - setupBrMenuCursor--; - drawMenuCursor(setupBrMenuCursor, WHITE); - cursorNow = BLACK; - clearSub(); - display.display(); - } - break; - case 8: - // menu - state = MAIN_MENU; - stateFirstRun = 1; - break; - } - } - } - - - } else if (state == SETUP_CT_MENU) { // SETUP CONTROLLERS MENU HERE <<<<<<<<<<<<< - if (stateFirstRun) { - drawSetupCtMenuScreen(); - stateFirstRun = 0; - } - if (subPort){ - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotPort(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - plotPort(BLACK); - if (portamento > 0){ - portamento--; - } else portamento = 2; - plotPort(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 2: - // enter - plotPort(WHITE); - cursorNow = BLACK; - display.display(); - subPort = 0; - if (readSetting(PORTAM_ADDR) != portamento) writeSetting(PORTAM_ADDR,portamento); - break; - case 4: - // up - plotPort(BLACK); - if (portamento < 2){ - portamento++; - } else portamento = 0; - plotPort(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 8: - // menu - plotPort(WHITE); - cursorNow = BLACK; - display.display(); - subPort = 0; - if (readSetting(PORTAM_ADDR) != portamento) writeSetting(PORTAM_ADDR,portamento); - break; - } - } - } else if (subPB) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotPB(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (PBdepth > 0){ - plotPB(BLACK); - PBdepth--; - plotPB(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotPB(WHITE); - cursorNow = BLACK; - display.display(); - subPB = 0; - if (readSetting(PB_ADDR) != PBdepth) writeSetting(PB_ADDR,PBdepth); - break; - case 4: - // up - if (PBdepth < 12){ - plotPB(BLACK); - PBdepth++; - plotPB(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotPB(WHITE); - cursorNow = BLACK; - display.display(); - subPB = 0; - if (readSetting(PB_ADDR) != PBdepth) writeSetting(PB_ADDR,PBdepth); - break; - } - } - } else if (subExtra) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotExtra(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - plotExtra(BLACK); - if (extraCT > 0){ - extraCT--; - } else extraCT = 2; - plotExtra(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 2: - // enter - plotExtra(WHITE); - cursorNow = BLACK; - display.display(); - subExtra = 0; - if (readSetting(EXTRA_ADDR) != extraCT) writeSetting(EXTRA_ADDR,extraCT); - break; - case 4: - // up - plotExtra(BLACK); - if (extraCT < 2){ - extraCT++; - } else extraCT = 0; - plotExtra(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - break; - case 8: - // menu - plotExtra(WHITE); - cursorNow = BLACK; - display.display(); - subExtra = 0; - if (readSetting(EXTRA_ADDR) != extraCT) writeSetting(EXTRA_ADDR,extraCT); - break; - } - } - } else if (subVibrato) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotVibrato(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (vibrato > 0){ - plotVibrato(BLACK); - vibrato--; - plotVibrato(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotVibrato(WHITE); - cursorNow = BLACK; - display.display(); - subVibrato = 0; - if (readSetting(VIBRATO_ADDR) != vibrato) writeSetting(VIBRATO_ADDR,vibrato); - break; - case 4: - // up - if (vibrato < 7){ - plotVibrato(BLACK); - vibrato++; - plotVibrato(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotVibrato(WHITE); - cursorNow = BLACK; - display.display(); - subVibrato = 0; - if (readSetting(VIBRATO_ADDR) != vibrato) writeSetting(VIBRATO_ADDR,vibrato); - break; - } - } - } else if (subDeglitch) { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - plotDeglitch(cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (deglitch > 0){ - plotDeglitch(BLACK); - deglitch-=5; - plotDeglitch(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 2: - // enter - plotDeglitch(WHITE); - cursorNow = BLACK; - display.display(); - subDeglitch = 0; - if (readSetting(DEGLITCH_ADDR) != deglitch) writeSetting(DEGLITCH_ADDR,deglitch); - break; - case 4: - // up - if (deglitch < 70){ - plotDeglitch(BLACK); - deglitch+=5; - plotDeglitch(WHITE); - cursorNow = BLACK; - display.display(); - cursorBlinkTime = millis(); - } - break; - case 8: - // menu - plotDeglitch(WHITE); - cursorNow = BLACK; - display.display(); - subDeglitch = 0; - if (readSetting(DEGLITCH_ADDR) != deglitch) writeSetting(DEGLITCH_ADDR,deglitch); - break; - } - } - } else { - if ((millis() - cursorBlinkTime) > cursorBlinkInterval) { - if (cursorNow == WHITE) cursorNow = BLACK; else cursorNow = WHITE; - drawMenuCursor(setupCtMenuCursor, cursorNow); - display.display(); - cursorBlinkTime = millis(); - } - if (buttonPressedAndNotUsed){ - buttonPressedAndNotUsed = 0; - switch (deumButtonState){ - case 1: - // down - if (setupCtMenuCursor < 5){ - drawMenuCursor(setupCtMenuCursor, BLACK); - setupCtMenuCursor++; - drawMenuCursor(setupCtMenuCursor, WHITE); - cursorNow = BLACK; - clearSub(); - display.display(); - } - break; - case 2: - // enter - selectSetupCtMenu(); - break; - case 4: - // up - if (setupCtMenuCursor > 1){ - drawMenuCursor(setupCtMenuCursor, BLACK); - setupCtMenuCursor--; - drawMenuCursor(setupCtMenuCursor, WHITE); - cursorNow = BLACK; - clearSub(); - display.display(); - } - break; - case 8: - // menu - state = MAIN_MENU; - stateFirstRun = 1; - break; - } - } - } - } - -} - -void selectMainMenu(){ - switch (mainMenuCursor){ - case 1: - subTranspose = 1; - drawMenuCursor(mainMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubTranspose(); - break; - case 2: - subOctave = 1; - drawMenuCursor(mainMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubOctave(); - break; - case 3: - subMIDI = 1; - drawMenuCursor(mainMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubMIDI(); - break; - case 4: - state = BREATH_ADJ_IDL; - stateFirstRun = 1; - break; - case 5: - state = SETUP_BR_MENU; - stateFirstRun = 1; - break; - case 6: - state = SETUP_CT_MENU; - stateFirstRun = 1; - break; - } -} - -void selectSetupBrMenu(){ - switch (setupBrMenuCursor){ - case 1: - subBreathCC = 1; - drawMenuCursor(setupBrMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubBreathCC(); - break; - case 2: - subBreathAT = 1; - drawMenuCursor(setupBrMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubBreathAT(); - break; - case 3: - subVelocity = 1; - drawMenuCursor(setupBrMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubVelocity(); - } -} - -void selectSetupCtMenu(){ - switch (setupCtMenuCursor){ - case 1: - subPort = 1; - drawMenuCursor(setupCtMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubPort(); - break; - case 2: - subPB = 1; - drawMenuCursor(setupCtMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubPB(); - break; - case 3: - subExtra = 1; - drawMenuCursor(setupCtMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubExtra(); - break; - case 4: - subVibrato = 1; - drawMenuCursor(setupCtMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubVibrato(); - break; - case 5: - subDeglitch = 1; - drawMenuCursor(setupCtMenuCursor, WHITE); - display.display(); - cursorBlinkTime = millis(); - drawSubDeglitch(); - } -} -void drawBreathScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(25,2); - display.println("BREATH"); - //display.drawLine(0,10,127,10,WHITE); - display.setCursor(0,20); - display.println("THR"); - display.drawLine(25,17,120,17,WHITE); - display.drawLine(25,18,25,19,WHITE); - display.drawLine(120,18,120,19,WHITE); - display.drawLine(25,29,120,29,WHITE); - display.drawLine(25,27,25,28,WHITE); - display.drawLine(120,27,120,28,WHITE); - display.setCursor(0,35); - display.println("SNS"); - //display.drawLine(25,38,120,38,WHITE); - display.drawLine(25,36,25,40,WHITE); - display.drawLine(120,36,120,40,WHITE); - display.setCursor(0,50); - display.println("MAX"); - display.drawLine(25,47,120,47,WHITE); - display.drawLine(25,48,25,49,WHITE); - display.drawLine(120,48,120,49,WHITE); - display.drawLine(25,60,120,60,WHITE); - display.drawLine(25,58,25,59,WHITE); - display.drawLine(120,58,120,59,WHITE); - - //display.drawLine(38,20,38,26,WHITE); // indikation thr - pos1 = map(breathThrVal, breathLoLimit, breathHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - cursorNow = WHITE; - //display.drawLine(115,50,115,57,WHITE); // indikation max - pos2 = map(breathMaxVal, breathLoLimit, breathHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - //display.drawPixel(34, 38, WHITE); - drawAdjCursor(WHITE); - display.display(); -} - -void drawPortamScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(25,2); - display.println("PORTAMENTO"); - //display.drawLine(0,10,127,10,WHITE); - display.setCursor(0,20); - display.println("THR"); - display.drawLine(25,17,120,17,WHITE); - display.drawLine(25,18,25,19,WHITE); - display.drawLine(120,18,120,19,WHITE); - display.drawLine(25,29,120,29,WHITE); - display.drawLine(25,27,25,28,WHITE); - display.drawLine(120,27,120,28,WHITE); - display.setCursor(0,35); - display.println("SNS"); - //display.drawLine(25,38,120,38,WHITE); - display.drawLine(25,36,25,40,WHITE); - display.drawLine(120,36,120,40,WHITE); - display.setCursor(0,50); - display.println("MAX"); - display.drawLine(25,47,120,47,WHITE); - display.drawLine(25,48,25,49,WHITE); - display.drawLine(120,48,120,49,WHITE); - display.drawLine(25,60,120,60,WHITE); - display.drawLine(25,58,25,59,WHITE); - display.drawLine(120,58,120,59,WHITE); - - //display.drawLine(38,20,38,26,WHITE); // indikation thr - pos1 = map(portamThrVal, portamLoLimit, portamHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - cursorNow = WHITE; - //display.drawLine(115,50,115,57,WHITE); // indikation max - pos2 = map(portamMaxVal, portamLoLimit, portamHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - //display.drawPixel(34, 38, WHITE); - drawAdjCursor(WHITE); - display.display(); -} - -void drawPitchbScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(25,2); - display.println("PITCH BEND"); - //display.drawLine(0,10,127,10,WHITE); - display.setCursor(0,20); - display.println("THR"); - display.drawLine(25,17,120,17,WHITE); - display.drawLine(25,18,25,19,WHITE); - display.drawLine(120,18,120,19,WHITE); - display.drawLine(25,29,120,29,WHITE); - display.drawLine(25,27,25,28,WHITE); - display.drawLine(120,27,120,28,WHITE); - display.setCursor(0,35); - display.println("SNS"); - //display.drawLine(25,38,120,38,WHITE); - display.drawLine(25,36,25,40,WHITE); - display.drawLine(120,36,120,40,WHITE); - display.setCursor(0,50); - display.println("MAX"); - display.drawLine(25,47,120,47,WHITE); - display.drawLine(25,48,25,49,WHITE); - display.drawLine(120,48,120,49,WHITE); - display.drawLine(25,60,120,60,WHITE); - display.drawLine(25,58,25,59,WHITE); - display.drawLine(120,58,120,59,WHITE); - - //display.drawLine(38,20,38,26,WHITE); // indikation thr - pos1 = map(pitchbThrVal, pitchbLoLimit, pitchbHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - cursorNow = WHITE; - //display.drawLine(115,50,115,57,WHITE); // indikation max - pos2 = map(pitchbMaxVal, pitchbLoLimit, pitchbHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - //display.drawPixel(34, 38, WHITE); - drawAdjCursor(WHITE); - display.display(); -} - -void drawExtracScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(25,2); - display.println("EXTRA CONTROLLER"); - //display.drawLine(0,10,127,10,WHITE); - display.setCursor(0,20); - display.println("THR"); - display.drawLine(25,17,120,17,WHITE); - display.drawLine(25,18,25,19,WHITE); - display.drawLine(120,18,120,19,WHITE); - display.drawLine(25,29,120,29,WHITE); - display.drawLine(25,27,25,28,WHITE); - display.drawLine(120,27,120,28,WHITE); - display.setCursor(0,35); - display.println("SNS"); - //display.drawLine(25,38,120,38,WHITE); - display.drawLine(25,36,25,40,WHITE); - display.drawLine(120,36,120,40,WHITE); - display.setCursor(0,50); - display.println("MAX"); - display.drawLine(25,47,120,47,WHITE); - display.drawLine(25,48,25,49,WHITE); - display.drawLine(120,48,120,49,WHITE); - display.drawLine(25,60,120,60,WHITE); - display.drawLine(25,58,25,59,WHITE); - display.drawLine(120,58,120,59,WHITE); - - //display.drawLine(38,20,38,26,WHITE); // indikation thr - pos1 = map(extracThrVal, extracLoLimit, extracHiLimit, 27, 119); - display.drawLine(pos1,20,pos1,26,WHITE); - cursorNow = WHITE; - //display.drawLine(115,50,115,57,WHITE); // indikation max - pos2 = map(extracMaxVal, extracLoLimit, extracHiLimit, 27, 119); - display.drawLine(pos2,50,pos2,57,WHITE); - //display.drawPixel(34, 38, WHITE); - drawAdjCursor(WHITE); - display.display(); -} - -void drawMenuCursor(byte itemNo, byte color){ - byte xmid = 6 + 9 * itemNo; - display.drawTriangle(57,xmid,61,xmid+2,61,xmid-2,color); -} - -void drawAdjCursor(byte color){ - display.drawTriangle(16,4,20,4,18,1,color); - display.drawTriangle(16,6,20,6,18,9,color); -} - -void drawMenuScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(0,0); - display.println("MENU"); - display.drawLine(0,9,127,9,WHITE); - display.setCursor(0,12); - display.println("TRANSPOSE"); - display.setCursor(0,21); - display.println("OCTAVE"); - display.setCursor(0,30); - display.println("MIDI CH"); - display.setCursor(0,39); - display.println("ADJUST"); - display.setCursor(0,48); - display.println("SETUP BR"); - display.setCursor(0,57); - display.println("SETUP CTL"); - drawMenuCursor(mainMenuCursor, WHITE); - display.display(); -} - -void drawPatchView(){ - display.clearDisplay(); - display.setTextColor(WHITE); - display.setTextSize(6); - if (patch < 10){ - // 1-9 - display.setCursor(48,10); - } else if (patch < 100){ - // 10-99 - display.setCursor(31,10); - } else { - // 99-128 - display.setCursor(10,10); - } - display.println(patch); - display.display(); -} - -void clearSub(){ - display.fillRect(63,11,64,52,BLACK); -} - -void drawSubTranspose(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(68,15); - display.println("TRANSPOSE"); - plotTranspose(WHITE); - display.display(); -} - -void plotTranspose(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(80,33); - if ((transpose-12) > -1){ - display.println("+"); - display.setCursor(93,33); - display.println(transpose-12); - } else { - display.println("-"); - display.setCursor(93,33); - display.println(abs(transpose-12)); - } -} - -void drawSubOctave(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(74,15); - display.println("OCTAVE"); - plotOctave(WHITE); - display.display(); -} - -void plotOctave(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(80,33); - if ((octave-3) > -1){ - display.println("+"); - display.setCursor(93,33); - display.println(octave-3); - } else { - display.println("-"); - display.setCursor(93,33); - display.println(abs(octave-3)); - } -} - -void drawSubMIDI(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(68,15); - display.println("MIDI CHNL"); - plotMIDI(WHITE); - display.display(); -} - -void plotMIDI(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(90,33); - display.println(MIDIchannel); -} - -void drawSubBreathCC(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(68,15); - display.println("BREATH CC"); - plotBreathCC(WHITE); - display.display(); -} - -void plotBreathCC(int color){ - display.setTextColor(color); - display.setTextSize(2); - if (breathCC){ - display.setCursor(90,33); - display.println(ccList[breathCC]); - } else { - display.setCursor(79,33); - display.println("OFF"); - } -} - -void drawSubBreathAT(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(68,15); - display.println("BREATH AT"); - plotBreathAT(WHITE); - display.display(); -} - -void plotBreathAT(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(79,33); - if (breathAT){ - display.println("ON"); - } else { - display.println("OFF"); - } -} - -void drawSubVelocity(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(71,15); - display.println("VELOCITY"); - plotVelocity(WHITE); - display.display(); -} - -void plotVelocity(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(79,33); - if (velocity){ - display.println(velocity); - } else { - display.println("DYN"); - } -} - -void drawSubPort(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(71,15); - display.println("PORT/GLD"); - plotPort(WHITE); - display.display(); -} - -void plotPort(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(79,33); - if (portamento == 1){ - display.println("ON"); - } else if (portamento == 2){ - display.println("SW"); - } else { - display.println("OFF"); - } -} - -void drawSubPB(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(68,15); - display.println("PITCHBEND"); - plotPB(WHITE); - display.display(); -} - -void plotPB(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(76,33); - if (PBdepth){ - display.println("1/"); - display.setCursor(101,33); - display.println(PBdepth); - } else { - display.println("OFF"); - } -} - -void drawSubExtra(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(68,15); - display.println("EXTRA CTR"); - plotExtra(WHITE); - display.display(); -} - -void plotExtra(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(79,33); - if (extraCT == 1){ - display.println("MOD"); - } else if (extraCT == 2){ - display.println("SUS"); - } else { - display.println("OFF"); - } -} - -void drawSubVibrato(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(74,15); - display.println("VIBRATO"); - plotVibrato(WHITE); - display.display(); -} - -void plotVibrato(int color){ - display.setTextColor(color); - display.setTextSize(2); - if (vibrato){ - display.setCursor(90,33); - display.println(vibrato); - } else { - display.setCursor(79,33); - display.println("OFF"); - } -} - -void drawSubDeglitch(){ - display.fillRect(63,11,64,52,BLACK); - display.drawRect(63,11,64,52,WHITE); - display.setTextColor(WHITE); - display.setTextSize(1); - display.setCursor(71,15); - display.println("DEGLITCH"); - plotDeglitch(WHITE); - display.display(); -} - -void plotDeglitch(int color){ - display.setTextColor(color); - display.setTextSize(2); - display.setCursor(79,33); - if (deglitch){ - display.println(deglitch); - display.setCursor(105,40); - display.setTextSize(1); - display.println("ms"); - } else { - display.println("OFF"); - } -} - -void drawSetupBrMenuScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(0,0); - display.println("SETUP BREATH"); - display.drawLine(0,9,127,9,WHITE); - display.setCursor(0,12); - display.println("BREATH CC"); - display.setCursor(0,21); - display.println("BREATH AT"); - display.setCursor(0,30); - display.println("VELOCITY"); - display.setCursor(0,39); - display.println(""); - display.setCursor(0,48); - display.println(""); - display.setCursor(0,57); - display.println(""); - - display.display(); -} - -void drawSetupCtMenuScreen(){ - // Clear the buffer. - display.clearDisplay(); - - display.setTextSize(1); - display.setTextColor(WHITE); - display.setCursor(0,0); - display.println("SETUP CTRLS"); - display.drawLine(0,9,127,9,WHITE); - display.setCursor(0,12); - display.println("PORT/GLD"); - display.setCursor(0,21); - display.println("PITCHBEND"); - display.setCursor(0,30); - display.println("EXTRA CTR"); - display.setCursor(0,39); - display.println("VIBRATO"); - display.setCursor(0,48); - display.println("DEGLITCH"); - display.setCursor(0,57); - display.println(""); - - display.display(); -} - -void drawSensorPixels(){ - int pos,oldpos; - int redraw=0; - if ((state == BREATH_ADJ_IDL) || (state == BREATH_ADJ_THR) || (state == BREATH_ADJ_MAX)){ - pos = map(constrain(pressureSensor, breathLoLimit, breathHiLimit), breathLoLimit, breathHiLimit, 28, 118); - oldpos = map(constrain(lastPressure, breathLoLimit, breathHiLimit), breathLoLimit, breathHiLimit, 28, 118); - if (pos!=oldpos){ - display.drawPixel(oldpos, 38, BLACK); - display.drawPixel(pos, 38, WHITE); - display.display(); - } - lastPressure=pressureSensor; - } - if ((state == PORTAM_ADJ_IDL) || (state == PORTAM_ADJ_THR) || (state == PORTAM_ADJ_MAX)){ - pos = map(constrain(biteSensor,portamLoLimit,portamHiLimit), portamLoLimit, portamHiLimit, 28, 118); - oldpos = map(constrain(lastBite,portamLoLimit,portamHiLimit), portamLoLimit, portamHiLimit, 28, 118); - if (pos!=oldpos){ - display.drawPixel(oldpos, 38, BLACK); - display.drawPixel(pos, 38, WHITE); - display.display(); - } - lastBite=biteSensor; - } - if ((state == PITCHB_ADJ_IDL) || (state == PITCHB_ADJ_THR) || (state == PITCHB_ADJ_MAX)){ - pos = map(constrain(pbUp, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); - oldpos = map(constrain(lastPbUp, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); - if (pos!=oldpos){ - display.drawPixel(oldpos, 38, BLACK); - display.drawPixel(pos, 38, WHITE); - redraw=1; - } - pos = map(constrain(pbDn, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); - oldpos = map(constrain(lastPbDn, pitchbLoLimit, pitchbHiLimit), pitchbLoLimit, pitchbHiLimit, 28, 118); - if (pos!=oldpos){ - display.drawPixel(oldpos, 38, BLACK); - display.drawPixel(pos, 38, WHITE); - redraw=1; - } - if (redraw){ - display.display(); - redraw=0; - } - lastPbUp=pbUp; - lastPbDn=pbDn; - } - if ((state == EXTRAC_ADJ_IDL) || (state == EXTRAC_ADJ_THR) || (state == EXTRAC_ADJ_MAX)){ - pos = map(constrain(exSensor, extracLoLimit, extracHiLimit), extracLoLimit, extracHiLimit, 28, 118); - oldpos = map(constrain(lastEx, extracLoLimit, extracHiLimit), extracLoLimit, extracHiLimit, 28, 118); - if (pos!=oldpos){ - display.drawPixel(oldpos, 38, BLACK); - display.drawPixel(pos, 38, WHITE); - display.display(); - } - lastEx=exSensor; - } -} - -void writeSetting(byte address, unsigned short value){ - union { - byte v[2]; - unsigned short val; - } data; - data.val = value; - EEPROM.write(address, data.v[0]); - EEPROM.write(address+1, data.v[1]); -} - -unsigned short readSetting(byte address){ - union { - byte v[2]; - unsigned short val; - } data; - data.v[0] = EEPROM.read(address); - data.v[1] = EEPROM.read(address+1); - return data.val; -} - -