Use settings flag for DAC output mode (remove CVSCALEBOARD define)

This commit is contained in:
John Stäck 2019-07-25 07:57:31 +02:00
parent 671dfe9b2c
commit 33bfc9ea08
4 changed files with 4 additions and 17 deletions

View file

@ -709,7 +709,7 @@ void loop() {
pixelUpdateTime = millis();
}
#if defined(CVSCALEBOARD) // pitch CV from DAC and breath CV from PWM on pin 6, for filtering and scaling on separate board
if(dacMode == DAC_MODE_PITCH) { // pitch CV from DAC and breath CV from PWM on pin 6, for filtering and scaling on separate board
targetPitch = (fingeredNote-24)*42;
if (portIsOn){
if (targetPitch > cvPitch){
@ -726,9 +726,9 @@ void loop() {
}
analogWrite(dacPin,constrain(cvPitch+map(pitchBend,0,16383,-84,84),0,4095));
analogWrite(pwmDacPin,breathCurve(map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,500,4095))); //starting at 0.6V to match use of cv from sensor, so recalibration of cv offset/scaler is not needed
#else // else breath CV on DAC pin, directly to unused pin of MIDI DIN jack
else if(dacMode == DAC_MODE_BREATH) { // else breath CV on DAC pin, directly to unused pin of MIDI DIN jack
analogWrite(dacPin,breathCurve(map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,0,4095)));
#endif
}
midiDiscardInput();

View file

@ -5,14 +5,9 @@
// Compile options, comment/uncomment to change
#define FIRMWARE_VERSION "1.3.9" // FIRMWARE VERSION NUMBER HERE <<<<<<<<<<<<<<<<<<<<<<<
//#define CASSIDY
#define CVSCALEBOARD
#define FIRMWARE_VERSION "1.4.0" // FIRMWARE VERSION NUMBER HERE <<<<<<<<<<<<<<<<<<<<<<<
#define ON_Delay 20 // Set Delay after ON threshold before velocity is checked (wait for tounging peak)
//#define touch_Thr 1200 // sensitivity for Teensy touch sensors
#define CCN_Port 5 // Controller number for portamento level
#define CCN_PortOnOff 65// Controller number for portamento on/off
@ -21,7 +16,6 @@
#define CC_INTERVAL 2
// MAybe move these to config.h (as defines?)
#define breathLoLimit 0
#define breathHiLimit 4095
#define portamLoLimit 700

View file

@ -1,4 +1,3 @@
#include <EEPROM.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
@ -156,10 +155,6 @@ void initDisplay() {
void showVersion() {
display.setTextColor(WHITE);
display.setTextSize(1);
#if defined(CVSCALEBOARD)
display.setCursor(15,0);
display.print("CV");
#endif
display.setCursor(85,52);
display.print("v.");
display.println(FIRMWARE_VERSION);

View file

@ -154,8 +154,6 @@ bool readEEPROM() {
if(trill3_interval<3 || trill3_interval > 4) trill3_interval = TRILL3_INTERVAL_FACTORY; //Deal with possible zero/bad values
//Flags stored in bit field
fastBoot = dipSwBits & (1<<DIPSW_FASTBOOT);
legacy = dipSwBits & (1<<DIPSW_LEGACY);