Dataset Viewer
Auto-converted to Parquet Duplicate
repo_id
stringclasses
4 values
file_path
stringlengths
42
73
content
stringlengths
58
14.1k
response
stringclasses
1 value
instruction
stringclasses
4 values
__index_level_0__
int64
0
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/voices.h
#include <cstdint> #ifndef __VOICES_H__ #define __VOICES_H__ void init_voices(); volatile bool note_on_flag_flag[NUM_VOICES_TOTAL]; uint32_t portamentoTimer[NUM_VOICES_TOTAL]; uint32_t portamentoStartMillis[NUM_VOICES_TOTAL]; uint32_t portamentoStartMicros[NUM_VOICES_TOTAL]; bool portamento = true; uint32_t portame...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/voices.ino
#include "include_all.h" void init_voices() { for (int i = 0; i < NUM_VOICES_TOTAL; i++) { VOICE_NOTES[i] = DCO_calibration_start_note; } initMultiplierTables(); setVoiceMode(); voice_task(); } inline void voice_task() { float calcPitchbend; if (midi_pitch_bend == 8192) { calcPitchbend = 0.0f...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/utils.ino
char * uintToStr( const uint64_t num, char *str ) { uint8_t i = 0; uint64_t n = num; do i++; while ( n /= 10 ); str[i] = '\0'; n = num; do str[--i] = ( n % 10 ) + '0'; while ( n /= 10 ); return str; } uint16_t linearToLogarithmic(uint16_t linearValue, float base, uint16_t maxValue) {...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/params.ino
inline void update_parameters(byte paramNumber, int16_t paramValue) { switch (paramNumber) { case 5: sqr1Status = paramValue; // update_waveSelector(4); break; case 10: ADSR3ToOscSelect = paramValue; break; case 11: LFO1Waveform = paramValue; LFO1_class.setWaveFo...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/autotune.h
#ifndef __AUTOTUNE_H__ #define __AUTOTUNE_H__ #include "include_all.h" bool calibrationFlag = false; bool manualCalibrationFlag = false; bool firstTuneFlag = false; uint8_t manualCalibrationStage; int8_t manualCalibrationOffset[NUM_OSCILLATORS] = {0,0,0,0,0,0,0,0}; /************************************************/ ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/autotune.ino
#include "include_all.h" void init_DCO_calibration() { currentDCO = 0; VOICE_NOTES[0] = DCO_calibration_start_note; DCO_calibration_current_note = DCO_calibration_start_note; arrayPos = 0; calibrationData[arrayPos] = 0; calibrationData[arrayPos + 1] = ampCompLowestFreqVal; arrayPos += 2; calibratio...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/globals.h
#include <cstddef> #ifndef __GLOBALS_H__ #define __GLOBALS_H__ //#include "include_all.h" #define NUM_VOICES_TOTAL 4 #define NUM_OSCILLATORS NUM_VOICES_TOTAL * 2 #define MIDI_CHANNEL 1 //#define USE_ADC_STACK_VOICES // gpio 28 (adc 2) //#define USE_ADC_DETUNE // gpio 27 (adc 1) #define SCK 2 #define MOSI 3 #d...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/PID.h
#ifndef __PID_H__ #define __PID_H__ #include <PID_v1.h> double PIDSetpoint = 0, PIDInput, PIDOutput; // double aggKp=0.01, aggKi=0.06, aggKd=0.0012; // double midKp=0.008, midKi=0.05, midKd=0.0009; // double consKp=0.006, consKi=0.04, consKd=0.0007; double PIDKMultiplier = 2; double aggKp = 0.0008 * PIDKMultiplier,...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/pico-dco.pio
.program frequency .side_set 1 opt .wrap_target lp0: jmp x-- lp0 mov x, OSR side 0 lp1: jmp x-- lp1 pull_1: mov x, OSR lp2: jmp x-- lp2 pull_2: mov x, OSR lp3: jmp x-- lp3 pull_3: mov x, OSR lp4: jmp x-- lp4 pull_4: mov x, OSR lp5: jmp x-- lp5 pull_5: mov x, OSR lp6: jmp x-- lp6 pull_6: mov...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/pico-dco.pio.h
// -------------------------------------------------- // // This file is autogenerated by pioasm; do not edit! // // -------------------------------------------------- // #pragma once #if !PICO_NO_HARDWARE #include "hardware/pio.h" #endif // --------- // // frequency // // --------- // #define frequency_wrap_target...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/midi.h
#ifndef __MIDI_H_H__ #define __MIDI_H_H__ #include <MIDI.h> Adafruit_USBD_MIDI usb_midi; MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDI_USB); MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI_SERIAL); void init_midi(); #endif
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/midi.ino
void init_midi() { MIDI_USB.begin(MIDI_CHANNEL_OMNI); MIDI_USB.setHandleNoteOn(handleNoteOn); MIDI_USB.setHandleNoteOff(handleNoteOff); MIDI_USB.setHandleControlChange(handleControlChange); MIDI_USB.setHandleProgramChange(handleProgramChange); MIDI_USB.setHandlePitchBend(handlePitchBend); MIDI_SERIAL.b...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/noteList.h
#ifndef __NOTE_LIST_H__ #define __NOTE_LIST_H__ #define NOTE_C_1 8.176 #define NOTE_CS_1 8.662 #define NOTE_D_1 9.177 #define NOTE_DS_1 9.723 #define NOTE_E_1 10.301 #define NOTE_F_1 10.913 #define NOTE_FS_1 11.562 #define NOTE_G_1 12.250 #define NOTE_GS_1 12.978 #define NOTE_A_1 13.750 #define NOTE_AS_1 14.568 #defin...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/PWM.ino
void init_pwm() { for (int i = 0; i < NUM_VOICES_TOTAL * 2; i++) { gpio_set_function(RANGE_PINS[i], GPIO_FUNC_PWM); RANGE_PWM_SLICES[i] = pwm_gpio_to_slice_num(RANGE_PINS[i]); pwm_set_wrap(RANGE_PWM_SLICES[i], DIV_COUNTER); pwm_set_enabled(RANGE_PWM_SLICES[i], true); } for (int i = 0; i < NUM_V...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/LFO.ino
void init_LFOs() { init_LFO1(); init_LFO2(); } void init_DRIFT_LFOs() { for (int i = 0; i < NUM_OSCILLATORS; i++) { init_DRIFT_LFO(LFO_DRIFT_CLASS[i], LFO_DRIFT_CC, i); } } void init_DRIFT_LFO(lfo &LFO, int CC, byte LFONumber) { LFO_DRIFT_SPEED_OFFSET[LFONumber] = (float)(1.00f - (float)((float)analogDr...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/irq_tuner.h
#ifndef __IRQ_TUNER_H__ #define __IRQ_TUNER_H__ #define IRQ_TUNER_MAX_SAMPLES 16 volatile uint16_t irqTunerSamples; volatile uint64_t irqTunerSamplesBuffer[IRQ_TUNER_MAX_SAMPLES]; uint tuner_slice_num; #define MFPIN 11 #endif
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/PID.ino
#include "include_all.h" void init_PID() { //initialize the variables we're linked to PIDInput = -2000; PIDSetpoint = 0; myPID.SetMode(AUTOMATIC); } bool PID_dco_calibration() { PIDInput = (double)constrain(DCO_calibration_difference, -1500, 1500); double PIDgap = abs(PIDSetpoint - PIDInput); //distanc...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/LFO.h
#ifndef __LFO_H__ #define __LFO_H__ #include <lfo.h> // required for function generation //static constexpr uint16_t PWM_CC = 4096; static constexpr uint16_t LFO1_CC = 1000; static constexpr uint16_t LFO1_CC_HALF = LFO1_CC / 2; static constexpr uint16_t LF01_CC_THIRD = LFO1_CC / 3; static constexpr uint16_t LFO2_CC ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/FS.h
#ifndef __FS_H__ #define __FS_H__ static constexpr uint16_t FSVoiceDataSize = 22 * 2 * 4; static constexpr uint16_t FSPWDataSize = 2; static constexpr uint16_t FSBankSize = FSVoiceDataSize * NUM_OSCILLATORS; static constexpr uint16_t FSPWBankSize = FSPWDataSize * NUM_VOICES_TOTAL; static constexpr uint16_t chanLeve...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/FS.ino
#include "include_all.h" void init_FS() { LittleFS.begin(); if (!LittleFS.exists("voiceTables")) { fileVoiceTablesFS = LittleFS.open("voiceTables", "w+"); } else { fileVoiceTablesFS = LittleFS.open("voiceTables", "r"); } #ifdef ENABLE_FS_CALIBRATION fileVoiceTablesFS.read(voiceTablesBankBuffer, FSB...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/DCO4_DCO.ino
// #include <stdint.h> // #include <stdio.h> // #include <stdlib.h> // #include <math.h> #include <Adafruit_TinyUSB.h> #include <MIDI.h> //#include "tusb_config.h" #include "pico/stdlib.h" // #include "hardware/pio.h" #include "hardware/clocks.h" #include "pico-dco.pio.h" #include "hardware/pwm.h" // #include "hardw...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/adsr.ino
void init_ADSR() { adsrCreateTables(ADSR_1_CC, ARRAY_SIZE); for (int i = 0; i < LIN_TO_EXP_TABLE_SIZE; i++) { linToLogLookup[i] = linearToLogarithmic(i, 10, maxADSRControlValue); } for (int i = 0; i < NUM_VOICES_TOTAL; i++) { ADSRVoices[i].adsr1_voice.setAttack(ADSR1_attack); // initialize att...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/amp_comp.h
#ifndef __AMP_COMP_H__ #define __AMP_COMP_H__ #include "include_all.h" static constexpr int ampCompTableSize = 22; int32_t freq_to_amp_comp_array[352]; uint8_t ampCompArraySize = FSVoiceDataSize / 4; // Arrays to store the precomputed coefficients float aCoeff[NUM_OSCILLATORS][ampCompTableSize - 2]; float bCoeff[NU...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/include_all.h
#ifndef __INCLUDE_ALL__H_ #define __INCLUDE_ALL__H_ #include <Adafruit_TinyUSB.h> #include <MIDI.h> //#include "tusb_config.h" #include "pico/stdlib.h" // #include "hardware/pio.h" #include "hardware/clocks.h" #include "pico-dco.pio.h" #include "hardware/pwm.h" // #include "hardware/spi.h" #include "LittleFS.h" //#i...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/Serial.ino
void init_serial() { // init serial midi Serial1.setFIFOSize(256); Serial1.setPollingMode(true); Serial1.setRX(1); Serial1.setTX(0); Serial1.begin(31250); Serial2.setFIFOSize(512); Serial2.setPollingMode(false); Serial2.setRX(21); Serial2.setTX(20); Serial2.begin(2500000); Serial.begin(200000...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/Timer_millis.h
#ifndef __TIMERS_MILLIS_H__ #define __TIMERS_MILLIS_H__ unsigned long timer99micros = 0; unsigned long timer223micros = 0; unsigned long timer1ms = 0; // unsigned long timer2340micros = 0; // unsigned long timer3543micros = 0; // unsigned long timer5ms = 0; // unsigned long timer11ms = 0; // unsigned long timer23ms = ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/Timer_millis.ino
inline void millisTimer() { timer99microsFlag = 0; timer223microsFlag = 0; timer1msFlag = 0; // timer2340microsFlag = 0; // timer3543microsFlag = 0; // timer5msFlag = 0; // timer11msFlag = 0; // timer23msFlag = 0; // timer31msFlag = 0; // timer67msFlag = 0; timer200msFlag = 0; // timer500msFla...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/adsr.h
#ifndef __ADSR_H__ #define __ADSR_H__ #define ADSR_1_DACSIZE 4000 #define ARRAY_SIZE 512 #define LIN_TO_EXP_TABLE_SIZE ADSR_1_DACSIZE + 1 uint16_t linToExpLookup[LIN_TO_EXP_TABLE_SIZE]; uint16_t linToLogLookup[LIN_TO_EXP_TABLE_SIZE]; uint16_t maxADSRControlValue = ADSR_1_DACSIZE; struct Point { float x, y; }; i...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/PWM.h
#ifndef __PWM_H__ #define __PWM_H__ void init_pwm(); #endif
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/Serial.h
#ifndef __SERIAL_H__ #define __SERIAL_H__ void init_serial(); #endif
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/state_machines.h
#ifndef __STATE_MACHINES_H__ #define __STATE_MACHINES_H__ void init_pio(); #endif
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/state_machines.ino
void init_pio() { offset[0] = pio_add_program(pio[0], &frequency_sync_program); offset[1] = pio_add_program(pio[1], &frequency_sync_program); // offset[0] = pio_add_program(pio[0], &frequency_program); // offset[1] = pio_add_program(pio[1], &frequency_program); start_voice_sms(); } void start_voice_sms() { ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/tusb_config.h
#ifndef _TUSB_CONFIG_H_ #define _TUSB_CONFIG_H_ #ifdef __cplusplus extern "C" { #endif //-------------------------------------------------------------------- // COMMON CONFIGURATION //-------------------------------------------------------------------- // defined by compiler flags for flexibility #ifndef CFG_TUSB_MCU...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/utils.h
#ifndef __UTILS_H__ #define __UTILS_H__ long map(long x, long in_min, long in_max, long out_min, long out_max); char * uintToStr( const uint64_t num, char *str ); #endif
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/autotune2.ino
void find_PW_low_limit() { DCO_calibration_current_note = DCO_calibration_start_note; VOICE_NOTES[0] = DCO_calibration_current_note; uint16_t targetGap = 1000000.00f / sNotePitches[DCO_calibration_current_note - 12] * 0.01; currentNoteCalibrationStart = micros(); DCOCalibrationStart = millis()...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/PID2.ino
void calibrate_DCO() { double tolerance; // minGap uint16_t minAmpComp; // Lower Limit uint16_t maxAmpComp; // Higher Limit int rangeSamples = 2; // Number of measurements to store around the sign change const int numPresetVoltages = chanLevelVoiceDataSize; for (int j = 4; j < num...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/voices_autotune.ino
// PER OSCILLATOR AUTOTUNE FUNCTION void voice_task_autotune(uint8_t taskAutotuneVoiceMode, uint16_t calibrationValue) { float freq; uint8_t note1; // = 57; int chanLevel = ampCompCalibrationVal; if (VOICE_NOTES[0] > 0) { note1 = VOICE_NOTES[0] - 12; } if (taskAutotuneVoiceMode == ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/voices_functions.ino
inline uint8_t get_free_voice_sequential() { uint8_t nextVoice; uint8_t freeVoices = 0; if (VOICES[VOICES_LAST_SEQUENCE[NUM_VOICES_TOTAL - 1]] == 1 || VOICES[VOICES_LAST_SEQUENCE[NUM_VOICES_TOTAL - 1]] == 0) { for (int voiceIndex = NUM_VOICES_TOTAL - 1; voiceIndex > 0; voiceIndex--) { if (V...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_DCO_Controller
DCO4-ARDUINO/DCO4/DCO4_DCO_Controller/autotune3.ino
void DCO_calibration_debug() { samplesNumber = 12; edgeDetectionLastTime = micros(); while (samplesCounter < samplesNumber) { bool val = digitalRead(DCO_calibration_pin); microsNow = micros(); if ((microsNow - edgeDetectionLastTime) > 100000) { pulseCounter = 0; ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_DCO_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/LED_control.ino
void init_LED_control() { pinMode(PIN_LATCH, OUTPUT); pinMode(PIN_DATA, OUTPUT); pinMode(PIN_CLK, OUTPUT); LED_Control_Mux.begin(PIN_DATA, PIN_LATCH, PIN_CLK, -1); LED_Control_Mux.setBrightness(20); LED_Control_Mux.allOff(); } void set_LED_Status(byte LEDNumber, byte LEDStatus) { if (LEDNumber == 16) { ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/LED_control.h
#ifndef __LED_CONTROL_H__ #define __LED_CONTROL_H__ #include <RoxMux.h> Rox74HC595<2> LED_Control_Mux; // pins for 74HC595 // #define PIN_DATA PE_4 // pin 14 on 74HC595 (DATA) / DS // #define PIN_LATCH PE_2 // pin 12 on 74HC595 (LATCH) / ST // #define PIN_CLK PE_3 // pin 11 on 74HC595 (CLK) / SH #def...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/include_all.h
#ifndef __INCLUDE_ALL_H__ #define __INCLUDE_ALL_H__ #include "Arduino.h" //#include <Adafruit_TinyUSB.h> #include "params.h" //#include "auxiliary.h" #include "Timers_millis.h" #include "Serial.h" #include "buttons.h" #include "encoders.h" #include "Controls.h" #include "formulas.h" #include "FS.h" #include "L...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/auxiliary.h
#ifndef __AUX_H__ #define __AUX_H__ #include <SimpleKalmanFilter.h> static constexpr float e_mea = 30; // Measurement Uncertainty static constexpr float e_est = 25; // Estimation Uncertainty static constexpr float q_value = 0.02; // Process Noise static constexpr float e_mea_2 = 2; // Measurement Uncertainty...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/auxiliary.ino
void init_tables() { for (int i = 0; i < LIN_TO_EXP_TABLE_SIZE; i++) { linToExpLookup[i] = linearToExponential(i, 50, maxADSRControlValue); } }
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/buttons.h
#ifndef __BUTTONS_H__ #define __BUTTONS_H__ #define NUM_BUTTONS 16 bool buttonIsLatched[NUM_BUTTONS]; enum ButtonState { BTN_STATE_NONE, RELEASED, PRESSED, HELD, DOUBLE }; enum ButtonAction { BTN_ACTION_NONE, TG_SAW1, TG_SAW2, TG_TRI, TG_SIN, TG_SQR1, TG_SQR2, TG_SYNC_MODE, TG_RESO_AM...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/buttons.ino
void read_encoder_buttons() { if ((millis() - buttonActionSelectedMillis) > buttonActionSelectedTimeout) { buttonActionSelected = BTN_ACTION_NONE; buttonActionIsSelected = false; } for (int i = 0; i < NUM_BUTTONS; i++) { ButtonStruct& button = buttons[i]; currentButtonAction = BTN_ACTION_NONE; ...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/Controls.h
#ifndef __CONTROLS_H__ #define __CONTROLS_H__ #include <RoxMux_fela.h> //#include <light_CD74HC4067.h> #include <MD_REncoder_fela.h> #include <CD74HC4067.h> //#include "analogmuxdemux.h" // #define PIN_SAW1 42 // #define PIN_SAW2 42 // #define PIN_TRI 42 // #define PIN_SIN 42 #define muxAnalog_PIN_CH0 21 #define mux...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/Controls.ino
void init_controls() { analogReadResolution(12); enc1.begin(); enc2.begin(); enc3.begin(); enc4.begin(); enc5.begin(); enc6.begin(); enc7.begin(); enc8.begin(); enc9.begin(); enc10.begin(); enc11.begin(); pinMode(digitalMUX1_PIN_SIG0, INPUT); pinMode(digitalMUX2_PIN_SIG0, INPUT); pinMode...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/encoders.h
#ifndef __ENCODERS_H__ #define __ENCODERS_H__ enum EncoderAction { ACTION_NONE, ACTION_portamento_time, ACTION_LFO1_to_DCO, ACTION_VCF_keytrack, ACTION_velocity_to_VCF, ACTION_velocity_to_VCA, ACTION_SQR1_level, ACTION_SQR2_level, ACTION_SUB_level, ACTION_octave, ACTION_OSC2_interval, ACT...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/params.h
#ifndef __PARAMS_H__ #define __PARAMS_H__ byte noteStart[NUM_VOICES]; byte noteEnd[NUM_VOICES]; byte velocity[NUM_VOICES]; byte note[NUM_VOICES]; byte voiceMode = 0; byte syncMode = 0; byte currentVoice = 0; int16_t unisonDetune = 0; int16_t analogDrift = 0; int16_t analogDriftSpeed = 0; int16_t analogDriftSpread = 0...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
DCO4/DCO4_Input_Controller
DCO4-ARDUINO/DCO4/DCO4_Input_Controller/DCO4_Input_Controller.ino
#include "Arduino.h" //#include <Adafruit_TinyUSB.h> #define NUM_VOICES 4 #define NUM_OSCILLATORS NUM_VOICES * 2 int8_t OSC1Interval = 24; int8_t OSC2Interval = 24; int16_t OSC2Detune = 0; float DETUNE1; float DETUNE2; uint16_t PW; int16_t SubLevel; int16_t SQR1Level; int16_t SQR2Level; uint16_t RESONANCE; uint16_...
You are an Arduino coding assistant. Next code is from project named DCO4/DCO4_Input_Controller
0
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
1