├── .gitignore ├── hardware ├── teensy-fx.dcm ├── board.png ├── teensy4.png ├── schematic.pdf ├── graphics │ ├── lab.png │ └── labyrinth.cfdg ├── schematic_audio4.png ├── .gitignore ├── teensy-fx-2020-01-12-fab.zip ├── teensy-fx-2020-02-10-fab.zip ├── config.rc ├── sym-lib-table ├── fp-lib-table ├── audio-fx.pretty │ ├── Potentiometer_Alps_RK09L_Single_Vertical.kicad_mod │ ├── Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal.kicad_mod │ ├── teensy4smt.kicad_mod │ └── back-graphic.kicad_mod ├── teensy-fx-bom.csv ├── teensy-fx.lib ├── teensy-fx.pro ├── teensy-fx-cache.lib └── SGTL5000.sch ├── docs ├── gui.png ├── input.PNG ├── patch.png ├── output.PNG ├── i2s-clock.PNG ├── lrclk-bclk-swap.png ├── po-sync-120bpm.PNG ├── po-sync-pulse.PNG ├── noise.md └── PO_sync_mode.md ├── Makefile ├── kitspace.yaml ├── fx-control ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── fx-control.pro └── mainwindow.ui ├── .gitmodules ├── lib ├── Control │ └── src │ │ ├── Control.h │ │ └── Control.cpp ├── LEDS │ └── src │ │ ├── LEDS.h │ │ ├── gamma.py │ │ └── LEDS.cpp ├── Pots │ └── src │ │ ├── Pots.h │ │ └── Pots.cpp ├── Button │ └── src │ │ ├── Button.h │ │ └── Button.cpp └── BarTimer │ └── src │ ├── BarTimer.h │ └── BarTimer.cpp ├── platformio.ini ├── binaries └── README.md ├── test └── test_desktop │ └── test_leds.cpp ├── README.md ├── effect_reverb.cpp ├── control.py ├── src └── fx.ino └── effect_freeverb.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | *pkl 3 | *swp 4 | include 5 | *user 6 | teensy-beats 7 | -------------------------------------------------------------------------------- /hardware/teensy-fx.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | #End Doc Library 4 | -------------------------------------------------------------------------------- /docs/gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/gui.png -------------------------------------------------------------------------------- /docs/input.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/input.PNG -------------------------------------------------------------------------------- /docs/patch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/patch.png -------------------------------------------------------------------------------- /docs/output.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/output.PNG -------------------------------------------------------------------------------- /docs/i2s-clock.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/i2s-clock.PNG -------------------------------------------------------------------------------- /hardware/board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/board.png -------------------------------------------------------------------------------- /hardware/teensy4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/teensy4.png -------------------------------------------------------------------------------- /docs/lrclk-bclk-swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/lrclk-bclk-swap.png -------------------------------------------------------------------------------- /docs/po-sync-120bpm.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/po-sync-120bpm.PNG -------------------------------------------------------------------------------- /docs/po-sync-pulse.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/docs/po-sync-pulse.PNG -------------------------------------------------------------------------------- /hardware/schematic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/schematic.pdf -------------------------------------------------------------------------------- /hardware/graphics/lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/graphics/lab.png -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | prog: 2 | pio run --target upload --upload-port /dev/ttyACM0 3 | 4 | debug: 5 | pio device monitor 6 | -------------------------------------------------------------------------------- /hardware/schematic_audio4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/schematic_audio4.png -------------------------------------------------------------------------------- /kitspace.yaml: -------------------------------------------------------------------------------- 1 | bom: hardware/teensy-fx-bom.csv 2 | eda: 3 | type: kicad 4 | pcb: hardware/teensy-fx.kicad_pcb 5 | -------------------------------------------------------------------------------- /hardware/.gitignore: -------------------------------------------------------------------------------- 1 | *bak 2 | *.STEP 3 | auto-fab 4 | bom 5 | *log 6 | *net 7 | *xml 8 | fp-info-cache 9 | oldlib 10 | -------------------------------------------------------------------------------- /hardware/teensy-fx-2020-01-12-fab.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/teensy-fx-2020-01-12-fab.zip -------------------------------------------------------------------------------- /hardware/teensy-fx-2020-02-10-fab.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mattvenn/teensy-audio-fx/HEAD/hardware/teensy-fx-2020-02-10-fab.zip -------------------------------------------------------------------------------- /hardware/config.rc: -------------------------------------------------------------------------------- 1 | ; pcb config 2 | [board] 3 | mask_color = black 4 | silk_color = white 5 | material = FR4 6 | thickness = 1.6 7 | layers = 4 8 | copper = 35um 9 | 10 | [meta] 11 | name = teensy fx 12 | 13 | -------------------------------------------------------------------------------- /fx-control/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | MainWindow w; 8 | w.show(); 9 | 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /hardware/sym-lib-table: -------------------------------------------------------------------------------- 1 | (sym_lib_table 2 | (lib (name teensy)(type Legacy)(uri ${KIPRJMOD}/teensy_library/teensy.lib)(options "")(descr "")) 3 | (lib (name teensy-fx)(type Legacy)(uri ${KIPRJMOD}/teensy-fx.lib)(options "")(descr "")) 4 | ) 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "hardware/teensy_library"] 2 | path = hardware/teensy_library 3 | url = git@github.com:XenGi/teensy_library.git 4 | [submodule "hardware/teensy.pretty"] 5 | path = hardware/teensy.pretty 6 | url = git@github.com:XenGi/teensy.pretty.git 7 | -------------------------------------------------------------------------------- /fx-control/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | MainWindow::MainWindow(QWidget *parent) : 5 | QMainWindow(parent), 6 | ui(new Ui::MainWindow) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | MainWindow::~MainWindow() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /docs/noise.md: -------------------------------------------------------------------------------- 1 | # Noise and clock measurements 2 | 3 | ## I2S 12MHz clock 4 | 5 | ![i2s clock and fft](i2s-clock.PNG) 6 | 7 | ## Noise on input jack, nothing plugged in 8 | 9 | ![input jack](input.PNG) 10 | 11 | ## Noise on output jack, nothing plugged in, nothing playing 12 | 13 | ![output jack](output.PNG) 14 | -------------------------------------------------------------------------------- /hardware/fp-lib-table: -------------------------------------------------------------------------------- 1 | (fp_lib_table 2 | (lib (name teensy_library)(type KiCad)(uri ${KIPRJMOD}/teensy_library)(options "")(descr "")(disabled)) 3 | (lib (name teensy)(type KiCad)(uri ${KIPRJMOD}/teensy.pretty)(options "")(descr "")) 4 | (lib (name audio-fx)(type KiCad)(uri ${KIPRJMOD}/audio-fx.pretty)(options "")(descr "")) 5 | ) 6 | -------------------------------------------------------------------------------- /fx-control/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class MainWindow; 8 | } 9 | 10 | class MainWindow : public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit MainWindow(QWidget *parent = 0); 16 | ~MainWindow(); 17 | 18 | private: 19 | Ui::MainWindow *ui; 20 | }; 21 | 22 | #endif // MAINWINDOW_H 23 | -------------------------------------------------------------------------------- /docs/PO_sync_mode.md: -------------------------------------------------------------------------------- 1 | # PO sync mode 2 | 3 | looks for full amp sync pulse on 1/8 notes on left channel. 4 | 5 | ## sync pulse 6 | 7 | * DC, 1v peak 8 | * 2.7ms long pulse 9 | 10 | ![sync pulse](po-sync-pulse.PNG) 11 | 12 | ## 2 sync pulses @ 120bpm 13 | 14 | * showing 250ms spacing 15 | * 120bpm is 2bps, so 8 pulses per bar of 16 steps 16 | * 1 pulse every 2 steps 17 | 18 | ![sync pulses at 120bpm](po-sync-120bpm.PNG) 19 | -------------------------------------------------------------------------------- /lib/Control/src/Control.h: -------------------------------------------------------------------------------- 1 | #ifndef Control_H 2 | #define Control_H 3 | 4 | #define MAX_POT 1024 5 | #define MAX_STEPS 512 6 | 7 | //#define DEBUG 8 | 9 | class Control { 10 | 11 | public: 12 | Control() {}; 13 | void set_val(int val, int step, bool changed, bool write, bool erase); 14 | float get_val(int step); 15 | int get_led_val(int step); 16 | 17 | private: 18 | int _val[MAX_STEPS] = {0}; 19 | bool _writing = false; 20 | #ifdef DEBUG 21 | char _buf [80]; 22 | #endif 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /platformio.ini: -------------------------------------------------------------------------------- 1 | ;PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:teensy40] 12 | platform = teensy 13 | board = teensy40 14 | framework = arduino 15 | test_ignore = test_desktop 16 | 17 | [env:native] 18 | platform = native 19 | -------------------------------------------------------------------------------- /lib/LEDS/src/LEDS.h: -------------------------------------------------------------------------------- 1 | #ifndef LEDS_H 2 | #define LEDS_H 3 | 4 | #define NUM_LEDS 24 5 | // if you change MAX_LED, make sure to regenerate gamma.h 6 | #define MAX_LED 4095 7 | 8 | class LEDS { 9 | 10 | public: 11 | LEDS(int data_p, int clk_p, int latch_p, int blank_p); 12 | LEDS() {}; 13 | void set_data(int led, int val); // gamma correct? 14 | int get_data(int led); 15 | void send(); 16 | 17 | private: 18 | int _led_data [NUM_LEDS] = {0}; 19 | int _data_p, _clk_p, _latch_p, _blank_p; 20 | void send_bit (bool bit); 21 | void send_latch(bool latch); 22 | void send_blank(bool blank); 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /lib/Pots/src/Pots.h: -------------------------------------------------------------------------------- 1 | #ifndef Pots_H 2 | #define Pots_H 3 | 4 | #define NUM_POTS 12 5 | #define POT_MUX_PINS 4 6 | 7 | class Pots { 8 | 9 | public: 10 | Pots(int mux0_p, int mux1_p, int mux2_p, int mux3_p, int pot_p); 11 | Pots() {}; 12 | void update(); 13 | int get_value(int pot); 14 | bool changed(int pot); 15 | 16 | private: 17 | int _pot_data [NUM_POTS] = {0}; 18 | int _old_pot_data [NUM_POTS] = {0}; 19 | int _pot_mux_addr_p[POT_MUX_PINS]; 20 | int _pot_p; 21 | float EMA_a = 0.3; //initialization of EMA alpha 22 | int _pot_map [NUM_POTS] = { 0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11 }; // pots are in a funny order because I wanted to make the routing easier on the PCB 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /lib/LEDS/src/gamma.py: -------------------------------------------------------------------------------- 1 | ## Creates a gamma-corrected lookup table 2 | import math 3 | 4 | def gamma(nsteps, gamma): 5 | gammaedUp = [math.pow(x, gamma) for x in range(nsteps)] 6 | return [x/max(gammaedUp) for x in gammaedUp] 7 | 8 | def rounder(topValue, gammas): 9 | return [min(topValue, round(x*topValue)) for x in gammas] 10 | 11 | if __name__ == "__main__": 12 | myGamma = 2.3 13 | steps = 2 ** 12 14 | max_val = steps - 1 15 | output = file("gamma.h", "w") 16 | output.write("/* %d-step brightness table: gamma = %s */ \n\n" % (steps, myGamma)) 17 | output.write("const int gamma_table[%d] = {\n" % steps) 18 | for value in rounder(max_val, gamma(steps, myGamma)): 19 | output.write("\t %d,\n" % value) 20 | output.write("};\n") 21 | output.close() 22 | 23 | 24 | -------------------------------------------------------------------------------- /hardware/graphics/labyrinth.cfdg: -------------------------------------------------------------------------------- 1 | /* 2 | Labyrinth 3 | 4 | By AK, October 2009 5 | 6 | Variants: most 7 | */ 8 | 9 | startshape START 10 | size { s 2.2} 11 | background { b -.5} 12 | 13 | rule START{ 14 | 2* {s -1} SQUARE [ s 1.1 x .5 y .5 z -5] 15 | 2* {s -1} SQUARE [ s 1.1 x .5 y -.5 z -5 b 1] 16 | 2* {s -1} CIRCLE [ x 1.2 z -4 s .5] 17 | 2* {s -1} CIRCLE [ y 1.2 z -4 s .5 b 1] 18 | CIRCLE { z -3 b .8 } 19 | S{ |sat .26 h -60} 20 | } 21 | rule S { 22 | FOUR{} 23 | S{ r .9 s .999 sat .0005| h 1.1 b .0002} 24 | } 25 | rule S 0.002{ W{}} 26 | 27 | rule W { 28 | 12* { r .9 s .999 h 1.1} FOUR{r 90 z -1 h 90} 29 | S{ r (.9*12) s (.999^12) h (1.1*12)} 30 | } 31 | 32 | rule FOUR{ 33 | CIRCLE { s .101 x 1 } 34 | CIRCLE { s .101 x -1 } 35 | CIRCLE { s .101 y 1 b 1 h 180} 36 | CIRCLE { s .101 y -1 b 1} 37 | } -------------------------------------------------------------------------------- /binaries/README.md: -------------------------------------------------------------------------------- 1 | # sáb 18 sep 2021 18:36:15 CEST 2 | 3 | * switched from stereo freeverb to Eric's adjusted mono reverb. Doesn't have damping but sounds a lot better. 4 | 5 | # lun 03 may 2021 22:29:35 CEST 6 | 7 | * added an average for beat_ms because slight changes in detected incoming sync would change delay size by a few ms, leading to unwanted 8 | audio artifacts 9 | * slightly increased max noise value 10 | * fixed un-updated freeverb effect with local one 11 | 12 | # dom 02 may 2021 14:32:25 CEST 13 | 14 | * Added delay sync mode. This uses multiples of the synced BPM to generate the delay times. 15 | * The 2 delay knobs now set between 1 and 16 multiples of the beat time. 16 | * Mode is enabled by default. 17 | * Press and hold 'set to 1' key to toggle on and off. 18 | * Max delay is limited to MAX_DELAY (currently 1200ms). 19 | 20 | * Delayed white noise level was too loud so reduced noise amount to half what it was. 21 | 22 | -------------------------------------------------------------------------------- /lib/Button/src/Button.h: -------------------------------------------------------------------------------- 1 | #ifndef Button_H 2 | #define Button_H 3 | 4 | #define LONG_HOLD 500 5 | 6 | class Button { 7 | 8 | public: 9 | Button(int b_p); //, int erase_p, int set_one_p, int tap_tempo_p); 10 | void update(); 11 | bool pressed(); 12 | bool was_pressed(); 13 | bool long_hold(); 14 | /* 15 | bool get_write(); 16 | bool get_erase(); 17 | bool get_set_one(); 18 | bool get_tap_tempo(); 19 | */ 20 | 21 | private: 22 | int _b_p; 23 | int _hold_time; 24 | unsigned long _start_hold; 25 | bool _b; 26 | bool _long_hold = false; 27 | bool _was_pressed = false; 28 | /* 29 | bool _write; 30 | bool _erase; 31 | bool _tap_tempo; 32 | bool _set_one; 33 | 34 | int _write_p; 35 | int _erase_p; 36 | int _tap_tempo_p; 37 | int _set_one_p; 38 | */ 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /lib/Control/src/Control.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef ARDUINO 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | void Control::set_val(int val, int step, bool changed, bool write, bool erase) { 11 | if(write && changed) 12 | _writing = true; 13 | else if(!write) 14 | _writing = false; 15 | 16 | if(_writing) { 17 | _val[step] = val; 18 | #ifdef DEBUG 19 | sprintf(_buf, "write %d at %d", val, step); 20 | Serial.println(_buf); 21 | #endif 22 | } 23 | else if(changed || erase) 24 | { 25 | for(int s = 0; s < MAX_STEPS; s ++) 26 | _val[s] = val; 27 | #ifdef DEBUG 28 | sprintf(_buf, "set all to %d", val); 29 | Serial.println(_buf); 30 | #endif 31 | } 32 | } 33 | 34 | float Control::get_val(int step) { 35 | return float(_val[step]) / MAX_POT; 36 | } 37 | 38 | int Control::get_led_val(int step) { 39 | return _val[step] * (MAX_LED / MAX_POT); 40 | } 41 | -------------------------------------------------------------------------------- /lib/Button/src/Button.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef ARDUINO 4 | #include 5 | #else 6 | #include 7 | #endif 8 | 9 | Button::Button(int b_p) { 10 | _b_p = b_p; 11 | 12 | #ifdef ARDUINO 13 | pinMode(_b_p, INPUT_PULLUP); 14 | #endif 15 | } 16 | 17 | void Button::update() { // need to debounce this at some point 18 | #ifdef ARDUINO 19 | // active low 20 | _b = !digitalRead(_b_p); 21 | #endif 22 | } 23 | 24 | bool Button::long_hold() { 25 | if(_b) 26 | _hold_time = millis() - _start_hold; 27 | else { 28 | _start_hold = millis(); 29 | _long_hold = false; 30 | } 31 | 32 | if(_b && _hold_time > LONG_HOLD && _long_hold == false) { 33 | _long_hold = true; 34 | return true; 35 | } 36 | 37 | return false; 38 | } 39 | 40 | bool Button::was_pressed() { 41 | if(_b && _was_pressed == false) { 42 | _was_pressed = true; 43 | return true; 44 | } 45 | 46 | if(!_b) 47 | _was_pressed = false; 48 | 49 | return false; 50 | } 51 | 52 | bool Button::pressed() { 53 | return _b; 54 | } 55 | -------------------------------------------------------------------------------- /fx-control/fx-control.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-12-27T20:34:18 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 10 | 11 | TARGET = fx-control 12 | TEMPLATE = app 13 | 14 | # The following define makes your compiler emit warnings if you use 15 | # any feature of Qt which has been marked as deprecated (the exact warnings 16 | # depend on your compiler). Please consult the documentation of the 17 | # deprecated API in order to know how to port your code away from it. 18 | DEFINES += QT_DEPRECATED_WARNINGS 19 | 20 | # You can also make your code fail to compile if you use deprecated APIs. 21 | # In order to do so, uncomment the following line. 22 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 23 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 24 | 25 | 26 | SOURCES += \ 27 | main.cpp \ 28 | mainwindow.cpp 29 | 30 | HEADERS += \ 31 | mainwindow.h 32 | 33 | FORMS += \ 34 | mainwindow.ui 35 | -------------------------------------------------------------------------------- /lib/BarTimer/src/BarTimer.h: -------------------------------------------------------------------------------- 1 | #ifndef BarTimer_H 2 | #define BarTimer_H 3 | 4 | #define DEFAULT_BPM 120 5 | #define NUM_TAPS 4 6 | #define TAP_TIMEOUT 1000 7 | #define SYNC_STEPS 32 8 | 9 | #define WINDOW_SIZE 8 10 | 11 | enum SyncMode { 12 | TAP, 13 | SYNC, 14 | }; 15 | 16 | class BarTimer { 17 | 18 | public: 19 | BarTimer() {}; 20 | void update(); 21 | void tap_tempo(); 22 | void sync_tempo(); 23 | void inc_sync_mode(); 24 | void set_bpm(int bpm); 25 | void set_to_one(); 26 | int get_step(); 27 | int get_led(); 28 | bool bar_led(int bar); 29 | float get_step_millis(); 30 | int get_beat_ms(); 31 | #ifndef ARDUINO 32 | int millis(); 33 | void set_millis(int millis); 34 | int get_next_step_millis(); 35 | #endif 36 | 37 | private: 38 | void _set_to(int step); 39 | int _sync_beat = 0; 40 | int _bpm = DEFAULT_BPM; 41 | int _step = 0; 42 | int _taps[NUM_TAPS] = {0}; 43 | int _tap_count = 0; 44 | bool _sync_mode = SYNC; 45 | bool _sync_led = false; 46 | unsigned long _last_tap = 0; 47 | int _step_millis; 48 | float _step_millis_fraction; 49 | float _next_step_fraction; 50 | unsigned long _next_step_millis; 51 | int _beat_millis = 0; 52 | int _avg_beat_millis_window[WINDOW_SIZE]; 53 | int _avg_beat_index = 0; 54 | int _avg_beat_millis = 0; 55 | int _beat_millis_sum = 0; 56 | #ifndef ARDUINO 57 | int _millis; 58 | #endif 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /lib/Pots/src/Pots.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifdef ARDUINO 5 | #include 6 | #else 7 | #include 8 | #include 9 | #endif 10 | 11 | //https://www.norwegiancreations.com/2015/10/tutorial-potentiometers-with-arduino-and-filtering/ 12 | 13 | void Pots::update() 14 | { 15 | for(int pot = 0; pot < NUM_POTS ; pot ++ ) 16 | { 17 | // set mux pins 18 | for(int m = 0; m < POT_MUX_PINS; m ++) 19 | #ifdef ARDUINO 20 | digitalWrite(_pot_mux_addr_p[m], _pot_map[pot] & (1 << m) ? 1 : 0); 21 | #else 22 | printf("%d", _pot_map[pot] & (1 << m) ? 1 : 0); 23 | 24 | #endif 25 | #ifdef ARDUINO 26 | // read analogue data and filter with exp filter 27 | delayMicroseconds(1); // wait for mux to switch 28 | _pot_data[pot] = (EMA_a * analogRead(_pot_p)) + ((1 - EMA_a) * _pot_data[pot]); 29 | // _pot_data[pot] = analogRead(_pot_p); 30 | #else 31 | printf("\n"); 32 | #endif 33 | } 34 | } 35 | 36 | bool Pots::changed(int pot) { 37 | // maybe needs some leeway depending on filter and noise 38 | bool changed = abs(_old_pot_data[pot] - _pot_data[pot]) > 4; 39 | if(changed) 40 | _old_pot_data[pot] = _pot_data[pot]; 41 | return changed; 42 | } 43 | 44 | int Pots::get_value(int pot) { 45 | return _pot_data[pot]; 46 | } 47 | 48 | Pots::Pots(int mux0_p, int mux1_p, int mux2_p, int mux3_p, int pot_p) 49 | { 50 | _pot_mux_addr_p[0] = mux0_p; 51 | _pot_mux_addr_p[1] = mux1_p; 52 | _pot_mux_addr_p[2] = mux2_p; 53 | _pot_mux_addr_p[3] = mux3_p; 54 | _pot_p = pot_p; 55 | 56 | #ifdef ARDUINO 57 | for(int i = 0; i < POT_MUX_PINS; i++) 58 | pinMode(_pot_mux_addr_p[i], OUTPUT); 59 | #endif 60 | } 61 | -------------------------------------------------------------------------------- /lib/LEDS/src/LEDS.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #ifdef ARDUINO 6 | #include 7 | #else 8 | #include 9 | #endif 10 | 11 | void LEDS::send_bit(bool bit) 12 | { 13 | #ifdef ARDUINO 14 | digitalWrite(_clk_p, false); 15 | digitalWrite(_data_p, bit); 16 | digitalWrite(_clk_p, true); 17 | #else 18 | printf("%d", bit); 19 | #endif 20 | } 21 | 22 | void LEDS::send_latch(bool cs) 23 | { 24 | #ifdef ARDUINO 25 | digitalWrite(_latch_p, cs); 26 | #else 27 | printf("\ncs %d\n", cs); 28 | #endif 29 | } 30 | 31 | void LEDS::send_blank(bool blank) 32 | { 33 | #ifdef ARDUINO 34 | digitalWrite(_blank_p, blank); 35 | #else 36 | printf("\nblank %d\n", blank); 37 | #endif 38 | } 39 | 40 | LEDS::LEDS(int data_p, int clk_p, int latch_p, int blank_p) 41 | { 42 | _data_p = data_p; 43 | _clk_p = clk_p; 44 | _latch_p = latch_p; 45 | _blank_p = blank_p; // blank high, outputs off 46 | 47 | #ifdef ARDUINO 48 | pinMode(_data_p, OUTPUT); 49 | pinMode(_clk_p, OUTPUT); 50 | pinMode(_latch_p, OUTPUT); 51 | pinMode(_blank_p, OUTPUT); 52 | #endif 53 | 54 | send_blank(1); 55 | send_latch(0); 56 | } 57 | 58 | void LEDS::send() 59 | { 60 | send_blank(1); 61 | for(int led = NUM_LEDS - 1; led >= 0; led --) 62 | for(int bit = 11 ; bit >= 0 ; bit --) 63 | { 64 | if(gamma_table[_led_data[led]] & (1 << bit)) 65 | send_bit(1); 66 | else 67 | send_bit(0); 68 | } 69 | send_latch(1); 70 | send_latch(0); 71 | send_blank(0); 72 | } 73 | 74 | void LEDS::set_data(int led, int val) 75 | { 76 | if(led >= NUM_LEDS) 77 | return; 78 | if(val >= MAX_LED) 79 | val = MAX_LED; 80 | _led_data[led] = val; 81 | } 82 | 83 | int LEDS::get_data(int led) { 84 | if(led >= NUM_LEDS) 85 | return 0; 86 | return _led_data[led]; 87 | } 88 | -------------------------------------------------------------------------------- /hardware/audio-fx.pretty/Potentiometer_Alps_RK09L_Single_Vertical.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Potentiometer_Alps_RK09L_Single_Vertical (layer F.Cu) (tedit 5E1A03EA) 2 | (descr "Potentiometer, vertical, Alps RK09L Single, http://www.alps.com/prod/info/E/HTML/Potentiometer/RotaryPotentiometers/RK09L/RK09L_list.html") 3 | (tags "Potentiometer vertical Alps RK09L Single") 4 | (fp_text reference RV1 (at -1.8 -8.1) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value R_POT (at -1.8 7.925) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_circle (center 0 -0.025) (end 3 -0.025) (layer F.Fab) (width 0.1)) 11 | (fp_line (start -6.5 -6.075) (end -6.5 6.025) (layer F.Fab) (width 0.1)) 12 | (fp_line (start -6.5 6.025) (end 4.85 6.025) (layer F.Fab) (width 0.1)) 13 | (fp_line (start 4.85 6.025) (end 4.85 -6.075) (layer F.Fab) (width 0.1)) 14 | (fp_line (start 4.85 -6.075) (end -6.5 -6.075) (layer F.Fab) (width 0.1)) 15 | (fp_line (start -8.65 -7.025) (end -8.65 6.975) (layer F.CrtYd) (width 0.05)) 16 | (fp_line (start -8.65 6.975) (end 5.1 6.975) (layer F.CrtYd) (width 0.05)) 17 | (fp_line (start 5.1 6.975) (end 5.1 -7.025) (layer F.CrtYd) (width 0.05)) 18 | (fp_line (start 5.1 -7.025) (end -8.65 -7.025) (layer F.CrtYd) (width 0.05)) 19 | (fp_text user %R (at -5.5 -0.025 -90) (layer F.Fab) 20 | (effects (font (size 1 1) (thickness 0.15))) 21 | ) 22 | (pad 3 thru_hole circle (at -7 -2.5) (size 1.8 1.8) (drill 1) (layers *.Cu *.Mask)) 23 | (pad 2 thru_hole circle (at -7 0) (size 1.8 1.8) (drill 1) (layers *.Cu *.Mask)) 24 | (pad 1 thru_hole circle (at -7 2.5) (size 1.8 1.8) (drill 1) (layers *.Cu *.Mask)) 25 | (pad "" thru_hole roundrect (at 0 -4.5) (size 3 3) (drill 2.1) (layers *.Cu *.Mask) (roundrect_rratio 0.25)) 26 | (pad "" thru_hole roundrect (at 0 4.5) (size 3 3) (drill 2.1) (layers *.Cu *.Mask) (roundrect_rratio 0.25)) 27 | (model ${KIPRJMOD}/audio-fx.pretty/RK09K1130AP5.STEP 28 | (offset (xyz 0 0 6.3)) 29 | (scale (xyz 1 1 1)) 30 | (rotate (xyz 0 180 90)) 31 | ) 32 | ) 33 | -------------------------------------------------------------------------------- /hardware/teensy-fx-bom.csv: -------------------------------------------------------------------------------- 1 | "Ref","Qnty","Value","Cmp name","Footprint","Description","Vendor","Vendor P/N","farnell #","MOQ","Lead Time" 2 | "C1, C3, C6, C10, C11, C12, C16, C17, ","8","2.2uF","C_Small","Capacitor_SMD:C_0805_2012Metric","Unpolarized capacitor, small symbol","","","1759424","","" 3 | "C2, C4, C5, C7, C13, ","5","0.1uF","C_Small","Capacitor_SMD:C_0805_2012Metric","Unpolarized capacitor, small symbol","","","1414663","","" 4 | "C8, C9, C14, C15, ","4","1uF","C_Small","Capacitor_SMD:C_1210_3225Metric","Unpolarized capacitor, small symbol","","","2112915","","" 5 | "D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, ","20","LED","LED","LED_SMD:LED_0805_2012Metric","Light emitting diode","","","2099236","","" 6 | "J1, J2, J3, ","3","AudioJack3_Ground","AudioJack3","audio-fx:Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal","Audio Jack, 3 Poles (Stereo / TRS)","","","2915138","","" 7 | "L1, L2, ","2","600R","Ferrite_Bead_Small","Inductor_SMD:L_0805_2012Metric","Ferrite bead, small symbol","","","2215655","","" 8 | "R1, R2, ","2","2.2K","R","Resistor_SMD:R_0805_2012Metric","Resistor","","","1469887","","" 9 | "R3, R10, ","2","100R","R","Resistor_SMD:R_0805_2012Metric","Resistor","","","1469862","","" 10 | "R4, R6, R7, ","3","10k","R","Resistor_SMD:R_0805_2012Metric","Resistor","","","1469856","","" 11 | "R5, ","1","4.7k","R","Resistor_SMD:R_0805_2012Metric","Resistor","","","1469923","","" 12 | "R8, R9, ","2","100k","R","Resistor_SMD:R_0805_2012Metric","Resistor","","","1469860","","" 13 | "RV1, RV2, RV3, RV4, RV5, RV6, RV7, RV8, RV9, RV10, RV11, RV12, ","12","R_POT","R_POT","audio-fx:Potentiometer_Alps_RK09L_Single_Vertical","Potentiometer","","","","","" 14 | "SW1, SW2, SW3, SW4, ","4","Switch_SW_Push","Switch_SW_Push-teensy_beats-cache","Button_Switch_THT:SW_PUSH_6mm","","","","dnp","","" 15 | "TP1, TP2, TP3, TP4, TP5, TP6, TP7, TP8, ","8","TestPoint","TestPoint","TestPoint:TestPoint_Pad_D1.0mm","test point","","","dnp","","" 16 | "U1, ","1","Teensy4.0","Teensy4.0","audio-fx:teensy4smt","","","","2847911","","" 17 | "U2, ","1","MCP1811A","ldo","Package_TO_SOT_SMD:SOT-23","","","","2990195","","" 18 | "U3, ","1","SGTL5000","SparkFun-IC-Analog_SGTL5000-teensy_beats-cache","Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm","","","","2308049","","" 19 | "U4, ","1","4067","4067-teensy_beats-cache","Package_SO:SSOP-24_5.3x8.2mm_P0.65mm","","","","3124957","","" 20 | "U5, ","1","TLC5947DAP","TLC5947DAP","Package_SO:HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm","24-Channel, 12-Bit PWM LED Driver, HTSSOP","","","1755259","","" 21 | "U6, ","1","W25Q128JVS","W25Q128JVS","Package_SO:SOIC-8_5.23x5.23mm_P1.27mm","128Mb Serial Flash Memory, Standard/Dual/Quad SPI, SOIC-8","","","dnp","","" 22 | -------------------------------------------------------------------------------- /fx-control/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 645 10 | 459 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 120 24 | 25 | 26 | 27 | 28 | 29 | 30 | record 31 | 32 | 33 | true 34 | 35 | 36 | false 37 | 38 | 39 | 40 | 41 | 42 | 43 | reset 44 | 45 | 46 | 47 | 48 | 49 | 50 | set to 1 51 | 52 | 53 | 54 | 55 | 56 | 57 | 15 58 | 59 | 60 | 0 61 | 62 | 63 | false 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 0 78 | 0 79 | 645 80 | 26 81 | 82 | 83 | 84 | 85 | 86 | TopToolBarArea 87 | 88 | 89 | false 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /test/test_desktop/test_leds.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define NUM_CONTROLS 2 10 | #define NUM_BUTTONS 2 11 | Control control[NUM_CONTROLS]; 12 | LEDS led(1, 2, 3, 4); 13 | Pots pots(2, 3, 4, 5, 14); 14 | Button buttons[NUM_BUTTONS] = { Button(0), Button(1) }; //(0, 1, 17, 22); 15 | BarTimer bar_timer; 16 | 17 | void test_bar_timer(void){ 18 | 19 | bar_timer.set_bpm(120); 20 | bar_timer.update(true); 21 | // 120bpm with 512 steps per bar is 15.625 between beats 22 | TEST_ASSERT_EQUAL(bar_timer.get_next_step_millis(), 15); 23 | TEST_ASSERT_EQUAL(bar_timer.get_step(), 0); 24 | for(int ms = 0; ms < 15.625 * MAX_STEPS-1; ms ++) { 25 | bar_timer.set_millis(ms); 26 | bar_timer.update(false); 27 | printf("ms = %d ms/15.625 = %f, step = %d\n", ms, ms/15.625, bar_timer.get_step()); 28 | TEST_ASSERT_INT_WITHIN(1, bar_timer.get_step(), ms/15.625); //.625);expected, actual) 29 | } 30 | 31 | // test rollover 32 | int ms = MAX_STEPS * 15.625; 33 | bar_timer.set_millis(ms); 34 | bar_timer.update(false); 35 | TEST_ASSERT_EQUAL(bar_timer.get_step(), 0); 36 | } 37 | void test_button(void) { 38 | buttons[0].update(); 39 | TEST_ASSERT_EQUAL(buttons[0].pressed(), false); 40 | } 41 | void test_control_led_and_param(void) { 42 | for(int i = 0; i < 1024; i += 200) 43 | { 44 | control[0].set_val(i,0,true, false, false); 45 | printf("pot %d val %.2f led %d\n", i, control[0].get_val(0), control[0].get_led_val(0)); 46 | } 47 | 48 | } 49 | void test_control(void) { 50 | for(int i = 0; i < NUM_CONTROLS; i ++) 51 | { 52 | control[i].set_val(500,0,true,false, false); 53 | TEST_ASSERT_EQUAL(float(500)/1024, control[i].get_val(0)); 54 | TEST_ASSERT_EQUAL(500/(1024/256), control[i].get_led_val(0)); 55 | } 56 | } 57 | 58 | void test_control_seq(void) { 59 | // write 60 | for(int i = 0; i < MAX_STEPS; i ++) 61 | control[0].set_val(i, i, true, true, false); 62 | 63 | // read 64 | for(int i = 0; i < MAX_STEPS; i ++) 65 | TEST_ASSERT_EQUAL(float(i)/1024, control[0].get_val(i)); 66 | 67 | // set to single value 68 | control[0].set_val(0, 0, true, false, false); 69 | 70 | // read 71 | for(int i = 0; i < MAX_STEPS; i ++) 72 | TEST_ASSERT_EQUAL(0, control[0].get_val(i)); 73 | } 74 | 75 | void test_send_led_data(void) { 76 | led.set_data(0,50); 77 | led.set_data(3,50); 78 | led.send(); 79 | } 80 | 81 | void test_pot_mux(void) { 82 | pots.update(); 83 | } 84 | 85 | int main(int argc, char **argv) { 86 | UNITY_BEGIN(); 87 | RUN_TEST(test_send_led_data); 88 | RUN_TEST(test_control); 89 | RUN_TEST(test_control_seq); 90 | RUN_TEST(test_pot_mux); 91 | RUN_TEST(test_control_led_and_param); 92 | RUN_TEST(test_button); 93 | RUN_TEST(test_bar_timer); 94 | UNITY_END(); 95 | 96 | return 0; 97 | } 98 | -------------------------------------------------------------------------------- /hardware/audio-fx.pretty/Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal.kicad_mod: -------------------------------------------------------------------------------- 1 | (module Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal (layer F.Cu) (tedit 5E19ED90) 2 | (descr "3.5 mm, Stereo, Right Angle, Surface Mount (SMT), Audio Jack Connector (https://www.cui.com/product/resource/sj-352x-smt-series.pdf)") 3 | (tags "3.5mm audio cui horizontal jack stereo") 4 | (attr smd) 5 | (fp_text reference J1 (at 0 -9.9) (layer F.SilkS) hide 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text value AudioJack3_Ground (at 0 10.35) (layer F.Fab) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_line (start 3 -6) (end 3 8.5) (layer F.Fab) (width 0.1)) 12 | (fp_line (start 3 8.5) (end -3 8.5) (layer F.Fab) (width 0.1)) 13 | (fp_line (start -3 8.5) (end -3 -6) (layer F.Fab) (width 0.1)) 14 | (fp_line (start -3 -6) (end -2.5 -6) (layer F.Fab) (width 0.1)) 15 | (fp_line (start -2.5 -6) (end -2.5 -8.5) (layer F.Fab) (width 0.1)) 16 | (fp_line (start -2.5 -8.5) (end 2.5 -8.5) (layer F.Fab) (width 0.1)) 17 | (fp_line (start 2.5 -8.5) (end 2.5 -6) (layer F.Fab) (width 0.1)) 18 | (fp_line (start 2.5 -6) (end 3 -6) (layer F.Fab) (width 0.1)) 19 | (fp_line (start 5.6 -9) (end 5.6 9) (layer F.CrtYd) (width 0.05)) 20 | (fp_line (start 5.6 9) (end -5.6 9) (layer F.CrtYd) (width 0.05)) 21 | (fp_line (start -5.6 9) (end -5.6 -9) (layer F.CrtYd) (width 0.05)) 22 | (fp_line (start -5.6 -9) (end 5.6 -9) (layer F.CrtYd) (width 0.05)) 23 | (fp_text user %R (at 0 0) (layer F.Fab) 24 | (effects (font (size 1 1) (thickness 0.15))) 25 | ) 26 | (fp_line (start -3.1 -4.9) (end -3.1 -6.1) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start -3.1 -6.1) (end -2.6 -6.1) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start -2.6 -6.1) (end -2.6 -8.6) (layer F.SilkS) (width 0.12)) 29 | (fp_line (start -2.6 -8.6) (end 2.6 -8.6) (layer F.SilkS) (width 0.12)) 30 | (fp_line (start 2.6 -8.6) (end 2.6 -6.1) (layer F.SilkS) (width 0.12)) 31 | (fp_line (start 2.6 -6.1) (end 3.1 -6.1) (layer F.SilkS) (width 0.12)) 32 | (fp_line (start 3.1 -6.1) (end 3.1 -2.9) (layer F.SilkS) (width 0.12)) 33 | (fp_line (start 3.1 -0.3) (end 3.1 8.6) (layer F.SilkS) (width 0.12)) 34 | (fp_line (start 3.1 8.6) (end -3.1 8.6) (layer F.SilkS) (width 0.12)) 35 | (fp_line (start -3.1 8.6) (end -3.1 7.4) (layer F.SilkS) (width 0.12)) 36 | (fp_line (start -3.1 4.2) (end -3.1 -2.3) (layer F.SilkS) (width 0.12)) 37 | (fp_line (start -3.1 -4.9) (end -5.1 -4.9) (layer F.SilkS) (width 0.12)) 38 | (fp_line (start -3.1 -2.3) (end -5.1 -2.3) (layer F.SilkS) (width 0.12)) 39 | (pad R smd rect (at 3.7 -1.6) (size 2.8 2.2) (layers F.Cu F.Paste F.Mask)) 40 | (pad S smd rect (at -3.7 -3.6) (size 2.8 2.2) (layers F.Cu F.Paste F.Mask)) 41 | (pad T smd rect (at -3.7 5.8) (size 2.8 2.8) (layers F.Cu F.Paste F.Mask)) 42 | (pad "" np_thru_hole circle (at 0 -2.5) (size 1.7 1.7) (drill 1.7) (layers *.Cu *.Mask)) 43 | (pad "" np_thru_hole circle (at 0 4.5) (size 1.7 1.7) (drill 1.7) (layers *.Cu *.Mask)) 44 | (model ${KIPRJMOD}/audio-fx.pretty/35RASMT2BHNTRX.STEP 45 | (offset (xyz 0 6 2.5)) 46 | (scale (xyz 1 1 1)) 47 | (rotate (xyz 90 -180 0)) 48 | ) 49 | ) 50 | -------------------------------------------------------------------------------- /hardware/teensy-fx.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # 4067-teensy_beats-cache 5 | # 6 | DEF 4067-teensy_beats-cache U 0 30 Y Y 1 F N 7 | F0 "U" 250 850 50 H V C CNN 8 | F1 "4067-teensy_beats-cache" 300 -900 50 H V C CNN 9 | F2 "" 0 0 50 H I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | DRAW 12 | S 300 800 -300 -800 0 1 0 N 13 | X Z 1 -600 -550 300 R 50 50 1 1 I 14 | X A0 10 -600 150 300 R 50 50 1 1 I 15 | X A1 11 -600 50 300 R 50 50 1 1 I 16 | X Vss 12 0 -800 0 U 50 50 1 1 W 17 | X A3 13 -600 -150 300 R 50 50 1 1 I 18 | X A2 14 -600 -50 300 R 50 50 1 1 I 19 | X ~E 15 -600 550 300 R 50 50 1 1 I I 20 | X A15 16 600 -750 300 L 50 50 1 1 O 21 | X A14 17 600 -650 300 L 50 50 1 1 O 22 | X A13 18 600 -550 300 L 50 50 1 1 O 23 | X A12 19 600 -450 300 L 50 50 1 1 O 24 | X A7 2 600 50 300 L 50 50 1 1 O 25 | X A11 20 600 -350 300 L 50 50 1 1 O 26 | X A10 21 600 -250 300 L 50 50 1 1 O 27 | X A9 22 600 -150 300 L 50 50 1 1 O 28 | X A8 23 600 -50 300 L 50 50 1 1 O 29 | X Vdd 24 0 800 0 D 50 50 1 1 W 30 | X A3 3 600 150 300 L 50 50 1 1 O 31 | X A5 4 600 250 300 L 50 50 1 1 O 32 | X A4 5 600 350 300 L 50 50 1 1 O 33 | X A3 6 600 450 300 L 50 50 1 1 O 34 | X A2 7 600 550 300 L 50 50 1 1 O 35 | X A1 8 600 650 300 L 50 50 1 1 O 36 | X A0 9 600 750 300 L 50 50 1 1 O 37 | ENDDRAW 38 | ENDDEF 39 | # 40 | # SparkFun-IC-Analog_SGTL5000-teensy_beats-cache 41 | # 42 | DEF SparkFun-IC-Analog_SGTL5000-teensy_beats-cache U 0 40 Y Y 1 F N 43 | F0 "U" 50 50 60 V V C CNN 44 | F1 "SparkFun-IC-Analog_SGTL5000-teensy_beats-cache" 0 1400 60 H V C CNN 45 | F2 "" 0 50 60 H V C CNN 46 | F3 "" 0 50 60 H V C CNN 47 | $FPLIST 48 | QFN-32* 49 | $ENDFPLIST 50 | DRAW 51 | S -500 -900 500 850 0 1 0 N 52 | X GND 1 -200 -1100 200 U 50 50 1 1 I 53 | X VAG 10 -700 -350 200 R 50 50 1 1 I 54 | X LINEOUTR 11 700 400 200 L 50 50 1 1 I 55 | X LINEOUTL 12 700 300 200 L 50 50 1 1 I 56 | X LINEINR 13 700 500 200 L 50 50 1 1 I 57 | X LINEINL 14 700 600 200 L 50 50 1 1 I 58 | X MIC 15 700 -400 200 L 50 50 1 1 I 59 | X MICBIAS 16 700 -550 200 L 50 50 1 1 I 60 | X CPFILT 18 -700 -450 200 R 50 50 1 1 I 61 | X HPR 2 700 -100 200 L 50 50 1 1 I 62 | X vddio 20 0 1050 200 D 50 50 1 1 I 63 | X MCLK 21 -700 300 200 R 50 50 1 1 I 64 | X LRCLK 23 -700 100 200 R 50 50 1 1 I 65 | X BCLK 24 -700 200 200 R 50 50 1 1 I 66 | X I2S_OUT 25 -700 0 200 R 50 50 1 1 O 67 | X I2S_IN 26 -700 -100 200 R 50 50 1 1 I 68 | X SDA 27 -700 600 200 R 50 50 1 1 I 69 | X SCL 29 -700 500 200 R 50 50 1 1 I 70 | X GND 3 0 -1100 200 U 50 50 1 1 I 71 | X vddd 30 -200 1050 200 D 50 50 1 1 I 72 | X ADDR 31 -700 -550 200 R 50 50 1 1 I 73 | X MODE 32 -700 -650 200 R 50 50 1 1 I 74 | X GND 33 400 -1100 200 U 50 50 1 1 I 75 | X HPVGND 4 700 -200 200 L 50 50 1 1 I 76 | X vdda 5 200 1050 200 D 50 50 1 1 I 77 | X HPL 6 700 0 200 L 50 50 1 1 I 78 | X GND 7 200 -1100 200 U 50 50 1 1 I 79 | ENDDRAW 80 | ENDDEF 81 | # 82 | # Switch_SW_Push-teensy_beats-cache 83 | # 84 | DEF Switch_SW_Push-teensy_beats-cache SW 0 40 N N 1 F N 85 | F0 "SW" 50 100 50 H V L CNN 86 | F1 "Switch_SW_Push-teensy_beats-cache" 0 -60 50 H V C CNN 87 | F2 "" 0 200 50 H I C CNN 88 | F3 "" 0 200 50 H I C CNN 89 | DRAW 90 | C -80 0 20 0 1 0 N 91 | C 80 0 20 0 1 0 N 92 | P 2 0 1 0 0 50 0 120 N 93 | P 2 0 1 0 100 50 -100 50 N 94 | X 1 1 -200 0 100 R 50 50 0 1 P 95 | X 2 2 200 0 100 L 50 50 0 1 P 96 | ENDDRAW 97 | ENDDEF 98 | # 99 | # ldo 100 | # 101 | DEF ldo U 0 40 Y Y 1 F N 102 | F0 "U" 0 250 50 H V C CNN 103 | F1 "ldo" 0 150 50 H V C CNN 104 | F2 "" 0 0 50 H I C CNN 105 | F3 "" 0 0 50 H I C CNN 106 | DRAW 107 | S -300 100 300 -150 0 1 0 N 108 | X vout 1 400 0 100 L 50 50 1 1 I 109 | X vin 2 -400 0 100 R 50 50 1 1 I 110 | X gnd 3 0 -250 100 U 50 50 1 1 I 111 | ENDDRAW 112 | ENDDEF 113 | # 114 | # teensy_beats_parts_AP7313R-1.8V-teensy_beats-cache 115 | # 116 | DEF teensy_beats_parts_AP7313R-1.8V-teensy_beats-cache U 0 40 Y Y 1 F N 117 | F0 "U" -150 150 50 H V C CNN 118 | F1 "teensy_beats_parts_AP7313R-1.8V-teensy_beats-cache" 300 150 50 H V C CNN 119 | F2 "" 0 0 50 H I C CNN 120 | F3 "" 0 0 50 H I C CNN 121 | DRAW 122 | S -200 75 200 -200 1 1 10 f 123 | X GND 1 0 -300 100 U 50 50 1 1 W 124 | X VO 2 -300 0 100 R 50 50 1 1 w 125 | X VI 3 300 0 100 L 50 50 1 1 W 126 | ENDDRAW 127 | ENDDEF 128 | # 129 | #End Library 130 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Teensy FX 2 | 3 | * A [Teensy 4](https://www.pjrc.com/teensy-4-0/) based FX unit with [Pocket Operator](https://teenage.engineering/products/po) style and playability. 4 | * 12 knobs, 4 buttons each with LED, and 4 LEDs showing automation cycle. 5 | * Combination of filtered reverb, ping pong filtered delay and a noise source, but this is [customisable](#Audio-patch). 6 | * Each knob can be automated (a bit like punch in effects on the Pocket Operators) 7 | * Tap tempo and PO sync 8 | * [video series on development and use of the teensy-fx](https://www.youtube.com/playlist?list=PLmcDgdDpcaPg4DthWWuq7HqhB-hiN_gUg) 9 | 10 | # Hardware 11 | 12 | ![board](hardware/board.png) 13 | 14 | [schematic](hardware/schematic.pdf) 15 | 16 | [gerbers](hardware/teensy-fx-2020-02-10-fab.zip) 17 | 18 | [photos](https://photos.app.goo.gl/ELiSmwA5KhBPN7PL9) 19 | 20 | [noise performance](docs/noise.md) 21 | 22 | Buy the right parts through the links on the [kitspace page](https://kitspace.org/boards/github.com/mattvenn/teensy-audio-fx). 23 | 24 | ## Hardware Resources 25 | 26 | Based off the teensy 4 audio board and the [teensy beats shield](https://hackaday.io/project/161127-teensy-beats-shield) 27 | 28 | * teensy 4 audio board schematic https://www.pjrc.com/store/schematic_audio4.png 29 | * [SGTL5000 datasheet](https://static6.arrow.com/aropdfconversion/d5e3ddfdb01ac7d0ee29dd23626c23e0eb18a14a/1931605559406471sgtl5000.pdf) 30 | * TLC5947 24 channel PWM LED driver 31 | * 4067 multiplexer for the knobs 32 | * pot RK09K1130AP5 33 | 34 | ## Hardware V1: git commit 99c1038 35 | 36 | check the git repo out to the [hash](https://github.com/mattvenn/teensy-audio-fx/tree/99c1038) to make sure everything is in sync. 37 | 38 | ### Errata 39 | 40 | * Do not place C16 41 | * Swap LRCLK & BCLK - see pic [lrclk-bclk-swap](docs/lrclk-bclk-swap.png) 42 | * 2.2uF ceramics sound as good and are much cheaper than the 1uF acrylics for C8, C9, C14 & C15 43 | 44 | ## Hardware V2: git master 45 | 46 | * test points for mic input 47 | * separate regulator for pot 3.3v to reduce noise? 48 | * put leds and buttons below pots for easier viewing and pressing 49 | * leave space on back for rubber feet 50 | * update FP of audio sockets to new FP - audio sockets weren't available in EU, changed to 35RASMT2BHNTRX which has 5 pads but will fit on the same fp 51 | * filter behind pot mux was a mistake. filters must be in front of mux or removed - fixed by removing 52 | * fix LRCLK & BCLK mixup - fixed 53 | 54 | ## Back graphic 55 | 56 | * Art by Kipling: http://bit.ly/39Wxc4R. Designed in ContextFree 57 | * 100 x 60mm == 3.94 x 2.36" == 1182 x 708 pix 58 | 59 | # FW 60 | 61 | * each knob controls one of the parameters 62 | * each knob has a number of steps of recordable automation 63 | * knob's leds brightness shows current value of parameter 64 | * record time is based on bpm tap tempo and number of steps (4 bars in control.py) 65 | * buttons are: tap tempo/sync, write, erase and start automation loop from beginning 66 | * press & hold tempo button to switch between tap tempo and [PO sync mode](docs/PO_sync_mode.md) 67 | * press write and move a knob to record its movement 68 | * moving a knob without pressing record will wipe the pattern and set it all to the current knob value 69 | * 4 leds on top right show progression through the automation loop 70 | 71 | ## Uploading 72 | 73 | * remove modemmanager 74 | * install teensy rules: https://www.pjrc.com/teensy/00-teensy.rules 75 | 76 | sudo cp 49-teensy.rules /etc/udev/rules.d 77 | sudo udevadm control --reload-rules 78 | sudo udevadm trigger 79 | 80 | Then: 81 | 82 | make prog 83 | 84 | ## issues 85 | 86 | * freeverb [noise issue](https://forum.pjrc.com/threads/57046-Freeverb-with-low-input-levels-gt-noise-and-wierd-oscillating-quot-tone-quot) fixed [here](https://github.com/PaulStoffregen/Audio/pull/357) 87 | * to fix this you can copy the local effect_freeverb over the one in ~/.platformio 88 | * if delay is not as long as expected (should be seconds), check teensy audio lib is up to date, older versions [didn't support teensy4's large memory](https://github.com/PaulStoffregen/Audio/commit/bbcfe3bd201d86aa7aa0e87d97c989f4259465de) 89 | 90 | # Audio patch 91 | 92 | made with https://www.pjrc.com/teensy/gui/index.html 93 | 94 | ![patch](docs/patch.png) 95 | 96 | # Software 97 | 98 | [control.py](control.py) is a PyQT program that was developed in order to make an MVP 99 | interface that could later be translated to hardware in the form of a PCB. 100 | 101 | ![gui](docs/gui.png) 102 | -------------------------------------------------------------------------------- /lib/BarTimer/src/BarTimer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include // for MAX_STEPS 3 | #include // for MAX_LED 4 | 5 | #ifdef ARDUINO 6 | #include 7 | #define MILLIS = millis() 8 | #else 9 | #include 10 | int BarTimer::millis() { 11 | return _millis; 12 | } 13 | void BarTimer::set_millis(int millis) { 14 | _millis = millis; 15 | } 16 | int BarTimer::get_next_step_millis() { 17 | return _next_step_millis; 18 | } 19 | #endif 20 | 21 | float BarTimer::get_step_millis() { 22 | return _step_millis; 23 | } 24 | 25 | bool BarTimer::bar_led(int bar) { 26 | return bar == _step / (MAX_STEPS / 4); 27 | } 28 | 29 | void BarTimer::inc_sync_mode() { 30 | if(_sync_mode == TAP) { 31 | _sync_mode = SYNC; 32 | //Serial.println("sync = SYNC"); 33 | } 34 | else { 35 | _sync_mode = TAP; 36 | //Serial.println("sync = TAP"); 37 | } 38 | } 39 | 40 | int BarTimer::get_led() { 41 | if(_sync_mode == SYNC) 42 | return _sync_led ? MAX_LED : 0; 43 | else 44 | return millis() - _last_tap > 100 ? MAX_LED : 0; 45 | } 46 | 47 | void BarTimer::sync_tempo() { 48 | if(_sync_mode != SYNC) 49 | return; 50 | 51 | if(millis() - _last_tap > TAP_TIMEOUT) { 52 | _last_tap = millis(); 53 | } 54 | else { 55 | _sync_led = !_sync_led; 56 | int sync_time = millis() - _last_tap; 57 | _last_tap = millis(); 58 | // Serial.println(sync_time); 59 | // Serial.println(30000 / sync_time); 60 | set_bpm(30000 / sync_time); 61 | 62 | // force automation sequence to keep in line with the sync 63 | _set_to((MAX_STEPS/SYNC_STEPS) * _sync_beat); 64 | _sync_beat ++; 65 | if(_sync_beat >= SYNC_STEPS) 66 | _sync_beat = 0; 67 | } 68 | } 69 | 70 | void BarTimer::tap_tempo() { 71 | if(_sync_mode != TAP) 72 | return; 73 | 74 | // don't rely on counter until _tap_count == NUM_TAPS 75 | // if it's been a long time since a tap, set _tap_count to 0 76 | if(millis() - _last_tap > TAP_TIMEOUT) { 77 | _tap_count = 0; 78 | _last_tap = millis(); 79 | } 80 | // otherwise, keep a track of the tap times in a circular buffer 81 | else { 82 | // rotate buffer 83 | for(int i = NUM_TAPS-1; i > 0; i --) 84 | _taps[i] = _taps[i-1]; 85 | 86 | _taps[0] = millis() - _last_tap; 87 | _last_tap = millis(); 88 | 89 | // increment _tap_count but don't let it rollover 90 | if(_tap_count < NUM_TAPS) 91 | _tap_count ++; 92 | } 93 | 94 | // the taps should be stable now, so use them to set the bpm 95 | if(_tap_count == NUM_TAPS) { 96 | int avg_tap = 0; 97 | for(int i = 0; i < NUM_TAPS; i ++) 98 | avg_tap += _taps[i]; 99 | //Serial.println(avg_tap/NUM_TAPS); 100 | // Serial.println(60000 / (avg_tap/NUM_TAPS)); 101 | set_bpm(60000 / (avg_tap/NUM_TAPS)); 102 | } 103 | } 104 | 105 | int BarTimer::get_beat_ms() { 106 | return _avg_beat_millis; 107 | } 108 | 109 | void BarTimer::set_to_one() { 110 | _sync_beat = 0; 111 | _set_to(0); 112 | } 113 | 114 | void BarTimer::_set_to(int step) { 115 | if(step > MAX_STEPS) 116 | step = 0; 117 | _step = step; 118 | _next_step_millis = millis() + _step_millis; 119 | } 120 | 121 | void BarTimer::update() { 122 | 123 | if(millis() >= _next_step_millis) { 124 | _step ++; 125 | // fractional count to handle non integer step millis 126 | _next_step_fraction += _step_millis_fraction; 127 | 128 | if(_next_step_fraction >= 1) { 129 | _next_step_millis += 1; 130 | _next_step_fraction -= 1; 131 | } 132 | 133 | _next_step_millis += _step_millis; 134 | if(_step == MAX_STEPS) 135 | _step = 0; 136 | } 137 | } 138 | 139 | void BarTimer::set_bpm(int bpm) { 140 | _bpm = bpm; 141 | _step_millis = (60000.0 * 16.0 / MAX_STEPS) / _bpm; 142 | _step_millis_fraction = (60000.0 * 16.0 / MAX_STEPS) / _bpm - _step_millis; 143 | _beat_millis = 60000 / (_bpm * 4); 144 | 145 | // average 146 | _beat_millis_sum = _beat_millis_sum - _avg_beat_millis_window[_avg_beat_index]; 147 | _avg_beat_millis_window[_avg_beat_index] = _beat_millis; 148 | _beat_millis_sum = _beat_millis_sum + _beat_millis; 149 | _avg_beat_index = (_avg_beat_index+1) % WINDOW_SIZE; 150 | _avg_beat_millis = _beat_millis_sum / WINDOW_SIZE; 151 | } 152 | 153 | int BarTimer::get_step() { 154 | return _step; 155 | } 156 | -------------------------------------------------------------------------------- /hardware/teensy-fx.pro: -------------------------------------------------------------------------------- 1 | update=Mon 10 Feb 2020 12:51:15 CET 2 | version=1 3 | last_client=kicad 4 | [general] 5 | version=1 6 | RootSch= 7 | BoardNm= 8 | [cvpcb] 9 | version=1 10 | NetIExt=net 11 | [eeschema] 12 | version=1 13 | LibDir= 14 | [eeschema/libraries] 15 | [pcbnew] 16 | version=1 17 | PageLayoutDescrFile= 18 | LastNetListRead=teensy-fx.net 19 | CopperLayerCount=4 20 | BoardThickness=1.6 21 | AllowMicroVias=0 22 | AllowBlindVias=0 23 | RequireCourtyardDefinitions=0 24 | ProhibitOverlappingCourtyards=1 25 | MinTrackWidth=0.2 26 | MinViaDiameter=0.4 27 | MinViaDrill=0.3 28 | MinMicroViaDiameter=0.2 29 | MinMicroViaDrill=0.09999999999999999 30 | MinHoleToHole=0.25 31 | TrackWidth1=0.25 32 | ViaDiameter1=0.8 33 | ViaDrill1=0.4 34 | dPairWidth1=0.2 35 | dPairGap1=0.25 36 | dPairViaGap1=0.25 37 | SilkLineWidth=0.12 38 | SilkTextSizeV=1 39 | SilkTextSizeH=1 40 | SilkTextSizeThickness=0.15 41 | SilkTextItalic=0 42 | SilkTextUpright=1 43 | CopperLineWidth=0.2 44 | CopperTextSizeV=1.5 45 | CopperTextSizeH=1.5 46 | CopperTextThickness=0.3 47 | CopperTextItalic=0 48 | CopperTextUpright=1 49 | EdgeCutLineWidth=0.05 50 | CourtyardLineWidth=0.05 51 | OthersLineWidth=0.15 52 | OthersTextSizeV=1 53 | OthersTextSizeH=1 54 | OthersTextSizeThickness=0.15 55 | OthersTextItalic=0 56 | OthersTextUpright=1 57 | SolderMaskClearance=0.051 58 | SolderMaskMinWidth=0.25 59 | SolderPasteClearance=0 60 | SolderPasteRatio=-0 61 | [pcbnew/Layer.F.Cu] 62 | Name=F.Cu 63 | Type=0 64 | Enabled=1 65 | [pcbnew/Layer.In1.Cu] 66 | Name=In1.Cu 67 | Type=0 68 | Enabled=1 69 | [pcbnew/Layer.In2.Cu] 70 | Name=In2.Cu 71 | Type=0 72 | Enabled=1 73 | [pcbnew/Layer.In3.Cu] 74 | Name=In3.Cu 75 | Type=0 76 | Enabled=0 77 | [pcbnew/Layer.In4.Cu] 78 | Name=In4.Cu 79 | Type=0 80 | Enabled=0 81 | [pcbnew/Layer.In5.Cu] 82 | Name=In5.Cu 83 | Type=0 84 | Enabled=0 85 | [pcbnew/Layer.In6.Cu] 86 | Name=In6.Cu 87 | Type=0 88 | Enabled=0 89 | [pcbnew/Layer.In7.Cu] 90 | Name=In7.Cu 91 | Type=0 92 | Enabled=0 93 | [pcbnew/Layer.In8.Cu] 94 | Name=In8.Cu 95 | Type=0 96 | Enabled=0 97 | [pcbnew/Layer.In9.Cu] 98 | Name=In9.Cu 99 | Type=0 100 | Enabled=0 101 | [pcbnew/Layer.In10.Cu] 102 | Name=In10.Cu 103 | Type=0 104 | Enabled=0 105 | [pcbnew/Layer.In11.Cu] 106 | Name=In11.Cu 107 | Type=0 108 | Enabled=0 109 | [pcbnew/Layer.In12.Cu] 110 | Name=In12.Cu 111 | Type=0 112 | Enabled=0 113 | [pcbnew/Layer.In13.Cu] 114 | Name=In13.Cu 115 | Type=0 116 | Enabled=0 117 | [pcbnew/Layer.In14.Cu] 118 | Name=In14.Cu 119 | Type=0 120 | Enabled=0 121 | [pcbnew/Layer.In15.Cu] 122 | Name=In15.Cu 123 | Type=0 124 | Enabled=0 125 | [pcbnew/Layer.In16.Cu] 126 | Name=In16.Cu 127 | Type=0 128 | Enabled=0 129 | [pcbnew/Layer.In17.Cu] 130 | Name=In17.Cu 131 | Type=0 132 | Enabled=0 133 | [pcbnew/Layer.In18.Cu] 134 | Name=In18.Cu 135 | Type=0 136 | Enabled=0 137 | [pcbnew/Layer.In19.Cu] 138 | Name=In19.Cu 139 | Type=0 140 | Enabled=0 141 | [pcbnew/Layer.In20.Cu] 142 | Name=In20.Cu 143 | Type=0 144 | Enabled=0 145 | [pcbnew/Layer.In21.Cu] 146 | Name=In21.Cu 147 | Type=0 148 | Enabled=0 149 | [pcbnew/Layer.In22.Cu] 150 | Name=In22.Cu 151 | Type=0 152 | Enabled=0 153 | [pcbnew/Layer.In23.Cu] 154 | Name=In23.Cu 155 | Type=0 156 | Enabled=0 157 | [pcbnew/Layer.In24.Cu] 158 | Name=In24.Cu 159 | Type=0 160 | Enabled=0 161 | [pcbnew/Layer.In25.Cu] 162 | Name=In25.Cu 163 | Type=0 164 | Enabled=0 165 | [pcbnew/Layer.In26.Cu] 166 | Name=In26.Cu 167 | Type=0 168 | Enabled=0 169 | [pcbnew/Layer.In27.Cu] 170 | Name=In27.Cu 171 | Type=0 172 | Enabled=0 173 | [pcbnew/Layer.In28.Cu] 174 | Name=In28.Cu 175 | Type=0 176 | Enabled=0 177 | [pcbnew/Layer.In29.Cu] 178 | Name=In29.Cu 179 | Type=0 180 | Enabled=0 181 | [pcbnew/Layer.In30.Cu] 182 | Name=In30.Cu 183 | Type=0 184 | Enabled=0 185 | [pcbnew/Layer.B.Cu] 186 | Name=B.Cu 187 | Type=0 188 | Enabled=1 189 | [pcbnew/Layer.B.Adhes] 190 | Enabled=1 191 | [pcbnew/Layer.F.Adhes] 192 | Enabled=1 193 | [pcbnew/Layer.B.Paste] 194 | Enabled=1 195 | [pcbnew/Layer.F.Paste] 196 | Enabled=1 197 | [pcbnew/Layer.B.SilkS] 198 | Enabled=1 199 | [pcbnew/Layer.F.SilkS] 200 | Enabled=1 201 | [pcbnew/Layer.B.Mask] 202 | Enabled=1 203 | [pcbnew/Layer.F.Mask] 204 | Enabled=1 205 | [pcbnew/Layer.Dwgs.User] 206 | Enabled=1 207 | [pcbnew/Layer.Cmts.User] 208 | Enabled=1 209 | [pcbnew/Layer.Eco1.User] 210 | Enabled=1 211 | [pcbnew/Layer.Eco2.User] 212 | Enabled=1 213 | [pcbnew/Layer.Edge.Cuts] 214 | Enabled=1 215 | [pcbnew/Layer.Margin] 216 | Enabled=1 217 | [pcbnew/Layer.B.CrtYd] 218 | Enabled=1 219 | [pcbnew/Layer.F.CrtYd] 220 | Enabled=1 221 | [pcbnew/Layer.B.Fab] 222 | Enabled=1 223 | [pcbnew/Layer.F.Fab] 224 | Enabled=1 225 | [pcbnew/Layer.Rescue] 226 | Enabled=0 227 | [pcbnew/Netclasses] 228 | [pcbnew/Netclasses/Default] 229 | Name=Default 230 | Clearance=0.2 231 | TrackWidth=0.25 232 | ViaDiameter=0.8 233 | ViaDrill=0.4 234 | uViaDiameter=0.3 235 | uViaDrill=0.1 236 | dPairWidth=0.2 237 | dPairGap=0.25 238 | dPairViaGap=0.25 239 | [pcbnew/Netclasses/1] 240 | Name=power 241 | Clearance=0.2 242 | TrackWidth=0.6 243 | ViaDiameter=0.8 244 | ViaDrill=0.4 245 | uViaDiameter=0.3 246 | uViaDrill=0.1 247 | dPairWidth=0.2 248 | dPairGap=0.25 249 | dPairViaGap=0.25 250 | [schematic_editor] 251 | version=1 252 | PageLayoutDescrFile= 253 | PlotDirectoryName= 254 | SubpartIdSeparator=0 255 | SubpartFirstId=65 256 | NetFmtName=Pcbnew 257 | SpiceAjustPassiveValues=0 258 | LabSize=50 259 | ERC_TestSimilarLabels=1 260 | -------------------------------------------------------------------------------- /effect_reverb.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Joao Rossi Filho 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all 12 | * copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | * SOFTWARE. 21 | */ 22 | 23 | // https://github.com/joaoRossiFilho/teensy_reverb 24 | 25 | #include 26 | #include "effect_reverb.h" 27 | #include "utility/dspinst.h" 28 | #include "math_helper.h" 29 | 30 | void 31 | AudioEffectReverb::_do_comb_apf(struct comb_apf *apf, int32_t *in_buf, int32_t *out_buf) 32 | { 33 | int32_t acc_x, acc_y, g; 34 | int32_t w, z; 35 | uint32_t n, buf_len; 36 | 37 | g = apf->g; 38 | buf_len = apf->buf_len; 39 | 40 | for (n = 0; n < AUDIO_BLOCK_SAMPLES; n++) { 41 | acc_y = apf->buffer[apf->rd_idx%buf_len]; 42 | acc_x = in_buf[n]; 43 | 44 | w = multiply_32x32_rshift32_rounded(g, acc_y); 45 | acc_x += (w << 1); 46 | z = multiply_32x32_rshift32_rounded(g, acc_x); 47 | acc_y -= (z << 1); 48 | 49 | apf->buffer[apf->wr_idx%buf_len] = acc_x; 50 | out_buf[n] = acc_y; 51 | 52 | apf->rd_idx++; 53 | apf->wr_idx++; 54 | } 55 | } 56 | 57 | void 58 | AudioEffectReverb::_do_comb_lpf(struct comb_lpf *lpf, int32_t *in_buf, int32_t *out_buf) 59 | { 60 | int32_t x, y, w, z, g1, g2, z1; 61 | uint32_t n, buf_len; 62 | 63 | g1 = lpf->g1; 64 | g2 = lpf->g2; 65 | z1 = lpf->z1; 66 | buf_len = lpf->buf_len; 67 | 68 | for (n = 0; n < AUDIO_BLOCK_SAMPLES; n++) { 69 | y = lpf->buffer[lpf->rd_idx%buf_len]; 70 | x = in_buf[n]; 71 | 72 | w = multiply_accumulate_32x32_rshift32_rounded(y, g2, z1); 73 | z = multiply_accumulate_32x32_rshift32_rounded(x, g1, w); 74 | 75 | z1 = w; 76 | lpf->buffer[lpf->wr_idx%buf_len] = z; 77 | out_buf[n] = y; 78 | 79 | lpf->rd_idx++; 80 | lpf->wr_idx++; 81 | } 82 | 83 | lpf->z1 = z1; 84 | } 85 | 86 | void 87 | AudioEffectReverb::init_comb_filters(void) 88 | { 89 | int i; 90 | 91 | g_flt_apf[0] = 0.7; 92 | g_flt_apf[1] = -0.54; 93 | g_flt_apf[2] = 0.6; 94 | 95 | g2_flt_lpf = 0.985; 96 | 97 | arm_float_to_q31(g_flt_apf, g_q31_apf, 3); 98 | arm_float_to_q31(&g2_flt_lpf, &g2_q31_lpf, 1); 99 | 100 | apf[0].buffer = apf1_buf; 101 | apf[0].buf_len = APF1_BUF_LEN; 102 | apf[0].delay = APF1_DLY_LEN; 103 | apf[1].buffer = apf2_buf; 104 | apf[1].buf_len = APF2_BUF_LEN; 105 | apf[1].delay = APF2_DLY_LEN; 106 | apf[2].buffer = apf3_buf; 107 | apf[2].buf_len = APF3_BUF_LEN; 108 | apf[2].delay = APF3_DLY_LEN; 109 | 110 | for (i = 0; i < 3; i++) { 111 | apf[i].g = g_q31_apf[i]; 112 | apf[i].wr_idx = 0; 113 | apf[i].rd_idx = apf[i].wr_idx - apf[i].delay -1; 114 | } 115 | 116 | lpf[0].buffer = lpf1_buf; 117 | lpf[0].buf_len = LPF1_BUF_LEN; 118 | lpf[0].delay = LPF1_DLY_LEN; 119 | lpf[1].buffer = lpf2_buf; 120 | lpf[1].buf_len = LPF2_BUF_LEN; 121 | lpf[1].delay = LPF2_DLY_LEN; 122 | lpf[2].buffer = lpf3_buf; 123 | lpf[2].buf_len = LPF3_BUF_LEN; 124 | lpf[2].delay = LPF3_DLY_LEN; 125 | lpf[3].buffer = lpf4_buf; 126 | lpf[3].buf_len = LPF4_BUF_LEN; 127 | lpf[3].delay = LPF4_DLY_LEN; 128 | 129 | for (i = 0; i < 4; i++) { 130 | lpf[i].g1 = g1_q31_lpf[i]; 131 | lpf[i].g2 = g2_q31_lpf; 132 | lpf[i].wr_idx = 0; 133 | lpf[i].rd_idx = lpf[i].wr_idx - lpf[i].delay -1; 134 | } 135 | } 136 | 137 | void 138 | AudioEffectReverb::clear_buffers(void) 139 | { 140 | memset(apf1_buf, 0, sizeof(apf1_buf)); 141 | memset(apf2_buf, 0, sizeof(apf2_buf)); 142 | memset(apf3_buf, 0, sizeof(apf3_buf)); 143 | 144 | memset(lpf1_buf, 0, sizeof(lpf1_buf)); 145 | memset(lpf2_buf, 0, sizeof(lpf2_buf)); 146 | memset(lpf3_buf, 0, sizeof(lpf3_buf)); 147 | memset(lpf4_buf, 0, sizeof(lpf4_buf)); 148 | } 149 | 150 | void 151 | AudioEffectReverb::reverbTime(float rt) 152 | { 153 | if (rt <= 0.0) 154 | return; 155 | 156 | reverb_time_sec = rt; 157 | 158 | g1_flt_lpf[0] = powf(10.0, -(3.0*LPF1_DLY_SEC)/(reverb_time_sec)); 159 | g1_flt_lpf[1] = powf(10.0, -(3.0*LPF2_DLY_SEC)/(reverb_time_sec)); 160 | g1_flt_lpf[2] = powf(10.0, -(3.0*LPF3_DLY_SEC)/(reverb_time_sec)); 161 | g1_flt_lpf[3] = powf(10.0, -(3.0*LPF4_DLY_SEC)/(reverb_time_sec)); 162 | 163 | arm_float_to_q31(g1_flt_lpf, g1_q31_lpf, 4); 164 | 165 | for (int i = 0; i < 4; i++) 166 | lpf[i].g1 = g1_q31_lpf[i]; 167 | } 168 | 169 | /** 170 | * @brief Provide guard bits for Input buffer 171 | * @param q31_t* Pointer to input buffer 172 | * @param uint32_t blockSize 173 | * @param uint32_t guard_bits 174 | * @return none 175 | * The function Provides the guard bits for the buffer 176 | * to avoid overflow 177 | */ 178 | 179 | void provide_guard_bits_q31 (q31_t * input_buf, 180 | uint32_t blockSize, 181 | uint32_t guard_bits) 182 | { 183 | uint32_t i; 184 | 185 | for (i = 0; i < blockSize; i++) 186 | { 187 | input_buf[i] = input_buf[i] >> guard_bits; 188 | } 189 | } 190 | 191 | /** 192 | * @brief Remove guard bits and saturate for Input buffer 193 | * @param q31_t* Pointer to input buffer 194 | * @param uint32_t blockSize 195 | * @param uint32_t guard_bits 196 | * @return none 197 | * The function removes the guard bits for the buffer 198 | * and prevents overflow 199 | */ 200 | 201 | void remove_guard_bits_q31 (q31_t * input_buf, 202 | uint32_t blockSize, 203 | uint32_t guard_bits) 204 | { 205 | uint32_t i; 206 | int32_t sat_max = 2147483647 >> guard_bits; 207 | int32_t sat_min = -2147483648 >> guard_bits; 208 | int32_t temp; 209 | 210 | for (i = 0; i < blockSize; i++) 211 | { 212 | temp = input_buf[i]; 213 | temp = temp > sat_max ? sat_max : temp; 214 | temp = temp < sat_min ? sat_min : temp; 215 | input_buf[i] = temp << guard_bits; 216 | //input_buf[i] = input_buf[i] << guard_bits; 217 | } 218 | } 219 | 220 | void 221 | AudioEffectReverb::update(void) 222 | { 223 | audio_block_t *block; 224 | 225 | if (!(block = receiveWritable())) 226 | return; 227 | 228 | if (!block->data) 229 | return; 230 | 231 | arm_q15_to_q31(block->data, q31_buf, AUDIO_BLOCK_SAMPLES); 232 | provide_guard_bits_q31(q31_buf, AUDIO_BLOCK_SAMPLES, 8); 233 | 234 | _do_comb_apf(&apf[0], q31_buf, q31_buf); 235 | _do_comb_apf(&apf[1], q31_buf, q31_buf); 236 | 237 | _do_comb_lpf(&lpf[0], q31_buf, sum_buf); 238 | arm_shift_q31(sum_buf, -3, sum_buf, AUDIO_BLOCK_SAMPLES); 239 | 240 | _do_comb_lpf(&lpf[1], q31_buf, aux_buf); 241 | arm_shift_q31(aux_buf, -3, aux_buf, AUDIO_BLOCK_SAMPLES); 242 | arm_add_q31(sum_buf, aux_buf, sum_buf, AUDIO_BLOCK_SAMPLES); 243 | 244 | _do_comb_lpf(&lpf[2], q31_buf, aux_buf); 245 | arm_shift_q31(aux_buf, -3, aux_buf, AUDIO_BLOCK_SAMPLES); 246 | arm_add_q31(sum_buf, aux_buf, sum_buf, AUDIO_BLOCK_SAMPLES); 247 | 248 | _do_comb_lpf(&lpf[3], q31_buf, aux_buf); 249 | arm_shift_q31(aux_buf, -3, aux_buf, AUDIO_BLOCK_SAMPLES); 250 | arm_add_q31(sum_buf, aux_buf, sum_buf, AUDIO_BLOCK_SAMPLES); 251 | 252 | _do_comb_apf(&apf[2], sum_buf, q31_buf); 253 | 254 | remove_guard_bits_q31(q31_buf, AUDIO_BLOCK_SAMPLES, 8); 255 | arm_q31_to_q15(q31_buf, block->data, AUDIO_BLOCK_SAMPLES); 256 | 257 | transmit(block, 0); 258 | release(block); 259 | } 260 | /* EOF */ 261 | -------------------------------------------------------------------------------- /control.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from PyQt5 import QtWidgets, uic, QtCore, QtGui 3 | import pickle 4 | from unittest.mock import Mock 5 | import logging, argparse, os, time, sys 6 | import serial, time 7 | import struct 8 | from enum import IntEnum 9 | 10 | # make sure these match the enum in src/fx.ino 11 | class Cmd(IntEnum): 12 | REV_SIZE = 0 13 | REV_DAMP = 1 14 | MIX_DEL = 2 15 | MIX_SIG = 3 16 | MIX_REV = 4 17 | DEL_L_TIME = 5 18 | DEL_R_TIME = 6 19 | DEL_FB = 7 20 | DEL_FB_FILT_FREQ = 8 21 | DEL_FB_FILT_RES = 9 22 | MIX_REV_IN = 10 23 | MIX_NOISE = 11 24 | AUDIO_PROC = 12 25 | AUDIO_MEM = 13 26 | 27 | class MainWindow(QtWidgets.QMainWindow): 28 | 29 | SEQ_STEPS = 32 30 | 31 | def __init__(self): 32 | super(self.__class__, self).__init__() 33 | if args.mock_serial: 34 | self.ser = Mock() 35 | self.ser.readline = Mock(return_value="mock".encode('utf-8')) 36 | self.ser.write = Mock(return_value=0) 37 | else: 38 | self.ser = serial.Serial(args.serial_port, 9600, timeout = 2, write_timeout = 2) 39 | self.record = False 40 | self.play = True 41 | 42 | # configuration for all the sliders 43 | self.widget_config = [ 44 | { 'tip': 'del time l', 'cmd': Cmd.DEL_L_TIME, 'min': 0, 'max':2000 }, 45 | { 'tip': 'del time r', 'cmd': Cmd.DEL_R_TIME, 'min': 0, 'max':2000 }, 46 | { 'tip': 'del mix', 'cmd': Cmd.MIX_DEL, 'min': 0, 'max':255}, 47 | { 'tip': 'sig mix', 'cmd': Cmd.MIX_SIG, 'min': 0, 'max':255}, 48 | { 'tip': 'rev mix', 'cmd': Cmd.MIX_REV_IN, 'min': 0, 'max':255}, 49 | { 'tip': 'noiz mix', 'cmd': Cmd.MIX_NOISE, 'min': 0, 'max':255 }, 50 | { 'tip': 'rev size', 'cmd': Cmd.REV_SIZE, 'min': 0, 'max':255}, 51 | { 'tip': 'rev damp', 'cmd': Cmd.REV_DAMP, 'min': 0, 'max':255}, 52 | { 'tip': 'fil freq', 'cmd': Cmd.DEL_FB_FILT_FREQ, 'min': 0, 'max':255}, 53 | { 'tip': 'fil q', 'cmd': Cmd.DEL_FB_FILT_RES, 'min': 0, 'max':255}, 54 | { 'tip': 'del fb', 'cmd': Cmd.DEL_FB, 'min': 0, 'max':255 }, 55 | ] 56 | 57 | # setup UI 58 | uic.loadUi('fx-control/mainwindow.ui', self) 59 | self.button_reset.pressed.connect(lambda: self.reset_seq()) 60 | self.progressBar_beats.setMaximum(MainWindow.SEQ_STEPS) 61 | self.button_seq_reset.pressed.connect(lambda: self.reset_beat()) 62 | self.lineEdit_bpm.textChanged.connect(lambda: self.update_bpm()) 63 | self.timer = QtCore.QTimer(self) 64 | self.timer.timeout.connect(self.update_beat) 65 | self.timer.start(self.get_ms_from_bpm()) 66 | self.beat = 0 67 | 68 | self.setWindowTitle("Teensy FX controller") 69 | self.widgets = [] 70 | 71 | try: 72 | with open("settings.pkl", 'rb') as fh: 73 | last_values = pickle.load(fh) 74 | except FileNotFoundError: 75 | last_values = None 76 | 77 | # create all the widgets 78 | for index, w in enumerate(self.widget_config): 79 | w['pressed'] = False 80 | w['widget'] = QtWidgets.QSlider() 81 | w['disp'] = QtWidgets.QProgressBar() 82 | w['disp'].setOrientation(QtCore.Qt.Vertical) 83 | w['mem_a'] = 0 84 | w['mem_b'] = 0 85 | w['widget'].setMinimum(w['min']) 86 | w['widget'].setMaximum(w['max']) 87 | w['disp'].setMinimum(w['min']) 88 | w['disp'].setMaximum(w['max']) 89 | w['widget'].setToolTip(w['tip']) 90 | logging.info("creating widget: [%-12s] cmd [%-22s] min/max [%4d/%4d]" % (w['tip'], w['cmd'], w['min'], w['max'])) 91 | w['disp'].valueChanged.connect(lambda state, w=w: self.map_cmd(w)) 92 | w['widget'].sliderMoved.connect(lambda state, w=w: self.slider_moved(w)) 93 | w['widget'].sliderPressed.connect(lambda w=w: self.pressed(w)) 94 | w['widget'].sliderReleased.connect(lambda w=w: self.released(w)) 95 | label = QtWidgets.QLabel() 96 | label.setText(w['tip']) 97 | self.layout.addWidget(label) 98 | self.layout.addWidget(w['widget']) 99 | self.layout.addWidget(w['disp']) 100 | 101 | if last_values is not None: 102 | w['widget'].setValue(last_values[index]['value']) 103 | w['seq'] = last_values[index]['seq'] 104 | else: 105 | w['seq'] = [w['widget'].value()] * MainWindow.SEQ_STEPS 106 | 107 | def map_cmd(self, widget): 108 | logging.debug("%s %d" % (widget['cmd'], widget['disp'].value())) 109 | # map the number 110 | mult = 255 / widget['max'] 111 | self.send_cmd(widget['cmd'], widget['disp'].value() * mult) 112 | 113 | def send_cmd(self, cmd, val, verbose=False): 114 | fmt = "BB" 115 | self.ser.write(struct.pack(fmt, cmd, int(val))) 116 | result = self.ser.readline().decode("utf-8").strip() 117 | log_msg = "tx [%s %d] rx [%s]" % (cmd, val, result) 118 | if verbose: 119 | logging.info(log_msg) 120 | else: 121 | logging.debug(log_msg) 122 | self.statusBar.showMessage(log_msg) 123 | 124 | def pressed(self, widget): 125 | logging.debug("pressed %s %d" % (widget['cmd'], widget['widget'].value())) 126 | widget['pressed'] = True 127 | 128 | def released(self, widget): 129 | logging.debug("released %s %d" % (widget['cmd'], widget['widget'].value())) 130 | widget['pressed'] = False 131 | 132 | def slider_moved(self, widget): 133 | if not self.record: 134 | logging.debug("setting %s for all = %d" % (widget['tip'], widget['widget'].value())) 135 | widget['seq'] = [ widget['widget'].value() ] * MainWindow.SEQ_STEPS 136 | widget['disp'].setValue(widget['widget'].value()) 137 | 138 | def get_ms_from_bpm(self): 139 | bpm = int(self.lineEdit_bpm.text()) 140 | ms = (60000*16/MainWindow.SEQ_STEPS)/bpm 141 | logging.info("%d bpm is %d ms with %d steps" % (bpm, ms, MainWindow.SEQ_STEPS)) 142 | return ms 143 | 144 | def update_bpm(self): 145 | self.timer.start(self.get_ms_from_bpm()) 146 | 147 | def update_beat(self): 148 | self.progressBar_beats.setValue(self.beat) 149 | self.beat += 1 150 | if self.beat == MainWindow.SEQ_STEPS: 151 | self.beat = 0 152 | if args.perf_stats: 153 | self.send_cmd(Cmd.AUDIO_PROC,0, verbose=True) 154 | if self.beat == MainWindow.SEQ_STEPS / 2: 155 | if args.perf_stats: 156 | self.send_cmd(Cmd.AUDIO_MEM,0, verbose=True) 157 | if self.record: 158 | for w in self.widget_config: 159 | if w['pressed']: 160 | logging.debug("setting %s for beat %d = %d" % (w['tip'], self.beat, w['widget'].value())) 161 | w['seq'][self.beat] = w['widget'].value() 162 | 163 | if self.play: 164 | for w in self.widget_config: 165 | if not w['pressed']: 166 | w['disp'].setValue(w['seq'][self.beat]) 167 | 168 | def reset_seq(self): 169 | for w in self.widget_config: 170 | w['seq'] = [w['widget'].value()] * MainWindow.SEQ_STEPS 171 | 172 | def reset_beat(self): 173 | self.beat = 0 174 | self.progressBar_beats.setValue(self.beat) 175 | self.timer.start(self.get_ms_from_bpm()) 176 | 177 | def keyPressEvent(self, e): 178 | if e.key() == QtCore.Qt.Key_R and not e.isAutoRepeat(): 179 | self.record = True 180 | self.button_rec.setChecked(True) 181 | logging.info('recording') 182 | 183 | def keyReleaseEvent(self, e): 184 | if e.key() == QtCore.Qt.Key_R and not e.isAutoRepeat(): 185 | self.record = False 186 | self.button_rec.setChecked(False) 187 | logging.info('stop recording') 188 | 189 | def closeEvent(self, event): 190 | logging.info("save settings") 191 | last_settings = [] 192 | for w in self.widget_config: 193 | last_settings.append({'value': w['widget'].value(), 'seq': w['seq']}) 194 | 195 | with open("settings.pkl", 'wb') as fh: 196 | pickle.dump(last_settings, fh) 197 | 198 | if __name__ == '__main__': 199 | parser = argparse.ArgumentParser(description="control fx") 200 | parser.add_argument('--perf-stats', help="log performance stats", action="store_const", const=True) 201 | parser.add_argument('--debug', help="debug logging", action="store_const", const=True) 202 | parser.add_argument('--mock-serial', help="show gui even if don't have teensy connected", action="store_const", const=True) 203 | parser.add_argument('--serial-port', help="what port", action="store", default='/dev/ttyACM0') 204 | args = parser.parse_args() 205 | 206 | # setup log 207 | log_format = logging.Formatter('%(asctime)s - %(module)-15s - %(levelname)-8s - %(message)s') 208 | # configure the client logging 209 | log = logging.getLogger('') 210 | # has to be set to debug as is the root logger 211 | if args.debug: 212 | log.setLevel(logging.DEBUG) 213 | else: 214 | log.setLevel(logging.INFO) 215 | 216 | # create console handler and set level to info 217 | ch = logging.StreamHandler() 218 | # create formatter for console 219 | ch.setFormatter(log_format) 220 | log.addHandler(ch) 221 | 222 | app = QtWidgets.QApplication(sys.argv) 223 | main = MainWindow() 224 | main.show() 225 | sys.exit(app.exec_()) 226 | -------------------------------------------------------------------------------- /hardware/audio-fx.pretty/teensy4smt.kicad_mod: -------------------------------------------------------------------------------- 1 | (module teensy4smt (layer F.Cu) (tedit 5E199A52) 2 | (descr "surface-mounted straight socket strip, 1x14, 2.54mm pitch, single row, style 1 (pin 1 left) (https://cdn.harwin.com/pdfs/M20-786.pdf), script generated") 3 | (tags "Surface mounted socket strip SMD 1x14 2.54mm single row style1 pin1 left") 4 | (attr smd) 5 | (fp_text reference U1 (at 0 -19.38) (layer F.SilkS) hide 6 | (effects (font (size 1 1) (thickness 0.15))) 7 | ) 8 | (fp_text value Teensy4.0 (at 7.025 18.95) (layer F.Fab) 9 | (effects (font (size 1 1) (thickness 0.15))) 10 | ) 11 | (fp_line (start -1.33 -17.94) (end 1.33 -17.94) (layer F.SilkS) (width 0.12)) 12 | (fp_line (start 1.33 -17.94) (end 1.33 -14.73) (layer F.SilkS) (width 0.12)) 13 | (fp_line (start 1.33 -13.21) (end 1.33 -9.65) (layer F.SilkS) (width 0.12)) 14 | (fp_line (start 1.33 -8.13) (end 1.33 -4.57) (layer F.SilkS) (width 0.12)) 15 | (fp_line (start 1.33 -3.05) (end 1.33 0.51) (layer F.SilkS) (width 0.12)) 16 | (fp_line (start 1.33 2.03) (end 1.33 5.59) (layer F.SilkS) (width 0.12)) 17 | (fp_line (start 1.33 7.11) (end 1.33 10.67) (layer F.SilkS) (width 0.12)) 18 | (fp_line (start 1.33 12.19) (end 1.33 15.75) (layer F.SilkS) (width 0.12)) 19 | (fp_line (start 1.33 17.27) (end 1.33 17.94) (layer F.SilkS) (width 0.12)) 20 | (fp_line (start -1.33 17.94) (end 1.33 17.94) (layer F.SilkS) (width 0.12)) 21 | (fp_line (start -1.33 -17.94) (end -1.33 -17.27) (layer F.SilkS) (width 0.12)) 22 | (fp_line (start -1.33 -15.75) (end -1.33 -12.19) (layer F.SilkS) (width 0.12)) 23 | (fp_line (start -1.33 -10.67) (end -1.33 -7.11) (layer F.SilkS) (width 0.12)) 24 | (fp_line (start -1.33 -5.59) (end -1.33 -2.03) (layer F.SilkS) (width 0.12)) 25 | (fp_line (start -1.33 -0.51) (end -1.33 3.05) (layer F.SilkS) (width 0.12)) 26 | (fp_line (start -1.33 4.57) (end -1.33 8.13) (layer F.SilkS) (width 0.12)) 27 | (fp_line (start -1.33 9.65) (end -1.33 13.21) (layer F.SilkS) (width 0.12)) 28 | (fp_line (start -1.33 14.73) (end -1.33 17.94) (layer F.SilkS) (width 0.12)) 29 | (fp_line (start -2.54 -17.27) (end -1.33 -17.27) (layer F.SilkS) (width 0.12)) 30 | (fp_line (start -0.635 -17.88) (end 1.27 -17.88) (layer F.Fab) (width 0.1)) 31 | (fp_line (start 1.27 -17.88) (end 1.27 17.88) (layer F.Fab) (width 0.1)) 32 | (fp_line (start 1.27 17.88) (end -1.27 17.88) (layer F.Fab) (width 0.1)) 33 | (fp_line (start -1.27 17.88) (end -1.27 -17.245) (layer F.Fab) (width 0.1)) 34 | (fp_line (start -1.27 -17.245) (end -0.635 -17.88) (layer F.Fab) (width 0.1)) 35 | (fp_line (start -2.27 -16.81) (end -1.27 -16.81) (layer F.Fab) (width 0.1)) 36 | (fp_line (start -1.27 -16.21) (end -2.27 -16.21) (layer F.Fab) (width 0.1)) 37 | (fp_line (start -2.27 -16.21) (end -2.27 -16.81) (layer F.Fab) (width 0.1)) 38 | (fp_line (start 1.27 -14.27) (end 2.27 -14.27) (layer F.Fab) (width 0.1)) 39 | (fp_line (start 2.27 -14.27) (end 2.27 -13.67) (layer F.Fab) (width 0.1)) 40 | (fp_line (start 2.27 -13.67) (end 1.27 -13.67) (layer F.Fab) (width 0.1)) 41 | (fp_line (start -2.27 -11.73) (end -1.27 -11.73) (layer F.Fab) (width 0.1)) 42 | (fp_line (start -1.27 -11.13) (end -2.27 -11.13) (layer F.Fab) (width 0.1)) 43 | (fp_line (start -2.27 -11.13) (end -2.27 -11.73) (layer F.Fab) (width 0.1)) 44 | (fp_line (start 1.27 -9.19) (end 2.27 -9.19) (layer F.Fab) (width 0.1)) 45 | (fp_line (start 2.27 -9.19) (end 2.27 -8.59) (layer F.Fab) (width 0.1)) 46 | (fp_line (start 2.27 -8.59) (end 1.27 -8.59) (layer F.Fab) (width 0.1)) 47 | (fp_line (start -2.27 -6.65) (end -1.27 -6.65) (layer F.Fab) (width 0.1)) 48 | (fp_line (start -1.27 -6.05) (end -2.27 -6.05) (layer F.Fab) (width 0.1)) 49 | (fp_line (start -2.27 -6.05) (end -2.27 -6.65) (layer F.Fab) (width 0.1)) 50 | (fp_line (start 1.27 -4.11) (end 2.27 -4.11) (layer F.Fab) (width 0.1)) 51 | (fp_line (start 2.27 -4.11) (end 2.27 -3.51) (layer F.Fab) (width 0.1)) 52 | (fp_line (start 2.27 -3.51) (end 1.27 -3.51) (layer F.Fab) (width 0.1)) 53 | (fp_line (start -2.27 -1.57) (end -1.27 -1.57) (layer F.Fab) (width 0.1)) 54 | (fp_line (start -1.27 -0.97) (end -2.27 -0.97) (layer F.Fab) (width 0.1)) 55 | (fp_line (start -2.27 -0.97) (end -2.27 -1.57) (layer F.Fab) (width 0.1)) 56 | (fp_line (start 1.27 0.97) (end 2.27 0.97) (layer F.Fab) (width 0.1)) 57 | (fp_line (start 2.27 0.97) (end 2.27 1.57) (layer F.Fab) (width 0.1)) 58 | (fp_line (start 2.27 1.57) (end 1.27 1.57) (layer F.Fab) (width 0.1)) 59 | (fp_line (start -2.27 3.51) (end -1.27 3.51) (layer F.Fab) (width 0.1)) 60 | (fp_line (start -1.27 4.11) (end -2.27 4.11) (layer F.Fab) (width 0.1)) 61 | (fp_line (start -2.27 4.11) (end -2.27 3.51) (layer F.Fab) (width 0.1)) 62 | (fp_line (start 1.27 6.05) (end 2.27 6.05) (layer F.Fab) (width 0.1)) 63 | (fp_line (start 2.27 6.05) (end 2.27 6.65) (layer F.Fab) (width 0.1)) 64 | (fp_line (start 2.27 6.65) (end 1.27 6.65) (layer F.Fab) (width 0.1)) 65 | (fp_line (start -2.27 8.59) (end -1.27 8.59) (layer F.Fab) (width 0.1)) 66 | (fp_line (start -1.27 9.19) (end -2.27 9.19) (layer F.Fab) (width 0.1)) 67 | (fp_line (start -2.27 9.19) (end -2.27 8.59) (layer F.Fab) (width 0.1)) 68 | (fp_line (start 1.27 11.13) (end 2.27 11.13) (layer F.Fab) (width 0.1)) 69 | (fp_line (start 2.27 11.13) (end 2.27 11.73) (layer F.Fab) (width 0.1)) 70 | (fp_line (start 2.27 11.73) (end 1.27 11.73) (layer F.Fab) (width 0.1)) 71 | (fp_line (start -2.27 13.67) (end -1.27 13.67) (layer F.Fab) (width 0.1)) 72 | (fp_line (start -1.27 14.27) (end -2.27 14.27) (layer F.Fab) (width 0.1)) 73 | (fp_line (start -2.27 14.27) (end -2.27 13.67) (layer F.Fab) (width 0.1)) 74 | (fp_line (start 1.27 16.21) (end 2.27 16.21) (layer F.Fab) (width 0.1)) 75 | (fp_line (start 2.27 16.21) (end 2.27 16.81) (layer F.Fab) (width 0.1)) 76 | (fp_line (start 2.27 16.81) (end 1.27 16.81) (layer F.Fab) (width 0.1)) 77 | (fp_line (start -3.1 -18.4) (end 3.1 -18.4) (layer F.CrtYd) (width 0.05)) 78 | (fp_line (start 3.1 -18.4) (end 3.1 18.4) (layer F.CrtYd) (width 0.05)) 79 | (fp_line (start 3.1 18.4) (end -3.1 18.4) (layer F.CrtYd) (width 0.05)) 80 | (fp_line (start -3.1 18.4) (end -3.1 -18.4) (layer F.CrtYd) (width 0.05)) 81 | (fp_text user %R (at 0 0 90) (layer F.Fab) 82 | (effects (font (size 1 1) (thickness 0.15))) 83 | ) 84 | (fp_line (start 17.51 1.57) (end 16.51 1.57) (layer F.Fab) (width 0.1)) 85 | (fp_line (start 12.97 3.51) (end 13.97 3.51) (layer F.Fab) (width 0.1)) 86 | (fp_line (start 16.51 -9.19) (end 17.51 -9.19) (layer F.Fab) (width 0.1)) 87 | (fp_line (start 17.51 -9.19) (end 17.51 -8.59) (layer F.Fab) (width 0.1)) 88 | (fp_line (start 13.97 9.19) (end 12.97 9.19) (layer F.Fab) (width 0.1)) 89 | (fp_line (start 12.97 9.19) (end 12.97 8.59) (layer F.Fab) (width 0.1)) 90 | (fp_line (start 18.34 18.4) (end 12.14 18.4) (layer F.CrtYd) (width 0.05)) 91 | (fp_line (start 12.14 18.4) (end 12.14 -18.4) (layer F.CrtYd) (width 0.05)) 92 | (fp_line (start 16.57 7.11) (end 16.57 10.67) (layer F.SilkS) (width 0.12)) 93 | (fp_line (start 16.51 0.97) (end 17.51 0.97) (layer F.Fab) (width 0.1)) 94 | (fp_line (start 17.51 0.97) (end 17.51 1.57) (layer F.Fab) (width 0.1)) 95 | (fp_text user %R (at 15.24 0 90) (layer F.Fab) 96 | (effects (font (size 1 1) (thickness 0.15))) 97 | ) 98 | (fp_line (start 13.97 -11.13) (end 12.97 -11.13) (layer F.Fab) (width 0.1)) 99 | (fp_line (start 12.97 -11.13) (end 12.97 -11.73) (layer F.Fab) (width 0.1)) 100 | (fp_line (start 16.51 6.05) (end 17.51 6.05) (layer F.Fab) (width 0.1)) 101 | (fp_line (start 17.51 6.05) (end 17.51 6.65) (layer F.Fab) (width 0.1)) 102 | (fp_line (start 17.51 -13.67) (end 16.51 -13.67) (layer F.Fab) (width 0.1)) 103 | (fp_line (start 12.97 -11.73) (end 13.97 -11.73) (layer F.Fab) (width 0.1)) 104 | (fp_line (start 13.97 -0.97) (end 12.97 -0.97) (layer F.Fab) (width 0.1)) 105 | (fp_line (start 12.97 -0.97) (end 12.97 -1.57) (layer F.Fab) (width 0.1)) 106 | (fp_line (start 16.51 17.88) (end 13.97 17.88) (layer F.Fab) (width 0.1)) 107 | (fp_line (start 12.97 14.27) (end 12.97 13.67) (layer F.Fab) (width 0.1)) 108 | (fp_line (start 16.51 16.21) (end 17.51 16.21) (layer F.Fab) (width 0.1)) 109 | (fp_line (start 17.51 16.21) (end 17.51 16.81) (layer F.Fab) (width 0.1)) 110 | (fp_line (start 17.51 16.81) (end 16.51 16.81) (layer F.Fab) (width 0.1)) 111 | (fp_line (start 12.14 -18.4) (end 18.34 -18.4) (layer F.CrtYd) (width 0.05)) 112 | (fp_line (start 18.34 -18.4) (end 18.34 18.4) (layer F.CrtYd) (width 0.05)) 113 | (fp_line (start 16.51 11.13) (end 17.51 11.13) (layer F.Fab) (width 0.1)) 114 | (fp_line (start 17.51 11.13) (end 17.51 11.73) (layer F.Fab) (width 0.1)) 115 | (fp_line (start 13.97 -6.05) (end 12.97 -6.05) (layer F.Fab) (width 0.1)) 116 | (fp_line (start 12.97 -6.05) (end 12.97 -6.65) (layer F.Fab) (width 0.1)) 117 | (fp_line (start 17.51 -3.51) (end 16.51 -3.51) (layer F.Fab) (width 0.1)) 118 | (fp_line (start 12.97 -1.57) (end 13.97 -1.57) (layer F.Fab) (width 0.1)) 119 | (fp_line (start 16.51 -4.11) (end 17.51 -4.11) (layer F.Fab) (width 0.1)) 120 | (fp_line (start 17.51 -4.11) (end 17.51 -3.51) (layer F.Fab) (width 0.1)) 121 | (fp_line (start 13.97 4.11) (end 12.97 4.11) (layer F.Fab) (width 0.1)) 122 | (fp_line (start 12.97 4.11) (end 12.97 3.51) (layer F.Fab) (width 0.1)) 123 | (fp_line (start 13.97 -17.245) (end 14.605 -17.88) (layer F.Fab) (width 0.1)) 124 | (fp_line (start 12.97 -16.81) (end 13.97 -16.81) (layer F.Fab) (width 0.1)) 125 | (fp_line (start 16.57 -8.13) (end 16.57 -4.57) (layer F.SilkS) (width 0.12)) 126 | (fp_line (start 16.57 -3.05) (end 16.57 0.51) (layer F.SilkS) (width 0.12)) 127 | (fp_line (start 16.57 2.03) (end 16.57 5.59) (layer F.SilkS) (width 0.12)) 128 | (fp_line (start 17.51 6.65) (end 16.51 6.65) (layer F.Fab) (width 0.1)) 129 | (fp_line (start 12.97 8.59) (end 13.97 8.59) (layer F.Fab) (width 0.1)) 130 | (fp_line (start 17.51 -8.59) (end 16.51 -8.59) (layer F.Fab) (width 0.1)) 131 | (fp_line (start 12.97 -6.65) (end 13.97 -6.65) (layer F.Fab) (width 0.1)) 132 | (fp_line (start 13.97 -16.21) (end 12.97 -16.21) (layer F.Fab) (width 0.1)) 133 | (fp_line (start 12.97 -16.21) (end 12.97 -16.81) (layer F.Fab) (width 0.1)) 134 | (fp_line (start 13.91 -17.94) (end 16.57 -17.94) (layer F.SilkS) (width 0.12)) 135 | (fp_line (start 16.57 -17.94) (end 16.57 -14.73) (layer F.SilkS) (width 0.12)) 136 | (fp_line (start 16.57 -13.21) (end 16.57 -9.65) (layer F.SilkS) (width 0.12)) 137 | (fp_line (start 16.51 -14.27) (end 17.51 -14.27) (layer F.Fab) (width 0.1)) 138 | (fp_line (start 17.51 -14.27) (end 17.51 -13.67) (layer F.Fab) (width 0.1)) 139 | (fp_line (start 16.51 -17.88) (end 16.51 17.88) (layer F.Fab) (width 0.1)) 140 | (fp_line (start 17.51 11.73) (end 16.51 11.73) (layer F.Fab) (width 0.1)) 141 | (fp_line (start 12.97 13.67) (end 13.97 13.67) (layer F.Fab) (width 0.1)) 142 | (fp_line (start 13.97 14.27) (end 12.97 14.27) (layer F.Fab) (width 0.1)) 143 | (fp_line (start 13.91 -5.59) (end 13.91 -2.03) (layer F.SilkS) (width 0.12)) 144 | (fp_line (start 13.91 -10.67) (end 13.91 -7.11) (layer F.SilkS) (width 0.12)) 145 | (fp_line (start 13.91 -15.75) (end 13.91 -12.19) (layer F.SilkS) (width 0.12)) 146 | (fp_line (start 13.91 4.57) (end 13.91 8.13) (layer F.SilkS) (width 0.12)) 147 | (fp_line (start 13.91 -17.94) (end 13.91 -17.27) (layer F.SilkS) (width 0.12)) 148 | (fp_line (start 13.91 9.65) (end 13.91 13.21) (layer F.SilkS) (width 0.12)) 149 | (fp_line (start 13.97 17.88) (end 13.97 -17.245) (layer F.Fab) (width 0.1)) 150 | (fp_line (start 13.91 17.94) (end 16.57 17.94) (layer F.SilkS) (width 0.12)) 151 | (fp_line (start 16.57 17.27) (end 16.57 17.94) (layer F.SilkS) (width 0.12)) 152 | (fp_line (start 16.57 12.19) (end 16.57 15.75) (layer F.SilkS) (width 0.12)) 153 | (fp_line (start 13.91 14.73) (end 13.91 17.94) (layer F.SilkS) (width 0.12)) 154 | (fp_line (start 14.605 -17.88) (end 16.51 -17.88) (layer F.Fab) (width 0.1)) 155 | (fp_line (start 13.91 -0.51) (end 13.91 3.05) (layer F.SilkS) (width 0.12)) 156 | (fp_line (start 12.7 -17.27) (end 13.91 -17.27) (layer F.SilkS) (width 0.12)) 157 | (pad 1 smd rect (at 1.65 -16.51) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 158 | (pad 3 smd rect (at 1.65 -11.43) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 159 | (pad 5 smd rect (at 1.65 -6.35) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 160 | (pad 7 smd rect (at 1.65 -1.27) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 161 | (pad 9 smd rect (at 1.65 3.81) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 162 | (pad 11 smd rect (at 1.65 8.89) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 163 | (pad 13 smd rect (at 1.65 13.97) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 164 | (pad 2 smd rect (at -1.65 -13.97) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 165 | (pad 4 smd rect (at -1.65 -8.89) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 166 | (pad 6 smd rect (at -1.65 -3.81) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 167 | (pad 8 smd rect (at -1.65 1.27) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 168 | (pad 10 smd rect (at -1.65 6.35) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 169 | (pad 12 smd rect (at -1.65 11.43) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 170 | (pad 14 smd rect (at -1.65 16.51) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 171 | (pad 23 smd rect (at 16.89 8.89) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 172 | (pad 21 smd rect (at 16.89 13.97) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 173 | (pad 20 smd rect (at 13.59 16.51) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 174 | (pad 31 smd rect (at 16.89 -11.43) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 175 | (pad 26 smd rect (at 13.59 1.27) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 176 | (pad 28 smd rect (at 13.59 -3.81) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 177 | (pad 30 smd rect (at 13.59 -8.89) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 178 | (pad 32 smd rect (at 13.59 -13.97) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 179 | (pad 24 smd rect (at 13.59 6.35) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 180 | (pad 33 smd rect (at 16.89 -16.51) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 181 | (pad 27 smd rect (at 16.89 -1.27) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 182 | (pad 22 smd rect (at 13.59 11.43) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 183 | (pad 25 smd rect (at 16.89 3.81) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 184 | (pad 29 smd rect (at 16.89 -6.35) (size 1.9 1) (layers F.Cu F.Paste F.Mask)) 185 | (model ${KISYS3DMOD}/Connector_PinSocket_2.54mm.3dshapes/PinSocket_1x14_P2.54mm_Vertical_SMD_Pin1Left.wrl 186 | (at (xyz 0 0 0)) 187 | (scale (xyz 1 1 1)) 188 | (rotate (xyz 0 0 0)) 189 | ) 190 | (model ${KISYS3DMOD}/Connector_PinSocket_2.54mm.3dshapes/PinSocket_1x14_P2.54mm_Vertical_SMD_Pin1Left.wrl 191 | (offset (xyz 15.5 0 0)) 192 | (scale (xyz 1 1 1)) 193 | (rotate (xyz 0 0 0)) 194 | ) 195 | ) 196 | -------------------------------------------------------------------------------- /hardware/teensy-fx-cache.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.4 2 | #encoding utf-8 3 | # 4 | # Connector_AudioJack3 5 | # 6 | DEF Connector_AudioJack3 J 0 20 Y Y 1 F N 7 | F0 "J" 0 350 50 H V C CNN 8 | F1 "Connector_AudioJack3" 0 250 50 H V C CNN 9 | F2 "" 0 0 50 H I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | $FPLIST 12 | Jack* 13 | $ENDFPLIST 14 | DRAW 15 | S -200 -200 -250 -100 0 1 10 F 16 | S 100 150 -200 -200 0 1 10 f 17 | P 4 0 1 10 0 -100 25 -125 50 -100 100 -100 N 18 | P 5 0 1 10 -75 -100 -50 -125 -25 -100 -25 0 100 0 N 19 | P 5 0 1 10 100 100 -100 100 -100 -100 -125 -125 -150 -100 N 20 | X ~ R 200 0 100 L 50 50 1 1 P 21 | X ~ S 200 100 100 L 50 50 1 1 P 22 | X ~ T 200 -100 100 L 50 50 1 1 P 23 | ENDDRAW 24 | ENDDEF 25 | # 26 | # Connector_TestPoint 27 | # 28 | DEF Connector_TestPoint TP 0 30 N N 1 F N 29 | F0 "TP" 0 270 50 H V C CNN 30 | F1 "Connector_TestPoint" 0 200 50 H V C CNN 31 | F2 "" 200 0 50 H I C CNN 32 | F3 "" 200 0 50 H I C CNN 33 | $FPLIST 34 | Pin* 35 | Test* 36 | $ENDFPLIST 37 | DRAW 38 | C 0 130 30 0 1 0 N 39 | X 1 1 0 0 100 U 50 50 1 1 P 40 | ENDDRAW 41 | ENDDEF 42 | # 43 | # Device_C 44 | # 45 | DEF Device_C C 0 10 N Y 1 F N 46 | F0 "C" 25 100 50 H V L CNN 47 | F1 "Device_C" 25 -100 50 H V L CNN 48 | F2 "" 38 -150 50 H I C CNN 49 | F3 "" 0 0 50 H I C CNN 50 | $FPLIST 51 | C_* 52 | $ENDFPLIST 53 | DRAW 54 | P 2 0 1 20 -80 -30 80 -30 N 55 | P 2 0 1 20 -80 30 80 30 N 56 | X ~ 1 0 150 110 D 50 50 1 1 P 57 | X ~ 2 0 -150 110 U 50 50 1 1 P 58 | ENDDRAW 59 | ENDDEF 60 | # 61 | # Device_C_Small 62 | # 63 | DEF Device_C_Small C 0 10 N N 1 F N 64 | F0 "C" 10 70 50 H V L CNN 65 | F1 "Device_C_Small" 10 -80 50 H V L CNN 66 | F2 "" 0 0 50 H I C CNN 67 | F3 "" 0 0 50 H I C CNN 68 | $FPLIST 69 | C_* 70 | $ENDFPLIST 71 | DRAW 72 | P 2 0 1 13 -60 -20 60 -20 N 73 | P 2 0 1 12 -60 20 60 20 N 74 | X ~ 1 0 100 80 D 50 50 1 1 P 75 | X ~ 2 0 -100 80 U 50 50 1 1 P 76 | ENDDRAW 77 | ENDDEF 78 | # 79 | # Device_Ferrite_Bead_Small 80 | # 81 | DEF Device_Ferrite_Bead_Small FB 0 0 N Y 1 F N 82 | F0 "FB" 75 50 50 H V L CNN 83 | F1 "Device_Ferrite_Bead_Small" 75 -50 50 H V L CNN 84 | F2 "" -70 0 50 V I C CNN 85 | F3 "" 0 0 50 H I C CNN 86 | $FPLIST 87 | Inductor_* 88 | L_* 89 | *Ferrite* 90 | $ENDFPLIST 91 | DRAW 92 | P 2 0 1 0 0 -50 0 -31 N 93 | P 2 0 1 0 0 35 0 51 N 94 | P 5 0 1 0 -72 11 -44 59 72 -8 44 -56 -72 11 N 95 | X ~ 1 0 100 50 D 50 50 1 1 P 96 | X ~ 2 0 -100 50 U 50 50 1 1 P 97 | ENDDRAW 98 | ENDDEF 99 | # 100 | # Device_LED 101 | # 102 | DEF Device_LED D 0 40 N N 1 F N 103 | F0 "D" 0 100 50 H V C CNN 104 | F1 "Device_LED" 0 -100 50 H V C CNN 105 | F2 "" 0 0 50 H I C CNN 106 | F3 "" 0 0 50 H I C CNN 107 | $FPLIST 108 | LED* 109 | LED_SMD:* 110 | LED_THT:* 111 | $ENDFPLIST 112 | DRAW 113 | P 2 0 1 8 -50 -50 -50 50 N 114 | P 2 0 1 0 -50 0 50 0 N 115 | P 4 0 1 8 50 -50 50 50 -50 0 50 -50 N 116 | P 5 0 1 0 -120 -30 -180 -90 -150 -90 -180 -90 -180 -60 N 117 | P 5 0 1 0 -70 -30 -130 -90 -100 -90 -130 -90 -130 -60 N 118 | X K 1 -150 0 100 R 50 50 1 1 P 119 | X A 2 150 0 100 L 50 50 1 1 P 120 | ENDDRAW 121 | ENDDEF 122 | # 123 | # Device_R 124 | # 125 | DEF Device_R R 0 0 N Y 1 F N 126 | F0 "R" 80 0 50 V V C CNN 127 | F1 "Device_R" 0 0 50 V V C CNN 128 | F2 "" -70 0 50 V I C CNN 129 | F3 "" 0 0 50 H I C CNN 130 | $FPLIST 131 | R_* 132 | $ENDFPLIST 133 | DRAW 134 | S -40 -100 40 100 0 1 10 N 135 | X ~ 1 0 150 50 D 50 50 1 1 P 136 | X ~ 2 0 -150 50 U 50 50 1 1 P 137 | ENDDRAW 138 | ENDDEF 139 | # 140 | # Device_R_POT 141 | # 142 | DEF Device_R_POT RV 0 40 Y N 1 F N 143 | F0 "RV" -175 0 50 V V C CNN 144 | F1 "Device_R_POT" -100 0 50 V V C CNN 145 | F2 "" 0 0 50 H I C CNN 146 | F3 "" 0 0 50 H I C CNN 147 | $FPLIST 148 | Potentiometer* 149 | $ENDFPLIST 150 | DRAW 151 | S 40 100 -40 -100 0 1 10 N 152 | P 2 0 1 0 100 0 60 0 N 153 | P 4 0 1 0 45 0 90 20 90 -20 45 0 F 154 | X 1 1 0 150 50 D 50 50 1 1 P 155 | X 2 2 150 0 50 L 50 50 1 1 P 156 | X 3 3 0 -150 50 U 50 50 1 1 P 157 | ENDDRAW 158 | ENDDEF 159 | # 160 | # Driver_LED_TLC5947DAP 161 | # 162 | DEF Driver_LED_TLC5947DAP U 0 40 Y Y 1 F N 163 | F0 "U" -550 1500 50 H V L CNN 164 | F1 "Driver_LED_TLC5947DAP" -550 1400 50 H V L CNN 165 | F2 "Package_SO:HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm_ThermalVias" -550 1600 50 H I L CNN 166 | F3 "" 0 0 50 H I C CNN 167 | $FPLIST 168 | HTSSOP* 169 | $ENDFPLIST 170 | DRAW 171 | S -550 1350 550 -1250 0 1 10 f 172 | X GND 1 -100 -1400 150 U 50 50 0 1 W 173 | X OUT5 10 700 700 150 L 50 50 0 1 O 174 | X OUT6 11 700 600 150 L 50 50 0 1 O 175 | X OUT7 12 700 500 150 L 50 50 0 1 O 176 | X OUT8 13 700 400 150 L 50 50 0 1 O 177 | X OUT9 14 700 300 150 L 50 50 0 1 O 178 | X OUT10 15 700 200 150 L 50 50 0 1 O 179 | X OUT11 16 700 100 150 L 50 50 0 1 O 180 | X OUT12 17 700 0 150 L 50 50 0 1 O 181 | X OUT13 18 700 -100 150 L 50 50 0 1 O 182 | X OUT14 19 700 -200 150 L 50 50 0 1 O 183 | X BLANK 2 -700 200 150 R 50 50 0 1 I 184 | X OUT15 20 700 -300 150 L 50 50 0 1 O 185 | X OUT16 21 700 -400 150 L 50 50 0 1 O 186 | X OUT17 22 700 -500 150 L 50 50 0 1 O 187 | X OUT18 23 700 -600 150 L 50 50 0 1 O 188 | X OUT19 24 700 -700 150 L 50 50 0 1 O 189 | X OUT20 25 700 -800 150 L 50 50 0 1 O 190 | X OUT21 26 700 -900 150 L 50 50 0 1 O 191 | X OUT22 27 700 -1000 150 L 50 50 0 1 O 192 | X OUT23 28 700 -1100 150 L 50 50 0 1 O 193 | X SOUT 29 -700 -200 150 R 50 50 0 1 O 194 | X SCLK 3 -700 0 150 R 50 50 0 1 I 195 | X XLAT 30 -700 100 150 R 50 50 0 1 I 196 | X IREF 31 -700 300 150 R 50 50 0 1 I 197 | X VCC 32 200 1500 150 D 50 50 0 1 W 198 | X PowerPAD 33 100 -1400 150 U 50 50 0 1 W 199 | X SIN 4 -700 -100 150 R 50 50 0 1 I 200 | X OUT0 5 700 1200 150 L 50 50 0 1 O 201 | X OUT1 6 700 1100 150 L 50 50 0 1 O 202 | X OUT2 7 700 1000 150 L 50 50 0 1 O 203 | X OUT3 8 700 900 150 L 50 50 0 1 O 204 | X OUT4 9 700 800 150 L 50 50 0 1 O 205 | ENDDRAW 206 | ENDDEF 207 | # 208 | # Memory_Flash_W25Q128JVS 209 | # 210 | DEF Memory_Flash_W25Q128JVS U 0 20 Y Y 1 F N 211 | F0 "U" -350 350 50 H V C CNN 212 | F1 "Memory_Flash_W25Q128JVS" 300 350 50 H V C CNN 213 | F2 "Package_SO:SOIC-8_5.23x5.23mm_P1.27mm" 0 0 50 H I C CNN 214 | F3 "" 0 0 50 H I C CNN 215 | ALIAS W25Q128JVS 216 | $FPLIST 217 | SOIC*5.23x5.23mm*P1.27mm* 218 | $ENDFPLIST 219 | DRAW 220 | S -400 300 400 -300 0 1 10 f 221 | X ~CS 1 -500 100 100 R 50 50 1 1 I 222 | X DO(IO1) 2 500 100 100 L 50 50 1 1 B 223 | X IO2 3 500 -100 100 L 50 50 1 1 B 224 | X GND 4 0 -400 100 U 50 50 1 1 W 225 | X DI(IO0) 5 500 200 100 L 50 50 1 1 B 226 | X CLK 6 -500 -100 100 R 50 50 1 1 I 227 | X IO3 7 500 -200 100 L 50 50 1 1 B 228 | X VCC 8 0 400 100 D 50 50 1 1 W 229 | ENDDRAW 230 | ENDDEF 231 | # 232 | # power_+1V8 233 | # 234 | DEF power_+1V8 #PWR 0 0 Y Y 1 F P 235 | F0 "#PWR" 0 -150 50 H I C CNN 236 | F1 "power_+1V8" 0 140 50 H V C CNN 237 | F2 "" 0 0 50 H I C CNN 238 | F3 "" 0 0 50 H I C CNN 239 | DRAW 240 | P 2 0 1 0 -30 50 0 100 N 241 | P 2 0 1 0 0 0 0 100 N 242 | P 2 0 1 0 0 100 30 50 N 243 | X +1V8 1 0 0 0 U 50 50 1 1 W N 244 | ENDDRAW 245 | ENDDEF 246 | # 247 | # power_+3.3V 248 | # 249 | DEF power_+3.3V #PWR 0 0 Y Y 1 F P 250 | F0 "#PWR" 0 -150 50 H I C CNN 251 | F1 "power_+3.3V" 0 140 50 H V C CNN 252 | F2 "" 0 0 50 H I C CNN 253 | F3 "" 0 0 50 H I C CNN 254 | ALIAS +3.3V 255 | DRAW 256 | P 2 0 1 0 -30 50 0 100 N 257 | P 2 0 1 0 0 0 0 100 N 258 | P 2 0 1 0 0 100 30 50 N 259 | X +3V3 1 0 0 0 U 50 50 1 1 W N 260 | ENDDRAW 261 | ENDDEF 262 | # 263 | # power_+3V3 264 | # 265 | DEF power_+3V3 #PWR 0 0 Y Y 1 F P 266 | F0 "#PWR" 0 -150 50 H I C CNN 267 | F1 "power_+3V3" 0 140 50 H V C CNN 268 | F2 "" 0 0 50 H I C CNN 269 | F3 "" 0 0 50 H I C CNN 270 | DRAW 271 | P 2 0 1 0 -30 50 0 100 N 272 | P 2 0 1 0 0 0 0 100 N 273 | P 2 0 1 0 0 100 30 50 N 274 | X +3V3 1 0 0 0 U 50 50 1 1 W N 275 | ENDDRAW 276 | ENDDEF 277 | # 278 | # power_+5V 279 | # 280 | DEF power_+5V #PWR 0 0 Y Y 1 F P 281 | F0 "#PWR" 0 -150 50 H I C CNN 282 | F1 "power_+5V" 0 140 50 H V C CNN 283 | F2 "" 0 0 50 H I C CNN 284 | F3 "" 0 0 50 H I C CNN 285 | DRAW 286 | P 2 0 1 0 -30 50 0 100 N 287 | P 2 0 1 0 0 0 0 100 N 288 | P 2 0 1 0 0 100 30 50 N 289 | X +5V 1 0 0 0 U 50 50 1 1 W N 290 | ENDDRAW 291 | ENDDEF 292 | # 293 | # power_+5VA 294 | # 295 | DEF power_+5VA #PWR 0 0 Y Y 1 F P 296 | F0 "#PWR" 0 -150 50 H I C CNN 297 | F1 "power_+5VA" 0 140 50 H V C CNN 298 | F2 "" 0 0 50 H I C CNN 299 | F3 "" 0 0 50 H I C CNN 300 | DRAW 301 | P 2 0 1 0 -30 50 0 100 N 302 | P 2 0 1 0 0 0 0 100 N 303 | P 2 0 1 0 0 100 30 50 N 304 | X +5VA 1 0 0 0 U 50 50 1 1 W N 305 | ENDDRAW 306 | ENDDEF 307 | # 308 | # power_GND 309 | # 310 | DEF power_GND #PWR 0 0 Y Y 1 F P 311 | F0 "#PWR" 0 -250 50 H I C CNN 312 | F1 "power_GND" 0 -150 50 H V C CNN 313 | F2 "" 0 0 50 H I C CNN 314 | F3 "" 0 0 50 H I C CNN 315 | DRAW 316 | P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N 317 | X GND 1 0 0 0 D 50 50 1 1 W N 318 | ENDDRAW 319 | ENDDEF 320 | # 321 | # power_PWR_FLAG 322 | # 323 | DEF power_PWR_FLAG #FLG 0 0 N N 1 F P 324 | F0 "#FLG" 0 75 50 H I C CNN 325 | F1 "power_PWR_FLAG" 0 150 50 H V C CNN 326 | F2 "" 0 0 50 H I C CNN 327 | F3 "" 0 0 50 H I C CNN 328 | DRAW 329 | P 6 0 1 0 0 0 0 50 -40 75 0 100 40 75 0 50 N 330 | X pwr 1 0 0 0 U 50 50 0 0 w 331 | ENDDRAW 332 | ENDDEF 333 | # 334 | # teensy-fx_4067-teensy_beats-cache 335 | # 336 | DEF teensy-fx_4067-teensy_beats-cache U 0 30 Y Y 1 F N 337 | F0 "U" 250 850 50 H V C CNN 338 | F1 "teensy-fx_4067-teensy_beats-cache" 300 -900 50 H V C CNN 339 | F2 "" 0 0 50 H I C CNN 340 | F3 "" 0 0 50 H I C CNN 341 | DRAW 342 | S 300 800 -300 -800 0 1 0 N 343 | X Z 1 -600 -550 300 R 50 50 1 1 I 344 | X A0 10 -600 150 300 R 50 50 1 1 I 345 | X A1 11 -600 50 300 R 50 50 1 1 I 346 | X Vss 12 0 -800 0 U 50 50 1 1 W 347 | X A3 13 -600 -150 300 R 50 50 1 1 I 348 | X A2 14 -600 -50 300 R 50 50 1 1 I 349 | X ~E 15 -600 550 300 R 50 50 1 1 I I 350 | X A15 16 600 -750 300 L 50 50 1 1 O 351 | X A14 17 600 -650 300 L 50 50 1 1 O 352 | X A13 18 600 -550 300 L 50 50 1 1 O 353 | X A12 19 600 -450 300 L 50 50 1 1 O 354 | X A7 2 600 50 300 L 50 50 1 1 O 355 | X A11 20 600 -350 300 L 50 50 1 1 O 356 | X A10 21 600 -250 300 L 50 50 1 1 O 357 | X A9 22 600 -150 300 L 50 50 1 1 O 358 | X A8 23 600 -50 300 L 50 50 1 1 O 359 | X Vdd 24 0 800 0 D 50 50 1 1 W 360 | X A3 3 600 150 300 L 50 50 1 1 O 361 | X A5 4 600 250 300 L 50 50 1 1 O 362 | X A4 5 600 350 300 L 50 50 1 1 O 363 | X A3 6 600 450 300 L 50 50 1 1 O 364 | X A2 7 600 550 300 L 50 50 1 1 O 365 | X A1 8 600 650 300 L 50 50 1 1 O 366 | X A0 9 600 750 300 L 50 50 1 1 O 367 | ENDDRAW 368 | ENDDEF 369 | # 370 | # teensy-fx_SparkFun-IC-Analog_SGTL5000-teensy_beats-cache 371 | # 372 | DEF teensy-fx_SparkFun-IC-Analog_SGTL5000-teensy_beats-cache U 0 40 Y Y 1 F N 373 | F0 "U" 50 50 60 V V C CNN 374 | F1 "teensy-fx_SparkFun-IC-Analog_SGTL5000-teensy_beats-cache" 0 1400 60 H V C CNN 375 | F2 "" 0 50 60 H V C CNN 376 | F3 "" 0 50 60 H V C CNN 377 | $FPLIST 378 | QFN-32* 379 | $ENDFPLIST 380 | DRAW 381 | S -500 -900 500 850 0 1 0 N 382 | X GND 1 -200 -1100 200 U 50 50 1 1 I 383 | X VAG 10 -700 -350 200 R 50 50 1 1 I 384 | X LINEOUTR 11 700 400 200 L 50 50 1 1 I 385 | X LINEOUTL 12 700 300 200 L 50 50 1 1 I 386 | X LINEINR 13 700 500 200 L 50 50 1 1 I 387 | X LINEINL 14 700 600 200 L 50 50 1 1 I 388 | X MIC 15 700 -400 200 L 50 50 1 1 I 389 | X MICBIAS 16 700 -550 200 L 50 50 1 1 I 390 | X CPFILT 18 -700 -450 200 R 50 50 1 1 I 391 | X HPR 2 700 -100 200 L 50 50 1 1 I 392 | X vddio 20 0 1050 200 D 50 50 1 1 I 393 | X MCLK 21 -700 300 200 R 50 50 1 1 I 394 | X LRCLK 23 -700 100 200 R 50 50 1 1 I 395 | X BCLK 24 -700 200 200 R 50 50 1 1 I 396 | X I2S_OUT 25 -700 0 200 R 50 50 1 1 O 397 | X I2S_IN 26 -700 -100 200 R 50 50 1 1 I 398 | X SDA 27 -700 600 200 R 50 50 1 1 I 399 | X SCL 29 -700 500 200 R 50 50 1 1 I 400 | X GND 3 0 -1100 200 U 50 50 1 1 I 401 | X vddd 30 -200 1050 200 D 50 50 1 1 I 402 | X ADDR 31 -700 -550 200 R 50 50 1 1 I 403 | X MODE 32 -700 -650 200 R 50 50 1 1 I 404 | X GND 33 400 -1100 200 U 50 50 1 1 I 405 | X HPVGND 4 700 -200 200 L 50 50 1 1 I 406 | X vdda 5 200 1050 200 D 50 50 1 1 I 407 | X HPL 6 700 0 200 L 50 50 1 1 I 408 | X GND 7 200 -1100 200 U 50 50 1 1 I 409 | ENDDRAW 410 | ENDDEF 411 | # 412 | # teensy-fx_Switch_SW_Push-teensy_beats-cache 413 | # 414 | DEF teensy-fx_Switch_SW_Push-teensy_beats-cache SW 0 40 N N 1 F N 415 | F0 "SW" 50 100 50 H V L CNN 416 | F1 "teensy-fx_Switch_SW_Push-teensy_beats-cache" 0 -60 50 H V C CNN 417 | F2 "" 0 200 50 H I C CNN 418 | F3 "" 0 200 50 H I C CNN 419 | DRAW 420 | C -80 0 20 0 1 0 N 421 | C 80 0 20 0 1 0 N 422 | P 2 0 1 0 0 50 0 120 N 423 | P 2 0 1 0 100 50 -100 50 N 424 | X 1 1 -200 0 100 R 50 50 0 1 P 425 | X 2 2 200 0 100 L 50 50 0 1 P 426 | ENDDRAW 427 | ENDDEF 428 | # 429 | # teensy-fx_ldo 430 | # 431 | DEF teensy-fx_ldo U 0 40 Y Y 1 F N 432 | F0 "U" 0 250 50 H V C CNN 433 | F1 "teensy-fx_ldo" 0 150 50 H V C CNN 434 | F2 "" 0 0 50 H I C CNN 435 | F3 "" 0 0 50 H I C CNN 436 | DRAW 437 | S -300 100 300 -150 0 1 0 N 438 | X vout 1 400 0 100 L 50 50 1 1 I 439 | X vin 2 -400 0 100 R 50 50 1 1 I 440 | X gnd 3 0 -250 100 U 50 50 1 1 I 441 | ENDDRAW 442 | ENDDEF 443 | # 444 | # teensy_Teensy4.0 445 | # 446 | DEF teensy_Teensy4.0 U 0 40 Y Y 1 F N 447 | F0 "U" 0 1550 50 H V C CNN 448 | F1 "teensy_Teensy4.0" 0 -1550 50 H V C CNN 449 | F2 "" -400 200 50 H I C CNN 450 | F3 "" -400 200 50 H I C CNN 451 | DRAW 452 | T 0 450 -950 50 0 0 0 "3.6V to 5.5V" Normal 0 C C 453 | T 0 450 -1150 50 0 0 0 "max 250mA" Normal 0 C C 454 | S -900 1450 900 -1450 0 1 0 N 455 | S -800 -1250 -800 -1250 0 1 0 N 456 | X 8_TX2_IN1 10 -1100 450 200 R 50 50 0 0 B 457 | X 9_OUT1C 11 -1100 350 200 R 50 50 0 0 B 458 | X 10_CS_MQSR 12 -1100 250 200 R 50 50 0 0 B 459 | X 11_MOSI_CTX1 13 -1100 150 200 R 50 50 0 0 B 460 | X 12_MISO_MQSL 14 -1100 50 200 R 50 50 0 0 B 461 | X VBAT 15 -1100 -50 200 R 50 50 0 0 W 462 | X 3V3 16 -1100 -150 200 R 50 50 0 0 w 463 | X GND 17 -1100 -250 200 R 50 50 0 0 W 464 | X PROGRAM 18 -1100 -350 200 R 50 50 0 0 I 465 | X ON_OFF 19 -1100 -450 200 R 50 50 0 0 I 466 | X 13_SCK_CRX1_LED 20 -1100 -550 200 R 50 50 0 0 B 467 | X 14_A0_TX3_SPDIF_OUT 21 -1100 -650 200 R 50 50 0 0 B 468 | X 15_A1_RX3_SPDIF_IN 22 -1100 -750 200 R 50 50 0 0 B 469 | X 16_A2_RX4_SCL1 23 -1100 -850 200 R 50 50 0 0 B 470 | X 17_A3_TX4_SDA1 24 -1100 -950 200 R 50 50 0 0 B 471 | X 18_A4_SDA0 25 -1100 -1050 200 R 50 50 0 0 B 472 | X 19_A5_SCL0 26 -1100 -1150 200 R 50 50 0 0 B 473 | X 20_A6_TX5_LRCLK1 27 -1100 -1250 200 R 50 50 0 0 B 474 | X 21_A7_RX5_BCLK1 28 -1100 -1350 200 R 50 50 0 0 B 475 | X 22_A8_CTX1 29 1100 -1350 200 L 50 50 0 0 B 476 | X 23_A9_CRX1_MCLK1 30 1100 -1250 200 L 50 50 0 0 B 477 | X 3V3 31 1100 -1150 200 L 50 50 0 0 w 478 | X GND 32 1100 -1050 200 L 50 50 0 0 W 479 | X VIN 33 1100 -950 200 L 50 50 0 0 W 480 | X VUSB 34 1100 -850 200 L 50 50 0 0 w 481 | X 3_LRCLK2 5 -1100 950 200 R 50 50 0 0 B 482 | X 4_BCLK2 6 -1100 850 200 R 50 50 0 0 B 483 | X 5_IN2 7 -1100 750 200 R 50 50 0 0 B 484 | X 6_OUT1D 8 -1100 650 200 R 50 50 0 0 B 485 | X 7_RX2_OUT1A 9 -1100 550 200 R 50 50 0 0 B 486 | X 24_A10_TX6_SCL2 ~ 1100 -550 200 L 50 50 0 0 B 487 | X 25_A11_RX6_SDA2 ~ 1100 -450 200 L 50 50 0 0 B 488 | X 26_A12_MOSI1 ~ 1100 -350 200 L 50 50 0 0 B 489 | X 27_A13_SCK1 ~ 1100 -250 200 L 50 50 0 0 B 490 | X 28_RX7 ~ 1100 -150 200 L 50 50 0 0 B 491 | X 29_TX7 ~ 1100 -50 200 L 50 50 0 0 B 492 | X 30_CRX3 ~ 1100 50 200 L 50 50 0 0 B 493 | X 31_CTX3 ~ 1100 150 200 L 50 50 0 0 B 494 | X 32_OUT1B ~ 1100 250 200 L 50 50 0 0 B 495 | X 33_MCLK2 ~ 1100 350 200 L 50 50 0 0 B 496 | X 34_DAT1_MISO2 ~ 1100 450 200 L 50 50 0 0 B 497 | X 35_DAT1_MOSI2 ~ 1100 550 200 L 50 50 0 0 B 498 | X 36_CLK_CS2 ~ 1100 750 200 L 50 50 0 0 B 499 | X 37_CMD_SCK2 ~ 1100 950 200 L 50 50 0 0 B 500 | X 38_DAT3_RX5 ~ 1100 1050 200 L 50 50 0 0 B 501 | X 39_DAT2_TX5 ~ 1100 1150 200 L 50 50 0 0 B 502 | X 3V3 ~ 1100 850 200 L 50 50 0 0 w 503 | X D+ ~ 1100 1350 200 L 50 50 0 0 B 504 | X D- ~ 1100 1250 200 L 50 50 0 0 B 505 | X GND ~ 1100 650 200 L 50 50 0 0 B 506 | X GND 1 -1100 1350 200 R 50 50 1 1 W 507 | X 0_RX1_CRX2 2 -1100 1250 200 R 50 50 1 1 B 508 | X 1_TX1_CTX2 3 -1100 1150 200 R 50 50 1 1 B 509 | X 2_OUT2 4 -1100 1050 200 R 50 50 1 1 B 510 | ENDDRAW 511 | ENDDEF 512 | # 513 | #End Library 514 | -------------------------------------------------------------------------------- /src/fx.ino: -------------------------------------------------------------------------------- 1 | /* 2 | https://forum.pjrc.com/threads/25679-Audio-adapter-schematic 3 | 4 | https://www.pjrc.com/teensy/gui/index.html 5 | 6 | https://github.com/PaulStoffregen/Audio/tree/master/examples 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | //16 -> 69 auto generated from audio tool 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | // GUItool: begin automatically generated code 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | // GUItool: begin automatically generated code 30 | AudioSynthNoisePink pink2; //xy=60.000030517578125,799 31 | AudioInputI2S i2s2; //xy=63,319 32 | AudioSynthNoisePink pink1; //xy=63.000030517578125,744 33 | AudioFilterStateVariable filter_noise_l; //xy=206.00003051757812,749 34 | AudioFilterStateVariable filter_noise_r; //xy=209.00003051757812,807 35 | AudioAnalyzePeak peak1; //xy=227,127 36 | AudioMixer4 mix_del_l; //xy=312,424 37 | AudioMixer4 mix_del_r; //xy=320,619 38 | AudioMixer4 mix_rev; //xy=363.1999969482422,237.1999969482422 39 | AudioFilterStateVariable filter_del_r; //xy=429,744 40 | AudioFilterStateVariable filter_del_l; //xy=495,488 41 | AudioFilterStateVariable filter_rev; //xy=555,183 42 | AudioEffectDelay delay_r; //xy=614,867 43 | AudioEffectDelay delay_l; //xy=630,571 44 | AudioEffectReverb freeverbs1; //xy=642,279 45 | AudioMixer4 mix_op_l; //xy=949,382 46 | AudioMixer4 mix_op_r; //xy=952,475 47 | AudioOutputI2S i2s1; //xy=1179,417 48 | AudioConnection patchCord1(pink2, 0, filter_noise_r, 0); 49 | AudioConnection patchCord2(i2s2, 0, peak1, 0); 50 | AudioConnection patchCord3(i2s2, 1, mix_op_r, 0); 51 | AudioConnection patchCord4(i2s2, 1, mix_del_r, 0); 52 | AudioConnection patchCord5(i2s2, 1, mix_rev, 1); 53 | AudioConnection patchCord6(i2s2, 1, mix_op_l, 0); 54 | AudioConnection patchCord7(i2s2, 1, mix_del_l, 0); 55 | AudioConnection patchCord8(pink1, 0, filter_noise_l, 0); 56 | AudioConnection patchCord9(filter_noise_l, 1, mix_del_l, 2); 57 | AudioConnection patchCord10(filter_noise_r, 1, mix_del_r, 2); 58 | AudioConnection patchCord11(mix_del_l, 0, filter_del_l, 0); 59 | AudioConnection patchCord12(mix_del_r, 0, filter_del_r, 0); 60 | AudioConnection patchCord13(mix_rev, 0, filter_rev, 0); 61 | AudioConnection patchCord14(filter_del_r, 2, delay_r, 0); 62 | AudioConnection patchCord15(filter_del_l, 2, delay_l, 0); 63 | AudioConnection patchCord16(filter_rev, 2, freeverbs1, 0); 64 | AudioConnection patchCord17(delay_r, 0, mix_op_r, 2); 65 | AudioConnection patchCord18(delay_r, 0, mix_del_l, 1); 66 | AudioConnection patchCord19(delay_l, 0, mix_op_l, 2); 67 | AudioConnection patchCord20(delay_l, 0, mix_del_r, 1); 68 | AudioConnection patchCord21(freeverbs1, 0, mix_op_l, 1); 69 | AudioConnection patchCord22(freeverbs1, 0, mix_op_r, 1); 70 | AudioConnection patchCord23(mix_op_l, 0, i2s1, 0); 71 | AudioConnection patchCord24(mix_op_r, 0, i2s1, 1); 72 | AudioControlSGTL5000 sgtl5000_1; //xy=292,903 73 | // GUItool: end automatically generated code 74 | 75 | // GUItool: end automatically generated code 76 | 77 | #define MAX_DELAY 1200 // should be 2000ms with combined delay of 4000ms (2 delays). 78 | // Combined delays of more than 2400 currently lead to audio distortion, so set to 1200 79 | 80 | //#define SERIAL_CONTROL 81 | #define BOARD_CONTROL 82 | 83 | #define NUM_BUTTONS 4 84 | 85 | // led indexing, first 12 pots, then 4 buttons, then 4 (reversed) bars 86 | #define NUM_POT_LEDS 12 87 | #define NUM_BUT_LEDS 4 88 | #define NUM_BAR_LEDS 4 89 | 90 | Control controls[NUM_POTS]; 91 | // data_p, clk_p, latch_p, blank_p 92 | LEDS leds(11, 13, 16, 9); 93 | Button buttons[NUM_BUTTONS] = { Button(0), Button(1), Button(17), Button(22) }; 94 | Pots pots(5, 4, 2, 3, 14); // 14 for teensy fx pcb, 15 for audio pcb 95 | BarTimer bar_timer; 96 | 97 | // globals 98 | int last_step = 0; 99 | float peak; 100 | bool in_peak; 101 | bool delay_mode = true; // beat based delay 102 | 103 | 104 | enum ButtonType { 105 | TAP_TEMPO, 106 | SET_TO_ONE, 107 | ERASE, 108 | WRITE, 109 | }; 110 | 111 | enum Cmd { 112 | MIX_SIG, 113 | MIX_NOISE, 114 | 115 | DEL_FB_FILT_RES, 116 | DEL_FB_FILT_FREQ, 117 | 118 | REV_FILT, 119 | REV_DAMP, 120 | REV_SIZE, 121 | MIX_REV_IN, 122 | 123 | DEL_FB, 124 | DEL_R_TIME, 125 | DEL_L_TIME, 126 | MIX_DEL, 127 | }; 128 | 129 | void setup() { 130 | Serial.begin(9600); 131 | #ifdef SERIAL_CONTROL 132 | #endif 133 | 134 | 135 | #ifdef BOARD_CONTROL 136 | for(int j = 0; j < MAX_LED; j ++) 137 | { 138 | for(int i = 0; i < 24; i ++) 139 | { 140 | leds.set_data(i, j); 141 | } 142 | leds.send(); 143 | delayMicroseconds(50); 144 | } 145 | for(int j = MAX_LED; j > 0; j --) 146 | { 147 | for(int i = 0; i < 24; i ++) 148 | { 149 | leds.set_data(i, j); 150 | } 151 | leds.send(); 152 | delayMicroseconds(50); 153 | } 154 | #endif 155 | 156 | // delays requires 1 block per 3ms. 157 | AudioMemory(1300); 158 | 159 | // enable i2s audio chip 160 | sgtl5000_1.enable(); 161 | sgtl5000_1.volume(0.6); 162 | sgtl5000_1.lineOutLevel(5); 163 | sgtl5000_1.lineInLevel(5); 164 | 165 | sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN); 166 | 167 | // pink noise output 168 | pink1.amplitude(0.5); 169 | pink2.amplitude(0.5); 170 | 171 | // max gain for fx modules outputs. Only control the inputs 172 | mix_op_l.gain(1, 1.0); // reverb 173 | mix_op_l.gain(2, 1.0); // delay 174 | mix_op_r.gain(1, 1.0); // reverb 175 | mix_op_r.gain(2, 1.0); // delay 176 | 177 | // turn off unused delays - makes any difference? 178 | for(int i = 1; i < 7; i ++) { 179 | delay_l.disable(i); 180 | delay_r.disable(i); 181 | } 182 | 183 | // init bar timer 184 | bar_timer.set_bpm(120); 185 | } 186 | 187 | unsigned long last_update = 0; 188 | 189 | void loop() 190 | { 191 | #ifdef SERIAL_CONTROL 192 | check_serial(); 193 | #endif 194 | 195 | #ifdef BOARD_CONTROL 196 | // check_pot(); 197 | 198 | if(millis() - last_update > 5) { 199 | last_update = millis(); 200 | check_board(); 201 | } 202 | 203 | // look for sync signal 204 | if (peak1.available()) { 205 | if(peak1.read() > 0.7 && in_peak == false) { 206 | bar_timer.sync_tempo(); 207 | in_peak = true; 208 | } 209 | else if(peak < 0.5) 210 | in_peak = false; 211 | } 212 | #endif 213 | } 214 | 215 | void check_pot() 216 | { 217 | delay(20); 218 | pots.update(); 219 | for(int p = 0; p < NUM_POTS; p ++) 220 | { 221 | Serial.print(pots.get_value(p)); 222 | Serial.print(" "); 223 | } 224 | Serial.println(""); 225 | } 226 | 227 | void check_board() 228 | { 229 | if(buttons[TAP_TEMPO].long_hold()) 230 | bar_timer.inc_sync_mode(); 231 | 232 | if(buttons[SET_TO_ONE].long_hold()) 233 | delay_mode = !delay_mode; 234 | 235 | 236 | // bar_timer buttons 237 | if(buttons[TAP_TEMPO].was_pressed()) 238 | bar_timer.tap_tempo(); 239 | if(buttons[SET_TO_ONE].was_pressed()) 240 | bar_timer.set_to_one(); 241 | 242 | // update automation timer 243 | bar_timer.update(); 244 | 245 | // debugging info 246 | if(bar_timer.get_step() != last_step) { 247 | last_step = bar_timer.get_step(); 248 | //Serial.println(bar_timer.get_step_millis()); 249 | //Serial.print("step "); 250 | //Serial.println(bar_timer.get_step()); 251 | //Serial.print("audio cpu max: "); Serial.println(AudioProcessorUsageMax()); 252 | //Serial.print("audio mem max: "); Serial.println(AudioMemoryUsageMax()); 253 | } 254 | 255 | // update pots & buttons 256 | pots.update(); 257 | 258 | for(int button = 0; button < NUM_BUTTONS; button ++) 259 | buttons[button].update(); 260 | 261 | // led for tempo 262 | leds.set_data(NUM_POT_LEDS + TAP_TEMPO, bar_timer.get_led()); 263 | 264 | // led for write & erase & set to one 265 | leds.set_data(NUM_POT_LEDS + WRITE, buttons[WRITE].pressed() ? MAX_LED : 0); 266 | leds.set_data(NUM_POT_LEDS + SET_TO_ONE, delay_mode ? MAX_LED : 0); 267 | leds.set_data(NUM_POT_LEDS + ERASE, buttons[ERASE].pressed() ? MAX_LED : 0); 268 | 269 | for(int bar = 0; bar < NUM_BAR_LEDS; bar ++) 270 | leds.set_data(NUM_POT_LEDS + NUM_BUT_LEDS + bar, bar_timer.bar_led(bar) ? MAX_LED : 0); // leds are right to left 271 | 272 | for(int pot = 0; pot < NUM_POTS; pot ++) { 273 | // update controls 274 | controls[pot].set_val(pots.get_value(pot), bar_timer.get_step(), pots.changed(pot), buttons[WRITE].pressed(), buttons[ERASE].pressed()); 275 | 276 | // update leds 277 | leds.set_data(pot, controls[pot].get_led_val(bar_timer.get_step())); 278 | 279 | // update sound parameters 280 | float val = controls[pot].get_val(bar_timer.get_step()); 281 | 282 | // beat based delay calcs 283 | float delay_val = bar_timer.get_beat_ms() * int(val * 16 + 1); 284 | if(delay_val > MAX_DELAY) 285 | delay_val = MAX_DELAY; 286 | 287 | switch(pot) { 288 | case REV_SIZE: freeverbs1.reverbTime(8*val); break; 289 | // case REV_DAMP: freeverbs1.damping(val); break; 290 | case MIX_SIG: 291 | mix_op_l.gain(0, val); // dry 292 | mix_op_r.gain(0, val); // dry 293 | break; 294 | case MIX_DEL: 295 | mix_del_l.gain(0, val); // delay 296 | mix_del_r.gain(0, val); // delay 297 | break; 298 | // delay value is in milliseconds 299 | case DEL_L_TIME: 300 | if(delay_mode) { 301 | //Serial.println(delay_val); 302 | delay_l.delay(0, delay_val); 303 | } 304 | else 305 | delay_l.delay(0, val * MAX_DELAY); 306 | break; 307 | case DEL_R_TIME: 308 | if(delay_mode) 309 | delay_r.delay(0, delay_val); 310 | else 311 | delay_r.delay(0, val * MAX_DELAY); 312 | break; 313 | case DEL_FB: 314 | mix_del_r.gain(1, val); 315 | mix_del_l.gain(1, val); 316 | break; 317 | case DEL_FB_FILT_FREQ: 318 | filter_del_l.frequency(5000*val); 319 | filter_del_r.frequency(5000*val); 320 | filter_noise_l.frequency(5000*val); 321 | filter_noise_r.frequency(5000*val); 322 | break; 323 | case REV_FILT: 324 | filter_rev.frequency(5000*val); 325 | break; 326 | case DEL_FB_FILT_RES: 327 | filter_del_l.resonance(val*4); 328 | filter_del_r.resonance(val*4); 329 | filter_noise_l.resonance(val*4); 330 | filter_noise_r.resonance(val*4); 331 | break; 332 | case MIX_REV_IN: 333 | mix_rev.gain(1, val); // right to rev 334 | break; 335 | case MIX_NOISE: 336 | mix_del_l.gain(2, val*0.75); // noise 337 | mix_del_r.gain(2, val*0.75); // noise 338 | break; 339 | } 340 | } 341 | 342 | // send the led data out 343 | leds.send(); 344 | } 345 | 346 | void check_serial() 347 | { 348 | if(Serial.available() == 2) 349 | { 350 | char cmd = Serial.read(); 351 | uint8_t val = Serial.read(); 352 | float val_0_to_1 = float(val) / 255; 353 | float val_0_to_05 = float(val) / 127; 354 | switch(cmd) { 355 | case REV_SIZE: 356 | //freeverbs1.roomsize(val_0_to_1); 357 | Serial.print("roomsize: "); Serial.println(val); 358 | break; 359 | case REV_DAMP: 360 | //freeverbs1.damping(val_0_to_1); 361 | Serial.print("damping: "); Serial.println(val); 362 | break; 363 | case MIX_DEL: 364 | mix_del_l.gain(0, val_0_to_1); // delay 365 | mix_del_r.gain(0, val_0_to_1); // delay 366 | Serial.print("mix delay: "); Serial.println(val); 367 | break; 368 | case MIX_NOISE: 369 | mix_del_l.gain(2, val_0_to_05); // noise to delay input 370 | mix_del_r.gain(2, val_0_to_05); // noise to delay input 371 | Serial.print("mix noise: "); Serial.println(val); 372 | break; 373 | case MIX_SIG: 374 | mix_op_l.gain(0, val_0_to_1); // reverb 375 | mix_op_r.gain(0, val_0_to_1); // reverb 376 | Serial.print("mix wet: "); Serial.println(val); 377 | break; 378 | case DEL_L_TIME: 379 | { 380 | int dtime = map(val, 0, 255, 0, 2000); 381 | delay_l.delay(0, dtime); 382 | Serial.print("del l: "); Serial.println(dtime); 383 | break; 384 | } 385 | case DEL_R_TIME: 386 | { 387 | int dtime = map(val, 0, 255, 0, 2000); 388 | delay_r.delay(0, dtime); 389 | Serial.print("del r: "); Serial.println(dtime); 390 | break; 391 | } 392 | case DEL_FB: 393 | mix_del_r.gain(1, val_0_to_1); // fb 394 | mix_del_l.gain(1, val_0_to_1); // fb 395 | Serial.print("del fb: "); Serial.println(val_0_to_1); 396 | break; 397 | 398 | case DEL_FB_FILT_FREQ: 399 | { 400 | float freq = map(val, 0, 255, 0, 5000); 401 | filter_del_l.frequency(freq); // fb 402 | filter_del_r.frequency(freq); // fb 403 | filter_noise_l.frequency(freq); // fb 404 | filter_noise_r.frequency(freq); // fb 405 | filter_rev.frequency(freq); 406 | Serial.print("del fb, noise & rev filt freq: "); Serial.println(freq); 407 | break; 408 | } 409 | 410 | case DEL_FB_FILT_RES: 411 | { 412 | float resonance = map(val, 0, 255, 0, 500) / 100.0; 413 | filter_del_l.resonance(resonance); // fb 414 | filter_del_r.resonance(resonance); // fb 415 | filter_noise_l.resonance(resonance); // fb 416 | filter_noise_r.resonance(resonance); // fb 417 | Serial.print("del fb, noise & rev res: "); Serial.println(resonance); 418 | break; 419 | } 420 | 421 | case MIX_REV_IN: 422 | mix_rev.gain(0, val_0_to_1/2); // left to rev 423 | mix_rev.gain(1, val_0_to_1/2); // right to rev 424 | Serial.print("rev mix in: "); Serial.println(val_0_to_1/2); 425 | break; 426 | 427 | /* 428 | case AUDIO_PROC: 429 | Serial.print("audio cpu max: "); Serial.println(AudioProcessorUsageMax()); 430 | break; 431 | 432 | case AUDIO_MEM: 433 | Serial.print("audio cpu max: "); Serial.println(AudioProcessorUsageMax()); 434 | Serial.print("audio mem max: "); Serial.println(AudioMemoryUsageMax()); 435 | break; 436 | */ 437 | 438 | default: 439 | Serial.print("got cmd: "); Serial.print(cmd); 440 | Serial.print("with val: "); Serial.println(val); 441 | break; 442 | } 443 | } 444 | } 445 | -------------------------------------------------------------------------------- /effect_freeverb.cpp: -------------------------------------------------------------------------------- 1 | /* Audio Library for Teensy 3.X 2 | * Copyright (c) 2018, Paul Stoffregen, paul@pjrc.com 3 | * 4 | * Development of this audio library was funded by PJRC.COM, LLC by sales of 5 | * Teensy and Audio Adaptor boards. Please support PJRC's efforts to develop 6 | * open source software by purchasing Teensy or other PJRC products. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice, development funding notice, and this permission 16 | * notice shall be included in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | // A fixed point implementation of Freeverb by Jezar at Dreampoint 28 | // http://blog.bjornroche.com/2012/06/freeverb-original-public-domain-code-by.html 29 | // https://music.columbia.edu/pipermail/music-dsp/2001-October/045433.html 30 | 31 | #include 32 | #include "effect_freeverb.h" 33 | #include "utility/dspinst.h" 34 | 35 | AudioEffectFreeverb::AudioEffectFreeverb() : AudioStream(1, inputQueueArray) 36 | { 37 | memset(comb1buf, 0, sizeof(comb1buf)); 38 | memset(comb2buf, 0, sizeof(comb2buf)); 39 | memset(comb3buf, 0, sizeof(comb3buf)); 40 | memset(comb4buf, 0, sizeof(comb4buf)); 41 | memset(comb5buf, 0, sizeof(comb5buf)); 42 | memset(comb6buf, 0, sizeof(comb6buf)); 43 | memset(comb7buf, 0, sizeof(comb7buf)); 44 | memset(comb8buf, 0, sizeof(comb8buf)); 45 | comb1index = 0; 46 | comb2index = 0; 47 | comb3index = 0; 48 | comb4index = 0; 49 | comb5index = 0; 50 | comb6index = 0; 51 | comb7index = 0; 52 | comb8index = 0; 53 | comb1filter = 0; 54 | comb2filter = 0; 55 | comb3filter = 0; 56 | comb4filter = 0; 57 | comb5filter = 0; 58 | comb6filter = 0; 59 | comb7filter = 0; 60 | comb8filter = 0; 61 | combdamp1 = 6553; 62 | combdamp2 = 26215; 63 | combfeeback = 27524; 64 | memset(allpass1buf, 0, sizeof(allpass1buf)); 65 | memset(allpass2buf, 0, sizeof(allpass2buf)); 66 | memset(allpass3buf, 0, sizeof(allpass3buf)); 67 | memset(allpass4buf, 0, sizeof(allpass4buf)); 68 | allpass1index = 0; 69 | allpass2index = 0; 70 | allpass3index = 0; 71 | allpass4index = 0; 72 | } 73 | 74 | // cleaner sat16 by http://www.moseleyinstruments.com/ 75 | static int16_t sat16(int32_t n, int rshift) { 76 | // we should always round towards 0 77 | // to avoid recirculating round-off noise 78 | // 79 | // a 2s complement positive number is always 80 | // rounded down, so we only need to take 81 | // care of negative numbers 82 | if (n < 0) { 83 | n = n + (~(0xFFFFFFFFUL << rshift)); 84 | } 85 | n = n >> rshift; 86 | if (n > 32767) { 87 | return 32767; 88 | } 89 | if (n < -32768) { 90 | return -32768; 91 | } 92 | return n; 93 | } 94 | 95 | // TODO: move this to one of the data files, use in output_adat.cpp, output_tdm.cpp, etc 96 | static const audio_block_t zeroblock = { 97 | 0, 0, 0, { 98 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99 | #if AUDIO_BLOCK_SAMPLES > 16 100 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101 | #endif 102 | #if AUDIO_BLOCK_SAMPLES > 32 103 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104 | #endif 105 | #if AUDIO_BLOCK_SAMPLES > 48 106 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107 | #endif 108 | #if AUDIO_BLOCK_SAMPLES > 64 109 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110 | #endif 111 | #if AUDIO_BLOCK_SAMPLES > 80 112 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113 | #endif 114 | #if AUDIO_BLOCK_SAMPLES > 96 115 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116 | #endif 117 | #if AUDIO_BLOCK_SAMPLES > 112 118 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119 | #endif 120 | } }; 121 | 122 | void AudioEffectFreeverb::update() 123 | { 124 | #if defined(__ARM_ARCH_7EM__) 125 | const audio_block_t *block; 126 | audio_block_t *outblock; 127 | int i; 128 | int16_t input, bufout, output; 129 | int32_t sum; 130 | 131 | outblock = allocate(); 132 | if (!outblock) { 133 | audio_block_t *tmp = receiveReadOnly(0); 134 | if (tmp) release(tmp); 135 | return; 136 | } 137 | block = receiveReadOnly(0); 138 | if (!block) block = &zeroblock; 139 | 140 | for (i=0; i < AUDIO_BLOCK_SAMPLES; i++) { 141 | // TODO: scale numerical range depending on roomsize & damping 142 | // input = sat16(block->data[i] * 8738, 17); // for numerical headroom 143 | input = sat16(block->data[i] * 5000, 15); // for numerical headroom 144 | sum = 0; 145 | 146 | bufout = comb1buf[comb1index]; 147 | sum += bufout; 148 | comb1filter = sat16(bufout * combdamp2 + comb1filter * combdamp1, 15); 149 | comb1buf[comb1index] = sat16(input + sat16(comb1filter * combfeeback, 15), 0); 150 | if (++comb1index >= sizeof(comb1buf)/sizeof(int16_t)) comb1index = 0; 151 | 152 | bufout = comb2buf[comb2index]; 153 | sum += bufout; 154 | comb2filter = sat16(bufout * combdamp2 + comb2filter * combdamp1, 15); 155 | comb2buf[comb2index] = sat16(input + sat16(comb2filter * combfeeback, 15), 0); 156 | if (++comb2index >= sizeof(comb2buf)/sizeof(int16_t)) comb2index = 0; 157 | 158 | bufout = comb3buf[comb3index]; 159 | sum += bufout; 160 | comb3filter = sat16(bufout * combdamp2 + comb3filter * combdamp1, 15); 161 | comb3buf[comb3index] = sat16(input + sat16(comb3filter * combfeeback, 15), 0); 162 | if (++comb3index >= sizeof(comb3buf)/sizeof(int16_t)) comb3index = 0; 163 | 164 | bufout = comb4buf[comb4index]; 165 | sum += bufout; 166 | comb4filter = sat16(bufout * combdamp2 + comb4filter * combdamp1, 15); 167 | comb4buf[comb4index] = sat16(input + sat16(comb4filter * combfeeback, 15), 0); 168 | if (++comb4index >= sizeof(comb4buf)/sizeof(int16_t)) comb4index = 0; 169 | 170 | bufout = comb5buf[comb5index]; 171 | sum += bufout; 172 | comb5filter = sat16(bufout * combdamp2 + comb5filter * combdamp1, 15); 173 | comb5buf[comb5index] = sat16(input + sat16(comb5filter * combfeeback, 15), 0); 174 | if (++comb5index >= sizeof(comb5buf)/sizeof(int16_t)) comb5index = 0; 175 | 176 | bufout = comb6buf[comb6index]; 177 | sum += bufout; 178 | comb6filter = sat16(bufout * combdamp2 + comb6filter * combdamp1, 15); 179 | comb6buf[comb6index] = sat16(input + sat16(comb6filter * combfeeback, 15), 0); 180 | if (++comb6index >= sizeof(comb6buf)/sizeof(int16_t)) comb6index = 0; 181 | 182 | bufout = comb7buf[comb7index]; 183 | sum += bufout; 184 | comb7filter = sat16(bufout * combdamp2 + comb7filter * combdamp1, 15); 185 | comb7buf[comb7index] = sat16(input + sat16(comb7filter * combfeeback, 15), 0); 186 | if (++comb7index >= sizeof(comb7buf)/sizeof(int16_t)) comb7index = 0; 187 | 188 | bufout = comb8buf[comb8index]; 189 | sum += bufout; 190 | comb8filter = sat16(bufout * combdamp2 + comb8filter * combdamp1, 15); 191 | comb8buf[comb8index] = sat16(input + sat16(comb8filter * combfeeback, 15), 0); 192 | if (++comb8index >= sizeof(comb8buf)/sizeof(int16_t)) comb8index = 0; 193 | 194 | output = sat16(sum * 31457, 17); 195 | 196 | bufout = allpass1buf[allpass1index]; 197 | allpass1buf[allpass1index] = output + (bufout >> 1); 198 | output = sat16(bufout - output, 1); 199 | if (++allpass1index >= sizeof(allpass1buf)/sizeof(int16_t)) allpass1index = 0; 200 | 201 | bufout = allpass2buf[allpass2index]; 202 | allpass2buf[allpass2index] = output + (bufout >> 1); 203 | output = sat16(bufout - output, 1); 204 | if (++allpass2index >= sizeof(allpass2buf)/sizeof(int16_t)) allpass2index = 0; 205 | 206 | bufout = allpass3buf[allpass3index]; 207 | allpass3buf[allpass3index] = output + (bufout >> 1); 208 | output = sat16(bufout - output, 1); 209 | if (++allpass3index >= sizeof(allpass3buf)/sizeof(int16_t)) allpass3index = 0; 210 | 211 | bufout = allpass4buf[allpass4index]; 212 | allpass4buf[allpass4index] = output + (bufout >> 1); 213 | output = sat16(bufout - output, 1); 214 | if (++allpass4index >= sizeof(allpass4buf)/sizeof(int16_t)) allpass4index = 0; 215 | 216 | outblock->data[i] = sat16(output * 30, 0); 217 | } 218 | transmit(outblock); 219 | release(outblock); 220 | if (block != &zeroblock) release((audio_block_t *)block); 221 | 222 | #elif defined(KINETISL) 223 | audio_block_t *block; 224 | block = receiveReadOnly(0); 225 | if (block) release(block); 226 | #endif 227 | } 228 | 229 | 230 | AudioEffectFreeverbStereo::AudioEffectFreeverbStereo() : AudioStream(1, inputQueueArray) 231 | { 232 | memset(comb1bufL, 0, sizeof(comb1bufL)); 233 | memset(comb2bufL, 0, sizeof(comb2bufL)); 234 | memset(comb3bufL, 0, sizeof(comb3bufL)); 235 | memset(comb4bufL, 0, sizeof(comb4bufL)); 236 | memset(comb5bufL, 0, sizeof(comb5bufL)); 237 | memset(comb6bufL, 0, sizeof(comb6bufL)); 238 | memset(comb7bufL, 0, sizeof(comb7bufL)); 239 | memset(comb8bufL, 0, sizeof(comb8bufL)); 240 | comb1indexL = 0; 241 | comb2indexL = 0; 242 | comb3indexL = 0; 243 | comb4indexL = 0; 244 | comb5indexL = 0; 245 | comb6indexL = 0; 246 | comb7indexL = 0; 247 | comb8indexL = 0; 248 | comb1filterL = 0; 249 | comb2filterL = 0; 250 | comb3filterL = 0; 251 | comb4filterL = 0; 252 | comb5filterL = 0; 253 | comb6filterL = 0; 254 | comb7filterL = 0; 255 | comb8filterL = 0; 256 | memset(comb1bufR, 0, sizeof(comb1bufR)); 257 | memset(comb2bufR, 0, sizeof(comb2bufR)); 258 | memset(comb3bufR, 0, sizeof(comb3bufR)); 259 | memset(comb4bufR, 0, sizeof(comb4bufR)); 260 | memset(comb5bufR, 0, sizeof(comb5bufR)); 261 | memset(comb6bufR, 0, sizeof(comb6bufR)); 262 | memset(comb7bufR, 0, sizeof(comb7bufR)); 263 | memset(comb8bufR, 0, sizeof(comb8bufR)); 264 | comb1indexR = 0; 265 | comb2indexR = 0; 266 | comb3indexR = 0; 267 | comb4indexR = 0; 268 | comb5indexR = 0; 269 | comb6indexR = 0; 270 | comb7indexR = 0; 271 | comb8indexR = 0; 272 | comb1filterR = 0; 273 | comb2filterR = 0; 274 | comb3filterR = 0; 275 | comb4filterR = 0; 276 | comb5filterR = 0; 277 | comb6filterR = 0; 278 | comb7filterR = 0; 279 | comb8filterR = 0; 280 | combdamp1 = 6553; 281 | combdamp2 = 26215; 282 | combfeeback = 27524; 283 | memset(allpass1bufL, 0, sizeof(allpass1bufL)); 284 | memset(allpass2bufL, 0, sizeof(allpass2bufL)); 285 | memset(allpass3bufL, 0, sizeof(allpass3bufL)); 286 | memset(allpass4bufL, 0, sizeof(allpass4bufL)); 287 | allpass1indexL = 0; 288 | allpass2indexL = 0; 289 | allpass3indexL = 0; 290 | allpass4indexL = 0; 291 | memset(allpass1bufR, 0, sizeof(allpass1bufR)); 292 | memset(allpass2bufR, 0, sizeof(allpass2bufR)); 293 | memset(allpass3bufR, 0, sizeof(allpass3bufR)); 294 | memset(allpass4bufR, 0, sizeof(allpass4bufR)); 295 | allpass1indexR = 0; 296 | allpass2indexR = 0; 297 | allpass3indexR = 0; 298 | allpass4indexR = 0; 299 | } 300 | 301 | void AudioEffectFreeverbStereo::update() 302 | { 303 | #if defined(__ARM_ARCH_7EM__) 304 | const audio_block_t *block; 305 | audio_block_t *outblockL; 306 | audio_block_t *outblockR; 307 | int i; 308 | int16_t input, bufout, outputL, outputR; 309 | int32_t sum; 310 | 311 | block = receiveReadOnly(0); 312 | outblockL = allocate(); 313 | outblockR = allocate(); 314 | if (!outblockL || !outblockR) { 315 | if (outblockL) release(outblockL); 316 | if (outblockR) release(outblockR); 317 | if (block) release((audio_block_t *)block); 318 | return; 319 | } 320 | if (!block) block = &zeroblock; 321 | 322 | for (i=0; i < AUDIO_BLOCK_SAMPLES; i++) { 323 | // TODO: scale numerical range depending on roomsize & damping 324 | input = sat16(block->data[i] * 8738, 17); // for numerical headroom 325 | sum = 0; 326 | 327 | bufout = comb1bufL[comb1indexL]; 328 | sum += bufout; 329 | comb1filterL = sat16(bufout * combdamp2 + comb1filterL * combdamp1, 15); 330 | comb1bufL[comb1indexL] = sat16(input + sat16(comb1filterL * combfeeback, 15), 0); 331 | if (++comb1indexL >= sizeof(comb1bufL)/sizeof(int16_t)) comb1indexL = 0; 332 | 333 | bufout = comb2bufL[comb2indexL]; 334 | sum += bufout; 335 | comb2filterL = sat16(bufout * combdamp2 + comb2filterL * combdamp1, 15); 336 | comb2bufL[comb2indexL] = sat16(input + sat16(comb2filterL * combfeeback, 15), 0); 337 | if (++comb2indexL >= sizeof(comb2bufL)/sizeof(int16_t)) comb2indexL = 0; 338 | 339 | bufout = comb3bufL[comb3indexL]; 340 | sum += bufout; 341 | comb3filterL = sat16(bufout * combdamp2 + comb3filterL * combdamp1, 15); 342 | comb3bufL[comb3indexL] = sat16(input + sat16(comb3filterL * combfeeback, 15), 0); 343 | if (++comb3indexL >= sizeof(comb3bufL)/sizeof(int16_t)) comb3indexL = 0; 344 | 345 | bufout = comb4bufL[comb4indexL]; 346 | sum += bufout; 347 | comb4filterL = sat16(bufout * combdamp2 + comb4filterL * combdamp1, 15); 348 | comb4bufL[comb4indexL] = sat16(input + sat16(comb4filterL * combfeeback, 15), 0); 349 | if (++comb4indexL >= sizeof(comb4bufL)/sizeof(int16_t)) comb4indexL = 0; 350 | 351 | bufout = comb5bufL[comb5indexL]; 352 | sum += bufout; 353 | comb5filterL = sat16(bufout * combdamp2 + comb5filterL * combdamp1, 15); 354 | comb5bufL[comb5indexL] = sat16(input + sat16(comb5filterL * combfeeback, 15), 0); 355 | if (++comb5indexL >= sizeof(comb5bufL)/sizeof(int16_t)) comb5indexL = 0; 356 | 357 | bufout = comb6bufL[comb6indexL]; 358 | sum += bufout; 359 | comb6filterL = sat16(bufout * combdamp2 + comb6filterL * combdamp1, 15); 360 | comb6bufL[comb6indexL] = sat16(input + sat16(comb6filterL * combfeeback, 15), 0); 361 | if (++comb6indexL >= sizeof(comb6bufL)/sizeof(int16_t)) comb6indexL = 0; 362 | 363 | bufout = comb7bufL[comb7indexL]; 364 | sum += bufout; 365 | comb7filterL = sat16(bufout * combdamp2 + comb7filterL * combdamp1, 15); 366 | comb7bufL[comb7indexL] = sat16(input + sat16(comb7filterL * combfeeback, 15), 0); 367 | if (++comb7indexL >= sizeof(comb7bufL)/sizeof(int16_t)) comb7indexL = 0; 368 | 369 | bufout = comb8bufL[comb8indexL]; 370 | sum += bufout; 371 | comb8filterL = sat16(bufout * combdamp2 + comb8filterL * combdamp1, 15); 372 | comb8bufL[comb8indexL] = sat16(input + sat16(comb8filterL * combfeeback, 15), 0); 373 | if (++comb8indexL >= sizeof(comb8bufL)/sizeof(int16_t)) comb8indexL = 0; 374 | 375 | outputL = sat16(sum * 31457, 17); 376 | sum = 0; 377 | 378 | bufout = comb1bufR[comb1indexR]; 379 | sum += bufout; 380 | comb1filterR = sat16(bufout * combdamp2 + comb1filterR * combdamp1, 15); 381 | comb1bufR[comb1indexR] = sat16(input + sat16(comb1filterR * combfeeback, 15), 0); 382 | if (++comb1indexR >= sizeof(comb1bufR)/sizeof(int16_t)) comb1indexR = 0; 383 | 384 | bufout = comb2bufR[comb2indexR]; 385 | sum += bufout; 386 | comb2filterR = sat16(bufout * combdamp2 + comb2filterR * combdamp1, 15); 387 | comb2bufR[comb2indexR] = sat16(input + sat16(comb2filterR * combfeeback, 15), 0); 388 | if (++comb2indexR >= sizeof(comb2bufR)/sizeof(int16_t)) comb2indexR = 0; 389 | 390 | bufout = comb3bufR[comb3indexR]; 391 | sum += bufout; 392 | comb3filterR = sat16(bufout * combdamp2 + comb3filterR * combdamp1, 15); 393 | comb3bufR[comb3indexR] = sat16(input + sat16(comb3filterR * combfeeback, 15), 0); 394 | if (++comb3indexR >= sizeof(comb3bufR)/sizeof(int16_t)) comb3indexR = 0; 395 | 396 | bufout = comb4bufR[comb4indexR]; 397 | sum += bufout; 398 | comb4filterR = sat16(bufout * combdamp2 + comb4filterR * combdamp1, 15); 399 | comb4bufR[comb4indexR] = sat16(input + sat16(comb4filterR * combfeeback, 15), 0); 400 | if (++comb4indexR >= sizeof(comb4bufR)/sizeof(int16_t)) comb4indexR = 0; 401 | 402 | bufout = comb5bufR[comb5indexR]; 403 | sum += bufout; 404 | comb5filterR = sat16(bufout * combdamp2 + comb5filterR * combdamp1, 15); 405 | comb5bufR[comb5indexR] = sat16(input + sat16(comb5filterR * combfeeback, 15), 0); 406 | if (++comb5indexR >= sizeof(comb5bufR)/sizeof(int16_t)) comb5indexR = 0; 407 | 408 | bufout = comb6bufR[comb6indexR]; 409 | sum += bufout; 410 | comb6filterR = sat16(bufout * combdamp2 + comb6filterR * combdamp1, 15); 411 | comb6bufR[comb6indexR] = sat16(input + sat16(comb6filterR * combfeeback, 15), 0); 412 | if (++comb6indexR >= sizeof(comb6bufR)/sizeof(int16_t)) comb6indexR = 0; 413 | 414 | bufout = comb7bufR[comb7indexR]; 415 | sum += bufout; 416 | comb7filterR = sat16(bufout * combdamp2 + comb7filterR * combdamp1, 15); 417 | comb7bufR[comb7indexR] = sat16(input + sat16(comb7filterR * combfeeback, 15), 0); 418 | if (++comb7indexR >= sizeof(comb7bufR)/sizeof(int16_t)) comb7indexR = 0; 419 | 420 | bufout = comb8bufR[comb8indexR]; 421 | sum += bufout; 422 | comb8filterR = sat16(bufout * combdamp2 + comb8filterR * combdamp1, 15); 423 | comb8bufR[comb8indexR] = sat16(input + sat16(comb8filterR * combfeeback, 15), 0); 424 | if (++comb8indexR >= sizeof(comb8bufR)/sizeof(int16_t)) comb8indexR = 0; 425 | 426 | outputR = sat16(sum * 31457, 17); 427 | 428 | bufout = allpass1bufL[allpass1indexL]; 429 | allpass1bufL[allpass1indexL] = outputL + (bufout >> 1); 430 | outputL = sat16(bufout - outputL, 1); 431 | if (++allpass1indexL >= sizeof(allpass1bufL)/sizeof(int16_t)) allpass1indexL = 0; 432 | 433 | bufout = allpass2bufL[allpass2indexL]; 434 | allpass2bufL[allpass2indexL] = outputL + (bufout >> 1); 435 | outputL = sat16(bufout - outputL, 1); 436 | if (++allpass2indexL >= sizeof(allpass2bufL)/sizeof(int16_t)) allpass2indexL = 0; 437 | 438 | bufout = allpass3bufL[allpass3indexL]; 439 | allpass3bufL[allpass3indexL] = outputL + (bufout >> 1); 440 | outputL = sat16(bufout - outputL, 1); 441 | if (++allpass3indexL >= sizeof(allpass3bufL)/sizeof(int16_t)) allpass3indexL = 0; 442 | 443 | bufout = allpass4bufL[allpass4indexL]; 444 | allpass4bufL[allpass4indexL] = outputL + (bufout >> 1); 445 | outputL = sat16(bufout - outputL, 1); 446 | if (++allpass4indexL >= sizeof(allpass4bufL)/sizeof(int16_t)) allpass4indexL = 0; 447 | 448 | outblockL->data[i] = sat16(outputL * 30, 0); 449 | 450 | bufout = allpass1bufR[allpass1indexR]; 451 | allpass1bufR[allpass1indexR] = outputR + (bufout >> 1); 452 | outputR = sat16(bufout - outputR, 1); 453 | if (++allpass1indexR >= sizeof(allpass1bufR)/sizeof(int16_t)) allpass1indexR = 0; 454 | 455 | bufout = allpass2bufR[allpass2indexR]; 456 | allpass2bufR[allpass2indexR] = outputR + (bufout >> 1); 457 | outputR = sat16(bufout - outputR, 1); 458 | if (++allpass2indexR >= sizeof(allpass2bufR)/sizeof(int16_t)) allpass2indexR = 0; 459 | 460 | bufout = allpass3bufR[allpass3indexR]; 461 | allpass3bufR[allpass3indexR] = outputR + (bufout >> 1); 462 | outputR = sat16(bufout - outputR, 1); 463 | if (++allpass3indexR >= sizeof(allpass3bufR)/sizeof(int16_t)) allpass3indexR = 0; 464 | 465 | bufout = allpass4bufR[allpass4indexR]; 466 | allpass4bufR[allpass4indexR] = outputR + (bufout >> 1); 467 | outputR = sat16(bufout - outputR, 1); 468 | if (++allpass4indexR >= sizeof(allpass4bufR)/sizeof(int16_t)) allpass4indexR = 0; 469 | 470 | outblockR->data[i] = sat16(outputL * 30, 0); 471 | } 472 | transmit(outblockL, 0); 473 | transmit(outblockR, 1); 474 | release(outblockL); 475 | release(outblockR); 476 | if (block != &zeroblock) release((audio_block_t *)block); 477 | 478 | #elif defined(KINETISL) 479 | audio_block_t *block; 480 | block = receiveReadOnly(0); 481 | if (block) release(block); 482 | #endif 483 | } 484 | 485 | 486 | 487 | -------------------------------------------------------------------------------- /hardware/SGTL5000.sch: -------------------------------------------------------------------------------- 1 | EESchema Schematic File Version 4 2 | EELAYER 30 0 3 | EELAYER END 4 | $Descr A4 11693 8268 5 | encoding utf-8 6 | Sheet 2 3 7 | Title "teensy-fx" 8 | Date "2020-02-10" 9 | Rev "v2" 10 | Comp "mattvenn" 11 | Comment1 "" 12 | Comment2 "" 13 | Comment3 "" 14 | Comment4 "" 15 | $EndDescr 16 | $Comp 17 | L power:GND #PWR? 18 | U 1 1 5BAC3E44 19 | P 4800 4500 20 | AR Path="/5BAC3E44" Ref="#PWR?" Part="1" 21 | AR Path="/5BAC34FB/5BAC3E44" Ref="#PWR0138" Part="1" 22 | AR Path="/5E0E3867/5BAC3E44" Ref="#PWR0105" Part="1" 23 | F 0 "#PWR0105" H 4800 4250 50 0001 C CNN 24 | F 1 "GND" H 4805 4327 50 0000 C CNN 25 | F 2 "" H 4800 4500 50 0001 C CNN 26 | F 3 "" H 4800 4500 50 0001 C CNN 27 | 1 4800 4500 28 | 1 0 0 -1 29 | $EndComp 30 | Wire Wire Line 31 | 4800 4500 4800 4400 32 | Wire Wire Line 33 | 4800 4400 4950 4400 34 | Wire Wire Line 35 | 5450 4850 5450 4950 36 | $Comp 37 | L Connector:AudioJack3 J? 38 | U 1 1 5BAC3E4F 39 | P 7900 3050 40 | AR Path="/5BAC3E4F" Ref="J?" Part="1" 41 | AR Path="/5BAC34FB/5BAC3E4F" Ref="J2" Part="1" 42 | AR Path="/5E0E3867/5BAC3E4F" Ref="J1" Part="1" 43 | F 0 "J1" H 7600 3000 50 0000 R CNN 44 | F 1 "AudioJack3_Ground" H 7500 3100 50 0001 R CNN 45 | F 2 "audio-fx:Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal" H 7900 3050 50 0001 C CNN 46 | F 3 "https://uk.farnell #.com/switchcraft-conxall/35rasmt2bhntrx/connector-smt-3-5mm-ph-jk-tap/dp/2915138" H 7900 3050 50 0001 C CNN 47 | F 4 "2915138" H 7900 3050 50 0001 C CNN "farnell #" 48 | 1 7900 3050 49 | -1 0 0 1 50 | $EndComp 51 | Wire Wire Line 52 | 4950 4300 4800 4300 53 | Wire Wire Line 54 | 4800 4300 4800 4400 55 | Connection ~ 4800 4400 56 | $Comp 57 | L power:+1V8 #PWR? 58 | U 1 1 5BAC3E61 59 | P 5450 2300 60 | AR Path="/5BAC3E61" Ref="#PWR?" Part="1" 61 | AR Path="/5BAC34FB/5BAC3E61" Ref="#PWR0127" Part="1" 62 | AR Path="/5E0E3867/5BAC3E61" Ref="#PWR0106" Part="1" 63 | F 0 "#PWR0106" H 5450 2150 50 0001 C CNN 64 | F 1 "+1V8" H 5465 2473 50 0000 C CNN 65 | F 2 "" H 5450 2300 50 0001 C CNN 66 | F 3 "" H 5450 2300 50 0001 C CNN 67 | 1 5450 2300 68 | 1 0 0 -1 69 | $EndComp 70 | Wire Wire Line 71 | 5650 2000 5150 2000 72 | $Comp 73 | L power:+3V3 #PWR? 74 | U 1 1 5BAC3E68 75 | P 4250 2000 76 | AR Path="/5BAC3E68" Ref="#PWR?" Part="1" 77 | AR Path="/5BAC34FB/5BAC3E68" Ref="#PWR0125" Part="1" 78 | AR Path="/5E0E3867/5BAC3E68" Ref="#PWR0107" Part="1" 79 | F 0 "#PWR0107" H 4250 1850 50 0001 C CNN 80 | F 1 "+3V3" H 4265 2173 50 0000 C CNN 81 | F 2 "" H 4250 2000 50 0001 C CNN 82 | F 3 "" H 4250 2000 50 0001 C CNN 83 | 1 4250 2000 84 | 1 0 0 -1 85 | $EndComp 86 | $Comp 87 | L Device:C_Small C? 88 | U 1 1 5BAC3E6E 89 | P 4550 2250 90 | AR Path="/5BAC3E6E" Ref="C?" Part="1" 91 | AR Path="/5BAC34FB/5BAC3E6E" Ref="C26" Part="1" 92 | AR Path="/5E0E3867/5BAC3E6E" Ref="C3" Part="1" 93 | F 0 "C3" H 4642 2296 50 0000 L CNN 94 | F 1 "2.2uF" H 4642 2205 50 0000 L CNN 95 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 4550 2250 50 0001 C CNN 96 | F 3 "~" H 4550 2250 50 0001 C CNN 97 | F 4 "1759424" H 4550 2250 50 0001 C CNN "farnell #" 98 | 1 4550 2250 99 | 1 0 0 -1 100 | $EndComp 101 | Wire Wire Line 102 | 4550 2000 4550 2150 103 | $Comp 104 | L Device:C_Small C? 105 | U 1 1 5BAC3E7C 106 | P 4850 2250 107 | AR Path="/5BAC3E7C" Ref="C?" Part="1" 108 | AR Path="/5BAC34FB/5BAC3E7C" Ref="C27" Part="1" 109 | AR Path="/5E0E3867/5BAC3E7C" Ref="C4" Part="1" 110 | F 0 "C4" H 4942 2296 50 0000 L CNN 111 | F 1 "0.1uF" H 4942 2205 50 0000 L CNN 112 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 4850 2250 50 0001 C CNN 113 | F 3 "~" H 4850 2250 50 0001 C CNN 114 | F 4 "1414663" H 4850 2250 50 0001 C CNN "farnell #" 115 | 1 4850 2250 116 | 1 0 0 -1 117 | $EndComp 118 | Wire Wire Line 119 | 4850 2000 4850 2150 120 | $Comp 121 | L Device:C_Small C? 122 | U 1 1 5BAC3E8A 123 | P 5150 2250 124 | AR Path="/5BAC3E8A" Ref="C?" Part="1" 125 | AR Path="/5BAC34FB/5BAC3E8A" Ref="C28" Part="1" 126 | AR Path="/5E0E3867/5BAC3E8A" Ref="C5" Part="1" 127 | F 0 "C5" H 5242 2296 50 0000 L CNN 128 | F 1 "0.1uF" H 5242 2205 50 0000 L CNN 129 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 5150 2250 50 0001 C CNN 130 | F 3 "~" H 5150 2250 50 0001 C CNN 131 | F 4 "1414663" H 5150 2250 50 0001 C CNN "farnell #" 132 | 1 5150 2250 133 | 1 0 0 -1 134 | $EndComp 135 | Wire Wire Line 136 | 5150 2000 5150 2150 137 | $Comp 138 | L Device:C_Small C? 139 | U 1 1 5BAC3E98 140 | P 6350 2250 141 | AR Path="/5BAC3E98" Ref="C?" Part="1" 142 | AR Path="/5BAC34FB/5BAC3E98" Ref="C29" Part="1" 143 | AR Path="/5E0E3867/5BAC3E98" Ref="C6" Part="1" 144 | F 0 "C6" H 6442 2296 50 0000 L CNN 145 | F 1 "2.2uF" H 6442 2205 50 0000 L CNN 146 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 6350 2250 50 0001 C CNN 147 | F 3 "~" H 6350 2250 50 0001 C CNN 148 | F 4 "1759424" H 6350 2250 50 0001 C CNN "farnell #" 149 | 1 6350 2250 150 | 1 0 0 -1 151 | $EndComp 152 | Wire Wire Line 153 | 6350 2000 6350 2150 154 | $Comp 155 | L Device:C_Small C? 156 | U 1 1 5BAC3EA6 157 | P 6650 2250 158 | AR Path="/5BAC3EA6" Ref="C?" Part="1" 159 | AR Path="/5BAC34FB/5BAC3EA6" Ref="C30" Part="1" 160 | AR Path="/5E0E3867/5BAC3EA6" Ref="C7" Part="1" 161 | F 0 "C7" H 6742 2296 50 0000 L CNN 162 | F 1 "0.1uF" H 6742 2205 50 0000 L CNN 163 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 6650 2250 50 0001 C CNN 164 | F 3 "~" H 6650 2250 50 0001 C CNN 165 | F 4 "1414663" H 6650 2250 50 0001 C CNN "farnell #" 166 | 1 6650 2250 167 | 1 0 0 -1 168 | $EndComp 169 | Wire Wire Line 170 | 6650 2000 6650 2150 171 | $Comp 172 | L Device:Ferrite_Bead_Small L? 173 | U 1 1 5BAC3EB4 174 | P 5850 2000 175 | AR Path="/5BAC3EB4" Ref="L?" Part="1" 176 | AR Path="/5BAC34FB/5BAC3EB4" Ref="L2" Part="1" 177 | AR Path="/5E0E3867/5BAC3EB4" Ref="L1" Part="1" 178 | F 0 "L1" V 6087 2000 50 0000 C CNN 179 | F 1 "600R" V 5996 2000 50 0000 C CNN 180 | F 2 "Inductor_SMD:L_0805_2012Metric" V 5780 2000 50 0001 C CNN 181 | F 3 "~" H 5850 2000 50 0001 C CNN 182 | F 4 "2215655" H 5850 2000 50 0001 C CNN "farnell #" 183 | 1 5850 2000 184 | 0 -1 -1 0 185 | $EndComp 186 | Wire Wire Line 187 | 5850 2300 6050 2300 188 | Wire Wire Line 189 | 6050 2300 6050 2000 190 | Wire Wire Line 191 | 4350 3250 4900 3250 192 | $Comp 193 | L Device:R R? 194 | U 1 1 5BAC3EBE 195 | P 4600 2950 196 | AR Path="/5BAC3EBE" Ref="R?" Part="1" 197 | AR Path="/5BAC34FB/5BAC3EBE" Ref="R22" Part="1" 198 | AR Path="/5E0E3867/5BAC3EBE" Ref="R1" Part="1" 199 | F 0 "R1" H 4670 2996 50 0000 L CNN 200 | F 1 "2.2K" H 4670 2905 50 0000 L CNN 201 | F 2 "Resistor_SMD:R_0805_2012Metric" V 4530 2950 50 0001 C CNN 202 | F 3 "~" H 4600 2950 50 0001 C CNN 203 | F 4 "1469887" H 4600 2950 50 0001 C CNN "farnell #" 204 | 1 4600 2950 205 | 1 0 0 -1 206 | $EndComp 207 | $Comp 208 | L power:+3V3 #PWR? 209 | U 1 1 5BAC3EC5 210 | P 4600 2800 211 | AR Path="/5BAC3EC5" Ref="#PWR?" Part="1" 212 | AR Path="/5BAC34FB/5BAC3EC5" Ref="#PWR0135" Part="1" 213 | AR Path="/5E0E3867/5BAC3EC5" Ref="#PWR0113" Part="1" 214 | F 0 "#PWR0113" H 4600 2650 50 0001 C CNN 215 | F 1 "+3V3" H 4615 2973 50 0000 C CNN 216 | F 2 "" H 4600 2800 50 0001 C CNN 217 | F 3 "" H 4600 2800 50 0001 C CNN 218 | 1 4600 2800 219 | 1 0 0 -1 220 | $EndComp 221 | $Comp 222 | L Device:R R? 223 | U 1 1 5BAC3ECB 224 | P 4900 2950 225 | AR Path="/5BAC3ECB" Ref="R?" Part="1" 226 | AR Path="/5BAC34FB/5BAC3ECB" Ref="R23" Part="1" 227 | AR Path="/5E0E3867/5BAC3ECB" Ref="R2" Part="1" 228 | F 0 "R2" H 4970 2996 50 0000 L CNN 229 | F 1 "2.2K" H 4970 2905 50 0000 L CNN 230 | F 2 "Resistor_SMD:R_0805_2012Metric" V 4830 2950 50 0001 C CNN 231 | F 3 "~" H 4900 2950 50 0001 C CNN 232 | F 4 "1469887" H 4900 2950 50 0001 C CNN "farnell #" 233 | 1 4900 2950 234 | 1 0 0 -1 235 | $EndComp 236 | $Comp 237 | L power:+3V3 #PWR? 238 | U 1 1 5BAC3ED2 239 | P 4900 2800 240 | AR Path="/5BAC3ED2" Ref="#PWR?" Part="1" 241 | AR Path="/5BAC34FB/5BAC3ED2" Ref="#PWR0136" Part="1" 242 | AR Path="/5E0E3867/5BAC3ED2" Ref="#PWR0114" Part="1" 243 | F 0 "#PWR0114" H 4900 2650 50 0001 C CNN 244 | F 1 "+3V3" H 4915 2973 50 0000 C CNN 245 | F 2 "" H 4900 2800 50 0001 C CNN 246 | F 3 "" H 4900 2800 50 0001 C CNN 247 | 1 4900 2800 248 | 1 0 0 -1 249 | $EndComp 250 | Connection ~ 4900 3250 251 | Wire Wire Line 252 | 4900 3250 4950 3250 253 | Wire Wire Line 254 | 4900 3150 4950 3150 255 | Wire Wire Line 256 | 4350 3150 4600 3150 257 | Wire Wire Line 258 | 5450 2300 5450 2700 259 | Wire Wire Line 260 | 5650 2000 5650 2700 261 | Wire Wire Line 262 | 5850 2300 5850 2700 263 | Wire Wire Line 264 | 4600 3100 4600 3150 265 | Connection ~ 4600 3150 266 | Wire Wire Line 267 | 4600 3150 4900 3150 268 | Wire Wire Line 269 | 4900 3100 4900 3250 270 | Wire Wire Line 271 | 5950 2000 6050 2000 272 | Wire Wire Line 273 | 5650 2000 5750 2000 274 | Connection ~ 5650 2000 275 | Connection ~ 6350 2000 276 | Wire Wire Line 277 | 6350 2000 6650 2000 278 | Connection ~ 4550 2000 279 | Connection ~ 4850 2000 280 | Wire Wire Line 281 | 4850 2000 4550 2000 282 | Connection ~ 5150 2000 283 | Wire Wire Line 284 | 5150 2000 4850 2000 285 | Wire Wire Line 286 | 4250 2000 4550 2000 287 | Wire Wire Line 288 | 6050 2000 6350 2000 289 | Connection ~ 6050 2000 290 | Wire Wire Line 291 | 2150 2400 2150 2350 292 | Wire Wire Line 293 | 2550 2100 2750 2100 294 | Wire Wire Line 295 | 2750 2100 2750 1950 296 | $Comp 297 | L power:+3V3 #PWR? 298 | U 1 1 5BAC54FB 299 | P 1550 1900 300 | AR Path="/5BAC54FB" Ref="#PWR?" Part="1" 301 | AR Path="/5BAC34FB/5BAC54FB" Ref="#PWR0124" Part="1" 302 | AR Path="/5E0E3867/5BAC54FB" Ref="#PWR0118" Part="1" 303 | F 0 "#PWR0118" H 1550 1750 50 0001 C CNN 304 | F 1 "+3V3" H 1565 2073 50 0000 C CNN 305 | F 2 "" H 1550 1900 50 0001 C CNN 306 | F 3 "" H 1550 1900 50 0001 C CNN 307 | 1 1550 1900 308 | 1 0 0 -1 309 | $EndComp 310 | Wire Wire Line 311 | 5450 4950 5650 4950 312 | Wire Wire Line 313 | 6050 4950 6050 4850 314 | Connection ~ 5450 4950 315 | Wire Wire Line 316 | 5450 4950 5450 5000 317 | Wire Wire Line 318 | 5850 4850 5850 4950 319 | Connection ~ 5850 4950 320 | Wire Wire Line 321 | 5850 4950 6050 4950 322 | Wire Wire Line 323 | 5650 4850 5650 4950 324 | Connection ~ 5650 4950 325 | Wire Wire Line 326 | 5650 4950 5850 4950 327 | Text GLabel 4350 3150 0 50 Input ~ 0 328 | SDA 329 | Text GLabel 4350 3250 0 50 Input ~ 0 330 | SCL 331 | Text GLabel 4350 3450 0 50 Input ~ 0 332 | MCLK 333 | Text GLabel 4350 3550 0 50 Input ~ 0 334 | BCLK 335 | Text GLabel 4350 3650 0 50 Input ~ 0 336 | LRCLK 337 | Text GLabel 4350 3750 0 50 Input ~ 0 338 | I2S_IN 339 | Text GLabel 4350 3850 0 50 Input ~ 0 340 | I2S_OUT 341 | Wire Wire Line 342 | 7150 3250 7150 3050 343 | Wire Wire Line 344 | 7050 2950 7300 2950 345 | $Comp 346 | L Connector:AudioJack3 J? 347 | U 1 1 5E0F7896 348 | P 7900 4200 349 | AR Path="/5E0F7896" Ref="J?" Part="1" 350 | AR Path="/5BAC34FB/5E0F7896" Ref="J?" Part="1" 351 | AR Path="/5E0E3867/5E0F7896" Ref="J2" Part="1" 352 | F 0 "J2" H 7600 4150 50 0000 R CNN 353 | F 1 "AudioJack3_Ground" H 7550 4050 50 0001 R CNN 354 | F 2 "audio-fx:Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal" H 7900 4200 50 0001 C CNN 355 | F 3 "~" H 7900 4200 50 0001 C CNN 356 | F 4 "2915138" H 7900 4200 50 0001 C CNN "farnell #" 357 | 1 7900 4200 358 | -1 0 0 1 359 | $EndComp 360 | $Comp 361 | L Device:C_Small C? 362 | U 1 1 5E0FEC6F 363 | P 4450 4200 364 | AR Path="/5E0FEC6F" Ref="C?" Part="1" 365 | AR Path="/5BAC34FB/5E0FEC6F" Ref="C?" Part="1" 366 | AR Path="/5E0E3867/5E0FEC6F" Ref="C2" Part="1" 367 | F 0 "C2" H 4542 4246 50 0000 L CNN 368 | F 1 "0.1uF" H 4542 4155 50 0000 L CNN 369 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 4450 4200 50 0001 C CNN 370 | F 3 "~" H 4450 4200 50 0001 C CNN 371 | F 4 "1414663" H 4450 4200 50 0001 C CNN "farnell #" 372 | 1 4450 4200 373 | 1 0 0 -1 374 | $EndComp 375 | Wire Wire Line 376 | 4950 4100 4450 4100 377 | NoConn ~ 4950 4200 378 | NoConn ~ 6350 4300 379 | $Comp 380 | L teensy-fx:SparkFun-IC-Analog_SGTL5000-teensy_beats-cache U? 381 | U 1 1 5BAC3E38 382 | P 5650 3750 383 | AR Path="/5BAC3E38" Ref="U?" Part="1" 384 | AR Path="/5BAC34FB/5BAC3E38" Ref="U7" Part="1" 385 | AR Path="/5E0E3867/5BAC3E38" Ref="U3" Part="1" 386 | F 0 "U3" H 5650 3750 60 0000 C CNN 387 | F 1 "SGTL5000" H 5600 2200 60 0000 C CNN 388 | F 2 "Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm" H 5650 3800 60 0001 C CNN 389 | F 3 "https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf" H 5600 2100 60 0000 C CNN 390 | F 4 "2308049" H 5650 3750 50 0001 C CNN "farnell #" 391 | 1 5650 3750 392 | 1 0 0 -1 393 | $EndComp 394 | $Comp 395 | L Device:C_Small C? 396 | U 1 1 5E146D40 397 | P 6950 2950 398 | AR Path="/5E146D40" Ref="C?" Part="1" 399 | AR Path="/5BAC34FB/5E146D40" Ref="C?" Part="1" 400 | AR Path="/5E0E3867/5E146D40" Ref="C8" Part="1" 401 | F 0 "C8" V 7042 2996 50 0000 L CNN 402 | F 1 "1uF" V 7150 2900 50 0000 L CNN 403 | F 2 "Capacitor_SMD:C_1210_3225Metric" H 6950 2950 50 0001 C CNN 404 | F 3 "http://www.farnell #.com/datasheets/199119.pdf" H 6950 2950 50 0001 C CNN 405 | F 4 "2112915" V 6950 2950 50 0001 C CNN "farnell #" 406 | 1 6950 2950 407 | 0 -1 -1 0 408 | $EndComp 409 | $Comp 410 | L Device:C_Small C? 411 | U 1 1 5E147768 412 | P 6950 3250 413 | AR Path="/5E147768" Ref="C?" Part="1" 414 | AR Path="/5BAC34FB/5E147768" Ref="C?" Part="1" 415 | AR Path="/5E0E3867/5E147768" Ref="C9" Part="1" 416 | F 0 "C9" V 7050 3300 50 0000 L CNN 417 | F 1 "1uF" V 7150 3200 50 0000 L CNN 418 | F 2 "Capacitor_SMD:C_1210_3225Metric" H 6950 3250 50 0001 C CNN 419 | F 3 "~" H 6950 3250 50 0001 C CNN 420 | F 4 "2112915" H 6950 3250 50 0001 C CNN "farnell #" 421 | 1 6950 3250 422 | 0 -1 -1 0 423 | $EndComp 424 | Wire Wire Line 425 | 7050 3250 7150 3250 426 | Text Notes 7650 2750 0 50 ~ 0 427 | farnell # 2915138 428 | $Comp 429 | L Device:R R? 430 | U 1 1 5E21D79E 431 | P 4500 3450 432 | AR Path="/5E21D79E" Ref="R?" Part="1" 433 | AR Path="/5E0E3867/5E21D79E" Ref="R3" Part="1" 434 | F 0 "R3" V 4400 3400 50 0000 C CNN 435 | F 1 "100R" V 4500 3500 50 0000 C CNN 436 | F 2 "Resistor_SMD:R_0805_2012Metric" V 4430 3450 50 0001 C CNN 437 | F 3 "~" H 4500 3450 50 0001 C CNN 438 | F 4 "1469862" H 4500 3450 50 0001 C CNN "farnell #" 439 | 1 4500 3450 440 | 0 1 1 0 441 | $EndComp 442 | Text Notes 4700 1350 0 118 Italic 24 443 | SGTL5000 audio driver 444 | $Comp 445 | L Device:C_Small C? 446 | U 1 1 5E112693 447 | P 6550 4250 448 | AR Path="/5E112693" Ref="C?" Part="1" 449 | AR Path="/5BAC34FB/5E112693" Ref="C?" Part="1" 450 | AR Path="/5E0E3867/5E112693" Ref="C13" Part="1" 451 | F 0 "C13" H 6700 4000 50 0000 L CNN 452 | F 1 "0.1uF" H 6700 4100 50 0000 L CNN 453 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 6550 4250 50 0001 C CNN 454 | F 3 "~" H 6550 4250 50 0001 C CNN 455 | F 4 "1414663" H 6550 4250 50 0001 C CNN "farnell #" 456 | 1 6550 4250 457 | 1 0 0 -1 458 | $EndComp 459 | $Comp 460 | L power:GND #PWR? 461 | U 1 1 5E113ED8 462 | P 6550 4350 463 | AR Path="/5E113ED8" Ref="#PWR?" Part="1" 464 | AR Path="/5BAC34FB/5E113ED8" Ref="#PWR?" Part="1" 465 | AR Path="/5E0E3867/5E113ED8" Ref="#PWR01" Part="1" 466 | F 0 "#PWR01" H 6550 4100 50 0001 C CNN 467 | F 1 "GND" H 6555 4177 50 0000 C CNN 468 | F 2 "" H 6550 4350 50 0001 C CNN 469 | F 3 "" H 6550 4350 50 0001 C CNN 470 | 1 6550 4350 471 | 1 0 0 -1 472 | $EndComp 473 | $Comp 474 | L power:GND #PWR? 475 | U 1 1 5BAC54EE 476 | P 2150 2400 477 | AR Path="/5BAC54EE" Ref="#PWR?" Part="1" 478 | AR Path="/5BAC34FB/5BAC54EE" Ref="#PWR0134" Part="1" 479 | AR Path="/5E0E3867/5BAC54EE" Ref="#PWR0117" Part="1" 480 | F 0 "#PWR0117" H 2150 2150 50 0001 C CNN 481 | F 1 "GND" H 2155 2227 50 0000 C CNN 482 | F 2 "" H 2150 2400 50 0001 C CNN 483 | F 3 "" H 2150 2400 50 0001 C CNN 484 | 1 2150 2400 485 | 1 0 0 -1 486 | $EndComp 487 | $Comp 488 | L power:GND #PWR? 489 | U 1 1 5BAC3EAD 490 | P 6650 2350 491 | AR Path="/5BAC3EAD" Ref="#PWR?" Part="1" 492 | AR Path="/5BAC34FB/5BAC3EAD" Ref="#PWR0132" Part="1" 493 | AR Path="/5E0E3867/5BAC3EAD" Ref="#PWR0112" Part="1" 494 | F 0 "#PWR0112" H 6650 2100 50 0001 C CNN 495 | F 1 "GND" H 6655 2177 50 0000 C CNN 496 | F 2 "" H 6650 2350 50 0001 C CNN 497 | F 3 "" H 6650 2350 50 0001 C CNN 498 | 1 6650 2350 499 | 1 0 0 -1 500 | $EndComp 501 | $Comp 502 | L power:GND #PWR? 503 | U 1 1 5BAC3E9F 504 | P 6350 2350 505 | AR Path="/5BAC3E9F" Ref="#PWR?" Part="1" 506 | AR Path="/5BAC34FB/5BAC3E9F" Ref="#PWR0131" Part="1" 507 | AR Path="/5E0E3867/5BAC3E9F" Ref="#PWR0111" Part="1" 508 | F 0 "#PWR0111" H 6350 2100 50 0001 C CNN 509 | F 1 "GND" H 6355 2177 50 0000 C CNN 510 | F 2 "" H 6350 2350 50 0001 C CNN 511 | F 3 "" H 6350 2350 50 0001 C CNN 512 | 1 6350 2350 513 | 1 0 0 -1 514 | $EndComp 515 | $Comp 516 | L power:GND #PWR? 517 | U 1 1 5BAC3E91 518 | P 5150 2350 519 | AR Path="/5BAC3E91" Ref="#PWR?" Part="1" 520 | AR Path="/5BAC34FB/5BAC3E91" Ref="#PWR0130" Part="1" 521 | AR Path="/5E0E3867/5BAC3E91" Ref="#PWR0110" Part="1" 522 | F 0 "#PWR0110" H 5150 2100 50 0001 C CNN 523 | F 1 "GND" H 5155 2177 50 0000 C CNN 524 | F 2 "" H 5150 2350 50 0001 C CNN 525 | F 3 "" H 5150 2350 50 0001 C CNN 526 | 1 5150 2350 527 | 1 0 0 -1 528 | $EndComp 529 | $Comp 530 | L power:GND #PWR? 531 | U 1 1 5BAC3E83 532 | P 4850 2350 533 | AR Path="/5BAC3E83" Ref="#PWR?" Part="1" 534 | AR Path="/5BAC34FB/5BAC3E83" Ref="#PWR0129" Part="1" 535 | AR Path="/5E0E3867/5BAC3E83" Ref="#PWR0109" Part="1" 536 | F 0 "#PWR0109" H 4850 2100 50 0001 C CNN 537 | F 1 "GND" H 4855 2177 50 0000 C CNN 538 | F 2 "" H 4850 2350 50 0001 C CNN 539 | F 3 "" H 4850 2350 50 0001 C CNN 540 | 1 4850 2350 541 | 1 0 0 -1 542 | $EndComp 543 | $Comp 544 | L power:GND #PWR? 545 | U 1 1 5BAC3E75 546 | P 4550 2350 547 | AR Path="/5BAC3E75" Ref="#PWR?" Part="1" 548 | AR Path="/5BAC34FB/5BAC3E75" Ref="#PWR0128" Part="1" 549 | AR Path="/5E0E3867/5BAC3E75" Ref="#PWR0108" Part="1" 550 | F 0 "#PWR0108" H 4550 2100 50 0001 C CNN 551 | F 1 "GND" H 4555 2177 50 0000 C CNN 552 | F 2 "" H 4550 2350 50 0001 C CNN 553 | F 3 "" H 4550 2350 50 0001 C CNN 554 | 1 4550 2350 555 | 1 0 0 -1 556 | $EndComp 557 | $Comp 558 | L power:GND #PWR? 559 | U 1 1 5E1010DB 560 | P 4450 4300 561 | AR Path="/5E1010DB" Ref="#PWR?" Part="1" 562 | AR Path="/5BAC34FB/5E1010DB" Ref="#PWR?" Part="1" 563 | AR Path="/5E0E3867/5E1010DB" Ref="#PWR0122" Part="1" 564 | F 0 "#PWR0122" H 4450 4050 50 0001 C CNN 565 | F 1 "GND" H 4455 4127 50 0000 C CNN 566 | F 2 "" H 4450 4300 50 0001 C CNN 567 | F 3 "" H 4450 4300 50 0001 C CNN 568 | 1 4450 4300 569 | 1 0 0 -1 570 | $EndComp 571 | $Comp 572 | L power:GND #PWR? 573 | U 1 1 5BAC457F 574 | P 5450 5000 575 | AR Path="/5BAC457F" Ref="#PWR?" Part="1" 576 | AR Path="/5BAC34FB/5BAC457F" Ref="#PWR0141" Part="1" 577 | AR Path="/5E0E3867/5BAC457F" Ref="#PWR0115" Part="1" 578 | F 0 "#PWR0115" H 5450 4750 50 0001 C CNN 579 | F 1 "GND" H 5455 4827 50 0000 C CNN 580 | F 2 "" H 5450 5000 50 0001 C CNN 581 | F 3 "" H 5450 5000 50 0001 C CNN 582 | 1 5450 5000 583 | 1 0 0 -1 584 | $EndComp 585 | $Comp 586 | L power:GND #PWR? 587 | U 1 1 5E0FD89C 588 | P 7700 3150 589 | AR Path="/5E0FD89C" Ref="#PWR?" Part="1" 590 | AR Path="/5BAC34FB/5E0FD89C" Ref="#PWR?" Part="1" 591 | AR Path="/5E0E3867/5E0FD89C" Ref="#PWR0120" Part="1" 592 | F 0 "#PWR0120" H 7700 2900 50 0001 C CNN 593 | F 1 "GND" H 7705 2977 50 0000 C CNN 594 | F 2 "" H 7700 3150 50 0001 C CNN 595 | F 3 "" H 7700 3150 50 0001 C CNN 596 | 1 7700 3150 597 | 1 0 0 -1 598 | $EndComp 599 | $Comp 600 | L Device:R R? 601 | U 1 1 5E11741C 602 | P 7300 2800 603 | AR Path="/5E11741C" Ref="R?" Part="1" 604 | AR Path="/5BAC34FB/5E11741C" Ref="R?" Part="1" 605 | AR Path="/5E0E3867/5E11741C" Ref="R8" Part="1" 606 | F 0 "R8" H 7150 2800 50 0000 L CNN 607 | F 1 "100k" V 7300 2700 50 0000 L CNN 608 | F 2 "Resistor_SMD:R_0805_2012Metric" V 7230 2800 50 0001 C CNN 609 | F 3 "~" H 7300 2800 50 0001 C CNN 610 | F 4 "1469860" H 7300 2800 50 0001 C CNN "farnell #" 611 | 1 7300 2800 612 | -1 0 0 1 613 | $EndComp 614 | Text Label 4850 2000 0 50 ~ 0 615 | audio_3v3 616 | Text Label 6350 2000 0 50 ~ 0 617 | filter_audio_3v3 618 | $Comp 619 | L Device:R R? 620 | U 1 1 5E135AC8 621 | P 7500 3200 622 | AR Path="/5E135AC8" Ref="R?" Part="1" 623 | AR Path="/5BAC34FB/5E135AC8" Ref="R?" Part="1" 624 | AR Path="/5E0E3867/5E135AC8" Ref="R9" Part="1" 625 | F 0 "R9" H 7600 3200 50 0000 L CNN 626 | F 1 "100k" V 7500 3100 50 0000 L CNN 627 | F 2 "Resistor_SMD:R_0805_2012Metric" V 7430 3200 50 0001 C CNN 628 | F 3 "~" H 7500 3200 50 0001 C CNN 629 | F 4 "1469860" H 7500 3200 50 0001 C CNN "farnell #" 630 | 1 7500 3200 631 | -1 0 0 1 632 | $EndComp 633 | $Comp 634 | L power:GND #PWR? 635 | U 1 1 5E135F8E 636 | P 7500 3350 637 | AR Path="/5E135F8E" Ref="#PWR?" Part="1" 638 | AR Path="/5BAC34FB/5E135F8E" Ref="#PWR?" Part="1" 639 | AR Path="/5E0E3867/5E135F8E" Ref="#PWR0168" Part="1" 640 | F 0 "#PWR0168" H 7500 3100 50 0001 C CNN 641 | F 1 "GND" H 7505 3177 50 0000 C CNN 642 | F 2 "" H 7500 3350 50 0001 C CNN 643 | F 3 "" H 7500 3350 50 0001 C CNN 644 | 1 7500 3350 645 | 1 0 0 -1 646 | $EndComp 647 | $Comp 648 | L power:GND #PWR? 649 | U 1 1 5E136228 650 | P 7300 2650 651 | AR Path="/5E136228" Ref="#PWR?" Part="1" 652 | AR Path="/5BAC34FB/5E136228" Ref="#PWR?" Part="1" 653 | AR Path="/5E0E3867/5E136228" Ref="#PWR0175" Part="1" 654 | F 0 "#PWR0175" H 7300 2400 50 0001 C CNN 655 | F 1 "GND" H 7305 2477 50 0000 C CNN 656 | F 2 "" H 7300 2650 50 0001 C CNN 657 | F 3 "" H 7300 2650 50 0001 C CNN 658 | 1 7300 2650 659 | -1 0 0 1 660 | $EndComp 661 | Wire Wire Line 662 | 7300 2950 7700 2950 663 | Connection ~ 7300 2950 664 | Wire Wire Line 665 | 7150 3050 7500 3050 666 | Connection ~ 7500 3050 667 | Wire Wire Line 668 | 7500 3050 7700 3050 669 | $Comp 670 | L Connector:AudioJack3 J? 671 | U 1 1 5E13FD57 672 | P 7900 3800 673 | AR Path="/5E13FD57" Ref="J?" Part="1" 674 | AR Path="/5BAC34FB/5E13FD57" Ref="J?" Part="1" 675 | AR Path="/5E0E3867/5E13FD57" Ref="J3" Part="1" 676 | F 0 "J3" H 7600 3750 50 0000 R CNN 677 | F 1 "AudioJack3_Ground" H 7550 3650 50 0001 R CNN 678 | F 2 "audio-fx:Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal" H 7900 3800 50 0001 C CNN 679 | F 3 "~" H 7900 3800 50 0001 C CNN 680 | F 4 "2915138" H 7900 3800 50 0001 C CNN "farnell #" 681 | 1 7900 3800 682 | -1 0 0 1 683 | $EndComp 684 | $Comp 685 | L Device:C_Small C? 686 | U 1 1 5E1434E0 687 | P 6950 3550 688 | AR Path="/5E1434E0" Ref="C?" Part="1" 689 | AR Path="/5BAC34FB/5E1434E0" Ref="C?" Part="1" 690 | AR Path="/5E0E3867/5E1434E0" Ref="C14" Part="1" 691 | F 0 "C14" V 7050 3350 50 0000 L CNN 692 | F 1 "1uF" V 7150 3300 50 0000 L CNN 693 | F 2 "Capacitor_SMD:C_1210_3225Metric" H 6950 3550 50 0001 C CNN 694 | F 3 "~" H 6950 3550 50 0001 C CNN 695 | F 4 "2112915" H 6950 3550 50 0001 C CNN "farnell #" 696 | 1 6950 3550 697 | 0 -1 -1 0 698 | $EndComp 699 | $Comp 700 | L Device:C_Small C? 701 | U 1 1 5E143FCC 702 | P 6950 3750 703 | AR Path="/5E143FCC" Ref="C?" Part="1" 704 | AR Path="/5BAC34FB/5E143FCC" Ref="C?" Part="1" 705 | AR Path="/5E0E3867/5E143FCC" Ref="C15" Part="1" 706 | F 0 "C15" V 6650 3750 50 0000 L CNN 707 | F 1 "1uF" V 6750 3650 50 0000 L CNN 708 | F 2 "Capacitor_SMD:C_1210_3225Metric" H 6950 3750 50 0001 C CNN 709 | F 3 "~" H 6950 3750 50 0001 C CNN 710 | F 4 "2112915" H 6950 3750 50 0001 C CNN "farnell #" 711 | 1 6950 3750 712 | 0 -1 -1 0 713 | $EndComp 714 | Wire Wire Line 715 | 6800 3750 6850 3750 716 | Wire Wire Line 717 | 7050 3550 7350 3550 718 | Wire Wire Line 719 | 7350 3550 7350 3700 720 | Wire Wire Line 721 | 7350 3700 7700 3700 722 | Wire Wire Line 723 | 7050 3750 7300 3750 724 | Wire Wire Line 725 | 7300 3750 7300 3800 726 | Wire Wire Line 727 | 7300 3800 7700 3800 728 | $Comp 729 | L power:GND #PWR? 730 | U 1 1 5E1490F0 731 | P 7700 3900 732 | AR Path="/5E1490F0" Ref="#PWR?" Part="1" 733 | AR Path="/5BAC34FB/5E1490F0" Ref="#PWR?" Part="1" 734 | AR Path="/5E0E3867/5E1490F0" Ref="#PWR0176" Part="1" 735 | F 0 "#PWR0176" H 7700 3650 50 0001 C CNN 736 | F 1 "GND" H 7550 3800 50 0000 C CNN 737 | F 2 "" H 7700 3900 50 0001 C CNN 738 | F 3 "" H 7700 3900 50 0001 C CNN 739 | 1 7700 3900 740 | 1 0 0 -1 741 | $EndComp 742 | Wire Wire Line 743 | 6350 3250 6850 3250 744 | Wire Wire Line 745 | 6350 3350 6850 3350 746 | Wire Wire Line 747 | 6850 3350 6850 3550 748 | Wire Wire Line 749 | 6350 3450 6800 3450 750 | Wire Wire Line 751 | 6800 3450 6800 3750 752 | Wire Wire Line 753 | 6350 3150 6800 3150 754 | Wire Wire Line 755 | 6800 3150 6800 2950 756 | Wire Wire Line 757 | 6800 2950 6850 2950 758 | Wire Wire Line 759 | 6350 4150 6550 4150 760 | Wire Wire Line 761 | 6350 3750 6750 3750 762 | Wire Wire Line 763 | 6750 3750 6750 4100 764 | Wire Wire Line 765 | 6750 4100 7700 4100 766 | Wire Wire Line 767 | 6350 3850 6700 3850 768 | Wire Wire Line 769 | 6700 3850 6700 4200 770 | Wire Wire Line 771 | 6700 4200 7700 4200 772 | Wire Wire Line 773 | 6350 3950 6650 3950 774 | Wire Wire Line 775 | 6650 3950 6650 4300 776 | Wire Wire Line 777 | 6650 4300 7700 4300 778 | Wire Wire Line 779 | 4650 3450 4950 3450 780 | Wire Wire Line 781 | 4350 3550 4950 3550 782 | Wire Wire Line 783 | 4350 3650 4950 3650 784 | Wire Wire Line 785 | 4350 3750 4950 3750 786 | Wire Wire Line 787 | 4350 3850 4950 3850 788 | Text Notes 1700 1450 0 50 ~ 0 789 | p17 datasheet says 5mA max 790 | $Comp 791 | L Device:C_Small C? 792 | U 1 1 5E1A3824 793 | P 2750 2200 794 | AR Path="/5E1A3824" Ref="C?" Part="1" 795 | AR Path="/5BAC34FB/5E1A3824" Ref="C?" Part="1" 796 | AR Path="/5E0E3867/5E1A3824" Ref="C17" Part="1" 797 | F 0 "C17" H 2842 2246 50 0000 L CNN 798 | F 1 "2.2uF" H 2842 2155 50 0000 L CNN 799 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 2750 2200 50 0001 C CNN 800 | F 3 "~" H 2750 2200 50 0001 C CNN 801 | F 4 "1759424" H 2750 2200 50 0001 C CNN "farnell #" 802 | 1 2750 2200 803 | 1 0 0 -1 804 | $EndComp 805 | Connection ~ 2750 2100 806 | $Comp 807 | L power:GND #PWR? 808 | U 1 1 5E1A3C62 809 | P 2750 2300 810 | AR Path="/5E1A3C62" Ref="#PWR?" Part="1" 811 | AR Path="/5BAC34FB/5E1A3C62" Ref="#PWR?" Part="1" 812 | AR Path="/5E0E3867/5E1A3C62" Ref="#PWR03" Part="1" 813 | F 0 "#PWR03" H 2750 2050 50 0001 C CNN 814 | F 1 "GND" H 2755 2127 50 0000 C CNN 815 | F 2 "" H 2750 2300 50 0001 C CNN 816 | F 3 "" H 2750 2300 50 0001 C CNN 817 | 1 2750 2300 818 | 1 0 0 -1 819 | $EndComp 820 | $Comp 821 | L teensy-fx:ldo U2 822 | U 1 1 5E1AE9E1 823 | P 2150 2100 824 | F 0 "U2" H 2150 2365 50 0000 C CNN 825 | F 1 "MCP1811A" H 2150 2274 50 0000 C CNN 826 | F 2 "Package_TO_SOT_SMD:SOT-23" H 2150 2100 50 0001 C CNN 827 | F 3 "http://www.farnell #.com/datasheets/2722379.pdf" H 2150 2100 50 0001 C CNN 828 | F 4 "2990195" H 2150 2100 50 0001 C CNN "farnell #" 829 | 1 2150 2100 830 | 1 0 0 -1 831 | $EndComp 832 | $Comp 833 | L power:+1V8 #PWR? 834 | U 1 1 5BAC5501 835 | P 2750 1900 836 | AR Path="/5BAC5501" Ref="#PWR?" Part="1" 837 | AR Path="/5BAC34FB/5BAC5501" Ref="#PWR0123" Part="1" 838 | AR Path="/5E0E3867/5BAC5501" Ref="#PWR0119" Part="1" 839 | F 0 "#PWR0119" H 2750 1750 50 0001 C CNN 840 | F 1 "+1V8" H 2765 2073 50 0000 C CNN 841 | F 2 "" H 2750 1900 50 0001 C CNN 842 | F 3 "" H 2750 1900 50 0001 C CNN 843 | 1 2750 1900 844 | 1 0 0 -1 845 | $EndComp 846 | Connection ~ 1550 2100 847 | Wire Wire Line 848 | 1550 2100 1550 1900 849 | Wire Wire Line 850 | 1550 2100 1550 2250 851 | Wire Wire Line 852 | 1750 2100 1550 2100 853 | $Comp 854 | L power:GND #PWR? 855 | U 1 1 5BAC54E8 856 | P 1550 2450 857 | AR Path="/5BAC54E8" Ref="#PWR?" Part="1" 858 | AR Path="/5BAC34FB/5BAC54E8" Ref="#PWR0133" Part="1" 859 | AR Path="/5E0E3867/5BAC54E8" Ref="#PWR0116" Part="1" 860 | F 0 "#PWR0116" H 1550 2200 50 0001 C CNN 861 | F 1 "GND" H 1555 2277 50 0000 C CNN 862 | F 2 "" H 1550 2450 50 0001 C CNN 863 | F 3 "" H 1550 2450 50 0001 C CNN 864 | 1 1550 2450 865 | 1 0 0 -1 866 | $EndComp 867 | $Comp 868 | L Device:C_Small C? 869 | U 1 1 5BAC54E1 870 | P 1550 2350 871 | AR Path="/5BAC54E1" Ref="C?" Part="1" 872 | AR Path="/5BAC34FB/5BAC54E1" Ref="C31" Part="1" 873 | AR Path="/5E0E3867/5BAC54E1" Ref="C1" Part="1" 874 | F 0 "C1" H 1642 2396 50 0000 L CNN 875 | F 1 "2.2uF" H 1642 2305 50 0000 L CNN 876 | F 2 "Capacitor_SMD:C_0805_2012Metric" H 1550 2350 50 0001 C CNN 877 | F 3 "~" H 1550 2350 50 0001 C CNN 878 | F 4 "1759424" H 1550 2350 50 0001 C CNN "farnell #" 879 | 1 1550 2350 880 | 1 0 0 -1 881 | $EndComp 882 | $Comp 883 | L power:PWR_FLAG #FLG0104 884 | U 1 1 5E1CE9B1 885 | P 2750 1950 886 | F 0 "#FLG0104" H 2750 2025 50 0001 C CNN 887 | F 1 "PWR_FLAG" V 2750 2078 50 0000 L CNN 888 | F 2 "" H 2750 1950 50 0001 C CNN 889 | F 3 "~" H 2750 1950 50 0001 C CNN 890 | 1 2750 1950 891 | 0 1 1 0 892 | $EndComp 893 | Connection ~ 2750 1950 894 | Wire Wire Line 895 | 2750 1950 2750 1900 896 | $EndSCHEMATC 897 | -------------------------------------------------------------------------------- /hardware/audio-fx.pretty/back-graphic.kicad_mod: -------------------------------------------------------------------------------- 1 | (module LOGO (layer F.Cu) 2 | (at 0 0) 3 | (fp_text reference "G***" (at 0 0) (layer F.SilkS) hide 4 | (effects (font (thickness 0.3))) 5 | ) 6 | (fp_text value "LOGO" (at 0.75 0) (layer F.SilkS) hide 7 | (effects (font (thickness 0.3))) 8 | ) 9 | (fp_poly (pts (xy 1.845338 -21.202906) (xy 2.584009 -21.183628) (xy 3.273764 -21.151493) (xy 3.878333 -21.106795) (xy 4.360333 -21.050000) (xy 6.269942 -20.673858) (xy 8.120088 -20.142993) (xy 9.903006 -19.462953) 10 | (xy 11.610930 -18.639291) (xy 13.236094 -17.677556) (xy 14.770733 -16.583299) (xy 16.207080 -15.362072) (xy 17.537369 -14.019425) (xy 18.753836 -12.560908) (xy 19.848714 -10.992073) (xy 20.814237 -9.318469) 11 | (xy 20.838323 -9.272106) (xy 21.541521 -7.808457) (xy 22.124247 -6.354246) (xy 22.600514 -4.866521) (xy 22.984335 -3.302333) (xy 23.246834 -1.890021) (xy 23.305038 -1.425648) (xy 23.353871 -0.829534) 12 | (xy 23.392475 -0.139061) (xy 23.419996 0.608392) (xy 23.435576 1.375446) (xy 23.438361 2.124721) (xy 23.427492 2.818838) (xy 23.402115 3.420417) (xy 23.376172 3.757187) (xy 23.099983 5.729209) 13 | (xy 22.664196 7.656854) (xy 22.074578 9.532179) (xy 21.336896 11.347242) (xy 20.456919 13.094100) (xy 19.440415 14.764811) (xy 18.293150 16.351433) (xy 17.020894 17.846024) (xy 15.629415 19.240641) 14 | (xy 14.124479 20.527343) (xy 12.511855 21.698186) (xy 10.797310 22.745229) (xy 8.986614 23.660530) (xy 8.890000 23.704345) (xy 7.092594 24.427584) (xy 5.207987 25.019127) (xy 3.263163 25.472315) 15 | (xy 1.285107 25.780495) (xy -0.013089 25.900395) (xy -0.848554 25.974673) (xy -1.554655 26.082647) (xy -2.169855 26.235468) (xy -2.732614 26.444290) (xy -3.281396 26.720265) (xy -3.688317 26.966080) 16 | (xy -4.348072 27.460871) (xy -4.982318 28.071522) (xy -5.547925 28.750467) (xy -6.001766 29.450137) (xy -6.087408 29.612166) (xy -6.268775 29.972000) (xy -29.972000 29.972000) (xy -29.972000 -6.268775) 17 | (xy -29.612167 -6.087408) (xy -28.914525 -5.666036) (xy -28.226446 -5.122780) (xy -27.595500 -4.500766) (xy -27.069255 -3.843124) (xy -26.966081 -3.688317) (xy -26.635008 -3.125848) (xy -26.379097 -2.577018) 18 | (xy -26.187194 -2.003367) (xy -26.048146 -1.366431) (xy -25.950802 -0.627748) (xy -25.900396 -0.013089) (xy -25.688955 1.986771) (xy -25.327017 3.963226) (xy -24.820284 5.896587) (xy -24.174461 7.767162) 19 | (xy -23.395251 9.555262) (xy -22.794160 10.710333) (xy -21.705886 12.495555) (xy -20.498591 14.163082) (xy -19.175707 15.709621) (xy -17.740668 17.131880) (xy -16.196907 18.426568) (xy -14.547858 19.590392) 20 | (xy -12.796953 20.620061) (xy -12.070120 20.992997) (xy -10.520903 21.696457) (xy -8.976808 22.272367) (xy -7.389010 22.736561) (xy -5.708686 23.104874) (xy -5.367743 23.166582) (xy -4.652193 23.268593) 21 | (xy -3.813400 23.349670) (xy -2.896336 23.408310) (xy -1.945972 23.443007) (xy -1.007280 23.452259) (xy -0.125232 23.434560) (xy 0.655201 23.388406) (xy 0.817237 23.373444) (xy 2.752698 23.097929) 22 | (xy 4.639246 22.666288) (xy 6.468442 22.084185) (xy 8.231843 21.357277) (xy 9.921011 20.491226) (xy 11.527505 19.491693) (xy 13.042883 18.364337) (xy 14.458706 17.114819) (xy 15.766532 15.748799) 23 | (xy 16.957922 14.271938) (xy 18.024435 12.689896) (xy 18.803118 11.311851) (xy 19.517765 9.804968) (xy 20.104287 8.277281) (xy 20.573545 6.694293) (xy 20.936401 5.021510) (xy 21.098766 4.021666) 24 | (xy 21.149133 3.542239) (xy 21.184348 2.932687) (xy 21.204710 2.231512) (xy 21.210520 1.477215) (xy 21.202079 0.708298) (xy 21.179685 -0.036736) (xy 21.143641 -0.719387) (xy 21.094245 -1.301152) 25 | (xy 21.054859 -1.608667) (xy 20.687253 -3.475447) (xy 20.171499 -5.275819) (xy 19.512849 -7.002364) (xy 18.716556 -8.647665) (xy 17.787870 -10.204300) (xy 16.732044 -11.664852) (xy 15.554328 -13.021902) 26 | (xy 14.259976 -14.268030) (xy 12.854237 -15.395817) (xy 11.342366 -16.397845) (xy 10.100839 -17.083282) (xy 8.787460 -17.697322) (xy 7.483431 -18.197261) (xy 6.142261 -18.597760) (xy 4.717456 -18.913482) 27 | (xy 3.810000 -19.067269) (xy 3.411168 -19.110634) (xy 2.880610 -19.142996) (xy 2.255572 -19.164383) (xy 1.573301 -19.174824) (xy 0.871043 -19.174348) (xy 0.186045 -19.162985) (xy -0.444446 -19.140761) 28 | (xy -0.983183 -19.107707) (xy -1.392920 -19.063851) (xy -1.397000 -19.063244) (xy -3.175728 -18.716459) (xy -4.889524 -18.219329) (xy -6.530529 -17.576711) (xy -8.090883 -16.793462) (xy -9.562725 -15.874437) 29 | (xy -10.938194 -14.824493) (xy -12.209432 -13.648487) (xy -13.368576 -12.351273) (xy -14.307723 -11.086741) (xy -14.572783 -10.685157) (xy -14.749201 -10.387201) (xy -14.852047 -10.162646) (xy -14.896391 -9.981264) 30 | (xy -14.901334 -9.896002) (xy -14.829772 -9.566997) (xy -14.642105 -9.273961) (xy -14.378860 -9.070304) (xy -14.236420 -9.019728) (xy -14.001206 -8.998625) (xy -13.787993 -9.058856) (xy -13.572654 -9.218201) 31 | (xy -13.331067 -9.494440) (xy -13.043375 -9.898998) (xy -12.039965 -11.244218) (xy -10.926606 -12.466356) (xy -9.713265 -13.561889) (xy -8.409908 -14.527296) (xy -7.026500 -15.359052) (xy -5.573008 -16.053635) 32 | (xy -4.059399 -16.607522) (xy -2.495639 -17.017189) (xy -0.891693 -17.279114) (xy 0.742471 -17.389774) (xy 2.396889 -17.345646) (xy 4.061592 -17.143206) (xy 5.726616 -16.778932) (xy 6.112891 -16.670625) 33 | (xy 6.668157 -16.490683) (xy 7.074009 -16.314844) (xy 7.349605 -16.131178) (xy 7.514103 -15.927760) (xy 7.574938 -15.760420) (xy 7.574053 -15.442185) (xy 7.455762 -15.138083) (xy 7.251175 -14.892667) 34 | (xy 6.991401 -14.750492) (xy 6.856864 -14.732000) (xy 6.668457 -14.758922) (xy 6.380356 -14.829854) (xy 6.051679 -14.930048) (xy 6.019293 -14.940960) (xy 4.576726 -15.346149) (xy 3.069670 -15.607837) 35 | (xy 1.524955 -15.725120) (xy -0.030589 -15.697095) (xy -1.570131 -15.522860) (xy -2.914829 -15.241592) (xy -4.419579 -14.770232) (xy -5.849223 -14.156236) (xy -7.195481 -13.408862) (xy -8.450079 -12.537369) 36 | (xy -9.604738 -11.551014) (xy -10.651183 -10.459056) (xy -11.581136 -9.270753) (xy -12.386321 -7.995365) (xy -13.058460 -6.642148) (xy -13.589278 -5.220363) (xy -13.970496 -3.739266) (xy -14.142657 -2.682202) 37 | (xy -14.193950 -2.074388) (xy -14.214760 -1.359928) (xy -14.206929 -0.587946) (xy -14.172297 0.192435) (xy -14.112705 0.932092) (xy -14.029996 1.581901) (xy -13.970728 1.905000) (xy -13.574808 3.386107) 38 | (xy -13.039861 4.787600) (xy -12.374629 6.102189) (xy -11.587858 7.322584) (xy -10.688293 8.441497) (xy -9.684678 9.451638) (xy -8.585760 10.345718) (xy -7.400281 11.116448) (xy -6.136989 11.756539) 39 | (xy -4.804626 12.258702) (xy -3.411939 12.615647) (xy -1.967672 12.820086) (xy -0.817087 12.868992) (xy 0.676897 12.789829) (xy 2.108292 12.553671) (xy 3.475359 12.161213) (xy 4.776356 11.613154) 40 | (xy 6.009544 10.910190) (xy 7.173182 10.053017) (xy 7.947211 9.359880) (xy 8.931320 8.298777) (xy 9.765693 7.160648) (xy 10.453089 5.940498) (xy 10.996268 4.633334) (xy 11.397992 3.234162) 41 | (xy 11.441430 3.038453) (xy 11.553191 2.345825) (xy 11.620499 1.552104) (xy 11.643260 0.710649) (xy 11.621383 -0.125183) (xy 11.554775 -0.902032) (xy 11.449392 -1.539474) (xy 11.101182 -2.808738) 42 | (xy 10.633385 -4.020987) (xy 10.060079 -5.144200) (xy 9.464669 -6.053667) (xy 9.050976 -6.566143) (xy 8.547247 -7.115513) (xy 7.998757 -7.657099) (xy 7.450781 -8.146222) (xy 6.948596 -8.538205) 43 | (xy 6.942666 -8.542396) (xy 5.985137 -9.138672) (xy 4.927343 -9.657348) (xy 3.823367 -10.075744) (xy 2.727291 -10.371179) (xy 2.455333 -10.424153) (xy 1.937341 -10.488768) (xy 1.306967 -10.524687) 44 | (xy 0.618615 -10.532486) (xy -0.073312 -10.512736) (xy -0.714411 -10.466010) (xy -1.250280 -10.392882) (xy -1.293274 -10.384673) (xy -1.967925 -10.223641) (xy -2.687207 -10.003957) (xy -3.380359 -9.749417) 45 | (xy -3.976622 -9.483813) (xy -3.985311 -9.479441) (xy -4.835161 -8.985887) (xy -5.681619 -8.373991) (xy -6.485456 -7.678237) (xy -7.207442 -6.933114) (xy -7.808348 -6.173106) (xy -7.900451 -6.037648) 46 | (xy -8.534900 -4.936432) (xy -9.015657 -3.791886) (xy -9.344094 -2.617941) (xy -9.521584 -1.428525) (xy -9.549499 -0.237570) (xy -9.429212 0.940996) (xy -9.162095 2.093243) (xy -8.749522 3.205241) 47 | (xy -8.192865 4.263061) (xy -7.493497 5.252772) (xy -6.703148 6.112438) (xy -6.142716 6.623200) (xy -5.616781 7.035098) (xy -5.065151 7.389652) (xy -4.427632 7.728383) (xy -4.204038 7.836246) 48 | (xy -3.470113 8.147517) (xy -2.752632 8.369492) (xy -1.997854 8.514548) (xy -1.152038 8.595061) (xy -0.846667 8.609469) (xy 0.112645 8.605387) (xy 0.984778 8.509802) (xy 1.830932 8.312798) 49 | (xy 2.589226 8.052878) (xy 3.051824 7.856481) (xy 3.491041 7.638657) (xy 3.876837 7.417329) (xy 4.179175 7.210423) (xy 4.368016 7.035862) (xy 4.410591 6.966036) (xy 4.413698 6.765404) 50 | (xy 4.316951 6.569823) (xy 4.161414 6.447660) (xy 4.091441 6.434666) (xy 3.954346 6.476587) (xy 3.726387 6.586058) (xy 3.478477 6.726660) (xy 2.761268 7.099974) (xy 1.952075 7.415641) 51 | (xy 1.125749 7.645006) (xy 1.023587 7.666463) (xy 0.439623 7.746562) (xy -0.241716 7.779777) (xy -0.963483 7.768076) (xy -1.668730 7.713427) (xy -2.300509 7.617796) (xy -2.624667 7.540413) 52 | (xy -3.364116 7.278658) (xy -4.138541 6.915880) (xy -4.881172 6.486413) (xy -5.439181 6.093287) (xy -5.823916 5.767468) (xy -6.063352 5.501519) (xy -6.165265 5.282912) (xy -6.137430 5.099120) 53 | (xy -6.095088 5.036567) (xy -5.924117 4.924593) (xy -5.703453 4.953306) (xy -5.420276 5.126003) (xy -5.273053 5.248029) (xy -4.410635 5.902582) (xy -3.486374 6.412444) (xy -2.516758 6.778148) 54 | (xy -1.518272 7.000227) (xy -0.507403 7.079214) (xy 0.499363 7.015642) (xy 1.485539 6.810043) (xy 2.434640 6.462950) (xy 3.330178 5.974897) (xy 4.155668 5.346417) (xy 4.584928 4.929378) 55 | (xy 5.195002 4.196573) (xy 5.669331 3.423314) (xy 6.017711 2.620958) (xy 6.291336 1.641433) (xy 6.407387 0.656844) (xy 6.372264 -0.316258) (xy 6.192366 -1.261324) (xy 5.874093 -2.161806) 56 | (xy 5.423845 -3.001154) (xy 4.848020 -3.762819) (xy 4.153019 -4.430252) (xy 3.345242 -4.986903) (xy 3.005666 -5.168106) (xy 2.306168 -5.474169) (xy 1.650022 -5.668703) (xy 0.969268 -5.767790) 57 | (xy 0.381000 -5.789163) (xy -0.616844 -5.712876) (xy -1.542522 -5.483531) (xy -2.397817 -5.100406) (xy -3.184510 -4.562780) (xy -3.626958 -4.163137) (xy -4.240748 -3.440610) (xy -4.712019 -2.645941) 58 | (xy -5.037756 -1.797921) (xy -5.214946 -0.915343) (xy -5.240576 -0.017000) (xy -5.111630 0.878318) (xy -4.825095 1.751818) (xy -4.638422 2.143247) (xy -4.201243 2.804873) (xy -3.631477 3.409387) 59 | (xy -2.963089 3.930238) (xy -2.230044 4.340874) (xy -1.482122 4.610657) (xy -0.977335 4.699272) (xy -0.392586 4.735509) (xy 0.198826 4.719066) (xy 0.723604 4.649639) (xy 0.850044 4.620291) 60 | (xy 1.356584 4.440041) (xy 1.909690 4.165314) (xy 2.447545 3.831737) (xy 2.908332 3.474937) (xy 3.023111 3.367894) (xy 3.492307 2.792707) (xy 3.853555 2.113037) (xy 4.098793 1.361136) 61 | (xy 4.219959 0.569256) (xy 4.208994 -0.230351) (xy 4.088790 -0.895660) (xy 4.013035 -1.220971) (xy 3.996565 -1.421615) (xy 4.036899 -1.530594) (xy 4.040765 -1.534633) (xy 4.186424 -1.602113) 62 | (xy 4.323816 -1.523543) (xy 4.448319 -1.322167) (xy 4.555315 -1.021227) (xy 4.640183 -0.643967) (xy 4.698306 -0.213632) (xy 4.725062 0.246536) (xy 4.715833 0.713293) (xy 4.665998 1.163396) 63 | (xy 4.621506 1.387408) (xy 4.337864 2.230280) (xy 3.904322 3.007860) (xy 3.333587 3.702111) (xy 2.638368 4.294995) (xy 2.511666 4.382434) (xy 1.914051 4.738020) (xy 1.331018 4.982947) 64 | (xy 0.713267 5.131200) (xy 0.011499 5.196762) (xy -0.381000 5.202926) (xy -0.851741 5.195973) (xy -1.205249 5.174698) (xy -1.493478 5.131901) (xy -1.768379 5.060385) (xy -2.017997 4.976086) 65 | (xy -2.784349 4.647135) (xy -3.448058 4.235807) (xy -4.070036 3.703578) (xy -4.141260 3.633259) (xy -4.698893 3.000156) (xy -5.124132 2.334769) (xy -5.452265 1.581211) (xy -5.471669 1.526134) 66 | (xy -5.704784 0.604205) (xy -5.782690 -0.350582) (xy -5.708195 -1.310224) (xy -5.484111 -2.246720) (xy -5.113246 -3.132069) (xy -4.980160 -3.372664) (xy -4.802354 -3.631692) (xy -4.539583 -3.960062) 67 | (xy -4.230490 -4.311380) (xy -3.979334 -4.574267) (xy -3.267340 -5.201699) (xy -2.513998 -5.685062) (xy -1.676280 -6.049615) (xy -1.222876 -6.192268) (xy -0.554053 -6.324971) (xy 0.201103 -6.382940) 68 | (xy 0.976919 -6.366064) (xy 1.707722 -6.274228) (xy 2.044151 -6.197895) (xy 3.038997 -5.844626) (xy 3.948072 -5.353252) (xy 4.761118 -4.737230) (xy 5.467876 -4.010020) (xy 6.058084 -3.185080) 69 | (xy 6.521485 -2.275870) (xy 6.847817 -1.295848) (xy 7.026821 -0.258473) (xy 7.059212 0.381000) (xy 6.987812 1.496800) (xy 6.759166 2.552701) (xy 6.371446 3.553592) (xy 5.822826 4.504362) 70 | (xy 5.231809 5.273072) (xy 5.020128 5.523212) (xy 4.904571 5.684523) (xy 4.869486 5.795378) (xy 4.899222 5.894147) (xy 4.946899 5.971572) (xy 5.120863 6.147711) (xy 5.321537 6.173395) 71 | (xy 5.559438 6.045935) (xy 5.845085 5.762643) (xy 5.867770 5.736166) (xy 6.566192 4.789438) (xy 7.115191 3.775412) (xy 7.510504 2.707498) (xy 7.747870 1.599108) (xy 7.823026 0.463653) 72 | (xy 7.782270 -0.288498) (xy 7.646633 -1.158155) (xy 7.413957 -1.990739) (xy 7.069562 -2.828084) (xy 6.598768 -3.712021) (xy 6.554487 -3.787212) (xy 6.457004 -4.052724) (xy 6.506879 -4.252460) 73 | (xy 6.697349 -4.368847) (xy 6.784663 -4.385351) (xy 6.960801 -4.362686) (xy 7.138918 -4.239015) (xy 7.335705 -3.996690) (xy 7.567851 -3.618061) (xy 7.649017 -3.471334) (xy 8.125115 -2.423040) 74 | (xy 8.445654 -1.330641) (xy 8.613361 -0.210179) (xy 8.630969 0.922301) (xy 8.501206 2.050757) (xy 8.226802 3.159144) (xy 7.810488 4.231420) (xy 7.254993 5.251541) (xy 6.563047 6.203463) 75 | (xy 5.877511 6.939454) (xy 4.925228 7.740906) (xy 3.897523 8.397311) (xy 2.808277 8.907492) (xy 1.671367 9.270275) (xy 0.500674 9.484483) (xy -0.689922 9.548941) (xy -1.886542 9.462473) 76 | (xy -3.075307 9.223904) (xy -4.242337 8.832057) (xy -5.373753 8.285756) (xy -5.942659 7.940737) (xy -6.960540 7.177464) (xy -7.876530 6.286056) (xy -8.677913 5.282326) (xy -9.351975 4.182089) 77 | (xy -9.860252 3.068530) (xy -10.231647 1.879510) (xy -10.456866 0.632289) (xy -10.535614 -0.645359) (xy -10.467599 -1.925660) (xy -10.252526 -3.180839) (xy -9.937620 -4.253118) (xy -9.412615 -5.475193) 78 | (xy -8.743021 -6.620850) (xy -7.940746 -7.678330) (xy -7.017703 -8.635876) (xy -5.985803 -9.481730) (xy -4.856955 -10.204137) (xy -3.643071 -10.791338) (xy -3.106286 -10.996391) (xy -2.293317 -11.256927) 79 | (xy -1.528230 -11.440826) (xy -0.754026 -11.557385) (xy 0.086292 -11.615901) (xy 0.762000 -11.627311) (xy 1.378965 -11.621818) (xy 1.874223 -11.602772) (xy 2.295121 -11.566319) (xy 2.689007 -11.508607) 80 | (xy 3.021618 -11.443449) (xy 4.429720 -11.060255) (xy 5.756455 -10.532028) (xy 6.994732 -9.865910) (xy 8.137458 -9.069041) (xy 9.177542 -8.148564) (xy 10.107890 -7.111620) (xy 10.921412 -5.965351) 81 | (xy 11.611015 -4.716898) (xy 12.169607 -3.373402) (xy 12.590096 -1.942005) (xy 12.630219 -1.767883) (xy 12.700983 -1.430330) (xy 12.752789 -1.118277) (xy 12.788457 -0.794867) (xy 12.810805 -0.423244) 82 | (xy 12.822654 0.033452) (xy 12.826824 0.612077) (xy 12.827000 0.804333) (xy 12.824342 1.429656) (xy 12.814456 1.923672) (xy 12.794475 2.324351) (xy 12.761530 2.669661) (xy 12.712752 2.997573) 83 | (xy 12.645273 3.346057) (xy 12.629294 3.421502) (xy 12.234140 4.879369) (xy 11.694392 6.258576) (xy 11.018905 7.552062) (xy 10.216537 8.752769) (xy 9.296143 9.853636) (xy 8.266579 10.847605) 84 | (xy 7.136702 11.727615) (xy 5.915368 12.486608) (xy 4.611432 13.117524) (xy 3.233752 13.613302) (xy 1.791183 13.966884) (xy 0.292581 14.171210) (xy -0.920468 14.222448) (xy -2.476301 14.141388) 85 | (xy -3.999290 13.896365) (xy -5.480408 13.491069) (xy -6.910625 12.929187) (xy -8.280911 12.214408) (xy -9.582237 11.350420) (xy -10.805575 10.340912) (xy -11.100487 10.063994) (xy -12.158587 8.928380) 86 | (xy -13.094602 7.682924) (xy -13.901252 6.342254) (xy -14.571259 4.920998) (xy -15.097343 3.433788) (xy -15.472224 1.895250) (xy -15.617347 0.986377) (xy -15.674673 0.368323) (xy -15.705496 -0.355651) 87 | (xy -15.710705 -1.136364) (xy -15.691185 -1.924632) (xy -15.647823 -2.671271) (xy -15.581507 -3.327099) (xy -15.533912 -3.640667) (xy -15.448230 -4.063751) (xy -15.328823 -4.575291) (xy -15.193357 -5.102395) 88 | (xy -15.092752 -5.461000) (xy -14.973691 -5.874062) (xy -14.869893 -6.248376) (xy -14.792490 -6.542846) (xy -14.752618 -6.716378) (xy -14.752558 -6.716722) (xy -14.773912 -7.033945) (xy -14.928852 -7.307634) 89 | (xy -15.182004 -7.505495) (xy -15.497996 -7.595235) (xy -15.702412 -7.583864) (xy -15.908273 -7.523746) (xy -16.082565 -7.414812) (xy -16.235825 -7.237478) (xy -16.378593 -6.972154) (xy -16.521405 -6.599255) 90 | (xy -16.674802 -6.099194) (xy -16.849321 -5.452384) (xy -16.849416 -5.452018) (xy -17.170476 -3.901131) (xy -17.347965 -2.297353) (xy -17.381720 -0.673173) (xy -17.271578 0.938919) (xy -17.017376 2.506436) 91 | (xy -16.891967 3.048000) (xy -16.394910 4.692315) (xy -15.751368 6.254750) (xy -14.965376 7.729538) (xy -14.040971 9.110915) (xy -12.982189 10.393113) (xy -11.793066 11.570367) (xy -10.477638 12.636909) 92 | (xy -9.892065 13.048036) (xy -9.525924 13.300332) (xy -9.280094 13.492996) (xy -9.130910 13.655525) (xy -9.054706 13.817420) (xy -9.027817 14.008179) (xy -9.025467 14.128249) (xy -9.103165 14.427754) 93 | (xy -9.309004 14.680516) (xy -9.602099 14.850011) (xy -9.890841 14.901333) (xy -10.061912 14.881992) (xy -10.257400 14.813798) (xy -10.508042 14.681494) (xy -10.844575 14.469823) (xy -11.086741 14.307722) 94 | (xy -12.489609 13.254894) (xy -13.778266 12.079840) (xy -14.946595 10.790677) (xy -15.988481 9.395524) (xy -16.897805 7.902499) (xy -17.668451 6.319719) (xy -18.243529 4.809835) (xy -18.725915 3.096452) 95 | (xy -19.044573 1.348871) (xy -19.199238 -0.422894) (xy -19.189643 -2.208833) (xy -19.015522 -3.998932) (xy -18.676607 -5.783179) (xy -18.540005 -6.326169) (xy -18.005081 -8.010178) (xy -17.315799 -9.637836) 96 | (xy -16.480766 -11.198801) (xy -15.508585 -12.682732) (xy -14.407862 -14.079288) (xy -13.187202 -15.378127) (xy -11.855211 -16.568909) (xy -10.420494 -17.641293) (xy -8.891655 -18.584937) (xy -7.916334 -19.093015) 97 | (xy -6.862042 -19.578297) (xy -5.845211 -19.986190) (xy -4.824721 -20.329166) (xy -3.759450 -20.619698) (xy -2.608279 -20.870259) (xy -1.330087 -21.093321) (xy -1.312334 -21.096113) (xy -0.873122 -21.145546) 98 | (xy -0.301480 -21.180646) (xy 0.366324 -21.201710) (xy 1.094020 -21.209032) (xy 1.845338 -21.202906) )(layer F.SilkS) (width 0.010000) 99 | ) 100 | (fp_poly (pts (xy 29.972000 6.268774) (xy 29.612166 6.087407) (xy 28.914524 5.666035) (xy 28.226445 5.122779) (xy 27.595499 4.500765) (xy 27.069254 3.843123) (xy 26.966080 3.688316) (xy 26.635007 3.125847) 101 | (xy 26.379096 2.577017) (xy 26.187193 2.003366) (xy 26.048145 1.366430) (xy 25.950801 0.627747) (xy 25.900395 0.013088) (xy 25.678386 -2.080821) (xy 25.297835 -4.123036) (xy 24.761427 -6.107547) 102 | (xy 24.071848 -8.028346) (xy 23.231783 -9.879424) (xy 22.243918 -11.654772) (xy 21.110938 -13.348382) (xy 19.835530 -14.954244) (xy 18.626666 -16.260673) (xy 17.121215 -17.661802) (xy 15.528582 -18.918021) 103 | (xy 13.851519 -20.027895) (xy 12.092780 -20.989989) (xy 10.255119 -21.802867) (xy 8.341289 -22.465096) (xy 6.354043 -22.975240) (xy 5.376333 -23.165417) (xy 4.654231 -23.268275) (xy 3.809187 -23.349910) 104 | (xy 2.886442 -23.408803) (xy 1.931237 -23.443433) (xy 0.988812 -23.452282) (xy 0.104409 -23.433830) (xy -0.676732 -23.386557) (xy -0.817238 -23.373445) (xy -2.742217 -23.099290) (xy -4.620789 -22.669529) 105 | (xy -6.444083 -22.090083) (xy -8.203227 -21.366872) (xy -9.889350 -20.505815) (xy -11.493581 -19.512832) (xy -13.007048 -18.393843) (xy -14.420882 -17.154767) (xy -15.726209 -15.801524) (xy -16.914160 -14.340035) 106 | (xy -17.975863 -12.776217) (xy -18.755678 -11.403172) (xy -19.492787 -9.855330) (xy -20.095616 -8.292579) (xy -20.575447 -6.679376) (xy -20.943563 -4.980177) (xy -21.098808 -4.021667) (xy -21.148614 -3.546715) 107 | (xy -21.183415 -2.941376) (xy -21.203517 -2.243904) (xy -21.209228 -1.492553) (xy -21.200855 -0.725575) (xy -21.178704 0.018776) (xy -21.143082 0.702247) (xy -21.094297 1.286585) (xy -21.053628 1.608666) 108 | (xy -20.688951 3.470368) (xy -20.175487 5.267088) (xy -19.518619 6.991218) (xy -18.723732 8.635151) (xy -17.796210 10.191280) (xy -16.741438 11.651998) (xy -15.564799 13.009698) (xy -14.271678 14.256773) 109 | (xy -12.867459 15.385615) (xy -11.357526 16.388617) (xy -10.100840 17.083281) (xy -8.620523 17.769858) (xy -7.162788 18.311545) (xy -5.693031 18.717109) (xy -4.176652 18.995315) (xy -2.579046 19.154931) 110 | (xy -1.778000 19.191852) (xy -0.981108 19.207002) (xy -0.296163 19.198384) (xy 0.332788 19.164194) (xy 0.950389 19.103952) (xy 2.710263 18.816670) (xy 4.416721 18.374140) (xy 6.060599 17.781862) 111 | (xy 7.632730 17.045338) (xy 9.123950 16.170069) (xy 10.525094 15.161555) (xy 11.826997 14.025298) (xy 13.020494 12.766799) (xy 14.096419 11.391558) (xy 14.307722 11.086740) (xy 14.572782 10.685156) 112 | (xy 14.749200 10.387200) (xy 14.852046 10.162645) (xy 14.896390 9.981263) (xy 14.901333 9.896001) (xy 14.829771 9.566996) (xy 14.642104 9.273960) (xy 14.378859 9.070303) (xy 14.236419 9.019727) 113 | (xy 14.001464 8.998591) (xy 13.788491 9.058603) (xy 13.573402 9.217541) (xy 13.332095 9.493186) (xy 13.042238 9.900688) (xy 12.039516 11.244836) (xy 10.926655 12.466120) (xy 9.713659 13.561003) 114 | (xy 8.410532 14.525950) (xy 7.027279 15.357425) (xy 5.573904 16.051892) (xy 4.060410 16.605816) (xy 2.496802 17.015661) (xy 0.893084 17.277891) (xy -0.740740 17.388970) (xy -2.394665 17.345363) 115 | (xy -4.058689 17.143534) (xy -5.722805 16.779948) (xy -6.112892 16.670624) (xy -6.668158 16.490682) (xy -7.074010 16.314843) (xy -7.349606 16.131177) (xy -7.514104 15.927759) (xy -7.574939 15.760419) 116 | (xy -7.574054 15.442184) (xy -7.455763 15.138082) (xy -7.251176 14.892666) (xy -6.991402 14.750491) (xy -6.856865 14.732000) (xy -6.668458 14.758921) (xy -6.380357 14.829853) (xy -6.051680 14.930047) 117 | (xy -6.019294 14.940959) (xy -4.717988 15.310173) (xy -3.331189 15.568057) (xy -1.906493 15.707980) (xy -0.491493 15.723309) (xy -0.423334 15.720746) (xy 1.217398 15.574348) (xy 2.802962 15.270096) 118 | (xy 4.327252 14.810626) (xy 5.784162 14.198573) (xy 7.167587 13.436574) (xy 8.471419 12.527262) (xy 9.689554 11.473275) (xy 9.905338 11.262332) (xy 10.932382 10.123613) (xy 11.837500 8.881185) 119 | (xy 12.611895 7.552857) (xy 13.246771 6.156440) (xy 13.733333 4.709745) (xy 14.062785 3.230581) (xy 14.142656 2.682201) (xy 14.205678 1.926506) (xy 14.224198 1.075397) (xy 14.200643 0.183279) 120 | (xy 14.137440 -0.695443) (xy 14.037016 -1.506365) (xy 13.930466 -2.074334) (xy 13.514918 -3.553716) (xy 12.961683 -4.951016) (xy 12.279453 -6.259080) (xy 11.476915 -7.470756) (xy 10.562762 -8.578891) 121 | (xy 9.545681 -9.576329) (xy 8.434364 -10.455919) (xy 7.237501 -11.210507) (xy 5.963781 -11.832939) (xy 4.621895 -12.316061) (xy 3.220532 -12.652722) (xy 1.768382 -12.835766) (xy 0.817086 -12.868993) 122 | (xy -0.675997 -12.789573) (xy -2.107769 -12.552783) (xy -3.475966 -12.159528) (xy -4.778326 -11.610716) (xy -6.012583 -10.907252) (xy -7.176475 -10.050043) (xy -7.947212 -9.359881) (xy -8.931321 -8.298778) 123 | (xy -9.765694 -7.160649) (xy -10.453090 -5.940499) (xy -10.996269 -4.633335) (xy -11.397993 -3.234163) (xy -11.441431 -3.038454) (xy -11.553192 -2.345826) (xy -11.620500 -1.552105) (xy -11.643261 -0.710650) 124 | (xy -11.621384 0.125182) (xy -11.554776 0.902031) (xy -11.449393 1.539473) (xy -11.064378 2.925484) (xy -10.542798 4.219870) (xy -9.889354 5.416366) (xy -9.108747 6.508711) (xy -8.205679 7.490641) 125 | (xy -7.184849 8.355894) (xy -6.050960 9.098205) (xy -5.588000 9.348493) (xy -4.499764 9.844637) (xy -3.437658 10.198626) (xy -2.355631 10.421485) (xy -1.207633 10.524237) (xy -0.635000 10.534184) 126 | (xy 0.604435 10.471649) (xy 1.755550 10.284831) (xy 2.849176 9.964247) (xy 3.916146 9.500415) (xy 4.987290 8.883852) (xy 5.213700 8.735384) (xy 5.772493 8.315873) (xy 6.364645 7.792686) 127 | (xy 6.944866 7.211299) (xy 7.467867 6.617186) (xy 7.888358 6.055823) (xy 7.900450 6.037647) (xy 8.534614 4.936835) (xy 9.015156 3.792552) (xy 9.343453 2.618756) (xy 9.520879 1.429404) 128 | (xy 9.548810 0.238451) (xy 9.428620 -0.940146) (xy 9.161686 -2.092428) (xy 8.749383 -3.204441) (xy 8.193085 -4.262226) (xy 7.494169 -5.251828) (xy 6.703147 -6.112439) (xy 6.142715 -6.623201) 129 | (xy 5.616780 -7.035099) (xy 5.065150 -7.389653) (xy 4.427631 -7.728384) (xy 4.204037 -7.836247) (xy 3.470112 -8.147518) (xy 2.752631 -8.369493) (xy 1.997853 -8.514549) (xy 1.152037 -8.595062) 130 | (xy 0.846666 -8.609470) (xy -0.112646 -8.605388) (xy -0.984779 -8.509803) (xy -1.830933 -8.312799) (xy -2.589227 -8.052879) (xy -3.051825 -7.856482) (xy -3.491042 -7.638658) (xy -3.876838 -7.417330) 131 | (xy -4.179176 -7.210424) (xy -4.368017 -7.035863) (xy -4.410592 -6.966037) (xy -4.413699 -6.765405) (xy -4.316952 -6.569824) (xy -4.161415 -6.447661) (xy -4.091442 -6.434667) (xy -3.954347 -6.476588) 132 | (xy -3.726388 -6.586059) (xy -3.478478 -6.726661) (xy -2.577774 -7.195169) (xy -1.641537 -7.522003) (xy -0.645312 -7.713049) (xy 0.435360 -7.774194) (xy 0.839079 -7.765956) (xy 1.598674 -7.716583) 133 | (xy 2.248625 -7.623164) (xy 2.845941 -7.471670) (xy 3.447631 -7.248069) (xy 4.021666 -6.982657) (xy 4.451736 -6.750295) (xy 4.885881 -6.480998) (xy 5.296349 -6.195803) (xy 5.655389 -5.915747) 134 | (xy 5.935249 -5.661868) (xy 6.108176 -5.455204) (xy 6.147134 -5.371410) (xy 6.147319 -5.130882) (xy 6.033318 -4.976280) (xy 5.843585 -4.920222) (xy 5.616578 -4.975324) (xy 5.412258 -5.130306) 135 | (xy 5.156873 -5.358263) (xy 4.789364 -5.628282) (xy 4.352407 -5.913789) (xy 3.888677 -6.188208) (xy 3.440850 -6.424963) (xy 3.063661 -6.592860) (xy 2.488326 -6.781860) (xy 1.844733 -6.939685) 136 | (xy 1.199468 -7.053030) (xy 0.619119 -7.108589) (xy 0.465666 -7.112001) (xy -0.384191 -7.045856) (xy -1.277940 -6.858546) (xy -2.161133 -6.566757) (xy -2.979324 -6.187176) (xy -3.421846 -5.920584) 137 | (xy -4.232509 -5.285092) (xy -4.919916 -4.555319) (xy -5.481124 -3.748018) (xy -5.913185 -2.879939) (xy -6.213154 -1.967837) (xy -6.378086 -1.028464) (xy -6.405035 -0.078571) (xy -6.291055 0.865088) 138 | (xy -6.033200 1.785761) (xy -5.628525 2.666696) (xy -5.076269 3.488399) (xy -4.388921 4.225397) (xy -3.618813 4.825752) (xy -2.782574 5.286222) (xy -1.896835 5.603563) (xy -0.978225 5.774536) 139 | (xy -0.043375 5.795898) (xy 0.891087 5.664406) (xy 1.808529 5.376821) (xy 2.600707 4.984934) (xy 3.094247 4.637158) (xy 3.597920 4.183521) (xy 4.064664 3.673171) (xy 4.447420 3.155256) 140 | (xy 4.597394 2.899728) (xy 4.966848 2.024042) (xy 5.180253 1.113976) (xy 5.237426 0.190716) (xy 5.138183 -0.724550) (xy 4.882339 -1.610636) (xy 4.641244 -2.143248) (xy 4.222126 -2.781942) 141 | (xy 3.670659 -3.373773) (xy 3.022787 -3.890618) (xy 2.314453 -4.304353) (xy 1.581603 -4.586852) (xy 1.485044 -4.612817) (xy 0.977662 -4.700130) (xy 0.392475 -4.735610) (xy -0.197956 -4.719025) 142 | (xy -0.721072 -4.650142) (xy -0.850045 -4.620292) (xy -1.356585 -4.440042) (xy -1.909691 -4.165315) (xy -2.447546 -3.831738) (xy -2.908333 -3.474938) (xy -3.023112 -3.367895) (xy -3.482355 -2.804165) 143 | (xy -3.840874 -2.133890) (xy -4.089566 -1.392931) (xy -4.219329 -0.617150) (xy -4.221060 0.157593) (xy -4.096063 0.859119) (xy -4.013298 1.238719) (xy -4.018656 1.481659) (xy -4.113164 1.596498) 144 | (xy -4.186169 1.608666) (xy -4.327761 1.528826) (xy -4.460675 1.308610) (xy -4.576599 0.976976) (xy -4.667225 0.562882) (xy -4.724244 0.095284) (xy -4.740082 -0.321668) (xy -4.657610 -1.197538) 145 | (xy -4.423335 -2.023834) (xy -4.051041 -2.786406) (xy -3.554510 -3.471104) (xy -2.947527 -4.063780) (xy -2.243874 -4.550285) (xy -1.457335 -4.916469) (xy -0.601694 -5.148184) (xy 0.034560 -5.223000) 146 | (xy 0.972100 -5.195764) (xy 1.862849 -5.015003) (xy 2.694058 -4.693069) (xy 3.452976 -4.242313) (xy 4.126853 -3.675087) (xy 4.702938 -3.003743) (xy 5.168482 -2.240631) (xy 5.510734 -1.398105) 147 | (xy 5.716943 -0.488515) (xy 5.775754 0.338666) (xy 5.724465 1.204093) (xy 5.558498 2.002064) (xy 5.262924 2.796682) (xy 5.144784 3.048000) (xy 4.759824 3.687103) (xy 4.249916 4.317963) 148 | (xy 3.656123 4.898951) (xy 3.019507 5.388438) (xy 2.577542 5.650658) (xy 1.816899 5.998416) (xy 1.094000 6.225206) (xy 0.345967 6.346252) (xy -0.423334 6.377291) (xy -1.490988 6.292358) 149 | (xy -2.499396 6.050631) (xy -3.439746 5.656964) (xy -4.303222 5.116214) (xy -5.081011 4.433235) (xy -5.764299 3.612883) (xy -5.957125 3.329007) (xy -6.468641 2.387909) (xy -6.823794 1.400533) 150 | (xy -7.023823 0.382535) (xy -7.069964 -0.650431) (xy -6.963458 -1.682710) (xy -6.705541 -2.698647) (xy -6.297452 -3.682587) (xy -5.740429 -4.618875) (xy -5.281311 -5.215519) (xy -5.071784 -5.470873) 151 | (xy -4.913163 -5.680116) (xy -4.831573 -5.808200) (xy -4.826000 -5.826329) (xy -4.895910 -5.960257) (xy -5.060341 -6.092471) (xy -5.251347 -6.173530) (xy -5.312954 -6.180667) (xy -5.495357 -6.107329) 152 | (xy -5.730240 -5.903379) (xy -6.001244 -5.592917) (xy -6.292009 -5.200041) (xy -6.586177 -4.748848) (xy -6.867389 -4.263439) (xy -7.119285 -3.767910) (xy -7.325508 -3.286360) (xy -7.380768 -3.134570) 153 | (xy -7.687898 -2.011387) (xy -7.827857 -0.898166) (xy -7.800261 0.208321) (xy -7.604723 1.311302) (xy -7.240858 2.414006) (xy -6.708282 3.519659) (xy -6.554488 3.787211) (xy -6.457005 4.052723) 154 | (xy -6.506880 4.252459) (xy -6.697350 4.368846) (xy -6.784664 4.385350) (xy -6.960802 4.362685) (xy -7.138919 4.239014) (xy -7.335706 3.996689) (xy -7.567852 3.618060) (xy -7.649018 3.471333) 155 | (xy -8.125116 2.423039) (xy -8.445655 1.330640) (xy -8.613362 0.210178) (xy -8.630970 -0.922302) (xy -8.501207 -2.050758) (xy -8.226803 -3.159145) (xy -7.810489 -4.231421) (xy -7.254994 -5.251542) 156 | (xy -6.563048 -6.203464) (xy -5.877512 -6.939455) (xy -4.928689 -7.738437) (xy -3.907959 -8.391521) (xy -2.829082 -8.898873) (xy -1.705819 -9.260658) (xy -0.551932 -9.477043) (xy 0.618818 -9.548192) 157 | (xy 1.792670 -9.474272) (xy 2.955862 -9.255448) (xy 4.094634 -8.891885) (xy 5.195223 -8.383750) (xy 6.243869 -7.731208) (xy 7.226811 -6.934424) (xy 7.391492 -6.779740) (xy 8.290097 -5.804878) 158 | (xy 9.039920 -4.750233) (xy 9.639170 -3.620090) (xy 10.086054 -2.418736) (xy 10.378783 -1.150457) (xy 10.515564 0.180462) (xy 10.526241 0.719666) (xy 10.441013 2.077955) (xy 10.194680 3.386428) 159 | (xy 9.789543 4.639685) (xy 9.227901 5.832321) (xy 8.512055 6.958936) (xy 7.644306 8.014125) (xy 7.245684 8.424333) (xy 6.215387 9.318404) (xy 5.085300 10.076308) (xy 3.858319 10.696524) 160 | (xy 2.537338 11.177531) (xy 1.497618 11.443681) (xy 0.776986 11.557519) (xy -0.048516 11.621961) (xy -0.921794 11.637029) (xy -1.785754 11.602743) (xy -2.583304 11.519124) (xy -3.021619 11.442044) 161 | (xy -4.433722 11.061923) (xy -5.757967 10.537185) (xy -6.995918 9.867010) (xy -8.149139 9.050577) (xy -8.991373 8.311187) (xy -9.987631 7.247832) (xy -10.835204 6.110247) (xy -11.539091 4.889583) 162 | (xy -12.104296 3.576992) (xy -12.535818 2.163625) (xy -12.588014 1.947979) (xy -12.723497 1.204358) (xy -12.814116 0.352240) (xy -12.857943 -0.553073) (xy -12.853049 -1.456277) (xy -12.797509 -2.302070) 163 | (xy -12.749663 -2.689416) (xy -12.453551 -4.135429) (xy -12.005610 -5.519892) (xy -11.414855 -6.834207) (xy -10.690297 -8.069777) (xy -9.840951 -9.218004) (xy -8.875829 -10.270292) (xy -7.803943 -11.218043) 164 | (xy -6.634308 -12.052659) (xy -5.375935 -12.765544) (xy -4.037837 -13.348101) (xy -2.629028 -13.791732) (xy -1.158521 -14.087839) (xy -0.742890 -14.142452) (xy -0.053907 -14.196672) (xy 0.726375 -14.214951) 165 | (xy 1.545600 -14.199268) (xy 2.351412 -14.151600) (xy 3.091458 -14.073925) (xy 3.679948 -13.975401) (xy 5.250647 -13.563129) (xy 6.729824 -13.008941) (xy 8.121557 -12.310687) (xy 9.429927 -11.466217) 166 | (xy 10.659010 -10.473380) (xy 11.098634 -10.063995) (xy 12.147659 -8.935265) (xy 13.080649 -7.695341) (xy 13.886813 -6.363943) (xy 14.555360 -4.960790) (xy 15.075501 -3.505601) (xy 15.401159 -2.201334) 167 | (xy 15.534207 -1.492024) (xy 15.626997 -0.876718) (xy 15.684616 -0.296609) (xy 15.712153 0.307114) (xy 15.714697 0.993260) (xy 15.708836 1.354666) (xy 15.649280 2.546590) (xy 15.515701 3.648597) 168 | (xy 15.297662 4.727710) (xy 15.033326 5.692880) (xy 14.890990 6.172803) (xy 14.798417 6.522388) (xy 14.752242 6.772083) (xy 14.749104 6.952333) (xy 14.785636 7.093584) (xy 14.858477 7.226284) 169 | (xy 14.863127 7.233416) (xy 15.111598 7.474280) (xy 15.428052 7.584053) (xy 15.768950 7.559063) (xy 16.090753 7.395641) (xy 16.153161 7.342151) (xy 16.289562 7.144199) (xy 16.441155 6.803140) 170 | (xy 16.601163 6.343770) (xy 16.762811 5.790885) (xy 16.919325 5.169280) (xy 17.063928 4.503751) (xy 17.189847 3.819094) (xy 17.280234 3.217333) (xy 17.339165 2.602312) (xy 17.372646 1.874056) 171 | (xy 17.381197 1.085163) (xy 17.365337 0.288233) (xy 17.325585 -0.464138) (xy 17.262462 -1.119348) (xy 17.235507 -1.312334) (xy 16.889812 -3.032582) (xy 16.396964 -4.674529) (xy 15.760070 -6.233204) 172 | (xy 14.982238 -7.703638) (xy 14.066577 -9.080864) (xy 13.016192 -10.359911) (xy 11.834194 -11.535810) (xy 10.523689 -12.603593) (xy 9.898217 -13.043900) (xy 9.530638 -13.297074) (xy 9.283405 -13.490314) 173 | (xy 9.132945 -13.652908) (xy 9.055685 -13.814145) (xy 9.028052 -14.003314) (xy 9.025466 -14.128250) (xy 9.103164 -14.427755) (xy 9.309003 -14.680517) (xy 9.602098 -14.850012) (xy 9.890840 -14.901334) 174 | (xy 10.061911 -14.881993) (xy 10.257399 -14.813799) (xy 10.508041 -14.681495) (xy 10.844574 -14.469824) (xy 11.086740 -14.307723) (xy 12.487777 -13.256079) (xy 13.775538 -12.081572) (xy 14.943648 -10.792665) 175 | (xy 15.985730 -9.397819) (xy 16.895406 -7.905498) (xy 17.666301 -6.324164) (xy 18.243528 -4.809836) (xy 18.725914 -3.096453) (xy 19.044572 -1.348872) (xy 19.199237 0.422893) (xy 19.189642 2.208832) 176 | (xy 19.015521 3.998931) (xy 18.676606 5.783178) (xy 18.540004 6.326168) (xy 18.004291 8.013079) (xy 17.314360 9.642521) (xy 16.478538 11.204484) (xy 15.505154 12.688960) (xy 14.402535 14.085938) 177 | (xy 13.179010 15.385411) (xy 11.842905 16.577368) (xy 10.402550 17.651802) (xy 8.866271 18.598703) (xy 7.916333 19.094437) (xy 6.710371 19.645594) (xy 5.537972 20.099221) (xy 4.350106 20.470535) 178 | (xy 3.097744 20.774753) (xy 1.731858 21.027093) (xy 1.644537 21.041024) (xy 1.212305 21.093358) (xy 0.650573 21.137588) (xy -0.001336 21.172794) (xy -0.704100 21.198056) (xy -1.418396 21.212454) 179 | (xy -2.104900 21.215065) (xy -2.724291 21.204971) (xy -3.237244 21.181250) (xy -3.471334 21.160792) (xy -5.383740 20.865850) (xy -7.236396 20.416675) (xy -9.022839 19.819767) (xy -10.736607 19.081623) 180 | (xy -12.371237 18.208742) (xy -13.920265 17.207622) (xy -15.377228 16.084761) (xy -16.735664 14.846658) (xy -17.989110 13.499811) (xy -19.131103 12.050719) (xy -20.155179 10.505879) (xy -21.054876 8.871790) 181 | (xy -21.823732 7.154950) (xy -22.455282 5.361858) (xy -22.943064 3.499011) (xy -23.280615 1.572909) (xy -23.327780 1.195662) (xy -23.379746 0.618502) (xy -23.417516 -0.075265) (xy -23.440797 -0.841296) 182 | (xy -23.449295 -1.635250) (xy -23.442715 -2.412786) (xy -23.420762 -3.129562) (xy -23.383142 -3.741235) (xy -23.362009 -3.961504) (xy -23.059140 -5.950048) (xy -22.597648 -7.889734) (xy -21.983162 -9.772884) 183 | (xy -21.221308 -11.591822) (xy -20.317716 -13.338870) (xy -19.278011 -15.006351) (xy -18.107821 -16.586588) (xy -16.812775 -18.071905) (xy -15.398498 -19.454624) (xy -13.870620 -20.727069) (xy -12.234767 -21.881561) 184 | (xy -10.496566 -22.910425) (xy -8.890000 -23.704346) (xy -7.092595 -24.427585) (xy -5.207988 -25.019128) (xy -3.263164 -25.472316) (xy -1.285108 -25.780496) (xy 0.013088 -25.900396) (xy 0.848553 -25.974674) 185 | (xy 1.554654 -26.082648) (xy 2.169854 -26.235469) (xy 2.732613 -26.444291) (xy 3.281395 -26.720266) (xy 3.688316 -26.966081) (xy 4.348071 -27.460872) (xy 4.982317 -28.071523) (xy 5.547924 -28.750468) 186 | (xy 6.001765 -29.450138) (xy 6.087407 -29.612167) (xy 6.268774 -29.972000) (xy 29.972000 -29.972000) (xy 29.972000 6.268774) )(layer F.SilkS) (width 0.010000) 187 | ) 188 | (fp_poly (pts (xy -3.656150 2.082091) (xy -3.384769 2.304109) (xy -3.049271 2.628542) (xy -2.707541 2.991589) (xy -2.494073 3.262306) (xy -2.402865 3.451540) (xy -2.427908 3.570139) (xy -2.503463 3.614416) 189 | (xy -2.619448 3.585999) (xy -2.813462 3.479952) (xy -2.931856 3.399735) (xy -3.190818 3.185836) (xy -3.455467 2.924399) (xy -3.694655 2.651789) (xy -3.877236 2.404367) (xy -3.972061 2.218496) 190 | (xy -3.978787 2.177509) (xy -3.945884 2.022321) (xy -3.840763 1.989338) (xy -3.656150 2.082091) )(layer F.SilkS) (width 0.010000) 191 | ) 192 | (fp_poly (pts (xy 2.594613 -3.593100) (xy 2.805614 -3.480509) (xy 3.060400 -3.289710) (xy 3.329485 -3.048899) (xy 3.583388 -2.786269) (xy 3.792625 -2.530015) (xy 3.927713 -2.308332) (xy 3.961369 -2.160538) 193 | (xy 3.908918 -2.021707) (xy 3.799626 -1.995120) (xy 3.622153 -2.086553) (xy 3.365157 -2.301787) (xy 3.026833 -2.636727) (xy 2.704750 -2.980227) (xy 2.498034 -3.229733) (xy 2.395631 -3.403908) 194 | (xy 2.386489 -3.521417) (xy 2.456877 -3.599288) (xy 2.594613 -3.593100) )(layer F.SilkS) (width 0.010000) 195 | ) 196 | ) 197 | --------------------------------------------------------------------------------