├── .gitattributes
├── .gitignore
├── .gitmodules
├── Hardware
├── GuitarPedal125b
│ ├── README.md
│ ├── docs
│ │ ├── OrderingHardware.md
│ │ ├── README.md
│ │ └── images
│ │ │ ├── CircuitBoard-Back.png
│ │ │ ├── CircuitBoard-Front.png
│ │ │ ├── Enclosure-Drilled.png
│ │ │ ├── EnclosureAndKnobs.png
│ │ │ ├── FinalProduct-Back.png
│ │ │ ├── FinalProduct.png
│ │ │ ├── JLCPCB-AssemblyAddToCart.png
│ │ │ ├── JLCPCB-AssemblyBOMCentroid.png
│ │ │ ├── JLCPCB-AssemblyBOMCentroidConfirm.png
│ │ │ ├── JLCPCB-AssemblyOptions.png
│ │ │ ├── JLCPCB-AssemblyPCBConfirm.png
│ │ │ ├── JLCPCB-AssemblyPlacement.png
│ │ │ ├── JLCPCB-AssemblyPlacementFixed.png
│ │ │ ├── JLCPCB-AssemblyProcessBOMCentroid.png
│ │ │ ├── JLCPCB-Options.png
│ │ │ ├── JLCPCB-OrderNow.png
│ │ │ ├── JLCPCB-OrderParts.png
│ │ │ ├── PCBExtraParts.png
│ │ │ ├── PCBs.png
│ │ │ └── PotPrep.png
│ └── pcb
│ │ ├── Audio_Input_Buffer.kicad_sch
│ │ ├── Audio_Output_Buffer.kicad_sch
│ │ ├── Audio_True_Bypass_Stereo.kicad_sch
│ │ ├── BOM_JLCSMT_DaisySeedGuitarPedal125b.xlsx
│ │ ├── Controls.kicad_sch
│ │ ├── CustomFootprints.pretty
│ │ ├── Generic_PowerJack.kicad_mod
│ │ ├── HiLetgo_OLED_SPI.kicad_mod
│ │ ├── Potentiometer_Bourns_PRS11R.kicad_mod
│ │ └── SOP-6_2.54mm.kicad_mod
│ │ ├── CustomSymbols.kicad_sym
│ │ ├── DaisySeedPedal125b.kicad_pcb
│ │ ├── DaisySeedPedal125b.kicad_prl
│ │ ├── DaisySeedPedal125b.kicad_pro
│ │ ├── DaisySeedPedal125b.kicad_sch
│ │ ├── JLCPCB-Gerbers
│ │ ├── DaisySeedPedal125b-Rev5-gerbers.zip
│ │ └── DaisySeedPedal125b-top-pos.csv
│ │ ├── Midi_InOut.kicad_sch
│ │ ├── Power.kicad_sch
│ │ ├── SSD1306_Screen_SPI.kicad_sch
│ │ ├── fp-info-cache
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
├── GuitarPedal1590b-SMD
│ ├── README.md
│ ├── docs
│ │ ├── OrderingHardware.md
│ │ ├── README.md
│ │ └── images
│ │ │ ├── Alive.png
│ │ │ ├── Backside.png
│ │ │ ├── CircuitBoard.png
│ │ │ ├── EnclosureAndKnobs.png
│ │ │ ├── FinalProduct.png
│ │ │ ├── HoleTemplate.png
│ │ │ ├── JLCPCB-AssemblyAddToCart.png
│ │ │ ├── JLCPCB-AssemblyBOMCentroid.png
│ │ │ ├── JLCPCB-AssemblyBOMCentroidConfirm.png
│ │ │ ├── JLCPCB-AssemblyOptions.png
│ │ │ ├── JLCPCB-AssemblyPCBConfirm.png
│ │ │ ├── JLCPCB-AssemblyPlacement.png
│ │ │ ├── JLCPCB-AssemblyPlacementFixed.png
│ │ │ ├── JLCPCB-AssemblyProcessBOMCentroid-Error.png
│ │ │ ├── JLCPCB-AssemblyProcessBOMCentroid.png
│ │ │ ├── JLCPCB-Options.png
│ │ │ ├── JLCPCB-OrderNow.png
│ │ │ ├── JLCPCB-OrderParts.png
│ │ │ ├── PCBExtraParts.png
│ │ │ └── PCBs.png
│ └── pcb
│ │ ├── Audio_Input_Buffer.kicad_sch
│ │ ├── Audio_Output_Buffer.kicad_sch
│ │ ├── Audio_True_Bypass_Stereo.kicad_sch
│ │ ├── BOM_JLCSMT_DaisySeedGuitarPedal1590b-SMD.xlsx
│ │ ├── Controls.kicad_sch
│ │ ├── CustomFootprints.pretty
│ │ ├── Generic_PowerJack.kicad_mod
│ │ ├── Pot_RightAngle_LongPin_16mm.kicad_mod
│ │ └── SOP-6_2.54mm.kicad_mod
│ │ ├── CustomSymbols.kicad_sym
│ │ ├── DaisySeedPedal1590b-SMD.kicad_pcb
│ │ ├── DaisySeedPedal1590b-SMD.kicad_prl
│ │ ├── DaisySeedPedal1590b-SMD.kicad_pro
│ │ ├── DaisySeedPedal1590b-SMD.kicad_sch
│ │ ├── JLCPCB-Gerbers
│ │ ├── DaisySeedPedal1590b-SMD-Rev2-gerbers.zip
│ │ └── DaisySeedPedal1590b-SMD-top-pos.csv
│ │ ├── Midi_InOut.kicad_sch
│ │ ├── Power.kicad_sch
│ │ ├── fp-info-cache
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
└── GuitarPedal1590b
│ ├── README.md
│ ├── docs
│ ├── Bill_of_Materials_BOM.xlsx
│ ├── OrderingHardware.md
│ ├── README.md
│ └── images
│ │ ├── Alive.png
│ │ ├── CircuitBoard.png
│ │ ├── EnclosureAndKnobs.png
│ │ ├── FilteredPower.png
│ │ ├── FilteredPowerBypass.png
│ │ ├── FinalProduct.png
│ │ ├── JLCPCB-Options.png
│ │ ├── JLCPCB-OrderNow.png
│ │ ├── PCB.png
│ │ ├── PCBs.png
│ │ └── Soldering.gif
│ └── pcb
│ ├── Audio_Input_Buffer.kicad_sch
│ ├── Audio_Output_Buffer.kicad_sch
│ ├── Controls.kicad_sch
│ ├── CustomFootprints.pretty
│ ├── Generic_PowerJack.kicad_mod
│ └── Pot_RightAngle_LongPin_16mm.kicad_mod
│ ├── CustomSymbols.bak
│ ├── CustomSymbols.kicad_sym
│ ├── DaisySeedPedal1590b.kicad_pcb
│ ├── DaisySeedPedal1590b.kicad_prl
│ ├── DaisySeedPedal1590b.kicad_pro
│ ├── DaisySeedPedal1590b.kicad_sch
│ ├── JLCPCB-Gerbers
│ └── DaisySeedPedal1590b-Rev6-gerbers.zip
│ ├── Midi_InOut.kicad_sch
│ ├── Power.kicad_sch
│ ├── fp-info-cache
│ ├── fp-lib-table
│ └── sym-lib-table
├── LICENSE
├── README.md
└── Software
└── GuitarPedal
├── .vscode
├── STM32H750x.svd
├── c_cpp_properties.json
├── launch.json
├── settings.json
└── tasks.json
├── Effect-Modules
├── Chopper
│ ├── README.md
│ ├── chopper.cpp
│ └── chopper.h
├── CloudSeed
│ ├── AllpassDiffuser.h
│ ├── AudioLib
│ │ ├── Biquad2.cpp
│ │ ├── Biquad2.h
│ │ ├── Hp1.h
│ │ ├── Lp1.h
│ │ ├── MathDefs.h
│ │ ├── ShaRandom.cpp
│ │ ├── ShaRandom.h
│ │ ├── ValueTables.cpp
│ │ └── ValueTables.h
│ ├── Default.h
│ ├── DelayLine.h
│ ├── Exports.cpp
│ ├── FastSin.cpp
│ ├── FastSin.h
│ ├── Makefile
│ ├── ModulatedAllpass.h
│ ├── ModulatedDelay.h
│ ├── MultitapDiffuser.h
│ ├── Parameter.h
│ ├── ReverbChannel.h
│ ├── ReverbController.h
│ ├── Utils.h
│ ├── Utils
│ │ ├── Sha256.cpp
│ │ └── Sha256.h
│ ├── license.txt
│ └── premake4.lua
├── Delays
│ ├── delayline_reverse.h
│ └── delayline_revoct.h
├── ImpulseResponse
│ ├── ImpulseResponse.cpp
│ ├── ImpulseResponse.h
│ ├── dsp.cpp
│ ├── dsp.h
│ └── ir_data.h
├── NeuralModels
│ ├── model_data_gru11.h
│ ├── model_data_gru6.h
│ └── model_data_gru9.h
├── amp_module.cpp
├── amp_module.h
├── autopan_module.cpp
├── autopan_module.h
├── base_effect_module.cpp
├── base_effect_module.h
├── chopper_module.cpp
├── chopper_module.h
├── chorus_module.cpp
├── chorus_module.h
├── cloudseed_module.cpp
├── cloudseed_module.h
├── crusher_module.cpp
├── crusher_module.h
├── delay_module.cpp
├── delay_module.h
├── metro_module.cpp
├── metro_module.h
├── midi_keys_module.cpp
├── midi_keys_module.h
├── midipitch_module.cpp
├── midipitch_module.h
├── modal_keys_module.cpp
├── modal_keys_module.h
├── modulated_tremolo_module.cpp
├── modulated_tremolo_module.h
├── multi_delay_module.cpp
├── multi_delay_module.h
├── overdrive_module.cpp
├── overdrive_module.h
├── pluckecho_module.cpp
├── pluckecho_module.h
├── reverb_module.cpp
├── reverb_module.h
├── scope_module.cpp
├── scope_module.h
├── string_keys_module.cpp
└── string_keys_module.h
├── Hardware-Modules
├── base_hardware_module.cpp
├── base_hardware_module.h
├── guitar_pedal_125b.cpp
├── guitar_pedal_125b.h
├── guitar_pedal_1590b-SMD.cpp
├── guitar_pedal_1590b-SMD.h
├── guitar_pedal_1590b.cpp
├── guitar_pedal_1590b.h
├── guitar_pedal_terrarium.cpp
└── guitar_pedal_terrarium.h
├── Makefile
├── README.md
├── UI
├── CustomMappedValues.cpp
├── CustomMappedValues.h
├── effect_module_menu_item.cpp
├── effect_module_menu_item.h
├── guitar_pedal_ui.cpp
└── guitar_pedal_ui.h
├── Util
├── audio_utilities.cpp
└── audio_utilities.h
├── guitar_pedal.cpp
├── guitar_pedal_storage.cpp
├── guitar_pedal_storage.h
└── images
└── configure_hardware.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Software/GuitarPedal/build
2 | Hardware/GuitarPedal1590b/pcb/DaisySeedPedal1590b-backups
3 | Hardware/GuitarPedal1590b-SMD/pcb/DaisySeedPedal1590b-SMD-backups
4 | Hardware/GuitarPedal125b/pcb/DaisySeedPedal125b-backups
5 | Hardware/GuitarPedal125b/pcb/CustomSymbols.bak
6 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "Software/GuitarPedal/DaisySP"]
2 | path = Software/GuitarPedal/DaisySP
3 | url = https://github.com/electro-smith/DaisySP.git
4 | [submodule "Software/GuitarPedal/libDaisy"]
5 | path = Software/GuitarPedal/libDaisy
6 | url = https://github.com/electro-smith/libDaisy.git
7 | [submodule "Software/GuitarPedal/eigen"]
8 | path = Software/GuitarPedal/eigen
9 | url = https://gitlab.com/libeigen/eigen
10 | [submodule "Software/GuitarPedal/RTNeural"]
11 | path = Software/GuitarPedal/RTNeural
12 | url = https://github.com/jatinchowdhury18/RTNeural
13 | [submodule "Software/GuitarPedal/eurorack"]
14 | path = Software/GuitarPedal/eurorack
15 | url = https://github.com/pichenettes/eurorack
16 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/README.md:
--------------------------------------------------------------------------------
1 | # Guitar Pedal 125b
2 |
3 | ### Rev 5 - 6/30/2023
4 |
5 | Updates include:
6 | 1. Updated placement of screen slightly to ease installation.
7 | 2. Updated POT footprint mounting holes to be slightly larger.
8 | 3. Properly grounded Audio TRS jacks when no cable is inserted.
9 | 4. Included exported Gerber and Assembly files to make it easy to order assembled PCBs from JCLPCB. Detailed instructions can be found on the [Build the Hardware](docs/README.md) page. This requires no knowledge of KiCad to get the PCBs made and mostly Assembled.
10 |
11 | ### Overview
12 |
13 | A project to create a digital effect pedal based on the Electro-Smith Daisy Seed that fits into a standard 125B sized Guitar Pedal enclosure. The video below shows a pedal board I made using 2 of these 125b sided pedals and demo the capabilities.
14 |
15 | [](https://www.youtube.com/watch?v=ZkLnS43acQo)
16 |
17 | This project is an evolution of my [1590B sized Pedal](https://github.com/bkshepherd/DaisySeedProjects/tree/main/Hardware/GuitarPedal1590b).
18 |
19 |  
20 |  
21 |  
22 |
23 | ### Features
24 |
25 | 1. 125B size pedal board friendly enclosure!
26 | 2. Buffered Stereo Input and Outputs for Guitar Level signals
27 | 2. Relay based "True Bypass" switching
28 | 3. TRS Mini MIDI Input and Outputs
29 | 4. OLED Display
30 | 5. Rotary Encoder for Display Navigation
31 | 6. 6 Pots
32 | 7. Up to 2 Footswitches
33 | 8. Up to 2 Leds
34 | 9. Standard 9v center pin negative power jack
35 | 10. Easy access to the Daisy Seed USB port and reset buttons for updating the firmware
36 | 11. Primarily SMD parts for easy assembly by your PCB provider
37 | 12. Easily order a custom drilled enclosure from Tayda! [Template Here](https://drill.taydakits.com/box-designs/new?public_key=ZXRnaU9PaWx0b1hNa3VxeTJua3d2dz09Cg==)
38 |
39 | This project includes a KiCad project with the necessary schematics and PCB layout files to create everything you need to build the hardware. The included exported Gerber and Assembly files make it easy to order PCBs from JCLPCB. Detailed instructions can be found on the [Build the Hardware](docs/README.md) page. This requires no knowledge of KiCad to get the PCBs made.
40 |
41 | Once you've built the hardware you can deploy the software from my Multi-Effect Guitar Pedal software project by following these directions: [Deploy the Software to the Hardware](../../Software/GuitarPedal/README.md)
42 |
43 | This software provides a hardware abstraction layer as well as a few custom FX including Tremolo, Chorus, Overdrive, and Stereo Auto-Pan.
44 |
45 | ## Past Updates
46 | ### Rev 4 - 5/16/2023
47 |
48 | Updates include:
49 | 1. Updated PCB design to improve the True Bypass relay switching to include an anti-pop hardware mute.
50 | 2. Update Example Software to take advantage of the anti-pop mute.
51 | 3. Update Example Software to provide a basic menu system for the OLED Screen
52 |
53 | ### Rev 3 - 4/14/2023
54 |
55 | Updates include:
56 | 1. Swapped the placement of the Footswitches and LEDs on the PCB to be consistent with my other pedals.
57 |
58 | Known Issues:
59 | 1. Relay bypass has an audible pop when enabling / disabling the effect. Sounds like a common issue with relay and 3pdt switch true bypass systems. Investigating fixing / minimizing it with an a solution similar to this [anti-pop system](https://www.coda-effects.com/2016/08/relay-bypass-with-anti-pop-system.html). Hope to add this in Rev 4.
60 |
61 | ### Rev 2 - 3/29/2023
62 |
63 | Updates include:
64 | 1. Added 3 Additional Pots (Total of 6)
65 | 2. Improved OLED Screen Placement
66 | 3. Removed an Encoder (now just 1)
67 | 4. Tayda Custom Drill Template for easily ordering a pre-drilled enclosure
68 |
69 | More Information about the Daisy Seed can be found at:
70 |
71 | http://electro-smith.com
72 |
73 | More Information about KiCad can be found at:
74 |
75 | https://www.kicad.org
76 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/OrderingHardware.md:
--------------------------------------------------------------------------------
1 | # Ordering Hardware
2 | I get a lot of requests to buy kits or finished pedals based on my designs. This is not something I typically do, but sometimes I do have extra PCBs, parts, and enclosures lying around and I'm willing to pass them along to you, basically at cost, as outlined in the options below.
3 |
4 | If you are interested, please message me through GitHub or you can find me on the Electro-Smith [Forums](https://forum.electro-smith.com/t/my-daisy-guitar-pedal-designs-on-github/3641) & [Discord](https://discord.gg/ByHBnMtQTR) as Kshep and can message me there.
5 |
6 | **SOLD OUT** - I'm currently sold out of everything, if you want to be added to the list for the next batch, please go ahead and reach out still. I ordered a few more units on 1/21/2024, they should be here soon.
7 |
8 | I also really can't supply much customer support on this stuff or offer any warranty on the hardware. I'm not really trying to start a pedal business. I'm doing this for fun and to learn new things, which is why I provide all these designs and documenation here on GitHub for free.
9 |
10 | ## Option 1 - Complete PCB (without Daisy Seed)
11 | Price: $100 (USD) + Shipping & Handling
12 |
13 | This option gets you a fully assembled PCB, I'll even test it (briefly) to make sure it works. You will still need to get an Enclosure, get Knobs and other hardware for the Enclosure, get a Daisy Seed, and Assemble everything yourself.
14 |
15 | You'll basically be starting at [Step 7: Order the Enclosure and External Hardware](README.md#7-order-the-enclosure-and-external-hardware)
16 |
17 | 
18 |
19 | ## Option 2 - Complete Pedal (without Daisy Seed)
20 | Price: $150 (USD) + Shipping & Handling
21 |
22 | I usually don't have extra Enclosures and Knobs around, so this might not always be an option. Plus picking a custom color and knobs for your pedal is half the fun! [Step 7: Order the Enclosure and External Hardware](README.md#7-order-the-enclosure-and-external-hardware) is so freaking easy, I highly recommend doing Option 1, instead of this one, if you are picky about aesthetics.
23 |
24 | This option is everything you need, except the Daisy Seed. Knobs and Enclosure colors are at my whim and may vary based on what I have lying around.
25 |
26 | You'll basically get a finished pedal ready for you to [create your own cool effects](../../../Software/GuitarPedal/README.md).
27 |
28 | 
29 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/CircuitBoard-Back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/CircuitBoard-Back.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/CircuitBoard-Front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/CircuitBoard-Front.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/Enclosure-Drilled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/Enclosure-Drilled.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/EnclosureAndKnobs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/EnclosureAndKnobs.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/FinalProduct-Back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/FinalProduct-Back.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/FinalProduct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/FinalProduct.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyAddToCart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyAddToCart.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyBOMCentroid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyBOMCentroid.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyBOMCentroidConfirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyBOMCentroidConfirm.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyOptions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyOptions.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyPCBConfirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyPCBConfirm.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyPlacement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyPlacement.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyPlacementFixed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyPlacementFixed.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyProcessBOMCentroid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-AssemblyProcessBOMCentroid.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-Options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-Options.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-OrderNow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-OrderNow.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/JLCPCB-OrderParts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/JLCPCB-OrderParts.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/PCBExtraParts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/PCBExtraParts.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/PCBs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/PCBs.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/docs/images/PotPrep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/docs/images/PotPrep.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/BOM_JLCSMT_DaisySeedGuitarPedal125b.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/pcb/BOM_JLCSMT_DaisySeedGuitarPedal125b.xlsx
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/CustomFootprints.pretty/Generic_PowerJack.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "Generic_PowerJack" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (attr through_hole)
4 | (fp_text reference "REF**" (at -3 -0.1 90 unlocked) (layer "F.SilkS")
5 | (effects (font (size 1 1) (thickness 0.15)))
6 | (tstamp ba0487bc-6ae2-4533-a090-ea23e3b1efcc)
7 | )
8 | (fp_text value "Generic_PowerJack" (at -5.1 6.8 unlocked) (layer "F.Fab")
9 | (effects (font (size 1 1) (thickness 0.15)))
10 | (tstamp cdb66520-91a5-4cad-a795-bc0399a866a8)
11 | )
12 | (fp_text user "${REFERENCE}" (at -3 -0.1 90 unlocked) (layer "F.Fab")
13 | (effects (font (size 1 1) (thickness 0.15)))
14 | (tstamp 7c7a03a9-160a-4ea5-a9c4-52c5889156d9)
15 | )
16 | (fp_rect (start -14 -4.5) (end 0 4.5)
17 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp 02617a5e-812d-44dc-98ba-97767e202b69))
18 | (fp_rect (start -14.15 -4.7) (end 0.2 4.7)
19 | (stroke (width 0.05) (type solid)) (fill none) (layer "F.CrtYd") (tstamp 0d33cffe-38d1-4206-827b-9412885c0f60))
20 | (pad "1" thru_hole oval (at 0 0) (size 2.3 4.5) (drill oval 0.8 3) (layers "*.Cu" "*.Mask") (tstamp eba171d2-aca5-4c61-b42c-d0ae28172d53))
21 | (pad "2" thru_hole oval (at -6 0) (size 2.3 4.5) (drill oval 0.8 3) (layers "*.Cu" "*.Mask") (tstamp c91944c2-b543-4fe3-824a-2566585c330e))
22 | (pad "3" thru_hole oval (at -2.5 4.65 90) (size 2.3 4) (drill oval 0.8 2.5) (layers "*.Cu" "*.Mask") (tstamp 8d61f06b-7d20-4910-a5ee-ac4fa8ec49e0))
23 | )
24 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/CustomFootprints.pretty/Potentiometer_Bourns_PRS11R.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "Potentiometer_Bourns_PRS11R" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (descr "Potentiometer, vertical, 9mm, single, http://www.taiwanalpha.com.tw/downloads?target=products&id=113")
4 | (tags "potentiometer vertical 9mm single")
5 | (attr through_hole)
6 | (fp_text reference "REF**" (at 6.71 -4.64 180) (layer "F.SilkS")
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | (tstamp 5556b31a-a42d-4c02-8359-2cadd5e45d6b)
9 | )
10 | (fp_text value "Potentiometer_Bourns_PRS11R" (at 0 9.86 180) (layer "F.Fab")
11 | (effects (font (size 1 1) (thickness 0.15)))
12 | (tstamp 76eede0a-e6d8-47d6-b23c-43a8c85c8b4a)
13 | )
14 | (fp_text user "${REFERENCE}" (at 7.62 2.54) (layer "F.Fab")
15 | (effects (font (size 1 1) (thickness 0.15)))
16 | (tstamp 60cc1576-50ef-4a23-be2e-b127f5f0f480)
17 | )
18 | (fp_line (start 0.88 -2.38) (end 5.6 -2.38)
19 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 22e3ac33-75a4-4535-8897-965c58dff516))
20 | (fp_line (start 0.88 -1.19) (end 0.88 -2.37)
21 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 3ae46bcb-049a-469a-81a9-bc5bca8eb97c))
22 | (fp_line (start 0.88 1.71) (end 0.88 1.18)
23 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 3819c62b-4a85-4b58-9bb8-bc7a9dca2a8e))
24 | (fp_line (start 0.88 4.16) (end 0.88 3.33)
25 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 0f6528c2-be0c-42ff-ba2c-080bf271ed0f))
26 | (fp_line (start 0.88 7.37) (end 0.88 5.88)
27 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 03d33f26-8668-49bd-92f1-d1c5424217f2))
28 | (fp_line (start 0.88 7.37) (end 5.6 7.37)
29 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp d0214bc1-093d-4cf7-831a-996c6d692a78))
30 | (fp_line (start 9.41 -2.37) (end 12.47 -2.37)
31 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp e8ae64dd-a4e4-478e-83ad-7143ed2cf767))
32 | (fp_line (start 9.41 7.37) (end 12.47 7.37)
33 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp a8f5d308-540e-4f4a-90f5-4dddc171ebd5))
34 | (fp_line (start 12.47 7.37) (end 12.47 -2.37)
35 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 7b23cde7-8ec1-429b-b943-13922555701e))
36 | (fp_line (start -1.15 -3.91) (end -1.15 8.91)
37 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp e64f3449-896b-49db-8275-8346105bb7a9))
38 | (fp_line (start -1.15 8.91) (end 12.6 8.91)
39 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp a674d662-7d34-4cf1-84b7-fe5b55612c95))
40 | (fp_line (start 12.6 -3.91) (end -1.15 -3.91)
41 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 48147e35-d3bf-42d4-90e8-062802067d8a))
42 | (fp_line (start 12.6 8.91) (end 12.6 -3.91)
43 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp f99d3dee-94c3-4c9a-8121-1193df0e1e17))
44 | (fp_line (start 1 -2.25) (end 12.35 -2.25)
45 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp de59107f-d8c8-482b-b87f-634abaf01f6d))
46 | (fp_line (start 1 7.25) (end 1 -2.25)
47 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 9fbf8765-a8dd-4269-9f2f-7d693af96dd3))
48 | (fp_line (start 1 7.25) (end 12.35 7.25)
49 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp dbeaddbe-974f-4c44-9520-fdd41d3e7b45))
50 | (fp_line (start 12.35 7.25) (end 12.35 -2.25)
51 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp fce3fadc-d5b4-4b4e-8b61-046b285139ee))
52 | (fp_circle (center 7.5 2.5) (end 7.5 -1)
53 | (stroke (width 0.1) (type solid)) (fill none) (layer "F.Fab") (tstamp 5e449f0b-e4f5-44a1-a59b-b353282a6938))
54 | (pad "" thru_hole oval (at 7.5 -2.3 90) (size 2.3 3.4) (drill oval 1.7 2.8) (layers "*.Cu" "*.Mask") (tstamp dfe03e0a-3a48-4b4c-831a-d33acedfab57))
55 | (pad "" thru_hole oval (at 7.5 7.3 90) (size 2.3 3.4) (drill oval 1.7 2.8) (layers "*.Cu" "*.Mask") (tstamp eb8fa706-eb61-4d8f-bd56-c1799dc8e195))
56 | (pad "1" thru_hole rect (at 0 0 90) (size 1.8 1.8) (drill 1) (layers "*.Cu" "*.Mask") (tstamp 8cd2564e-628a-4387-8bca-bd679fd2e2a9))
57 | (pad "2" thru_hole circle (at 0 2.5 90) (size 1.8 1.8) (drill 1) (layers "*.Cu" "*.Mask") (tstamp 301621fe-17da-439b-b857-c659cbe63409))
58 | (pad "3" thru_hole circle (at 0 5 90) (size 1.8 1.8) (drill 1) (layers "*.Cu" "*.Mask") (tstamp 927b3020-d809-4bd9-95fd-49dd74c263e6))
59 | (model "${KICAD6_3DMODEL_DIR}/Potentiometer_THT.3dshapes/Potentiometer_Alpha_RD901F-40-00D_Single_Vertical.wrl"
60 | (offset (xyz 0 0 0))
61 | (scale (xyz 1 1 1))
62 | (rotate (xyz 0 0 0))
63 | )
64 | )
65 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/CustomFootprints.pretty/SOP-6_2.54mm.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "SOP-6_2.54mm" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (descr "6-lead surface-mounted (SMD) DIP package, row spacing 9.53 mm (375 mils)")
4 | (tags "SMD DIP DIL PDIP SMDIP 2.54mm 9.53mm 375mil")
5 | (attr smd)
6 | (fp_text reference "REF**" (at 0 -5.2) (layer "F.SilkS")
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | (tstamp 68231a0c-d8a2-4573-9e74-86066459ab84)
9 | )
10 | (fp_text value "SOP-6_2.54mm" (at 0 5.4) (layer "F.Fab")
11 | (effects (font (size 1 1) (thickness 0.15)))
12 | (tstamp f08525c3-632b-4add-8b25-7c64eaac99df)
13 | )
14 | (fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab")
15 | (effects (font (size 1 1) (thickness 0.15)))
16 | (tstamp 9640f97b-ac81-4a1c-8ee5-a1e3d8e3f5d1)
17 | )
18 | (fp_line (start -3.235 -3.87) (end -3.235 3.87)
19 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp fd7deda1-6778-409a-be4f-fbba7c7a891d))
20 | (fp_line (start -3.235 3.87) (end 3.235 3.87)
21 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ff5574d3-0a85-4d25-89d8-116eca3f6e4d))
22 | (fp_line (start -1 -3.87) (end -3.235 -3.87)
23 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 97ea9d92-09cf-4c6a-a08b-bf1a074dd4d9))
24 | (fp_line (start 3.235 -3.87) (end 1 -3.87)
25 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 913de881-a03c-47c3-b659-6a65f2c0560f))
26 | (fp_line (start 3.235 3.87) (end 3.235 -3.87)
27 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 738881a5-85c4-44be-ae36-2ebc275a59f8))
28 | (fp_arc (start 1 -3.87) (mid 0 -2.87) (end -1 -3.87)
29 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 6a0b1442-bef3-4d83-afc8-b0e4079a88f4))
30 | (fp_line (start -5.75 -4.4) (end -5.75 4.4)
31 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9394c496-ded5-4050-a20a-a57ab2cd0eba))
32 | (fp_line (start -5.75 4.4) (end 5.75 4.4)
33 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 1a7e086b-7990-4686-8d92-c22419255528))
34 | (fp_line (start 5.75 -4.4) (end -5.75 -4.4)
35 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 35f85b86-a4c9-4080-8ebc-aad125b99f32))
36 | (fp_line (start 5.75 4.4) (end 5.75 -4.4)
37 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp a9fb04d3-3f2a-45ef-bd5e-a390df84e8b7))
38 | (fp_line (start -3.175 -2.81) (end -2.175 -3.81)
39 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp e1f1e93e-8cfe-415e-8946-bf33d9ef9442))
40 | (fp_line (start -3.175 3.81) (end -3.175 -2.81)
41 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b92e8874-b7cc-407a-a845-0cc4a3e80f9a))
42 | (fp_line (start -2.175 -3.81) (end 3.175 -3.81)
43 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 23a8759d-07c7-4d40-8c86-dec8fe895835))
44 | (fp_line (start 3.175 -3.81) (end 3.175 3.81)
45 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b04bd1db-0268-4445-b839-eb0386ea039b))
46 | (fp_line (start 3.175 3.81) (end -3.175 3.81)
47 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 5c3a24c9-ecc9-4eb4-a56b-7891d767a291))
48 | (pad "1" smd rect (at -4.625 -2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 1dac1b96-87a7-4726-872c-9527f5ec2e30))
49 | (pad "2" smd rect (at -4.625 0) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 97927784-9f9c-4e5f-91ab-37060cc04d18))
50 | (pad "3" smd rect (at -4.625 2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 6fd79709-a053-4b21-8551-a62abb44e8e3))
51 | (pad "4" smd rect (at 4.625 2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp cb9048af-1739-4b1f-9210-3ab3dc2a6db0))
52 | (pad "5" smd rect (at 4.625 0) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 11c41bae-830c-435e-9f8f-9184deba2295))
53 | (pad "6" smd rect (at 4.625 -2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 7f9d70a6-eac1-4b07-844b-49bef5fad961))
54 | (model "${KICAD6_3DMODEL_DIR}/Package_DIP.3dshapes/SMDIP-6_W9.53mm.wrl"
55 | (offset (xyz 0 0 0))
56 | (scale (xyz 1 1 1))
57 | (rotate (xyz 0 0 0))
58 | )
59 | )
60 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/CustomSymbols.kicad_sym:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
2 | (symbol "OLED_DISPLAY_SSD1306_SPI" (in_bom yes) (on_board yes)
3 | (property "Reference" "U" (id 0) (at 0 2.54 0)
4 | (effects (font (size 1.27 1.27)))
5 | )
6 | (property "Value" "OLED_DISPLAY_SSD1306_SPI" (id 1) (at 1.27 8.89 0)
7 | (effects (font (size 1.27 1.27)))
8 | )
9 | (property "Footprint" "" (id 2) (at 0 0 0)
10 | (effects (font (size 1.27 1.27)) hide)
11 | )
12 | (property "Datasheet" "" (id 3) (at 0 0 0)
13 | (effects (font (size 1.27 1.27)) hide)
14 | )
15 | (symbol "OLED_DISPLAY_SSD1306_SPI_0_1"
16 | (rectangle (start -17.78 16.51) (end 16.51 -7.62)
17 | (stroke (width 0) (type default) (color 0 0 0 0))
18 | (fill (type background))
19 | )
20 | )
21 | (symbol "OLED_DISPLAY_SSD1306_SPI_1_1"
22 | (pin power_in line (at 0 -10.16 90) (length 2.54)
23 | (name "GND" (effects (font (size 1.27 1.27))))
24 | (number "1" (effects (font (size 1.27 1.27))))
25 | )
26 | (pin power_in line (at 0 19.05 270) (length 2.54)
27 | (name "VCC" (effects (font (size 1.27 1.27))))
28 | (number "2" (effects (font (size 1.27 1.27))))
29 | )
30 | (pin input line (at -20.32 11.43 0) (length 2.54)
31 | (name "D0" (effects (font (size 1.27 1.27))))
32 | (number "3" (effects (font (size 1.27 1.27))))
33 | )
34 | (pin input line (at -20.32 7.62 0) (length 2.54)
35 | (name "D1" (effects (font (size 1.27 1.27))))
36 | (number "4" (effects (font (size 1.27 1.27))))
37 | )
38 | (pin input line (at -20.32 3.81 0) (length 2.54)
39 | (name "RES" (effects (font (size 1.27 1.27))))
40 | (number "5" (effects (font (size 1.27 1.27))))
41 | )
42 | (pin input line (at -20.32 0 0) (length 2.54)
43 | (name "DC" (effects (font (size 1.27 1.27))))
44 | (number "6" (effects (font (size 1.27 1.27))))
45 | )
46 | (pin input line (at -20.32 -3.81 0) (length 2.54)
47 | (name "CS" (effects (font (size 1.27 1.27))))
48 | (number "7" (effects (font (size 1.27 1.27))))
49 | )
50 | )
51 | )
52 | )
53 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/DaisySeedPedal125b.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 0,
4 | "active_layer_preset": "All Layers",
5 | "auto_track_width": false,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 0.6
16 | },
17 | "ratsnest_display_mode": 0,
18 | "selection_filter": {
19 | "dimensions": true,
20 | "footprints": true,
21 | "graphics": true,
22 | "keepouts": true,
23 | "lockedItems": true,
24 | "otherItems": true,
25 | "pads": true,
26 | "text": true,
27 | "tracks": true,
28 | "vias": true,
29 | "zones": true
30 | },
31 | "visible_items": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 8,
39 | 9,
40 | 10,
41 | 11,
42 | 12,
43 | 13,
44 | 15,
45 | 16,
46 | 17,
47 | 18,
48 | 19,
49 | 20,
50 | 21,
51 | 22,
52 | 23,
53 | 24,
54 | 25,
55 | 26,
56 | 27,
57 | 28,
58 | 29,
59 | 30,
60 | 32,
61 | 33,
62 | 34,
63 | 35,
64 | 36,
65 | 39,
66 | 40
67 | ],
68 | "visible_layers": "fffffff_ffffffff",
69 | "zone_display_mode": 0
70 | },
71 | "meta": {
72 | "filename": "DaisySeedPedal125b.kicad_prl",
73 | "version": 3
74 | },
75 | "project": {
76 | "files": []
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/JLCPCB-Gerbers/DaisySeedPedal125b-Rev5-gerbers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal125b/pcb/JLCPCB-Gerbers/DaisySeedPedal125b-Rev5-gerbers.zip
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/JLCPCB-Gerbers/DaisySeedPedal125b-top-pos.csv:
--------------------------------------------------------------------------------
1 | Designator,Val,Package,Mid X,Mid Y,Rotation,Layer
2 | C1,10UF,C_0805_2012Metric,141.25,-43.5,-90,top
3 | C2,100NF,C_0805_2012Metric,143.5,-43.5,-90,top
4 | C3,100NF,C_0805_2012Metric,145.75,-43.5,-90,top
5 | C4,10UF,C_0805_2012Metric,151,-51.5,180,top
6 | C5,10UF,C_0805_2012Metric,151,-55.5,180,top
7 | C6,22UF,C_0805_2012Metric,160.75,-66.05,90,top
8 | C7,100NF,C_0805_2012Metric,141.25,-102.25,0,top
9 | C8,100NF,C_0805_2012Metric,141.25,-104.5,0,top
10 | C9,10UF,C_0805_2012Metric,131.3125,-95.315749,90,top
11 | C10,10UF,C_0805_2012Metric,131.329626,-99.090749,-90,top
12 | C11,10UF,C_0805_2012Metric,158,-95.3,90,top
13 | C12,10UF,C_0805_2012Metric,160.25,-95.3,90,top
14 | C13,100NF,C_0805_2012Metric,151.8,-102.25,180,top
15 | C14,100NF,C_0805_2012Metric,151.75,-104.5,180,top
16 | C15,10UF,C_0805_2012Metric,133.6,-109.8,90,top
17 | C16,10UF,C_0805_2012Metric,131.25,-103.25,-90,top
18 | C17,100NF,C_0805_2012Metric,134.91,-70.75,180,top
19 | C18,10NF,C_0805_2012Metric,119.5,-85,90,top
20 | C19,10NF,C_0805_2012Metric,121.75,-85,-90,top
21 | D1,1N5817,D_SOD-123,138.6,-44.25,-90,top
22 | D2,1N4148,D_SOD-123,123.25,-57,90,top
23 | D3,1N4007,D_SOD-123F,116,-110.75,90,top
24 | D4,1N4007,D_SOD-123F,116,-98.75,90,top
25 | J1,Barrel_Jack_Switch,Generic_PowerJack,132.4375,-53.25,-90,top
26 | J2,AUDIO_IN_TRS,NEUTRIK_NMJ6HCD2,125.4,-124.977064,180,top
27 | J3,AUDIO_OUT_TRS,NEUTRIK_NMJ6HCD2,158.6,-125,0,top
28 | J4,MIDI IN JACK,TRRS-PJ-320A,121.75,-41.25,0,top
29 | J5,MIDI OUT JACK,TRRS-PJ-320A,162.25,-41.25,0,top
30 | K1,G6K-2,Relay_DPDT_Omron_G6K-2G-Y,122.75,-97,90,top
31 | K2,G6K-2,Relay_DPDT_Omron_G6K-2G-Y,122.7,-109,90,top
32 | L1,2.2uH,L_0805_2012Metric,153.8,-53.25,-90,top
33 | Q1,SS8050,SOT-23-3,115.1375,-102.95,0,top
34 | R1,2M,R_0805_2012Metric,129.1025,-95.315749,90,top
35 | R2,2M,R_0805_2012Metric,129.079626,-99.090749,-90,top
36 | R3,100K,R_0805_2012Metric,138,-103.25,90,top
37 | R4,2M,R_0805_2012Metric,133.6025,-95.315749,90,top
38 | R5,2M,R_0805_2012Metric,133.579626,-99.090749,-90,top
39 | R6,100K,R_0805_2012Metric,135.75,-103.25,-90,top
40 | R7,2M,R_0805_2012Metric,155.75,-98.85,90,top
41 | R8,2M,R_0805_2012Metric,158,-98.9125,-90,top
42 | R9,2M,R_0805_2012Metric,162.5,-98.85,90,top
43 | R10,2M,R_0805_2012Metric,160.25,-99,-90,top
44 | R11,100R,R_0805_2012Metric,135.8,-109.8,-90,top
45 | R12,100R,R_0805_2012Metric,133.5,-103.25,90,top
46 | R13,2M,R_0805_2012Metric,130.2,-107,180,top
47 | R14,2M,R_0805_2012Metric,129,-103.25,90,top
48 | R15,220R,R_0805_2012Metric,120.75,-56.5,-90,top
49 | R16,33R,R_0805_2012Metric,168.5,-49.25,0,top
50 | R17,10R,R_0805_2012Metric,162.25,-57.75,180,top
51 | R18,470R,R_0805_2012Metric,128.25,-70.75,0,top
52 | R19,1K,R_0805_2012Metric,143.25,-78,90,top
53 | R20,1K,R_0805_2012Metric,140.5,-78.0875,90,top
54 | R21,1K,R_0805_2012Metric,113.75,-94,-90,top
55 | R22,10K,R_0805_2012Metric,117.25,-85,90,top
56 | R23,10K,R_0805_2012Metric,124,-84.9125,-90,top
57 | R24,1K,R_0805_2012Metric,159,-105.5,180,top
58 | R25,1K,R_0805_2012Metric,164,-105.5,0,top
59 | R26,10K,R_0805_2012Metric,115,-85,-90,top
60 | R27,10K,R_0805_2012Metric,126.25,-84.9125,90,top
61 | U1,LD1117S50TR_SOT223,SOT-223-3_TabPin2,151,-46,-90,top
62 | U2,PDS1-S5-S5-M,CONV_PDS1-S5-S5-M,152.8625,-63.25,0,top
63 | U3,MCP6004,SOIC-14_3.9x8.7mm_P1.27mm,139.5625,-97.265749,90,top
64 | U4,OPA1652AID,SOIC-8_3.9x4.9mm_P1.27mm,151,-97.25,-90,top
65 | U5,H11L1,SOP-6_2.54mm,132,-63.25,-90,top
66 | U7,CPC1018N,SOP-4_3.8x4.1mm_P2.54mm,159,-110.5,-90,top
67 | U8,CPC1018N,SOP-4_3.8x4.1mm_P2.54mm,164.02,-110.5,-90,top
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (version 7)
3 | (lib (name "GuitarPedal125B")(type "KiCad")(uri "${KIPRJMOD}/CustomFootprints.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal125b/pcb/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (version 7)
3 | (lib (name "GuitarPedal125B")(type "KiCad")(uri "${KIPRJMOD}/CustomSymbols.kicad_sym")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/README.md:
--------------------------------------------------------------------------------
1 | # Guitar Pedal 1590b using SMD Parts
2 |
3 | ### Rev 2 - 11/3/2023
4 |
5 | Updates include:
6 | 1. Updated PCB to include the hardware mute
7 | 2. Included exported Gerber files to make it easy to order PCBs from JCLPCB. Detailed instructions can be found on the [Build the Hardware](docs/README.md) page. This requires no knowledge of KiCad to get the PCBs made.
8 |
9 | ### Overview
10 |
11 | A project to create a digital effect pedal based on the Electro-Smith Daisy Seed that fits into a standard 1590B sized Guitar Pedal enclosure. The video below shows a pedal board I made using this design, the smaller pedal on the far left, along with 2 of my [125B pedals](../GuitarPedal125b/README.md).
12 |
13 | [](https://www.youtube.com/watch?v=ZkLnS43acQo)
14 |
15 | This project is the SMD parts version of my [1590b pedal](../GuitarPedal1590b/README.md). Features are the same as the Through-Hole version with the addition of "True Bypass". The majority of all parts can be pre-assembled on the PCB by a fab like JLCPCB. If you'd prefer a design where all parts are through-hole components, please check out the through-hole version of this project [Guitar Pedal 1590 project](../GuitarPedal1590b/README.md).
16 |
17 |  
18 |
19 |  
20 |
21 | ### Features
22 |
23 | 1. Small 1590B pedal board friendly enclosure!
24 | 2. Buffered Stereo Input and Outputs for Guitar Level signals
25 | 3. TRS Mini MIDI Input and Outputs
26 | 4. 4 Pots
27 | 5. Up to 2 Foot Switches
28 | 6. Up to 2 Leds
29 | 7. Standard 9v center pin negative power jack
30 | 8. Setup for Easy Manufacturing with JLCPCB. Minimal soldering required!
31 | 9. Easily order a custom drilled enclosure from [Tayda](https://drill.taydakits.com/box-designs/new?public_key=YWRhVFFGU0Z2c3RJR09VQ1U4S3EvUT09Cg==)
32 |
33 | This project includes a KiCad project with the necessary schematics and PCB layout files to create everything you need to build the hardware. The included exported Gerber and Assembly files make it easy to order PCBs from JCLPCB. Detailed instructions can be found on the [Build the Hardware](docs/README.md) page. This requires no knowledge of KiCad to get the PCBs made.
34 |
35 | Once you've built the hardware you can deploy the software from my Multi-Effect Guitar Pedal software project by following these directions: [Deploy the Software to the Hardware](../../Software/GuitarPedal/README.md)
36 |
37 | This software provides a hardware abstraction layer as well as a few custom FX including Tremolo, Chorus, Overdrive, and Stereo Auto-Pan.
38 |
39 | ## Past Updates
40 | ### Rev 1 - Early 2023
41 |
42 | Updates include:
43 | 1. Original Design Revision
44 |
45 | More Information about the Daisy Seed can be found at:
46 |
47 | http://electro-smith.com
48 |
49 | More Information about KiCad can be found at:
50 |
51 | https://www.kicad.org
52 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/OrderingHardware.md:
--------------------------------------------------------------------------------
1 | # Ordering Hardware
2 | I get a lot of requests to buy kits or finished pedals based on my designs. This is not something I typically do, but sometimes I do have extra PCBs, parts, and enclosures lying around and I'm willing to pass them along to you, basically at cost, as outlined in the options below.
3 |
4 | If you are interested, please message me through GitHub or you can find me on the Electro-Smith [Forums](https://forum.electro-smith.com/t/my-daisy-guitar-pedal-designs-on-github/3641) & [Discord](https://discord.gg/ByHBnMtQTR) as Kshep and can message me there.
5 |
6 | I also really can't supply much customer support on this stuff or offer any warranty on the hardware. I'm not really trying to start a pedal business. I'm doing this for fun and to learn new things, which is why I provide all these designs and documenation here on GitHub for free.
7 |
8 | ## Option 1 - Complete PCB (without Daisy Seed)
9 | Price: $75 (USD) + Shipping & Handling
10 |
11 | This option gets you a fully assembled PCB, I'll even test it (briefly) to make sure it works. You will still need to get an Enclosure, get Knobs and other hardware for the Enclosure, get a Daisy Seed, and Assemble everything yourself.
12 |
13 | You'll basically be starting at [Step 7: Order the Enclosure and External Hardware](README.md#7-order-the-enclosure-and-external-hardware)
14 |
15 | 
16 |
17 | ## Option 2 - Complete Pedal (without Daisy Seed)
18 | Price: $125 (USD) + Shipping & Handling
19 |
20 | I usually don't have extra Enclosures and Knobs around, so this might not always be an option. Plus picking custom colors for your knobs and enclosure is half the fun! [Step 7: Order the Enclosure and External Hardware](README.md#7-order-the-enclosure-and-external-hardware) is so freaking easy, I highly recommend doing Option 1, instead of this one if you are picky about aesthetics.
21 |
22 | This option is everything you need, except the Daisy Seed. Knobs and Enclosure colors are at my whim and may vary based on what I have lying around.
23 |
24 | You'll basically get a finished pedal ready for you to [create your own cool effects](../../../Software/GuitarPedal/README.md).
25 |
26 | 
27 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/Alive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/Alive.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/Backside.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/Backside.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/CircuitBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/CircuitBoard.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/EnclosureAndKnobs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/EnclosureAndKnobs.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/FinalProduct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/FinalProduct.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/HoleTemplate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/HoleTemplate.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyAddToCart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyAddToCart.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyBOMCentroid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyBOMCentroid.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyBOMCentroidConfirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyBOMCentroidConfirm.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyOptions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyOptions.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyPCBConfirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyPCBConfirm.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyPlacement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyPlacement.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyPlacementFixed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyPlacementFixed.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyProcessBOMCentroid-Error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyProcessBOMCentroid-Error.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyProcessBOMCentroid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-AssemblyProcessBOMCentroid.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-Options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-Options.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-OrderNow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-OrderNow.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-OrderParts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/JLCPCB-OrderParts.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/PCBExtraParts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/PCBExtraParts.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/docs/images/PCBs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/docs/images/PCBs.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/BOM_JLCSMT_DaisySeedGuitarPedal1590b-SMD.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/pcb/BOM_JLCSMT_DaisySeedGuitarPedal1590b-SMD.xlsx
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/CustomFootprints.pretty/Generic_PowerJack.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "Generic_PowerJack" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (attr through_hole)
4 | (fp_text reference "REF**" (at -3 -0.1 90 unlocked) (layer "F.SilkS")
5 | (effects (font (size 1 1) (thickness 0.15)))
6 | (tstamp ba0487bc-6ae2-4533-a090-ea23e3b1efcc)
7 | )
8 | (fp_text value "Generic_PowerJack" (at -5.1 6.8 unlocked) (layer "F.Fab")
9 | (effects (font (size 1 1) (thickness 0.15)))
10 | (tstamp cdb66520-91a5-4cad-a795-bc0399a866a8)
11 | )
12 | (fp_text user "${REFERENCE}" (at -3 -0.1 90 unlocked) (layer "F.Fab")
13 | (effects (font (size 1 1) (thickness 0.15)))
14 | (tstamp 7c7a03a9-160a-4ea5-a9c4-52c5889156d9)
15 | )
16 | (fp_rect (start -14 -4.5) (end 0 4.5)
17 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp 02617a5e-812d-44dc-98ba-97767e202b69))
18 | (fp_rect (start -14.15 -4.7) (end 0.2 4.7)
19 | (stroke (width 0.05) (type solid)) (fill none) (layer "F.CrtYd") (tstamp 0d33cffe-38d1-4206-827b-9412885c0f60))
20 | (pad "1" thru_hole oval (at 0 0) (size 2.3 4.5) (drill oval 0.8 3) (layers "*.Cu" "*.Mask") (tstamp eba171d2-aca5-4c61-b42c-d0ae28172d53))
21 | (pad "2" thru_hole oval (at -6 0) (size 2.3 4.5) (drill oval 0.8 3) (layers "*.Cu" "*.Mask") (tstamp c91944c2-b543-4fe3-824a-2566585c330e))
22 | (pad "3" thru_hole oval (at -2.5 4.65 90) (size 2.3 4) (drill oval 0.8 2.5) (layers "*.Cu" "*.Mask") (tstamp 8d61f06b-7d20-4910-a5ee-ac4fa8ec49e0))
23 | )
24 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/CustomFootprints.pretty/Pot_RightAngle_LongPin_16mm.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "Pot_RightAngle_LongPin_16mm" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (attr through_hole)
4 | (fp_text reference "REF**" (at 0 -5.8 unlocked) (layer "F.SilkS")
5 | (effects (font (size 1 1) (thickness 0.15)))
6 | (tstamp db1b5205-2996-4c90-8cf6-3e944700a677)
7 | )
8 | (fp_text value "Pot_RightAngle_LongPin_16mm" (at -0.25 -4.25 unlocked) (layer "F.Fab")
9 | (effects (font (size 1 1) (thickness 0.15)))
10 | (tstamp c8f328a2-5373-4f6a-8c20-7654497205de)
11 | )
12 | (fp_text user "${REFERENCE}" (at 0.1 -4.15 unlocked) (layer "F.Fab")
13 | (effects (font (size 1 1) (thickness 0.15)))
14 | (tstamp 701acf6e-4ab2-4a5f-8ff0-34296b8f6e75)
15 | )
16 | (fp_line (start -6.75 -3.05) (end -3.25 -3.05)
17 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp e4d65219-8602-43c9-a6da-cb62f72cd4b0))
18 | (fp_line (start -6.75 0.45) (end -6.75 -3.05)
19 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 04b314df-ba81-40dc-b3a5-a2d3b42bb709))
20 | (fp_line (start -3.25 -3.05) (end -3.25 0.45)
21 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp a4f7d679-ae8c-4499-abe0-265e39692cf4))
22 | (fp_line (start -3.25 0.45) (end -6.75 0.45)
23 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp e025dd1c-0215-49ed-8e06-e85c9741031b))
24 | (fp_line (start -1.75 -3.05) (end 1.75 -3.05)
25 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp d38bd9c8-54ff-4839-a560-0df80ed066fd))
26 | (fp_line (start -1.75 0.45) (end -1.75 -3.05)
27 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp b10304e9-1ff8-4e1f-9903-348f8a0afdfb))
28 | (fp_line (start 1.75 -3.05) (end 1.75 0.45)
29 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 05301a85-308e-4d04-8615-5012b154181a))
30 | (fp_line (start 1.75 0.45) (end -1.75 0.45)
31 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 31a41e00-d572-4d69-b53a-dc6822af5b6b))
32 | (fp_line (start 3.25 -3.05) (end 6.75 -3.05)
33 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 35f17b63-3013-46c2-8df2-8782d9ba03f5))
34 | (fp_line (start 3.25 0.45) (end 3.25 -3.05)
35 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 1ebc3048-7839-439b-9c1c-f66d690719ba))
36 | (fp_line (start 6.75 -3.05) (end 6.75 0.45)
37 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 22d6e2f1-bd9f-426f-bddd-93c56f66c1db))
38 | (fp_line (start 6.75 0.45) (end 3.25 0.45)
39 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 381eda5e-d9c4-4345-bce5-c0b4cb930e58))
40 | (fp_circle (center 0 -16) (end 3.375 -16)
41 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp becc6d4a-0806-4f7a-82af-e64d4e0a122a))
42 | (fp_circle (center 0 -16) (end 8.25 -16)
43 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp 5d00f01a-f0ca-4c04-b41c-2645751f656b))
44 | (fp_line (start -8.5 -24.5) (end 8.5 -24.5)
45 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 71ce710e-b298-46c6-befc-94551c14b078))
46 | (fp_line (start -8.5 0.75) (end -8.5 -24.5)
47 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 87bb8c00-5b45-489b-9f20-74f381e4def0))
48 | (fp_line (start 8.5 -24.5) (end 8.5 0.75)
49 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 850e6c8c-0ad6-4b4c-bd5f-fbc21a6d1654))
50 | (fp_line (start 8.5 0.75) (end -8.5 0.75)
51 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 3479d45a-99be-467c-835a-0e5b02e41341))
52 | (pad "1" thru_hole rect (at -5 -1.3) (size 2.75 2.75) (drill 1.5) (layers "*.Cu" "*.Mask") (tstamp f6869ae2-8961-4052-bfbc-e12d02a4e301))
53 | (pad "2" thru_hole circle (at 0 -1.3) (size 2.75 2.75) (drill 1.5) (layers "*.Cu" "*.Mask") (tstamp 70a72574-a75e-4646-85d4-f4e6e46d634b))
54 | (pad "3" thru_hole circle (at 5 -1.3) (size 2.75 2.75) (drill 1.5) (layers "*.Cu" "*.Mask") (tstamp 2c3f2a9e-19ad-4f0a-a6b7-8d82c2e9cb3f))
55 | )
56 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/CustomFootprints.pretty/SOP-6_2.54mm.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "SOP-6_2.54mm" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (descr "6-lead surface-mounted (SMD) DIP package, row spacing 9.53 mm (375 mils)")
4 | (tags "SMD DIP DIL PDIP SMDIP 2.54mm 9.53mm 375mil")
5 | (attr smd)
6 | (fp_text reference "REF**" (at 0 -5.2) (layer "F.SilkS")
7 | (effects (font (size 1 1) (thickness 0.15)))
8 | (tstamp 68231a0c-d8a2-4573-9e74-86066459ab84)
9 | )
10 | (fp_text value "SOP-6_2.54mm" (at 0 5.4) (layer "F.Fab")
11 | (effects (font (size 1 1) (thickness 0.15)))
12 | (tstamp f08525c3-632b-4add-8b25-7c64eaac99df)
13 | )
14 | (fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab")
15 | (effects (font (size 1 1) (thickness 0.15)))
16 | (tstamp 9640f97b-ac81-4a1c-8ee5-a1e3d8e3f5d1)
17 | )
18 | (fp_line (start -3.235 -3.87) (end -3.235 3.87)
19 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp fd7deda1-6778-409a-be4f-fbba7c7a891d))
20 | (fp_line (start -3.235 3.87) (end 3.235 3.87)
21 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ff5574d3-0a85-4d25-89d8-116eca3f6e4d))
22 | (fp_line (start -1 -3.87) (end -3.235 -3.87)
23 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 97ea9d92-09cf-4c6a-a08b-bf1a074dd4d9))
24 | (fp_line (start 3.235 -3.87) (end 1 -3.87)
25 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 913de881-a03c-47c3-b659-6a65f2c0560f))
26 | (fp_line (start 3.235 3.87) (end 3.235 -3.87)
27 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 738881a5-85c4-44be-ae36-2ebc275a59f8))
28 | (fp_arc (start 1 -3.87) (mid 0 -2.87) (end -1 -3.87)
29 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 6a0b1442-bef3-4d83-afc8-b0e4079a88f4))
30 | (fp_line (start -5.75 -4.4) (end -5.75 4.4)
31 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 9394c496-ded5-4050-a20a-a57ab2cd0eba))
32 | (fp_line (start -5.75 4.4) (end 5.75 4.4)
33 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 1a7e086b-7990-4686-8d92-c22419255528))
34 | (fp_line (start 5.75 -4.4) (end -5.75 -4.4)
35 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp 35f85b86-a4c9-4080-8ebc-aad125b99f32))
36 | (fp_line (start 5.75 4.4) (end 5.75 -4.4)
37 | (stroke (width 0.05) (type solid)) (layer "F.CrtYd") (tstamp a9fb04d3-3f2a-45ef-bd5e-a390df84e8b7))
38 | (fp_line (start -3.175 -2.81) (end -2.175 -3.81)
39 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp e1f1e93e-8cfe-415e-8946-bf33d9ef9442))
40 | (fp_line (start -3.175 3.81) (end -3.175 -2.81)
41 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b92e8874-b7cc-407a-a845-0cc4a3e80f9a))
42 | (fp_line (start -2.175 -3.81) (end 3.175 -3.81)
43 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 23a8759d-07c7-4d40-8c86-dec8fe895835))
44 | (fp_line (start 3.175 -3.81) (end 3.175 3.81)
45 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp b04bd1db-0268-4445-b839-eb0386ea039b))
46 | (fp_line (start 3.175 3.81) (end -3.175 3.81)
47 | (stroke (width 0.1) (type solid)) (layer "F.Fab") (tstamp 5c3a24c9-ecc9-4eb4-a56b-7891d767a291))
48 | (pad "1" smd rect (at -4.625 -2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 1dac1b96-87a7-4726-872c-9527f5ec2e30))
49 | (pad "2" smd rect (at -4.625 0) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 97927784-9f9c-4e5f-91ab-37060cc04d18))
50 | (pad "3" smd rect (at -4.625 2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 6fd79709-a053-4b21-8551-a62abb44e8e3))
51 | (pad "4" smd rect (at 4.625 2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp cb9048af-1739-4b1f-9210-3ab3dc2a6db0))
52 | (pad "5" smd rect (at 4.625 0) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 11c41bae-830c-435e-9f8f-9184deba2295))
53 | (pad "6" smd rect (at 4.625 -2.54) (size 2 1.78) (layers "F.Cu" "F.Paste" "F.Mask") (tstamp 7f9d70a6-eac1-4b07-844b-49bef5fad961))
54 | (model "${KICAD6_3DMODEL_DIR}/Package_DIP.3dshapes/SMDIP-6_W9.53mm.wrl"
55 | (offset (xyz 0 0 0))
56 | (scale (xyz 1 1 1))
57 | (rotate (xyz 0 0 0))
58 | )
59 | )
60 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/CustomSymbols.kicad_sym:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
2 | (symbol "OLED_DISPLAY_SSD1306_SPI" (in_bom yes) (on_board yes)
3 | (property "Reference" "U" (id 0) (at 0 2.54 0)
4 | (effects (font (size 1.27 1.27)))
5 | )
6 | (property "Value" "OLED_DISPLAY_SSD1306_SPI" (id 1) (at 1.27 8.89 0)
7 | (effects (font (size 1.27 1.27)))
8 | )
9 | (property "Footprint" "" (id 2) (at 0 0 0)
10 | (effects (font (size 1.27 1.27)) hide)
11 | )
12 | (property "Datasheet" "" (id 3) (at 0 0 0)
13 | (effects (font (size 1.27 1.27)) hide)
14 | )
15 | (symbol "OLED_DISPLAY_SSD1306_SPI_0_1"
16 | (rectangle (start -17.78 16.51) (end 16.51 -7.62)
17 | (stroke (width 0) (type default) (color 0 0 0 0))
18 | (fill (type background))
19 | )
20 | )
21 | (symbol "OLED_DISPLAY_SSD1306_SPI_1_1"
22 | (pin power_in line (at 0 -10.16 90) (length 2.54)
23 | (name "GND" (effects (font (size 1.27 1.27))))
24 | (number "1" (effects (font (size 1.27 1.27))))
25 | )
26 | (pin power_in line (at 0 19.05 270) (length 2.54)
27 | (name "VCC" (effects (font (size 1.27 1.27))))
28 | (number "2" (effects (font (size 1.27 1.27))))
29 | )
30 | (pin input line (at -20.32 11.43 0) (length 2.54)
31 | (name "D0" (effects (font (size 1.27 1.27))))
32 | (number "3" (effects (font (size 1.27 1.27))))
33 | )
34 | (pin input line (at -20.32 7.62 0) (length 2.54)
35 | (name "D1" (effects (font (size 1.27 1.27))))
36 | (number "4" (effects (font (size 1.27 1.27))))
37 | )
38 | (pin input line (at -20.32 3.81 0) (length 2.54)
39 | (name "RES" (effects (font (size 1.27 1.27))))
40 | (number "5" (effects (font (size 1.27 1.27))))
41 | )
42 | (pin input line (at -20.32 0 0) (length 2.54)
43 | (name "DC" (effects (font (size 1.27 1.27))))
44 | (number "6" (effects (font (size 1.27 1.27))))
45 | )
46 | (pin input line (at -20.32 -3.81 0) (length 2.54)
47 | (name "CS" (effects (font (size 1.27 1.27))))
48 | (number "7" (effects (font (size 1.27 1.27))))
49 | )
50 | )
51 | )
52 | )
53 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/DaisySeedPedal1590b-SMD.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 37,
4 | "active_layer_preset": "All Layers",
5 | "auto_track_width": false,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [
8 | "GND"
9 | ],
10 | "high_contrast_mode": 0,
11 | "net_color_mode": 1,
12 | "opacity": {
13 | "images": 0.6,
14 | "pads": 1.0,
15 | "tracks": 1.0,
16 | "vias": 1.0,
17 | "zones": 0.6
18 | },
19 | "ratsnest_display_mode": 0,
20 | "selection_filter": {
21 | "dimensions": true,
22 | "footprints": true,
23 | "graphics": true,
24 | "keepouts": true,
25 | "lockedItems": true,
26 | "otherItems": true,
27 | "pads": true,
28 | "text": true,
29 | "tracks": true,
30 | "vias": true,
31 | "zones": true
32 | },
33 | "visible_items": [
34 | 0,
35 | 1,
36 | 2,
37 | 3,
38 | 4,
39 | 5,
40 | 8,
41 | 9,
42 | 10,
43 | 11,
44 | 12,
45 | 13,
46 | 15,
47 | 16,
48 | 17,
49 | 18,
50 | 19,
51 | 20,
52 | 21,
53 | 22,
54 | 23,
55 | 24,
56 | 25,
57 | 26,
58 | 27,
59 | 28,
60 | 29,
61 | 30,
62 | 32,
63 | 33,
64 | 34,
65 | 35,
66 | 36,
67 | 39,
68 | 40
69 | ],
70 | "visible_layers": "fffffff_ffffffff",
71 | "zone_display_mode": 0
72 | },
73 | "meta": {
74 | "filename": "DaisySeedPedal1590b-SMD.kicad_prl",
75 | "version": 3
76 | },
77 | "project": {
78 | "files": []
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/JLCPCB-Gerbers/DaisySeedPedal1590b-SMD-Rev2-gerbers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b-SMD/pcb/JLCPCB-Gerbers/DaisySeedPedal1590b-SMD-Rev2-gerbers.zip
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/JLCPCB-Gerbers/DaisySeedPedal1590b-SMD-top-pos.csv:
--------------------------------------------------------------------------------
1 | Designator,Val,Package,Mid X,Mid Y,Rotation,Layer
2 | A1,Electrosmith_Daisy_Seed_Rev4,Electrosmith_Daisy_Seed,99.38,-32.495,0,top
3 | C1,10UF,C_0805_2012Metric,84.25,-44,180,top
4 | C2,100NF,C_0805_2012Metric,84.25,-46.25,180,top
5 | C3,100NF,C_0805_2012Metric,88.25,-46.25,0,top
6 | C4,10UF,C_0805_2012Metric,84,-56.5,180,top
7 | C5,10UF,C_0805_2012Metric,85.7,-63,180,top
8 | C6,22UF,C_0805_2012Metric,84.75,-78.25,0,top
9 | C7,100NF,C_0805_2012Metric,109.85,-128.45,-90,top
10 | C8,100NF,C_0805_2012Metric,107.6,-128.45,-90,top
11 | C9,10UF,C_0805_2012Metric,119.1,-120.2,-90,top
12 | C10,10UF,C_0805_2012Metric,123.6,-120.2,-90,top
13 | C11,10UF,C_0805_2012Metric,103.107875,-120.375,90,top
14 | C12,10UF,C_0805_2012Metric,100.875,-120.375,90,top
15 | C13,100NF,C_0805_2012Metric,99.904664,-128.45,-90,top
16 | C14,100NF,C_0805_2012Metric,102.154664,-128.45,-90,top
17 | C15,10UF,C_0805_2012Metric,96.375,-120.4625,90,top
18 | C16,10UF,C_0805_2012Metric,93.882875,-120.471624,90,top
19 | C17,100NF,C_0805_2012Metric,118,-50.25,90,top
20 | D1,1N5817,D_SOD-123,83.75,-40.25,90,top
21 | D2,1N4148,D_SOD-123,128.5,-42.5,180,top
22 | D3,1N4007,D_SOD-123F,92.8,-112.65,-90,top
23 | D4,1N4007,D_SOD-123F,120,-112.2,90,top
24 | FS1,Foot_Switch_1,PinHeader_1x02_P2.54mm_Vertical,111,-132.8,90,top
25 | FS2,Foot_Switch_2,PinHeader_1x02_P2.54mm_Vertical,100.45,-132.8,90,top
26 | J1,Barrel_Jack,Generic_PowerJack,92.2875,-42.3875,-90,top
27 | J2,AUDIO_IN_TRS,NEUTRIK_NMJ6HCD2,120.75,-96.5,0,top
28 | J3,AUDIO_OUT_TRS,NEUTRIK_NMJ6HCD2,93.25,-96.5,180,top
29 | J4,MIDI IN JACK,TRRS-PJ-320A,120,-30.25,0,top
30 | J5,MIDI OUT JACK,TRRS-PJ-320A,107,-30.25,0,top
31 | K1,G6K-2,Relay_DPDT_Omron_G6K-2G-Y,126.8,-112.35,90,top
32 | K2,G6K-2,Relay_DPDT_Omron_G6K-2G-Y,86.3,-112.35,-90,top
33 | L1,2.2uH,L_0805_2012Metric,87.75,-56.5,0,top
34 | LED1,LED_1,PinHeader_1x02_P2.54mm_Vertical,105.75,-103.5,90,top
35 | LED2,LED_2,PinHeader_1x02_P2.54mm_Vertical,105.75,-89.5,90,top
36 | POT1,10K,Pot_RightAngle_LongPin_16mm,89,-61,0,top
37 | POT2,10K,Pot_RightAngle_LongPin_16mm,125,-61,0,top
38 | POT3,10K,Pot_RightAngle_LongPin_16mm,89,-86,0,top
39 | POT4,10K,Pot_RightAngle_LongPin_16mm,125,-86,0,top
40 | Q1,SS8050,SOT-23-3,116.8,-112.3,-90,top
41 | R1,2M,R_0805_2012Metric,116.85,-120.2,90,top
42 | R2,2M,R_0805_2012Metric,121.35,-120.2,90,top
43 | R3,100K,R_0805_2012Metric,123.6,-124.45,90,top
44 | R4,2M,R_0805_2012Metric,116.85,-124.3625,90,top
45 | R5,2M,R_0805_2012Metric,119.1,-124.3625,90,top
46 | R6,100K,R_0805_2012Metric,121.35,-124.3625,-90,top
47 | R7,2M,R_0805_2012Metric,100.875,-124.1125,90,top
48 | R8,2M,R_0805_2012Metric,103.125,-124.1125,-90,top
49 | R9,2M,R_0805_2012Metric,98.625,-124.1125,90,top
50 | R10,2M,R_0805_2012Metric,96.375,-124.1125,-90,top
51 | R11,100R,R_0805_2012Metric,94.125,-124.0375,90,top
52 | R12,100R,R_0805_2012Metric,91.65,-124.046624,90,top
53 | R13,2M,R_0805_2012Metric,98.625,-120.425,-90,top
54 | R14,2M,R_0805_2012Metric,91.632875,-120.434124,-90,top
55 | R15,220R,R_0805_2012Metric,129.25,-39.5,0,top
56 | R16,33R,R_0805_2012Metric,111.75,-36,-90,top
57 | R17,10R,R_0805_2012Metric,111.75,-41.75,-90,top
58 | R18,470R,R_0805_2012Metric,118,-46,90,top
59 | R19,1K,R_0805_2012Metric,111.25,-60.5,0,top
60 | R20,1K,R_0805_2012Metric,111.25,-58,0,top
61 | R21,1K,R_0805_2012Metric,116.8,-109,0,top
62 | R24,1K,R_0805_2012Metric,108.2,-112.4,90,top
63 | R25,1K,R_0805_2012Metric,101.8,-112.4,90,top
64 | U1,LD1117S50TR_SOT223,SOT-223-3_TabPin2,86.75,-51.5,180,top
65 | U2,PDS1-S5-S5-M,CONV_PDS1-S5-S5-M,88.5,-70.5,-90,top
66 | U3,MCP6004,SOIC-14_3.9x8.7mm_P1.27mm,110.35,-122.45,90,top
67 | U4,OPA1652AID,SOIC-8_3.9x4.9mm_P1.27mm,94.404664,-129.45,0,top
68 | U5,H11L1,SOP-6_2.54mm,125.5,-48.5,180,top
69 | U7,CPC1018N,SOP-4_3.8x4.1mm_P2.54mm,111.83,-112.45,90,top
70 | U8,CPC1018N,SOP-4_3.8x4.1mm_P2.54mm,98.07,-112.45,-90,top
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (version 7)
3 | (lib (name "GuitarPedal1590b")(type "KiCad")(uri "${KIPRJMOD}/CustomFootprints.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b-SMD/pcb/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (version 7)
3 | (lib (name "GuitarPedal1590b")(type "KiCad")(uri "${KIPRJMOD}/CustomSymbols.kicad_sym")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/README.md:
--------------------------------------------------------------------------------
1 | # Guitar Pedal 1590b - Through-Hole Parts
2 |
3 | ### Rev 6 - 11/12/2023
4 |
5 | Updates include:
6 | 1. Updated the PCB to have an optional bypass of the PDS1 5v Isolation circuit.
7 |
8 | ### Overview
9 |
10 | A project to create a digital effect pedal based on the Electro-Smith Daisy Seed that fits into a standard 1590B sized Guitar Pedal enclosure. Electro-Smith sells a guitar pedal, but it's a much larger format, and I wanted something as small as possible. The PedalPCB Terrarium was another option, but it's mono only, so I decided to build my own. This one is a smaller form factor than both, operates in Mono or Stereo, and has Midi support, so it's capable little pedal platform.
11 |
12 | The video below shows a pedal board I made using this design, the smaller pedal on the far left, along with 2 of my [125B sized pedals](../GuitarPedal125b/README.md).
13 |
14 | [](https://www.youtube.com/watch?v=ZkLnS43acQo)
15 |
16 | This project is the Through-Hole parts version of my 1590b pedal. All parts are through-hole components and can easily be hand soldered. There is also a version of this same pedal where all parts are SMD parts that can be assembled by a fab such as JLCPCB, if you are looking for that, please check out my [Guitar Pedal 1590b-SMD project](../GuitarPedal1590b-SMD/README.md).
17 |
18 |  
19 |
20 |  
21 |
22 | ### Features
23 |
24 | 1. Small 1590B pedal board friendly enclosure!
25 | 2. Buffered Stereo Input and Outputs for Guitar Level signals
26 | 3. TRS Mini MIDI Input and Outputs
27 | 4. 4 Pots
28 | 5. Up to 2 Foot Switches
29 | 6. Up to 2 Leds
30 | 7. Standard 9v center pin negative power jack
31 | 8. Easily Assembled from easily sourced through-hole parts, no SMD soldering required!
32 | 9. Easily order a custom drilled enclosure from Tayda!
33 |
34 | This project includes a KiCad project with the necessary schematics and PCB layout files to create everything you need to build the hardware. The included exported Gerber and Assembly files make it easy to order PCBs from JCLPCB. Detailed instructions can be found on the [Build the Hardware](docs/README.md) page. This requires no knowledge of KiCad to get the PCBs made.
35 |
36 | Once you've built the hardware you can deploy the software from my Multi-Effect Guitar Pedal software project by following these directions: [Deploy the Software to the Hardware](../../Software/GuitarPedal/README.md)
37 |
38 | This software provides a hardware abstraction layer as well as a few custom FX including Tremolo, Chorus, Overdrive, and Stereo Auto-Pan.
39 |
40 | ## Past Revisions
41 | ### Rev 5 - 6/3/2023
42 |
43 | Updates include:
44 | 1. Updated PCB to properly ground input / output jacks when no plug is inserted
45 | 2. Fixed a software issue causing noise from the LED.
46 | 3. Included exported Gerber files to make it easy to order PCBs from JCLPCB. Detailed instructions can be found on the [Build the Hardware](docs/README.md) page. This requires no knowledge of KiCad to get the PCBs made.
47 |
48 | ### Rev 4 - 4/12/2023
49 |
50 | Updates include:
51 | 1. Updated PCB layout to move some components farther away from the edges
52 | 2. Swapped the placement of Footswitches and LEDs for consistency with my other projects
53 | 3. Updated code to make Footswitch 1 & Led 1 enable / disabe the effect
54 |
55 | ### Rev 3 - 3/29/2023
56 |
57 | Updates include:
58 | 1. Improved 4 Layer PCB Layout, much easier to assemble!
59 | 2. Replaced all SMD parts with through-hole alternative
60 | 3. Tayda Custom Drill Template for easily ordering a pre-drilled enclosure
61 |
62 | More Information about the Daisy Seed can be found at:
63 |
64 | http://electro-smith.com
65 |
66 | More Information about KiCad can be found at:
67 |
68 | https://www.kicad.org
69 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/Bill_of_Materials_BOM.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/Bill_of_Materials_BOM.xlsx
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/OrderingHardware.md:
--------------------------------------------------------------------------------
1 | # Ordering Hardware
2 | I get a lot of requests to buy kits or finished pedals based on my designs. This is not something I typically do, but sometimes I do have extra PCBs, parts, and enclosures lying around and I'm willing to pass them along to you, basically at cost, as outlined in the options below.
3 |
4 | If you are interested, please message me through GitHub or you can find me on the Electro-Smith [Forums](https://forum.electro-smith.com/t/my-daisy-guitar-pedal-designs-on-github/3641) & [Discord](https://discord.gg/ByHBnMtQTR) as Kshep and can message me there.
5 |
6 | I also really can't supply much customer support on this stuff or offer any warranty on the hardware. I'm not really trying to start a pedal business. I'm doing this for fun and to learn new things, which is why I provide all these designs and documentation here on GitHub for free.
7 |
8 | ## Option 1 - PCB Only
9 | Price: $10 (USD) + Shipping & Handling
10 |
11 | About as bare bones as you can get.
12 |
13 | This option is just the PCB. You will still need to source the components, solder everything to the PCB, get an Enclosure, get Knobs and other hardware for the Enclosure, get a Daisy Seed, and Assemble everything yourself.
14 |
15 | You'll basically be starting at [Step 5: Build the Hardware](README.md#2-source-the-components)
16 |
17 | 
18 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/Alive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/Alive.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/CircuitBoard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/CircuitBoard.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/EnclosureAndKnobs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/EnclosureAndKnobs.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/FilteredPower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/FilteredPower.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/FilteredPowerBypass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/FilteredPowerBypass.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/FinalProduct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/FinalProduct.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/JLCPCB-Options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/JLCPCB-Options.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/JLCPCB-OrderNow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/JLCPCB-OrderNow.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/PCB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/PCB.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/PCBs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/PCBs.png
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/docs/images/Soldering.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/docs/images/Soldering.gif
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/CustomFootprints.pretty/Generic_PowerJack.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "Generic_PowerJack" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (attr through_hole)
4 | (fp_text reference "REF**" (at -3 -0.1 90 unlocked) (layer "F.SilkS")
5 | (effects (font (size 1 1) (thickness 0.15)))
6 | (tstamp ba0487bc-6ae2-4533-a090-ea23e3b1efcc)
7 | )
8 | (fp_text value "Generic_PowerJack" (at -5.1 6.8 unlocked) (layer "F.Fab")
9 | (effects (font (size 1 1) (thickness 0.15)))
10 | (tstamp cdb66520-91a5-4cad-a795-bc0399a866a8)
11 | )
12 | (fp_text user "${REFERENCE}" (at -3 -0.1 90 unlocked) (layer "F.Fab")
13 | (effects (font (size 1 1) (thickness 0.15)))
14 | (tstamp 7c7a03a9-160a-4ea5-a9c4-52c5889156d9)
15 | )
16 | (fp_rect (start -14 -4.5) (end 0 4.5)
17 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp 02617a5e-812d-44dc-98ba-97767e202b69))
18 | (fp_rect (start -14.15 -4.7) (end 0.2 4.7)
19 | (stroke (width 0.05) (type solid)) (fill none) (layer "F.CrtYd") (tstamp 0d33cffe-38d1-4206-827b-9412885c0f60))
20 | (pad "1" thru_hole oval (at 0 0) (size 2.3 4.5) (drill oval 0.8 3) (layers "*.Cu" "*.Mask") (tstamp eba171d2-aca5-4c61-b42c-d0ae28172d53))
21 | (pad "2" thru_hole oval (at -6 0) (size 2.3 4.5) (drill oval 0.8 3) (layers "*.Cu" "*.Mask") (tstamp c91944c2-b543-4fe3-824a-2566585c330e))
22 | (pad "3" thru_hole oval (at -2.5 4.65 90) (size 2.3 4) (drill oval 0.8 2.5) (layers "*.Cu" "*.Mask") (tstamp 8d61f06b-7d20-4910-a5ee-ac4fa8ec49e0))
23 | )
24 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/CustomFootprints.pretty/Pot_RightAngle_LongPin_16mm.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "Pot_RightAngle_LongPin_16mm" (version 20221018) (generator pcbnew)
2 | (layer "F.Cu")
3 | (attr through_hole)
4 | (fp_text reference "REF**" (at 0 -5.8 unlocked) (layer "F.SilkS")
5 | (effects (font (size 1 1) (thickness 0.15)))
6 | (tstamp db1b5205-2996-4c90-8cf6-3e944700a677)
7 | )
8 | (fp_text value "Pot_RightAngle_LongPin_16mm" (at -0.25 -4.25 unlocked) (layer "F.Fab")
9 | (effects (font (size 1 1) (thickness 0.15)))
10 | (tstamp c8f328a2-5373-4f6a-8c20-7654497205de)
11 | )
12 | (fp_text user "${REFERENCE}" (at 0.1 -4.15 unlocked) (layer "F.Fab")
13 | (effects (font (size 1 1) (thickness 0.15)))
14 | (tstamp 701acf6e-4ab2-4a5f-8ff0-34296b8f6e75)
15 | )
16 | (fp_line (start -6.75 -3.05) (end -3.25 -3.05)
17 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp e4d65219-8602-43c9-a6da-cb62f72cd4b0))
18 | (fp_line (start -6.75 0.45) (end -6.75 -3.05)
19 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 04b314df-ba81-40dc-b3a5-a2d3b42bb709))
20 | (fp_line (start -3.25 -3.05) (end -3.25 0.45)
21 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp a4f7d679-ae8c-4499-abe0-265e39692cf4))
22 | (fp_line (start -3.25 0.45) (end -6.75 0.45)
23 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp e025dd1c-0215-49ed-8e06-e85c9741031b))
24 | (fp_line (start -1.75 -3.05) (end 1.75 -3.05)
25 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp d38bd9c8-54ff-4839-a560-0df80ed066fd))
26 | (fp_line (start -1.75 0.45) (end -1.75 -3.05)
27 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp b10304e9-1ff8-4e1f-9903-348f8a0afdfb))
28 | (fp_line (start 1.75 -3.05) (end 1.75 0.45)
29 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 05301a85-308e-4d04-8615-5012b154181a))
30 | (fp_line (start 1.75 0.45) (end -1.75 0.45)
31 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 31a41e00-d572-4d69-b53a-dc6822af5b6b))
32 | (fp_line (start 3.25 -3.05) (end 6.75 -3.05)
33 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 35f17b63-3013-46c2-8df2-8782d9ba03f5))
34 | (fp_line (start 3.25 0.45) (end 3.25 -3.05)
35 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 1ebc3048-7839-439b-9c1c-f66d690719ba))
36 | (fp_line (start 6.75 -3.05) (end 6.75 0.45)
37 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 22d6e2f1-bd9f-426f-bddd-93c56f66c1db))
38 | (fp_line (start 6.75 0.45) (end 3.25 0.45)
39 | (stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 381eda5e-d9c4-4345-bce5-c0b4cb930e58))
40 | (fp_circle (center 0 -16) (end 3.375 -16)
41 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp becc6d4a-0806-4f7a-82af-e64d4e0a122a))
42 | (fp_circle (center 0 -16) (end 8.25 -16)
43 | (stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp 5d00f01a-f0ca-4c04-b41c-2645751f656b))
44 | (fp_line (start -8.5 -24.5) (end 8.5 -24.5)
45 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 71ce710e-b298-46c6-befc-94551c14b078))
46 | (fp_line (start -8.5 0.75) (end -8.5 -24.5)
47 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 87bb8c00-5b45-489b-9f20-74f381e4def0))
48 | (fp_line (start 8.5 -24.5) (end 8.5 0.75)
49 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 850e6c8c-0ad6-4b4c-bd5f-fbc21a6d1654))
50 | (fp_line (start 8.5 0.75) (end -8.5 0.75)
51 | (stroke (width 0.05) (type default)) (layer "F.CrtYd") (tstamp 3479d45a-99be-467c-835a-0e5b02e41341))
52 | (pad "1" thru_hole rect (at -5 -1.3) (size 2.75 2.75) (drill 1.5) (layers "*.Cu" "*.Mask") (tstamp f6869ae2-8961-4052-bfbc-e12d02a4e301))
53 | (pad "2" thru_hole circle (at 0 -1.3) (size 2.75 2.75) (drill 1.5) (layers "*.Cu" "*.Mask") (tstamp 70a72574-a75e-4646-85d4-f4e6e46d634b))
54 | (pad "3" thru_hole circle (at 5 -1.3) (size 2.75 2.75) (drill 1.5) (layers "*.Cu" "*.Mask") (tstamp 2c3f2a9e-19ad-4f0a-a6b7-8d82c2e9cb3f))
55 | )
56 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/CustomSymbols.bak:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
2 | (symbol "OLED_DISPLAY_SSD1306_SPI" (in_bom yes) (on_board yes)
3 | (property "Reference" "U" (at 0 2.54 0)
4 | (effects (font (size 1.27 1.27)))
5 | )
6 | (property "Value" "OLED_DISPLAY_SSD1306_SPI" (at 1.27 8.89 0)
7 | (effects (font (size 1.27 1.27)))
8 | )
9 | (property "Footprint" "" (at 0 0 0)
10 | (effects (font (size 1.27 1.27)) hide)
11 | )
12 | (property "Datasheet" "" (at 0 0 0)
13 | (effects (font (size 1.27 1.27)) hide)
14 | )
15 | (symbol "OLED_DISPLAY_SSD1306_SPI_0_1"
16 | (rectangle (start -17.78 16.51) (end 16.51 -7.62)
17 | (stroke (width 0) (type default))
18 | (fill (type background))
19 | )
20 | )
21 | (symbol "OLED_DISPLAY_SSD1306_SPI_1_1"
22 | (pin power_in line (at 0 -10.16 90) (length 2.54)
23 | (name "GND" (effects (font (size 1.27 1.27))))
24 | (number "1" (effects (font (size 1.27 1.27))))
25 | )
26 | (pin power_in line (at 0 19.05 270) (length 2.54)
27 | (name "VCC" (effects (font (size 1.27 1.27))))
28 | (number "2" (effects (font (size 1.27 1.27))))
29 | )
30 | (pin input line (at -20.32 11.43 0) (length 2.54)
31 | (name "D0" (effects (font (size 1.27 1.27))))
32 | (number "3" (effects (font (size 1.27 1.27))))
33 | )
34 | (pin input line (at -20.32 7.62 0) (length 2.54)
35 | (name "D1" (effects (font (size 1.27 1.27))))
36 | (number "4" (effects (font (size 1.27 1.27))))
37 | )
38 | (pin input line (at -20.32 3.81 0) (length 2.54)
39 | (name "RES" (effects (font (size 1.27 1.27))))
40 | (number "5" (effects (font (size 1.27 1.27))))
41 | )
42 | (pin input line (at -20.32 0 0) (length 2.54)
43 | (name "DC" (effects (font (size 1.27 1.27))))
44 | (number "6" (effects (font (size 1.27 1.27))))
45 | )
46 | (pin input line (at -20.32 -3.81 0) (length 2.54)
47 | (name "CS" (effects (font (size 1.27 1.27))))
48 | (number "7" (effects (font (size 1.27 1.27))))
49 | )
50 | )
51 | )
52 | (symbol "PDS1-S5-S5-D" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)
53 | (property "Reference" "U" (at -10.2127 7.6595 0)
54 | (effects (font (size 1.27 1.27)) (justify left bottom))
55 | )
56 | (property "Value" "PDS1-S5-S5-D" (at -7.62 -6.35 0)
57 | (effects (font (size 1.27 1.27)) (justify left bottom))
58 | )
59 | (property "Footprint" "" (at 0 15.24 0)
60 | (effects (font (size 1.27 1.27)) (justify bottom) hide)
61 | )
62 | (property "Datasheet" "https://www.mouser.com/datasheet/2/670/pds1_d-1311566.pdf" (at 0 -11.43 0)
63 | (effects (font (size 1.27 1.27)) hide)
64 | )
65 | (symbol "PDS1-S5-S5-D_0_0"
66 | (rectangle (start -10.16 7.62) (end 10.16 -7.62)
67 | (stroke (width 0.254) (type default))
68 | (fill (type background))
69 | )
70 | (pin power_in line (at -15.24 -2.54 0) (length 5.08)
71 | (name "GND" (effects (font (size 1.016 1.016))))
72 | (number "1" (effects (font (size 1.016 1.016))))
73 | )
74 | (pin power_in line (at -15.24 2.54 0) (length 5.08)
75 | (name "VIN" (effects (font (size 1.016 1.016))))
76 | (number "4" (effects (font (size 1.016 1.016))))
77 | )
78 | (pin power_out line (at 15.24 2.54 180) (length 5.08)
79 | (name "+VO" (effects (font (size 1.016 1.016))))
80 | (number "5" (effects (font (size 1.016 1.016))))
81 | )
82 | (pin power_in line (at 15.24 -2.54 180) (length 5.08)
83 | (name "0V" (effects (font (size 1.016 1.016))))
84 | (number "7" (effects (font (size 1.016 1.016))))
85 | )
86 | )
87 | )
88 | )
89 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/CustomSymbols.kicad_sym:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib (version 20220914) (generator kicad_symbol_editor)
2 | (symbol "OLED_DISPLAY_SSD1306_SPI" (in_bom yes) (on_board yes)
3 | (property "Reference" "U" (at 0 2.54 0)
4 | (effects (font (size 1.27 1.27)))
5 | )
6 | (property "Value" "OLED_DISPLAY_SSD1306_SPI" (at 1.27 8.89 0)
7 | (effects (font (size 1.27 1.27)))
8 | )
9 | (property "Footprint" "" (at 0 0 0)
10 | (effects (font (size 1.27 1.27)) hide)
11 | )
12 | (property "Datasheet" "" (at 0 0 0)
13 | (effects (font (size 1.27 1.27)) hide)
14 | )
15 | (symbol "OLED_DISPLAY_SSD1306_SPI_0_1"
16 | (rectangle (start -17.78 16.51) (end 16.51 -7.62)
17 | (stroke (width 0) (type default))
18 | (fill (type background))
19 | )
20 | )
21 | (symbol "OLED_DISPLAY_SSD1306_SPI_1_1"
22 | (pin power_in line (at 0 -10.16 90) (length 2.54)
23 | (name "GND" (effects (font (size 1.27 1.27))))
24 | (number "1" (effects (font (size 1.27 1.27))))
25 | )
26 | (pin power_in line (at 0 19.05 270) (length 2.54)
27 | (name "VCC" (effects (font (size 1.27 1.27))))
28 | (number "2" (effects (font (size 1.27 1.27))))
29 | )
30 | (pin input line (at -20.32 11.43 0) (length 2.54)
31 | (name "D0" (effects (font (size 1.27 1.27))))
32 | (number "3" (effects (font (size 1.27 1.27))))
33 | )
34 | (pin input line (at -20.32 7.62 0) (length 2.54)
35 | (name "D1" (effects (font (size 1.27 1.27))))
36 | (number "4" (effects (font (size 1.27 1.27))))
37 | )
38 | (pin input line (at -20.32 3.81 0) (length 2.54)
39 | (name "RES" (effects (font (size 1.27 1.27))))
40 | (number "5" (effects (font (size 1.27 1.27))))
41 | )
42 | (pin input line (at -20.32 0 0) (length 2.54)
43 | (name "DC" (effects (font (size 1.27 1.27))))
44 | (number "6" (effects (font (size 1.27 1.27))))
45 | )
46 | (pin input line (at -20.32 -3.81 0) (length 2.54)
47 | (name "CS" (effects (font (size 1.27 1.27))))
48 | (number "7" (effects (font (size 1.27 1.27))))
49 | )
50 | )
51 | )
52 | )
53 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/DaisySeedPedal1590b.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 0,
4 | "active_layer_preset": "All Layers",
5 | "auto_track_width": false,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 0.6
16 | },
17 | "ratsnest_display_mode": 0,
18 | "selection_filter": {
19 | "dimensions": true,
20 | "footprints": true,
21 | "graphics": true,
22 | "keepouts": true,
23 | "lockedItems": true,
24 | "otherItems": true,
25 | "pads": true,
26 | "text": true,
27 | "tracks": true,
28 | "vias": true,
29 | "zones": true
30 | },
31 | "visible_items": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 8,
39 | 9,
40 | 10,
41 | 11,
42 | 12,
43 | 13,
44 | 15,
45 | 16,
46 | 17,
47 | 18,
48 | 19,
49 | 20,
50 | 21,
51 | 22,
52 | 23,
53 | 24,
54 | 25,
55 | 26,
56 | 27,
57 | 28,
58 | 29,
59 | 30,
60 | 32,
61 | 33,
62 | 34,
63 | 35,
64 | 36,
65 | 39,
66 | 40
67 | ],
68 | "visible_layers": "fffffff_ffffffff",
69 | "zone_display_mode": 0
70 | },
71 | "meta": {
72 | "filename": "DaisySeedPedal1590b.kicad_prl",
73 | "version": 3
74 | },
75 | "project": {
76 | "files": []
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/JLCPCB-Gerbers/DaisySeedPedal1590b-Rev6-gerbers.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Hardware/GuitarPedal1590b/pcb/JLCPCB-Gerbers/DaisySeedPedal1590b-Rev6-gerbers.zip
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (version 7)
3 | (lib (name "GuitarPedal1590b")(type "KiCad")(uri "${KIPRJMOD}/CustomFootprints.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/Hardware/GuitarPedal1590b/pcb/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (version 7)
3 | (lib (name "GuitarPedal1590b")(type "KiCad")(uri "${KIPRJMOD}/CustomSymbols.kicad_sym")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Keith Shepherd
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Daisy Seed Projects
2 | This is a demo of a pedal board I put together using 3 of my custom Daisy Seed based guitar pedals. I designed and built the hardware and programmed the software. Everything shown here is open source and all the code, pcb files, and basic instructions on how to build the pedals, can be found on these pages.
3 |
4 | [](https://www.youtube.com/watch?v=ZkLnS43acQo)
5 |
6 | ## Software Projects:
7 | ### 1. [Guitar Multi-Effect Pedal](Software/GuitarPedal/README.md)
8 | The software that can run on any of the custom Guitar Pedal hardware projects listed below as well at the PedalPCB Terrarium hardware. This software is a flexible platform that abstracts the underlying Guitar Pedal hardware and allows a collection of Effects Modules to run on any of those hardware platforms.
9 |
10 | ## Hardware Projects:
11 |
12 | I provide everything you need to build any of pedals you see below along with pretty detailed documentation. However, recently I started to get a lot of requests to buy kits or finished pedals based on my designs. This is not something I typically do, but sometimes I do have extra PCBs, parts, and enclosures lying around and I'm willing to pass them along to you, basically at cost. I've included some ordering details along with each design below.
13 |
14 | ### 1. [Guitar Effect Pedal in 125b Enclosure](Hardware/GuitarPedal125b/README.md) (SMD Parts)
15 | A feature rich and flexible platform for making DSP based guitar FX pedals. Stereo Audio, Midi in/out, OLED Display, Rotary Encoder for Menu Navigation, 6 Knobs, 2 LEDs, 2 Foot Switches, Relay based "True Bypass" switching, all based on the Daisy Seed microcontroller.
16 |
17 | [Ordering Information](Hardware/GuitarPedal125b/docs/OrderingHardware.md)
18 |
19 |  
20 |
21 | ### 2. [Guitar Effect Pedal in 1590b Enclosure](Hardware/GuitarPedal1590b-SMD/README.md) (SMD Parts)
22 |
23 | A robust and tiny platform for making DSP based guitar FX pedals. Stereo Audio, Midi in/out, 4 Knobs, 2 LEDs, 1 or 2 Foot Switches, Relay based "True Bypass" switching, all based on the Daisy Seed microcontroller. Using SMD parts for easy manufacturing by a fab such as JLCPCB.
24 |
25 | [Ordering Information](Hardware/GuitarPedal1590b-SMD/docs/OrderingHardware.md)
26 |
27 |  
28 |
29 | ### 3. [Guitar Effect Pedal in 1590b Enclosure](Hardware/GuitarPedal1590b/README.md) (Through-hole parts)
30 |
31 | Same form factor and features as the SMD version of the 1590b pedal, minus the Relay based "True Bypass" switching. Using all Through-Hole parts for easy assembly at home with limited soldering skills.
32 |
33 | [Ordering Information](Hardware/GuitarPedal1590b/docs/OrderingHardware.md)
34 |
35 |  
36 |
37 | More Information about the Daisy Seed can be found at:
38 |
39 | http://electro-smith.com
40 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/.vscode/c_cpp_properties.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "cStandard": "c11",
5 | "compilerPath": "arm-none-eabi-g++.exe",
6 | "cppStandard": "c++17",
7 | "defines": [
8 | "_DEBUG",
9 | "UNICODE",
10 | "_UNICODE"
11 | ],
12 | "includePath": [
13 | "${workspaceFolder}/**",
14 | "${workspaceFolder}/libDaisy/**",
15 | "${workspaceFolder}/DaisySP/**"
16 | ],
17 | "name": "Win32",
18 | "windowsSdkVersion": "10.0.17763.0",
19 | "configurationProvider": "ms-vscode.makefile-tools"
20 | },
21 | {
22 | "cStandard": "c11",
23 | "compilerPath": "/usr/local/bin/arm-none-eabi-g++",
24 | "cppStandard": "c++17",
25 | "defines": [
26 | "_DEBUG",
27 | "UNICODE",
28 | "_UNICODE"
29 | ],
30 | "includePath": [
31 | "${workspaceFolder}/**",
32 | "${workspaceFolder}/libDaisy/**",
33 | "${workspaceFolder}/DaisySP/**"
34 | ],
35 | "name": "macOS",
36 | "configurationProvider": "ms-vscode.makefile-tools"
37 | }
38 | ],
39 | "version": 4
40 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "configFiles": [
5 | "interface/stlink.cfg",
6 | "target/stm32h7x.cfg"
7 | ],
8 | "cwd": "${workspaceFolder}",
9 | "debuggerArgs": [
10 | "-d",
11 | "${workspaceRoot}"
12 | ],
13 | "executable": "${workspaceRoot}/build/guitarpedal.elf",
14 | "interface": "swd",
15 | "name": "Cortex Debug",
16 | "openOCDLaunchCommands": [
17 | "init",
18 | "reset init",
19 | "gdb_breakpoint_override hard"
20 | ],
21 | "preLaunchTask": "build_all_debug",
22 | "preRestartCommands": [
23 | "load",
24 | "enable breakpoint",
25 | "monitor reset"
26 | ],
27 | "request": "launch",
28 | "runToMain": true,
29 | "servertype": "openocd",
30 | "showDevDebugOutput": "parsed",
31 | "svdFile": "${workspaceRoot}/.vscode/STM32H750x.svd",
32 | "type": "cortex-debug",
33 | "liveWatch": {
34 | "enabled": true,
35 | "samplesPerSecond": 4
36 | }
37 | }
38 | ],
39 | "version": "0.2.0"
40 | }
41 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "C_Cpp.errorSquiggles": "disabled",
3 | "files.associations": {
4 | "array": "cpp",
5 | "string": "cpp",
6 | "string_view": "cpp",
7 | "ranges": "cpp",
8 | "optional": "cpp",
9 | "istream": "cpp",
10 | "ostream": "cpp",
11 | "ratio": "cpp",
12 | "system_error": "cpp",
13 | "functional": "cpp",
14 | "tuple": "cpp",
15 | "type_traits": "cpp",
16 | "utility": "cpp",
17 | "variant": "cpp",
18 | "*.tcc": "cpp",
19 | "regex": "cpp",
20 | "any": "cpp",
21 | "new": "cpp",
22 | "atomic": "cpp",
23 | "bit": "cpp",
24 | "bitset": "cpp",
25 | "cctype": "cpp",
26 | "chrono": "cpp",
27 | "clocale": "cpp",
28 | "cmath": "cpp",
29 | "compare": "cpp",
30 | "concepts": "cpp",
31 | "condition_variable": "cpp",
32 | "cstdarg": "cpp",
33 | "cstddef": "cpp",
34 | "cstdint": "cpp",
35 | "cstdio": "cpp",
36 | "cstdlib": "cpp",
37 | "cstring": "cpp",
38 | "ctime": "cpp",
39 | "cwchar": "cpp",
40 | "cwctype": "cpp",
41 | "deque": "cpp",
42 | "forward_list": "cpp",
43 | "list": "cpp",
44 | "map": "cpp",
45 | "set": "cpp",
46 | "unordered_map": "cpp",
47 | "unordered_set": "cpp",
48 | "vector": "cpp",
49 | "exception": "cpp",
50 | "algorithm": "cpp",
51 | "iterator": "cpp",
52 | "memory": "cpp",
53 | "memory_resource": "cpp",
54 | "numeric": "cpp",
55 | "random": "cpp",
56 | "fstream": "cpp",
57 | "initializer_list": "cpp",
58 | "iomanip": "cpp",
59 | "iosfwd": "cpp",
60 | "iostream": "cpp",
61 | "limits": "cpp",
62 | "mutex": "cpp",
63 | "sstream": "cpp",
64 | "stdexcept": "cpp",
65 | "stop_token": "cpp",
66 | "streambuf": "cpp",
67 | "thread": "cpp",
68 | "typeinfo": "cpp"
69 | }
70 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "tasks": [
3 | {
4 | "command": "make clean; make",
5 | "group": {
6 | "isDefault": true,
7 | "kind": "build"
8 | },
9 | "label": "build",
10 | "options": {
11 | "cwd": "${workspaceFolder}"
12 | },
13 | "problemMatcher": [
14 | "$gcc"
15 | ],
16 | "type": "shell"
17 | },
18 | {
19 | "command": "make clean; make; make program",
20 | "label": "build_and_program",
21 | "options": {
22 | "cwd": "${workspaceFolder}"
23 | },
24 | "problemMatcher": [
25 | "$gcc"
26 | ],
27 | "type": "shell"
28 | },
29 | {
30 | "command": "make clean; make; make program-dfu",
31 | "label": "build_and_program_dfu",
32 | "options": {
33 | "cwd": "${workspaceFolder}"
34 | },
35 | "problemMatcher": [
36 | "$gcc"
37 | ],
38 | "type": "shell"
39 | },
40 | {
41 | "command": "make clean;make",
42 | "dependsOn": [
43 | "build_libdaisy",
44 | "build_daisysp"
45 | ],
46 | "label": "build_all",
47 | "options": {
48 | "cwd": "${workspaceFolder}"
49 | },
50 | "problemMatcher": [
51 | "$gcc"
52 | ],
53 | "type": "shell"
54 | },
55 | {
56 | "command": "make clean;DEBUG=1 make",
57 | "dependsOn": [
58 | "build_libdaisy",
59 | "build_daisysp"
60 | ],
61 | "label": "build_all_debug",
62 | "options": {
63 | "cwd": "${workspaceFolder}"
64 | },
65 | "problemMatcher": [
66 | "$gcc"
67 | ],
68 | "type": "shell"
69 | },
70 | {
71 | "command": "make program-dfu",
72 | "label": "program-dfu",
73 | "problemMatcher": [],
74 | "type": "shell"
75 | },
76 | {
77 | "command": "make program",
78 | "label": "program",
79 | "problemMatcher": [],
80 | "type": "shell"
81 | },
82 | {
83 | "command": "make",
84 | "label": "build_libdaisy",
85 | "options": {
86 | "cwd": "${workspaceFolder}/libDaisy"
87 | },
88 | "problemMatcher": [
89 | "$gcc"
90 | ],
91 | "type": "shell"
92 | },
93 | {
94 | "command": "make",
95 | "label": "build_daisysp",
96 | "options": {
97 | "cwd": "${workspaceFolder}/DaisySP"
98 | },
99 | "problemMatcher": [
100 | "$gcc"
101 | ],
102 | "type": "shell"
103 | }
104 | ],
105 | "version": "2.0.0"
106 | }
107 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/Chopper/README.md:
--------------------------------------------------------------------------------
1 | # Chopper
2 |
3 | A simple wave slicer created and contributed by [KnightHill](https://github.com/KnightHill)
4 |
5 | Default tempo is set to 120 BPM (2Hz). Tempo's range is between 30 and 240 BPM.
6 |
7 | # Patterns
8 |
9 |
10 |
11 |
12 | # |
13 | Steps |
14 |
15 |
16 |
17 |
18 |
19 | 1 |
20 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
21 |
22 |
23 |
24 | 2 |
25 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
26 |
27 |
28 |
29 | 3 |
30 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
31 |
32 |
33 |
34 | 4 |
35 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
36 |
37 |
38 |
39 | 5 |
40 | 1 | 1 | 1 | 1 |
41 |
42 |
43 |
44 | 6 |
45 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
46 |
47 |
48 |
49 | 7 |
50 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
51 |
52 |
53 |
54 | 8 |
55 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |
56 |
57 |
58 |
59 | 9 |
60 | 1 | 1 | 1 |
61 | 1 | 1 | 1 |
62 | 1 | 1 | 1 |
63 | 1 | 1 | 1 |
64 |
65 |
66 |
67 | 10 |
68 | 1 | 1 | 1 |
69 | 1 | 1 | 1 |
70 |
71 |
72 |
73 | 11 |
74 | 1 | 1 | 1 |
75 | 1 | 1 | 1 |
76 | 1 | 1 | 1 |
77 | 1 | 1 | 1 |
78 |
79 |
80 |
81 | 12 |
82 | 1 | 1 | 1 |
83 | 1 | 1 | 1 |
84 |
85 |
86 |
87 | 13 |
88 | 1 | 1 | 1 | 1 |
89 | 1 | 1 | 1 |
90 | 1 | 1 | 1 | 1 |
91 | 1 | 1 | 1 |
92 |
93 |
94 |
95 | 14 |
96 | 1 | 1 | 1 |
97 | 1 | 1 | 1 | 1 |
98 | 1 | 1 | 1 |
99 | 1 | 1 | 1 | 1 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/Chopper/chopper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef CHOPPER_H
3 | #define CHOPPER_H
4 | #include "Utility/dsp.h"
5 | #include
6 | #ifdef __cplusplus
7 |
8 | namespace bkshepherd
9 | {
10 |
11 | #define PATTERN_STEPS_MAX 16
12 | #define PATTERNS_MAX 14
13 |
14 | enum NoteDuration {
15 | D4, // quarter
16 | D8, // eigth
17 | D16 // sixteenth
18 | };
19 |
20 | struct Note {
21 | bool active;
22 | NoteDuration duration;
23 | };
24 |
25 | struct Pattern {
26 | uint8_t length;
27 | Note notes[PATTERN_STEPS_MAX];
28 | };
29 |
30 | class Chopper
31 | {
32 | private:
33 | static Pattern Patterns[PATTERNS_MAX];
34 |
35 | void IncPatternStep(uint8_t length);
36 |
37 | public:
38 | Chopper() {}
39 | ~Chopper() {}
40 |
41 | /** Initializes the Chopper
42 |
43 | \param sample_rate - sample rate of the audio engine being run, and the frequency that the Process function will be called.
44 |
45 | Defaults:
46 | - freq_ = 100 Hz
47 | - amp_ = 0.5
48 | */
49 | void Init(float sample_rate);
50 |
51 | /** Changes the frequency of the Chopper, and recalculates phase increment.
52 | */
53 | inline void SetFreq(const float f)
54 | {
55 | freq_ = f;
56 | phase_inc_ = CalcPhaseInc(f);
57 | }
58 |
59 | /** Sets the amplitude of the waveform.
60 | */
61 | inline void SetAmp(const float a) { amp_ = a; }
62 |
63 | /** Sets the pulse width (range 0 - 1)
64 | */
65 | inline void SetPw(const float pw)
66 | {
67 | pw_ = daisysp::fclamp(pw, 0.0f, 1.0f);
68 | pw_rad_ = pw_ * TWOPI_F;
69 | }
70 |
71 | /** Returns true if cycle is at end of rise. Set during call to Process.
72 | */
73 | inline bool IsEOR() { return eor_; }
74 |
75 | /** Returns true if cycle is at end of cycle. Set during call to Process.
76 | */
77 | inline bool IsEOC() { return eoc_; }
78 |
79 | /** Returns true if cycle rising.
80 | */
81 | inline bool IsRising() { return phase_ < PI_F; }
82 |
83 | /** Returns true if cycle falling.
84 | */
85 | inline bool IsFalling() { return phase_ >= PI_F; }
86 |
87 | /** Processes the waveform to be generated, returning one sample. This should be called once per sample period.
88 | */
89 | float Process();
90 |
91 | /** Adds a value 0.0-1.0 (mapped to 0.0-TWO_PI) to the current phase. Useful for PM and "FM" synthesis.
92 | */
93 | void PhaseAdd(float _phase) { phase_ += (_phase * TWOPI_F); }
94 |
95 | /** Resets the phase to the input argument. If no argumeNt is present, it will reset phase to 0.0;
96 | */
97 | void Reset(float _phase = 0.0f);
98 |
99 | // Pattern methods
100 | void SetPattern(int id);
101 | void NextPattern(bool reset = true);
102 | void PrevPattern(bool reset = true);
103 | inline int16_t GetCurrentPattern() { return current_pattern_; }
104 | inline Pattern GetPattern(int id) { return Patterns[id]; }
105 |
106 | // Envelope methods
107 | void SetAttack(float attack) { env_.SetTime(daisysp::ADSR_SEG_ATTACK, attack); }
108 | void SetDecay(float decay) { env_.SetTime(daisysp::ADSR_SEG_DECAY, decay); }
109 | void SetRelease(float release) { env_.SetTime(daisysp::ADSR_SEG_RELEASE, release); }
110 |
111 | private:
112 | float CalcPhaseInc(float f);
113 | float amp_, freq_, pw_, pw_rad_;
114 | float sr_, sr_recip_;
115 | float phase_, phase_inc_;
116 | float last_out_, last_freq_;
117 | bool eor_, eoc_;
118 | int16_t current_pattern_, pattern_step_;
119 | int16_t old_quadrant_index_;
120 | Note note_;
121 | daisysp::Adsr env_;
122 | };
123 |
124 | } // namespace bytebeat
125 | #endif
126 | #endif
127 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AllpassDiffuser.h:
--------------------------------------------------------------------------------
1 |
2 | #pragma once
3 |
4 | #include
5 | #include "ModulatedAllpass.h"
6 | #include "AudioLib/ShaRandom.h"
7 |
8 | using namespace std;
9 |
10 | namespace CloudSeed
11 | {
12 | class AllpassDiffuser
13 | {
14 | public:
15 | static const int MaxStageCount = 2;
16 |
17 | private:
18 | int samplerate;
19 |
20 | vector filters;
21 | int delay;
22 | float modRate;
23 | vector seedValues;
24 | int seed;
25 | float crossSeed;
26 |
27 | public:
28 | int Stages;
29 |
30 | AllpassDiffuser(int samplerate, int delayBufferLengthMillis)
31 | {
32 | auto delayBufferSize = samplerate * ((float)delayBufferLengthMillis / 1000.0);
33 | for (int i = 0; i < MaxStageCount; i++)
34 | {
35 | filters.push_back(new ModulatedAllpass((int)delayBufferSize, 100));
36 | }
37 |
38 | crossSeed = 0.0;
39 | seed = 23456;
40 | UpdateSeeds();
41 | Stages = 1;
42 |
43 | SetSamplerate(samplerate);
44 | }
45 |
46 | ~AllpassDiffuser()
47 | {
48 | for (auto filter : filters)
49 | delete filter;
50 | }
51 |
52 | int GetSamplerate()
53 | {
54 | return samplerate;
55 | }
56 |
57 | void SetSamplerate(int samplerate)
58 | {
59 | this->samplerate = samplerate;
60 | SetModRate(modRate);
61 | }
62 |
63 | void SetSeed(int seed)
64 | {
65 | this->seed = seed;
66 | UpdateSeeds();
67 | }
68 |
69 | void SetCrossSeed(float crossSeed)
70 | {
71 | this->crossSeed = crossSeed;
72 | UpdateSeeds();
73 | }
74 |
75 |
76 | bool GetModulationEnabled()
77 | {
78 | return filters[0]->ModulationEnabled;
79 | }
80 |
81 | void SetModulationEnabled(bool value)
82 | {
83 | for (auto filter : filters)
84 | filter->ModulationEnabled = value;
85 | }
86 |
87 | void SetInterpolationEnabled(bool enabled)
88 | {
89 | for (auto filter : filters)
90 | filter->InterpolationEnabled = enabled;
91 | }
92 |
93 | float* GetOutput()
94 | {
95 | return filters[Stages - 1]->GetOutput();
96 | }
97 |
98 |
99 | void SetDelay(int delaySamples)
100 | {
101 | delay = delaySamples;
102 | Update();
103 | }
104 |
105 | void SetFeedback(float feedback)
106 | {
107 | for (auto filter : filters)
108 | filter->Feedback = feedback;
109 | }
110 |
111 | void SetModAmount(float amount)
112 | {
113 | for (int i = 0; i < filters.size(); i++)
114 | {
115 | filters[i]->ModAmount = amount * (0.85 + 0.3 * seedValues[MaxStageCount + i]);
116 | }
117 | }
118 |
119 | void SetModRate(float rate)
120 | {
121 | modRate = rate;
122 |
123 | for (size_t i = 0; i < filters.size(); i++)
124 | filters[i]->ModRate = rate * (0.85 + 0.3 * seedValues[MaxStageCount * 2 + i]) / samplerate;
125 | }
126 |
127 | void Process(float* input, int sampleCount)
128 | {
129 | ModulatedAllpass** filterPtr = &filters[0];
130 |
131 | filterPtr[0]->Process(input, sampleCount);
132 |
133 | for (int i = 1; i < Stages; i++)
134 | {
135 | filterPtr[i]->Process(filterPtr[i - 1]->GetOutput(), sampleCount);
136 | }
137 | }
138 |
139 | void ClearBuffers()
140 | {
141 | for (size_t i = 0; i < filters.size(); i++)
142 | filters[i]->ClearBuffers();
143 | }
144 |
145 | private:
146 | void Update()
147 | {
148 | for (size_t i = 0; i < filters.size(); i++)
149 | {
150 | auto r = seedValues[i];
151 | auto d = std::pow(10, r) * 0.1; // 0.1 ... 1.0
152 | filters[i]->SampleDelay = (int)(delay * d);
153 | }
154 | }
155 |
156 | void UpdateSeeds()
157 | {
158 | this->seedValues = AudioLib::ShaRandom::Generate(seed, MaxStageCount * 3, crossSeed);
159 | Update();
160 | }
161 |
162 | };
163 | }
164 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/Biquad2.h:
--------------------------------------------------------------------------------
1 | #ifndef BIQUAD2
2 | #define BIQUAD2
3 |
4 | #include
5 | using namespace std;
6 |
7 | namespace AudioLib
8 | {
9 | class Biquad2
10 | {
11 | public:
12 | enum class FilterType
13 | {
14 | LowPass = 0,
15 | HighPass,
16 | BandPass,
17 | Notch,
18 | Peak,
19 | LowShelf,
20 | HighShelf
21 | };
22 |
23 | private:
24 | float samplerate;
25 | float _gainDb;
26 | float _q;
27 | float a0, a1, a2, b0, b1, b2;
28 | float x1, x2, y, y1, y2;
29 | float gain;
30 |
31 | public:
32 | FilterType Type;
33 | float Output;
34 | float Frequency;
35 | float Slope;
36 |
37 | Biquad2();
38 | Biquad2(FilterType filterType, float samplerate);
39 | ~Biquad2();
40 |
41 | float GetSamplerate();
42 | void SetSamplerate(float samplerate);
43 | float GetGainDb();
44 | void SetGainDb(float value);
45 | float GetGain();
46 | void SetGain(float value);
47 | float GetQ();
48 | void SetQ(float value);
49 | vector GetA();
50 | vector GetB();
51 |
52 | void Update();
53 | float GetResponse(float freq);
54 |
55 | float inline Process(float x)
56 | {
57 | y = b0 * x + b1 * x1 + b2 * x2 - a1 * y1 - a2 * y2;
58 | x2 = x1;
59 | y2 = y1;
60 | x1 = x;
61 | y1 = y;
62 |
63 | Output = y;
64 | return Output;
65 | }
66 |
67 | void inline Process(float* input, float* output, int len)
68 | {
69 | for (int i = 0; i < len; i++)
70 | output[i] = Process(input[i]);
71 | }
72 |
73 | void ClearBuffers();
74 | };
75 | }
76 |
77 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/Hp1.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #define PI 3.141592653589793238462643383
5 |
6 | namespace AudioLib
7 | {
8 | class Hp1
9 | {
10 | private:
11 | float fs;
12 | float b0, a1;
13 | float lpOut;
14 | float cutoffHz;
15 |
16 | public:
17 | float Output;
18 |
19 | public:
20 | Hp1(float fs)
21 | {
22 | this->lpOut = 0;
23 | this->fs = fs;
24 | }
25 |
26 | float GetSamplerate()
27 | {
28 | return fs;
29 | }
30 |
31 | void SetSamplerate(float samplerate)
32 | {
33 | fs = samplerate;
34 | }
35 |
36 | float GetCutoffHz()
37 | {
38 | return cutoffHz;
39 | }
40 |
41 | void SetCutoffHz(float hz)
42 | {
43 | cutoffHz = hz;
44 | Update();
45 | }
46 |
47 | void Update()
48 | {
49 | // Prevent going over the Nyquist frequency
50 | if (cutoffHz >= fs * 0.5)
51 | cutoffHz = fs * 0.499;
52 |
53 | auto x = 2 * PI * cutoffHz / fs;
54 | auto nn = (2 - cos(x));
55 | auto alpha = nn - sqrt(nn * nn - 1);
56 |
57 | a1 = alpha;
58 | b0 = 1 - alpha;
59 | }
60 |
61 | float Process(float input)
62 | {
63 | if (input == 0 && lpOut < 0.000000000001)
64 | {
65 | Output = 0;
66 | }
67 | else
68 | {
69 | lpOut = b0 * input + a1 * lpOut;
70 | Output = input - lpOut;
71 | }
72 |
73 | return Output;
74 | }
75 |
76 | void Process(float* input, float* output, int len)
77 | {
78 | for (int i = 0; i < len; i++)
79 | output[i] = Process(input[i]);
80 | }
81 | };
82 | }
83 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/Lp1.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #define PI 3.141592653589793238462643383
6 |
7 | namespace AudioLib
8 | {
9 | using namespace std;
10 |
11 | class Lp1
12 | {
13 | public:
14 | float Output;
15 |
16 | public:
17 | Lp1(float fs)
18 | {
19 | this->fs = fs;
20 | }
21 |
22 | float GetSamplerate()
23 | {
24 | return fs;
25 | }
26 |
27 | void SetSamplerate(float samplerate)
28 | {
29 | fs = samplerate;
30 | }
31 |
32 | float GetCutoffHz()
33 | {
34 | return cutoffHz;
35 | }
36 |
37 | void SetCutoffHz(float hz)
38 | {
39 | cutoffHz = hz;
40 | Update();
41 | }
42 |
43 | void Update()
44 | {
45 | // Prevent going over the Nyquist frequency
46 | if (cutoffHz >= fs * 0.5)
47 | cutoffHz = fs * 0.499;
48 |
49 | auto x = 2 * PI * cutoffHz / fs;
50 | auto nn = (2 - cos(x));
51 | auto alpha = nn - sqrt(nn * nn - 1);
52 |
53 | a1 = alpha;
54 | b0 = 1 - alpha;
55 | }
56 |
57 | float Process(float input)
58 | {
59 | if (input == 0 && Output < 0.000000000001)
60 | {
61 | Output = 0;
62 | }
63 | else
64 | {
65 | Output = b0 * input + a1 * Output;
66 | }
67 | return Output;
68 | }
69 |
70 | void Process(float* input, float* output, int len)
71 | {
72 | for (int i = 0; i < len; i++)
73 | output[i] = Process(input[i]);
74 | }
75 |
76 |
77 | private:
78 | float fs;
79 | float b0, a1;
80 | float cutoffHz;
81 | };
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/MathDefs.h:
--------------------------------------------------------------------------------
1 | #ifndef MATH_DEFS
2 | #define MATH_DEFS
3 |
4 | #ifndef DSY_SDRAM_BSS
5 | #define DSY_SDRAM_BSS __attribute__((section(".sdram_bss")))
6 | #endif
7 |
8 |
9 |
10 |
11 | //#define M_E 2.71828182845904523536 // e
12 | //#define M_LOG2E 1.44269504088896340736 // log2(e)
13 | //#define M_LOG10E 0.434294481903251827651 // log10(e)
14 | //#define M_LN2 0.693147180559945309417 // ln(2)
15 | //#define M_LN10 2.30258509299404568402 // ln(10)
16 | #define M_PI 3.14159265358979323846 // pi
17 | #define M_PI_2 1.57079632679489661923 // pi/2
18 | //#define M_PI_4 0.785398163397448309616 // pi/4
19 | //#define M_1_PI 0.318309886183790671538 // 1/pi
20 | //#define M_2_PI 0.636619772367581343076 // 2/pi
21 | #define M_2_SQRTPI 1.12837916709551257390 // 2/sqrt(pi)
22 | #define M_SQRT2 1.41421356237309504880 // sqrt(2)
23 | //#define M_SQRT1_2 0.707106781186547524401 // 1/sqrt(2)
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/ShaRandom.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "ShaRandom.h"
4 | #include "../Utils/Sha256.h"
5 |
6 | namespace AudioLib
7 | {
8 | using namespace std;
9 |
10 | vector ShaRandom::Generate(long long seed, int count)
11 | {
12 | vector byteList;
13 | auto iterations = count * sizeof(unsigned int) / (256 / 8) + 1;
14 | auto byteArr = (unsigned char*)&seed;
15 | vector bytes(byteArr, byteArr + 8);
16 |
17 | for (size_t i = 0; i < iterations; i++)
18 | {
19 | bytes = sha256(&bytes[0], 8);
20 | for (auto b : bytes)
21 | byteList.push_back(b);
22 | }
23 |
24 | auto intArray = (unsigned int*)(&byteList[0]);
25 | vector output;
26 |
27 | for (int i = 0; i < count; i++)
28 | {
29 | unsigned int val = intArray[i];
30 | float doubleVal = val / (float)UINT_MAX;
31 | output.push_back(doubleVal);
32 | }
33 |
34 | return output;
35 | }
36 |
37 | vector ShaRandom::Generate(long long seed, int count, float crossSeed)
38 | {
39 | auto seedA = seed;
40 | auto seedB = ~seed;
41 | auto seriesA = Generate(seedA, count);
42 | auto seriesB = Generate(seedB, count);
43 |
44 | vector output;
45 | for (int i = 0; i < count; i++)
46 | output.push_back(seriesA[i] * (1 - crossSeed) + seriesB[i] * crossSeed);
47 |
48 | return output;
49 | }
50 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/ShaRandom.h:
--------------------------------------------------------------------------------
1 | #ifndef SHARANDOM
2 | #define SHARANDOM
3 |
4 | #include
5 |
6 | namespace AudioLib
7 | {
8 | class ShaRandom
9 | {
10 | public:
11 | static std::vector Generate(long long seed, int count);
12 | static std::vector Generate(long long seed, int count, float crossSeed);
13 | };
14 | }
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/ValueTables.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "ValueTables.h"
4 | #include
5 |
6 | namespace AudioLib
7 | {
8 | float DSY_SDRAM_BSS ValueTables::Sqrt[TableSize];
9 | float DSY_SDRAM_BSS ValueTables::Sqrt3[TableSize];
10 | float DSY_SDRAM_BSS ValueTables::Pow1_5[TableSize];
11 | float DSY_SDRAM_BSS ValueTables::Pow2[TableSize];
12 | float DSY_SDRAM_BSS ValueTables::Pow3[TableSize];
13 | float DSY_SDRAM_BSS ValueTables::Pow4[TableSize];
14 | float DSY_SDRAM_BSS ValueTables::x2Pow3[TableSize];
15 |
16 | // octave response. value float every step (2,3,4,5 or 6 steps)
17 | float DSY_SDRAM_BSS ValueTables::Response2Oct[TableSize];
18 | float DSY_SDRAM_BSS ValueTables::Response3Oct[TableSize];
19 | float DSY_SDRAM_BSS ValueTables::Response4Oct[TableSize];
20 | float DSY_SDRAM_BSS ValueTables::Response5Oct[TableSize];
21 | float DSY_SDRAM_BSS ValueTables::Response6Oct[TableSize];
22 |
23 | // decade response, value multiplies by 10 every step
24 | float DSY_SDRAM_BSS ValueTables::Response2Dec[TableSize];
25 | float DSY_SDRAM_BSS ValueTables::Response3Dec[TableSize];
26 | float DSY_SDRAM_BSS ValueTables::Response4Dec[TableSize];
27 |
28 | void ValueTables::Init()
29 | {
30 | // Initialize tables
31 |
32 | for (int i = 0; i <= 4000; i++)
33 | {
34 | float x = i / 4000.0;
35 |
36 | Sqrt[i] = std::sqrt(x);
37 | Sqrt3[i] = std::pow(x, 1.0 / 3.0);
38 | Pow1_5[i] = std::pow(x, 1.5);
39 | Pow2[i] = std::pow(x, 2.0);
40 | Pow3[i] = std::pow(x, 3.0);
41 | Pow4[i] = std::pow(x, 4.0);
42 |
43 | x2Pow3[i] = std::pow(2 * x, 3.0);
44 | Response2Oct[i] = (std::pow(4, x) - 1.0) / 4.0 + 0.25;
45 | Response3Oct[i] = (std::pow(8, x) - 1.0) / 8.0 + 0.125;
46 | Response4Oct[i] = (std::pow(16, x) - 1.0) / 16.0 + 0.125 / 2.0;
47 | Response5Oct[i] = (std::pow(32, x) - 1.0) / 32.0 + 0.125 / 4.0;
48 | Response6Oct[i] = (std::pow(64, x) - 1.0) / 64.0 + 0.125 / 8.0;
49 |
50 | Response2Dec[i] = std::pow(100, x) / 100.0;
51 | Response3Dec[i] = std::pow(1000, x) / 1000.0;
52 | Response4Dec[i] = std::pow(10000, x) / 10000.0;
53 | }
54 |
55 | for (int i = 1; i <= 4000; i++)
56 | {
57 | Response2Oct[i] = (Response2Oct[i] - Response2Oct[0]) / (1 - Response2Oct[0]);
58 | Response3Oct[i] = (Response3Oct[i] - Response3Oct[0]) / (1 - Response3Oct[0]);
59 | Response4Oct[i] = (Response4Oct[i] - Response4Oct[0]) / (1 - Response4Oct[0]);
60 | Response5Oct[i] = (Response5Oct[i] - Response5Oct[0]) / (1 - Response5Oct[0]);
61 | Response6Oct[i] = (Response6Oct[i] - Response6Oct[0]) / (1 - Response6Oct[0]);
62 | Response2Dec[i] = (Response2Dec[i] - Response2Dec[0]) / (1 - Response2Dec[0]);
63 | Response3Dec[i] = (Response3Dec[i] - Response3Dec[0]) / (1 - Response3Dec[0]);
64 | Response4Dec[i] = (Response4Dec[i] - Response4Dec[0]) / (1 - Response4Dec[0]);
65 | }
66 |
67 | Response2Oct[0] = 0;
68 | Response3Oct[0] = 0;
69 | Response4Oct[0] = 0;
70 | Response5Oct[0] = 0;
71 | Response6Oct[0] = 0;
72 | Response2Dec[0] = 0;
73 | Response3Dec[0] = 0;
74 | Response4Dec[0] = 0;
75 | }
76 |
77 | float ValueTables::Get(float index, float* table)
78 | {
79 | if (table == nullptr)
80 | return index;
81 |
82 | int idx = (int)(index * 4000.999);
83 |
84 | assert(idx >= 0);
85 | assert(idx < AudioLib::ValueTables::TableSize);
86 |
87 |
88 | return table[idx];
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/AudioLib/ValueTables.h:
--------------------------------------------------------------------------------
1 | #ifndef AUDIOLIB_VALUETABLES
2 | #define AUDIOLIB_VALUETABLES
3 |
4 | #include "MathDefs.h"
5 |
6 |
7 | namespace AudioLib
8 | {
9 | class ValueTables
10 | {
11 | public:
12 | static const int TableSize = 40001;
13 |
14 | static DSY_SDRAM_BSS float Sqrt[TableSize];
15 | static DSY_SDRAM_BSS float Sqrt3[TableSize];
16 | static DSY_SDRAM_BSS float Pow1_5[TableSize];
17 | static DSY_SDRAM_BSS float Pow2[TableSize];
18 | static DSY_SDRAM_BSS float Pow3[TableSize];
19 | static DSY_SDRAM_BSS float Pow4[TableSize];
20 | static DSY_SDRAM_BSS float x2Pow3[TableSize];
21 |
22 | // octave response. value float every step (2,3,4,5 or 6 steps)
23 | static DSY_SDRAM_BSS float Response2Oct[TableSize];
24 | static DSY_SDRAM_BSS float Response3Oct[TableSize];
25 | static DSY_SDRAM_BSS float Response4Oct[TableSize];
26 | static DSY_SDRAM_BSS float Response5Oct[TableSize];
27 | static DSY_SDRAM_BSS float Response6Oct[TableSize];
28 |
29 | // decade response, value multiplies by 10 every step
30 | static DSY_SDRAM_BSS float Response2Dec[TableSize];
31 | static DSY_SDRAM_BSS float Response3Dec[TableSize];
32 | static DSY_SDRAM_BSS float Response4Dec[TableSize];
33 |
34 | static void Init();
35 | static float Get(float index, float* table);
36 | };
37 | }
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/Default.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef DEFAULT_INCLUDE
3 | #define DEFAULT_INCLUDE
4 |
5 | typedef unsigned char byte;
6 | typedef unsigned int uint;
7 | #ifdef _WIN32
8 | typedef unsigned long long ulong;
9 | #endif
10 |
11 |
12 | #ifdef DEBUG
13 | #define __inline_always inline
14 | #else
15 | #define __inline_always __forceinline
16 | #endif
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/Exports.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include "Default.h"
3 | #include "ReverbController.h"
4 | #include "FastSin.h"
5 | #include "AudioLib/ValueTables.h"
6 |
7 | using namespace CloudSeed;
8 | bool isInitialized = false;
9 |
10 | extern "C"
11 | {
12 | ReverbController* Create(int samplerate)
13 | {
14 | if (!isInitialized)
15 | {
16 | AudioLib::ValueTables::Init();
17 | FastSin::Init();
18 | isInitialized = true;
19 | }
20 |
21 | return new ReverbController(samplerate);
22 | }
23 |
24 | void Delete(ReverbController* item)
25 | {
26 | delete item;
27 | }
28 |
29 | int GetSamplerate(ReverbController* item)
30 | {
31 | return item->GetSamplerate();
32 | }
33 |
34 | void SetSamplerate(ReverbController* item, int samplerate)
35 | {
36 | return item->SetSamplerate(samplerate);
37 | }
38 |
39 | int GetParameterCount(ReverbController* item)
40 | {
41 | return item->GetParameterCount();
42 | }
43 |
44 | float* GetAllParameters(ReverbController* item)
45 | {
46 | return item->GetAllParameters();
47 | }
48 |
49 | float GetScaledParameter(ReverbController* item, Parameter2 param)
50 | {
51 | return item->GetScaledParameter(param);
52 | }
53 |
54 | void SetParameter(ReverbController* item, Parameter2 param, float value)
55 | {
56 | item->SetParameter(param, value);
57 | }
58 |
59 | void ClearBuffers(ReverbController* item)
60 | {
61 | item->ClearBuffers();
62 | }
63 |
64 | void Process(ReverbController* item, float* input, float* output, int bufferSize)
65 | {
66 | item->Process(input, output, bufferSize);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/FastSin.cpp:
--------------------------------------------------------------------------------
1 |
2 | #define _USE_MATH_DEFINES
3 | #include
4 | #include "Default.h"
5 | #include "FastSin.h"
6 |
7 | namespace CloudSeed
8 | {
9 | DSY_SDRAM_BSS float FastSin::data[FastSin::DataSize];
10 | }
11 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/FastSin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "AudioLib/MathDefs.h"
5 | #include "FastSin.h"
6 |
7 | namespace CloudSeed
8 | {
9 | class FastSin
10 | {
11 | private:
12 | static const int DataSize = 32768;
13 | static DSY_SDRAM_BSS float data[DataSize];
14 |
15 | public:
16 | static void ZeroBuffer(float* buffer, int len);
17 | static void Init()
18 | {
19 | for (int i = 0; i < DataSize; i++)
20 | {
21 | data[i] = std::sin(2 * M_PI * i / (float)DataSize);
22 | }
23 | }
24 |
25 | static float Get(float index)
26 | {
27 | return data[(int)(index * 32767.99999)];
28 | }
29 | };
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/ModulatedAllpass.h:
--------------------------------------------------------------------------------
1 | #ifndef MODULATEDALLPASS
2 | #define MODULATEDALLPASS
3 |
4 | #include "ModulatedAllpass.h"
5 | #include "FastSin.h"
6 | #include "Utils.h"
7 | extern void* custom_pool_allocate(size_t size);
8 |
9 | namespace CloudSeed
10 | {
11 | class ModulatedAllpass
12 | {
13 | public:
14 | const int DelayBufferSamples = 19200; // 100ms at 192Khz
15 | static const int ModulationUpdateRate = 8;
16 |
17 | private:
18 | float* delayBuffer;
19 | float* output;
20 | int bufferSize;
21 | int index;
22 | unsigned int samplesProcessed;
23 |
24 | float modPhase;
25 | int delayA;
26 | int delayB;
27 | float gainA;
28 | float gainB;
29 |
30 | public:
31 |
32 | int SampleDelay;
33 | float Feedback;
34 | float ModAmount;
35 | float ModRate;
36 |
37 | bool InterpolationEnabled;
38 | bool ModulationEnabled;
39 |
40 | ModulatedAllpass(int bufferSize, int sampleDelay)
41 | {
42 | this->InterpolationEnabled = true;
43 | this->bufferSize = bufferSize;
44 | delayBuffer = new (custom_pool_allocate(sizeof(float) * DelayBufferSamples)) float[DelayBufferSamples];
45 | output = new (custom_pool_allocate(sizeof(float) * bufferSize)) float[bufferSize];
46 | SampleDelay = sampleDelay;
47 | index = DelayBufferSamples - 1;
48 | modPhase = 0.01 + 0.98 * std::rand() / (float)RAND_MAX;
49 | ModRate = 0.0;
50 | ModAmount = 0.0;
51 | Update();
52 | }
53 |
54 | ~ModulatedAllpass()
55 | {
56 | delete delayBuffer;
57 | delete output;
58 | }
59 |
60 |
61 | inline float* GetOutput()
62 | {
63 | return output;
64 | }
65 |
66 | void ClearBuffers()
67 | {
68 | Utils::ZeroBuffer(delayBuffer, DelayBufferSamples);
69 | Utils::ZeroBuffer(output, bufferSize);
70 | }
71 |
72 | void Process(float* input, int sampleCount)
73 | {
74 | if (ModulationEnabled)
75 | ProcessWithMod(input, sampleCount);
76 | else
77 | ProcessNoMod(input, sampleCount);
78 | }
79 |
80 |
81 | private:
82 | void ProcessNoMod(float* input, int sampleCount)
83 | {
84 | auto delayedIndex = index - SampleDelay;
85 | if (delayedIndex < 0) delayedIndex += DelayBufferSamples;
86 |
87 | for (int i = 0; i < sampleCount; i++)
88 | {
89 | auto bufOut = delayBuffer[delayedIndex];
90 | auto inVal = input[i] + bufOut * Feedback;
91 |
92 | delayBuffer[index] = inVal;
93 | output[i] = bufOut - inVal * Feedback;
94 |
95 | index++;
96 | delayedIndex++;
97 | if (index >= DelayBufferSamples) index -= DelayBufferSamples;
98 | if (delayedIndex >= DelayBufferSamples) delayedIndex -= DelayBufferSamples;
99 | samplesProcessed++;
100 | }
101 | }
102 |
103 | void ProcessWithMod(float* input, int sampleCount)
104 | {
105 | for (int i = 0; i < sampleCount; i++)
106 | {
107 | if (samplesProcessed >= ModulationUpdateRate)
108 | Update();
109 |
110 | float bufOut;
111 |
112 | if (InterpolationEnabled)
113 | {
114 | int idxA = index - delayA;
115 | int idxB = index - delayB;
116 | idxA += DelayBufferSamples * (idxA < 0); // modulo
117 | idxB += DelayBufferSamples * (idxB < 0); // modulo
118 |
119 | bufOut = delayBuffer[idxA] * gainA + delayBuffer[idxB] * gainB;
120 | }
121 | else
122 | {
123 | int idxA = index - delayA;
124 | idxA += DelayBufferSamples * (idxA < 0); // modulo
125 | bufOut = delayBuffer[idxA];
126 | }
127 |
128 | auto inVal = input[i] + bufOut * Feedback;
129 | delayBuffer[index] = inVal;
130 | output[i] = bufOut - inVal * Feedback;
131 |
132 | index++;
133 | if (index >= DelayBufferSamples) index -= DelayBufferSamples;
134 | samplesProcessed++;
135 | }
136 | }
137 |
138 | inline float Get(int delay)
139 | {
140 | int idx = index - delay;
141 | if (idx < 0)
142 | idx += DelayBufferSamples;
143 |
144 | return delayBuffer[idx];
145 | }
146 |
147 | void Update()
148 | {
149 | modPhase += ModRate * ModulationUpdateRate;
150 | if (modPhase > 1)
151 | modPhase = std::fmod(modPhase, 1.0);
152 |
153 | auto mod = FastSin::Get(modPhase);
154 |
155 | if (ModAmount >= SampleDelay) // don't modulate to negative value
156 | ModAmount = SampleDelay - 1;
157 |
158 |
159 | auto totalDelay = SampleDelay + ModAmount * mod;
160 |
161 | if (totalDelay <= 0) // should no longer be required
162 | totalDelay = 1;
163 |
164 | delayA = (int)totalDelay;
165 | delayB = (int)totalDelay + 1;
166 |
167 | auto partial = totalDelay - delayA;
168 |
169 | gainA = 1 - partial;
170 | gainB = partial;
171 |
172 | samplesProcessed = 0;
173 | }
174 |
175 | };
176 | }
177 |
178 | #endif
179 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/ModulatedDelay.h:
--------------------------------------------------------------------------------
1 | #ifndef MODULATEDDELAY
2 | #define MODULATEDDELAY
3 |
4 | #include "ModulatedDelay.h"
5 | #include "Utils.h"
6 | #include "FastSin.h"
7 |
8 | extern void* custom_pool_allocate(size_t size);
9 |
10 | namespace CloudSeed
11 | {
12 | class ModulatedDelay
13 | {
14 | private:
15 |
16 | const int ModulationUpdateRate = 8;
17 |
18 | float* delayBuffer;
19 | float* output;
20 | int bufferSize;
21 | int writeIndex;
22 | int readIndexA;
23 | int readIndexB;
24 | int samplesProcessed;
25 | int delayBufferSizeSamples;
26 |
27 | float modPhase;
28 | float gainA;
29 | float gainB;
30 |
31 | public:
32 | int SampleDelay;
33 |
34 | float ModAmount;
35 | float ModRate;
36 |
37 | ModulatedDelay(int bufferSize, int delayBufferSizeSamples, int sampleDelay)
38 | {
39 | this->delayBufferSizeSamples = delayBufferSizeSamples;
40 | this->bufferSize = bufferSize;
41 | this->delayBuffer = new (custom_pool_allocate(sizeof(float) * delayBufferSizeSamples)) float[delayBufferSizeSamples];
42 | this->output = new (custom_pool_allocate(sizeof(float) * bufferSize)) float[bufferSize];
43 | this->SampleDelay = sampleDelay;
44 | writeIndex = 0;
45 | modPhase = 0.01 + 0.98 * (std::rand() / (float)RAND_MAX);
46 | ModRate = 0.0;
47 | ModAmount = 0.0;
48 | Update();
49 | }
50 |
51 | ~ModulatedDelay()
52 | {
53 | delete delayBuffer;
54 | delete output;
55 | }
56 |
57 | float* GetOutput()
58 | {
59 | return output;
60 | }
61 |
62 | void Process(float* input, int sampleCount)
63 | {
64 | for (int i = 0; i < sampleCount; i++)
65 | {
66 | if (samplesProcessed == ModulationUpdateRate)
67 | Update();
68 |
69 | delayBuffer[writeIndex] = input[i];
70 | output[i] = delayBuffer[readIndexA] * gainA + delayBuffer[readIndexB] * gainB;
71 |
72 | writeIndex++;
73 | readIndexA++;
74 | readIndexB++;
75 | if (writeIndex >= delayBufferSizeSamples) writeIndex -= delayBufferSizeSamples;
76 | if (readIndexA >= delayBufferSizeSamples) readIndexA -= delayBufferSizeSamples;
77 | if (readIndexB >= delayBufferSizeSamples) readIndexB -= delayBufferSizeSamples;
78 | samplesProcessed++;
79 | }
80 | }
81 |
82 | void ClearBuffers()
83 | {
84 | Utils::ZeroBuffer(delayBuffer, delayBufferSizeSamples);
85 | Utils::ZeroBuffer(output, bufferSize);
86 | }
87 |
88 |
89 | private:
90 | void Update()
91 | {
92 | modPhase += ModRate * ModulationUpdateRate;
93 | if (modPhase > 1)
94 | modPhase = std::fmod(modPhase, 1.0);
95 |
96 | auto mod = FastSin::Get(modPhase);
97 | auto totalDelay = SampleDelay + ModAmount * mod;
98 |
99 | auto delayA = (int)totalDelay;
100 | auto delayB = (int)totalDelay + 1;
101 |
102 | auto partial = totalDelay - delayA;
103 |
104 | gainA = 1 - partial;
105 | gainB = partial;
106 |
107 | readIndexA = writeIndex - delayA;
108 | readIndexB = writeIndex - delayB;
109 | if (readIndexA < 0) readIndexA += delayBufferSizeSamples;
110 | if (readIndexB < 0) readIndexB += delayBufferSizeSamples;
111 |
112 | samplesProcessed = 0;
113 | }
114 | };
115 | }
116 |
117 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/Parameter.h:
--------------------------------------------------------------------------------
1 | #ifndef PARAMETER2
2 | #define PARAMETER2
3 |
4 | enum class Parameter2
5 | {
6 | // Input
7 |
8 | InputMix = 0,
9 | PreDelay,
10 |
11 | HighPass,
12 | LowPass,
13 |
14 | // Early
15 |
16 | TapCount,
17 | TapLength,
18 | TapGain,
19 | TapDecay,
20 |
21 | DiffusionEnabled,
22 | DiffusionStages,
23 | DiffusionDelay,
24 | DiffusionFeedback,
25 |
26 | // Late
27 |
28 | LineCount,
29 | LineDelay,
30 | LineDecay,
31 |
32 |
33 | LateDiffusionEnabled,
34 | LateDiffusionStages,
35 | LateDiffusionDelay,
36 | LateDiffusionFeedback,
37 |
38 | // Frequency Response
39 |
40 | PostLowShelfGain,
41 | PostLowShelfFrequency,
42 | PostHighShelfGain,
43 | PostHighShelfFrequency,
44 | PostCutoffFrequency,
45 |
46 | // Modulation
47 |
48 | EarlyDiffusionModAmount,
49 | EarlyDiffusionModRate,
50 |
51 | LineModAmount,
52 | LineModRate,
53 |
54 | LateDiffusionModAmount,
55 | LateDiffusionModRate,
56 |
57 | // Seeds
58 |
59 | TapSeed,
60 | DiffusionSeed,
61 | DelaySeed,
62 | PostDiffusionSeed,
63 |
64 | // Seed Mix
65 |
66 | CrossSeed,
67 |
68 | DryOut,
69 | PredelayOut,
70 | EarlyOut,
71 | MainOut,
72 |
73 | // Switches
74 | HiPassEnabled,
75 | LowPassEnabled,
76 | LowShelfEnabled,
77 | HighShelfEnabled,
78 | CutoffEnabled,
79 | LateStageTap,
80 |
81 | // Effects
82 | Interpolation,
83 |
84 | Count,
85 |
86 | Unused = 999
87 | };
88 |
89 | #endif
90 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/Utils.h:
--------------------------------------------------------------------------------
1 | #ifndef UTILS
2 | #define UTILS
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | namespace CloudSeed
9 | {
10 | class Utils
11 | {
12 | public:
13 |
14 | static inline void ZeroBuffer(float* buffer, int len)
15 | {
16 | for (int i = 0; i < len; i++)
17 | buffer[i] = 0.0;
18 | }
19 |
20 | static inline void Copy(float* source, float* dest, int len)
21 | {
22 | std::memcpy(dest, source, len * sizeof(float));
23 | }
24 |
25 | static inline void Gain(float* buffer, float gain, int len)
26 | {
27 | for (int i = 0; i < len; i++)
28 | {
29 | buffer[i] *= gain;
30 | }
31 | }
32 |
33 | // perform bit crushing and undersampling
34 | // undersampling: if set to 1, perfroms no effect, if set to 2, will undersample to 1/2 samplerate, etc...
35 | // sampleResolution: if set to 32, will use 2^32 steps, if set to 8, will resude to 2^8 = 256 steps
36 | // Currently Unused
37 | static inline void BitcrushAndReduce(float* bufferIn, float* bufferOut, int len, int undersampling, int sampleResolution)
38 | {
39 | float sampleSteps = std::pow(2, sampleResolution);
40 | float inverseSteps = 1.0 / sampleSteps;
41 |
42 | float sample = 0.0;
43 |
44 | for (int i = 0; i < len; i++)
45 | {
46 | if (i % undersampling == 0)
47 | sample = ((long)(bufferIn[i] * sampleSteps)) * inverseSteps;
48 |
49 | bufferOut[i] = sample;
50 | }
51 | }
52 |
53 | template
54 | static float DB2gain(T input)
55 | {
56 | return std::pow(10, input / 20.0);
57 | }
58 |
59 | template
60 | static float Gain2DB(T input)
61 | {
62 | if (input < 0.0000001)
63 | return -100000;
64 |
65 | return 20.0f * std::log10(input);
66 | }
67 | };
68 | }
69 |
70 | #endif
71 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/Utils/Sha256.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Updated to C++, zedwood.com 2012
3 | * Based on Olivier Gay's version
4 | * See Modified BSD License below:
5 | *
6 | * FIPS 180-2 SHA-224/256/384/512 implementation
7 | * Issue date: 04/30/2005
8 | * http://www.ouah.org/ogay/sha2/
9 | *
10 | * Copyright (C) 2005, 2007 Olivier Gay
11 | * All rights reserved.
12 | *
13 | * Redistribution and use in source and binary forms, with or without
14 | * modification, are permitted provided that the following conditions
15 | * are met:
16 | * 1. Redistributions of source code must retain the above copyright
17 | * notice, this list of conditions and the following disclaimer.
18 | * 2. Redistributions in binary form must reproduce the above copyright
19 | * notice, this list of conditions and the following disclaimer in the
20 | * documentation and/or other materials provided with the distribution.
21 | * 3. Neither the name of the project nor the names of its contributors
22 | * may be used to endorse or promote products derived from this software
23 | * without specific prior written permission.
24 | *
25 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
26 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 | * SUCH DAMAGE.
36 | */
37 |
38 | #ifndef SHA256_H
39 | #define SHA256_H
40 | #include
41 |
42 | class SHA256
43 | {
44 | protected:
45 | typedef unsigned char uint8;
46 | typedef unsigned int uint32;
47 | typedef unsigned long long uint64;
48 |
49 | const static uint32 sha256_k[];
50 | static const unsigned int SHA224_256_BLOCK_SIZE = (512 / 8);
51 | public:
52 | void init();
53 | void update(const unsigned char *message, unsigned int len);
54 | void final(unsigned char *digest);
55 | static const unsigned int DIGEST_SIZE = (256 / 8);
56 |
57 | protected:
58 | void transform(const unsigned char *message, unsigned int block_nb);
59 | unsigned int m_tot_len;
60 | unsigned int m_len;
61 | unsigned char m_block[2 * SHA224_256_BLOCK_SIZE];
62 | uint32 m_h[8];
63 | };
64 |
65 | std::vector sha256(unsigned char* input, int len);
66 |
67 | #define SHA2_SHFR(x, n) (x >> n)
68 | #define SHA2_ROTR(x, n) ((x >> n) | (x << ((sizeof(x) << 3) - n)))
69 | #define SHA2_ROTL(x, n) ((x << n) | (x >> ((sizeof(x) << 3) - n)))
70 | #define SHA2_CH(x, y, z) ((x & y) ^ (~x & z))
71 | #define SHA2_MAJ(x, y, z) ((x & y) ^ (x & z) ^ (y & z))
72 | #define SHA256_F1(x) (SHA2_ROTR(x, 2) ^ SHA2_ROTR(x, 13) ^ SHA2_ROTR(x, 22))
73 | #define SHA256_F2(x) (SHA2_ROTR(x, 6) ^ SHA2_ROTR(x, 11) ^ SHA2_ROTR(x, 25))
74 | #define SHA256_F3(x) (SHA2_ROTR(x, 7) ^ SHA2_ROTR(x, 18) ^ SHA2_SHFR(x, 3))
75 | #define SHA256_F4(x) (SHA2_ROTR(x, 17) ^ SHA2_ROTR(x, 19) ^ SHA2_SHFR(x, 10))
76 | #define SHA2_UNPACK32(x, str) \
77 | { \
78 | *((str) + 3) = (uint8) ((x) ); \
79 | *((str) + 2) = (uint8) ((x) >> 8); \
80 | *((str) + 1) = (uint8) ((x) >> 16); \
81 | *((str) + 0) = (uint8) ((x) >> 24); \
82 | }
83 | #define SHA2_PACK32(str, x) \
84 | { \
85 | *(x) = ((uint32) *((str) + 3) ) \
86 | | ((uint32) *((str) + 2) << 8) \
87 | | ((uint32) *((str) + 1) << 16) \
88 | | ((uint32) *((str) + 0) << 24); \
89 | }
90 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/license.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 Valdemar Erlingsson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/CloudSeed/premake4.lua:
--------------------------------------------------------------------------------
1 | project "CloudSeed"
2 |
3 | language "C++"
4 |
5 | kind "StaticLib"
6 |
7 | includedirs {"."}
8 |
9 | files {
10 | "*.cpp",
11 | "*.h",
12 | "AudioLib/*.cpp",
13 | "AudioLib/*.h",
14 | "Utils/*.cpp",
15 | "Utils/*.h",
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/ImpulseResponse/ImpulseResponse.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // ImpulseResponse.cpp
3 | // NeuralAmpModeler-macOS
4 | //
5 | // Created by Steven Atkinson on 12/30/22.
6 | //
7 | // Modified by Keith Bloemer on 12/28/23
8 | // Greatly simplified by assuming 1 channel, 1 input per Process call, and constant samplerate.
9 | // For initial investigation into running IR's on the Daisy Seed
10 |
11 | #include "ImpulseResponse.h"
12 |
13 |
14 | ImpulseResponse::ImpulseResponse()
15 | {
16 | }
17 |
18 | // Destructor
19 | ImpulseResponse::~ImpulseResponse()
20 | {
21 | // No Code Needed
22 | }
23 |
24 |
25 | void ImpulseResponse::Init(std::vector irData)
26 | {
27 | mRawAudio = irData;
28 | _SetWeights();
29 | }
30 |
31 | float ImpulseResponse::Process(float inputs)
32 | {
33 |
34 | _UpdateHistory(inputs);
35 |
36 | int j = mHistoryIndex - mHistoryRequired;
37 | auto input = Eigen::Map(&mHistory[j], mHistoryRequired + 1);
38 |
39 | _AdvanceHistoryIndex(1); // KAB MOD - for Daisy implementation numFrames is always 1
40 |
41 | return (float)mWeight.dot(input);
42 |
43 | }
44 |
45 | void ImpulseResponse::_SetWeights()
46 | {
47 |
48 | const size_t irLength = std::min(mRawAudio.size(), mMaxLength);
49 | mWeight.resize(irLength);
50 | // Gain reduction.
51 | // https://github.com/sdatkinson/NeuralAmpModelerPlugin/issues/100#issuecomment-1455273839
52 | // Add sample rate-dependence
53 | //const float gain = pow(10, -18 * 0.05) * 48000 / mSampleRate; //KAB NOTE: This made a very bad/loud sound on Daisy Seed
54 | for (size_t i = 0, j = irLength - 1; i < irLength; i++, j--)
55 | //mWeight[j] = gain * mRawAudio[i];
56 | mWeight[j] = mRawAudio[i];
57 | mHistoryRequired = irLength - 1;
58 |
59 | // Moved from HISTORY::EnsureHistorySize since only doing once for this module (assuming same size IR's)
60 | // TODO: Maybe find a more efficient method of indexing mHistory,
61 | // rather than copying the end of the vector (length of IR) back to the beginning all at once.
62 | const size_t requiredHistoryArraySize = 5 * mHistoryRequired; // Just so we don't spend too much time copying back. // KAB NOTE: was 10 *
63 | mHistory.resize(requiredHistoryArraySize);
64 | std::fill(mHistory.begin(), mHistory.end(), 0.0f);
65 | mHistoryIndex = mHistoryRequired;
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/ImpulseResponse/ImpulseResponse.h:
--------------------------------------------------------------------------------
1 | //
2 | // ImpulseResponse.h
3 | // NeuralAmpModeler-macOS
4 | //
5 | // Created by Steven Atkinson on 12/30/22.
6 | //
7 | // Impulse response processing
8 | //
9 | // Modified by Keith Bloemer on 12/28/23
10 | // Greatly simplified by assuming 1 channel, 1 input per Process call, and constant samplerate.
11 | // For initial investigation into running IR's on the Daisy Seed
12 |
13 | #pragma once
14 |
15 | #include
16 | #include "dsp.h"
17 |
18 |
19 | class ImpulseResponse : public History
20 | {
21 | public:
22 | ImpulseResponse();
23 | ~ImpulseResponse();
24 |
25 | void Init(std::vector irData);
26 | float Process(float inputs);
27 |
28 |
29 | private:
30 | // Set the weights, given that the plugin is running at the provided sample
31 | // rate.
32 | void _SetWeights();
33 |
34 | // State of audio
35 | // Keep a copy of the raw audio that was loaded so that it can be resampled
36 | std::vector mRawAudio;
37 | float mRawAudioSampleRate;
38 | float mSampleRate;
39 |
40 | const size_t mMaxLength = 8192;
41 | // The weights
42 | Eigen::VectorXf mWeight;
43 | };
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/ImpulseResponse/dsp.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * File: dsp.cpp
3 | * Created Date: March 17, 2023
4 | * Author: Steven Atkinson (steven@atkinson.mn)
5 | */
6 | // Modified by Keith Bloemer on 12/28/23
7 | // Greatly simplified by assuming 1 channel, 1 input per Process call, and constant samplerate.
8 | // For initial investigation into running IR's on the Daisy Seed
9 |
10 | #include "dsp.h"
11 |
12 |
13 | History::History()
14 | {
15 | }
16 |
17 | // Destructor
18 | History::~History()
19 | {
20 | // No Code Needed
21 | }
22 |
23 |
24 | void History::_AdvanceHistoryIndex(const size_t bufferSize)
25 | {
26 | mHistoryIndex += bufferSize;
27 | }
28 |
29 |
30 | void History::_RewindHistory()
31 | {
32 | // TODO memcpy? Should be fine w/ history array being >2x the history length.
33 | for (size_t i = 0, j = mHistoryIndex - mHistoryRequired; i < mHistoryRequired; i++, j++)
34 | mHistory[i] = mHistory[j];
35 | mHistoryIndex = mHistoryRequired;
36 | }
37 |
38 | void History::_UpdateHistory(float inputs)
39 | {
40 | if (mHistoryIndex + 1 >= mHistory.size())
41 | _RewindHistory();
42 |
43 | mHistory[mHistoryIndex] = inputs;
44 | }
45 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/ImpulseResponse/dsp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | // A class where a longer buffer of history is needed to correctly calculate
6 | // the DSP algorithm (e.g. algorithms involving convolution).
7 | //
8 | // Hacky stuff:
9 | // * Mono
10 | // * Single-precision floats.
11 | class History
12 | {
13 | public:
14 | History();
15 | ~History();
16 | protected:
17 | // Called at the end of the DSP, advance the hsitory index to the next open
18 | // spot. Does not ensure that it's at a valid address.
19 | void _AdvanceHistoryIndex(const size_t bufferSize);
20 | // Drop the new samples into the history array.
21 | // Manages history array size
22 | void _UpdateHistory(float inputs);
23 |
24 | // The history array that's used for DSP calculations.
25 | std::vector mHistory;
26 | // How many samples previous are required.
27 | // Zero means that no history is required--only the current sample.
28 | size_t mHistoryRequired = 0;
29 | // Location of the first sample in the current buffer.
30 | // Shall always be in the range [mHistoryRequired, mHistory.size()).
31 | size_t mHistoryIndex = 0;
32 |
33 | private:
34 |
35 | // Copy the end of the history back to the front and reset mHistoryIndex
36 | void _RewindHistory();
37 | };
38 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/NeuralModels/model_data_gru6.h:
--------------------------------------------------------------------------------
1 | struct modelData {
2 | std::vector> rec_weight_ih_l0;
3 | std::vector> rec_weight_hh_l0;
4 | std::vector> lin_weight;
5 | std::vector lin_bias;
6 | std::vector> rec_bias;
7 | float levelAdjust;
8 | };
9 |
10 | // ADD YOUR MODEL IDENTIFIER HERE ////////////////////////////////// < -------------------
11 | modelData Model1;
12 |
13 |
14 |
15 | /////////////////////////////////////////////////////////////////
16 |
17 | std::vector model_collection;
18 |
19 | /*========================================================================*/
20 |
21 | void setupWeights() {
22 |
23 | // COPY AND PASTE YOUR MODEL WEIGHTS BELOW (After converting .json to .h file) ////////////////////////////////// < -------------------
24 | // ADD AND REMOVE MODELS AS DESIRED (CAN HOLD AROUND 15-16 MODELS IN FLASH MEMORY)
25 |
26 |
27 | //========================================================================
28 | //../newNeuralSeedModel
29 | /*
30 | model : SimpleRNN
31 | input_size : 1
32 | skip : 1
33 | output_size : 1
34 | unit_type : GRU
35 | num_layers : 1
36 | hidden_size : 2
37 | bias_fl : True
38 | */
39 |
40 | Model1.rec_weight_ih_l0 = {{1.0139787197113037, 2.9825797080993652, 1.2472124099731445, 3.150390863418579, -1.5450150966644287, 1.8350377082824707}};
41 |
42 | Model1.rec_weight_hh_l0 = {{0.698763906955719, 3.882492780685425, 0.9913920164108276, 2.9897453784942627, -0.5614499449729919, 2.19010066986084},
43 | { -0.2833782434463501, 2.6996567249298096, -0.3616560399532318, -0.09247095137834549, -0.3450881540775299, 1.490613341331482}};
44 |
45 | Model1.lin_weight = {{1.1280078887939453, -1.1408512592315674}};
46 |
47 | Model1.lin_bias = {-0.08455488085746765};
48 |
49 | Model1.rec_bias = {{1.5979323387145996, -0.6241311430931091, -0.21615047752857208, 0.07251371443271637, 0.42379361391067505, -0.4128590524196625},
50 | { 1.5481172800064087, -0.18020188808441162, 0.06090473383665085, 0.7659458518028259, -0.8148460984230042, 0.4995129108428955}};
51 |
52 |
53 |
54 | Model1.levelAdjust = 0.9;
55 |
56 |
57 |
58 | /*========================================================================*/
59 |
60 | // ADD YOUR MODEL IDENTIFIER HERE ////////////////////////////////// < -------------------------
61 | model_collection = { Model1
62 | };
63 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/amp_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef AMP_MODULE_H
3 | #define AMP_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #include
9 | #include "ImpulseResponse/ImpulseResponse.h"
10 |
11 | #ifdef __cplusplus
12 |
13 | /** @file amp_module.h */
14 |
15 | using namespace daisysp;
16 |
17 |
18 | namespace bkshepherd
19 | {
20 |
21 | class AmpModule : public BaseEffectModule
22 | {
23 | public:
24 | AmpModule();
25 | ~AmpModule();
26 |
27 | void Init(float sample_rate) override;
28 | void ParameterChanged(int parameter_id) override;
29 | void SelectModel();
30 | void SelectIR();
31 | void CalculateMix();
32 | void CalculateTone();
33 | void ProcessMono(float in) override;
34 | void ProcessStereo(float inL, float inR) override;
35 | float GetBrightnessForLED(int led_id) override;
36 |
37 | private:
38 |
39 |
40 | float m_gainMin;
41 | float m_gainMax;
42 |
43 | float wetMix;
44 | float dryMix;
45 |
46 | float nnLevelAdjust;
47 | int m_currentModelindex;
48 |
49 | float m_toneFreqMin;
50 | float m_toneFreqMax;
51 |
52 | Tone tone; // Low Pass
53 | //Balance bal; // Balance for volume correction in filtering
54 |
55 | float m_cachedEffectMagnitudeValue;
56 |
57 | ImpulseResponse mIR;
58 | int m_currentIRindex;
59 | };
60 | } // namespace bkshepherd
61 | #endif
62 | #endif
63 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/autopan_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef AUTOPAN_MODULE_H
3 | #define AUTOPAN_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file autopan_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class AutoPanModule : public BaseEffectModule
18 | {
19 | public:
20 | AutoPanModule();
21 | ~AutoPanModule();
22 |
23 | void Init(float sample_rate) override;
24 | void ProcessMono(float in) override;
25 | void ProcessStereo(float inL, float inR) override;
26 | void SetTempo(uint32_t bpm) override;
27 | float GetBrightnessForLED(int led_id) override;
28 | void UpdateUI(float elapsedTime) override;
29 | void DrawUI(OneBitGraphicsDisplay& display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing) override;
30 |
31 |
32 | private:
33 | float m_pan; // 0 to 1 value 0 is full left, 1 is full right.
34 | Oscillator m_freqOsc;
35 | float m_freqOscFreqMin;
36 | float m_freqOscFreqMax;
37 | };
38 | } // namespace bkshepherd
39 | #endif
40 | #endif
41 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/chopper_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef CHOPPER_MODULE_H
3 | #define CHOPPER_MODULE_H
4 |
5 | #include "daisysp.h"
6 | #include "Chopper/chopper.h"
7 | #include "base_effect_module.h"
8 | #include
9 | #ifdef __cplusplus
10 |
11 | /** @file chopper_module.h */
12 |
13 | using namespace daisysp;
14 |
15 | namespace bkshepherd {
16 |
17 | class ChopperModule : public BaseEffectModule {
18 | public:
19 | ChopperModule();
20 | ~ChopperModule();
21 |
22 | void Init(float sample_rate) override;
23 | void ProcessMono(float in) override;
24 | void ProcessStereo(float inL, float inR) override;
25 | void SetTempo(uint32_t bpm) override;
26 | float GetBrightnessForLED(int led_id) override;
27 | void DrawUI(OneBitGraphicsDisplay &display, int currentIndex,
28 | int numItemsTotal, Rectangle boundsToDrawIn,
29 | bool isEditing) override;
30 |
31 | private:
32 | Chopper m_chopper;
33 | float m_tempoFreqMin;
34 | float m_tempoFreqMax;
35 | float m_pulseWidthMin;
36 | float m_pulseWidthMax;
37 |
38 | float m_cachedEffectMagnitudeValue;
39 | };
40 | } // namespace bkshepherd
41 | #endif
42 | #endif
43 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/chorus_module.cpp:
--------------------------------------------------------------------------------
1 | #include "chorus_module.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_paramCount = 5;
6 | static const ParameterMetaData s_metaData[s_paramCount] = {{name: "Wet", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 83, knobMapping: 0, midiCCMapping: 20},
7 | {name: "Delay", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 64, knobMapping: 1, midiCCMapping: 21},
8 | {name: "LFO Freq", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 35, knobMapping: 2, midiCCMapping: 22},
9 | {name: "LFO Depth", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 40, knobMapping: 3, midiCCMapping: 23},
10 | {name: "Feedback", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 30, knobMapping: 4, midiCCMapping: 24}};
11 |
12 | // Default Constructor
13 | ChorusModule::ChorusModule() : BaseEffectModule(),
14 | m_lfoFreqMin(1.0f),
15 | m_lfoFreqMax(20.0f)
16 |
17 | {
18 | // Set the name of the effect
19 | m_name = "Chorus";
20 |
21 | // Setup the meta data reference for this Effect
22 | m_paramMetaData = s_metaData;
23 |
24 | // Initialize Parameters for this Effect
25 | this->InitParams(s_paramCount);
26 | }
27 |
28 | // Destructor
29 | ChorusModule::~ChorusModule()
30 | {
31 | // No Code Needed
32 | }
33 |
34 | void ChorusModule::Init(float sample_rate)
35 | {
36 | BaseEffectModule::Init(sample_rate);
37 |
38 | m_chorus.Init(sample_rate);
39 | }
40 |
41 | void ChorusModule::ProcessMono(float in)
42 | {
43 | BaseEffectModule::ProcessMono(in);
44 |
45 | // Calculate the effect
46 | m_chorus.SetDelay(GetParameterAsMagnitude(1));
47 | m_chorus.SetLfoFreq(m_lfoFreqMin + (GetParameterAsMagnitude(2) * GetParameterAsMagnitude(2) * (m_lfoFreqMax - m_lfoFreqMin)));
48 | m_chorus.SetLfoDepth(GetParameterAsMagnitude(3));
49 | m_chorus.SetFeedback(GetParameterAsMagnitude(4));
50 |
51 | m_chorus.Process(m_audioLeft);
52 |
53 | m_audioLeft = m_chorus.GetLeft() * GetParameterAsMagnitude(0) + m_audioLeft * (1.0f - GetParameterAsMagnitude(0));
54 | m_audioRight = m_chorus.GetRight() * GetParameterAsMagnitude(0) + m_audioRight * (1.0f - GetParameterAsMagnitude(0));
55 | }
56 |
57 | void ChorusModule::ProcessStereo(float inL, float inR)
58 | {
59 | // Calculate the mono effect
60 | ProcessMono(inL);
61 |
62 | // Do the base stereo calculation (which resets the right signal to be the inputR instead of combined mono)
63 | BaseEffectModule::ProcessStereo(m_audioLeft, inR);
64 |
65 | // Calculate the effect
66 | m_audioRight = m_chorus.GetRight() * GetParameterAsMagnitude(0) + m_audioRight * (1.0f - GetParameterAsMagnitude(0));
67 | }
68 |
69 | float ChorusModule::GetBrightnessForLED(int led_id)
70 | {
71 | float value = BaseEffectModule::GetBrightnessForLED(led_id);
72 |
73 | if (led_id == 1)
74 | {
75 | return value * GetParameterAsMagnitude(0);
76 | }
77 |
78 | return value;
79 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/chorus_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef CHORUS_MODULE_H
3 | #define CHORUS_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file chorus_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class ChorusModule : public BaseEffectModule
18 | {
19 | public:
20 | ChorusModule();
21 | ~ChorusModule();
22 |
23 | void Init(float sample_rate) override;
24 | void ProcessMono(float in) override;
25 | void ProcessStereo(float inL, float inR) override;
26 | float GetBrightnessForLED(int led_id) override;
27 |
28 | private:
29 | Chorus m_chorus;
30 | float m_lfoFreqMin;
31 | float m_lfoFreqMax;
32 | };
33 | } // namespace bkshepherd
34 | #endif
35 | #endif
36 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/cloudseed_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef CLOUDSEED_MODULE_H
3 | #define CLOUDSEED_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 |
9 |
10 | #include "CloudSeed/Default.h"
11 | #include "CloudSeed/ReverbController.h"
12 | #include "CloudSeed/FastSin.h"
13 | #include "CloudSeed/AudioLib/ValueTables.h"
14 | #include "CloudSeed/AudioLib/MathDefs.h"
15 |
16 |
17 |
18 | #ifdef __cplusplus
19 |
20 | /** @file cloudseed_module.h */
21 |
22 | //using namespace daisysp;
23 |
24 |
25 |
26 | namespace bkshepherd
27 | {
28 |
29 | class CloudSeedModule : public BaseEffectModule
30 | {
31 | public:
32 | CloudSeedModule();
33 | ~CloudSeedModule();
34 |
35 | void Init(float sample_rate) override;
36 | void ParameterChanged(int parameter_id) override;
37 | void changePreset();
38 | void ProcessMono(float in) override;
39 | void ProcessStereo(float inL, float inR) override;
40 | void SetTempo(uint32_t bpm) override;
41 | float GetBrightnessForLED(int led_id) override;
42 |
43 | private:
44 |
45 | CloudSeed::ReverbController* reverb = 0;
46 |
47 | float m_gainMin;
48 | float m_gainMax;
49 |
50 | float m_cachedEffectMagnitudeValue;
51 | };
52 | } // namespace bkshepherd
53 | #endif
54 | #endif
55 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/crusher_module.cpp:
--------------------------------------------------------------------------------
1 | #include "crusher_module.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_paramCount = 3;
6 | static const ParameterMetaData s_metaData[s_paramCount] = {
7 | {name : "Level", valueType : ParameterValueType::FloatMagnitude, valueBinCount : 0, defaultValue : 40, knobMapping : 0, midiCCMapping : -1},
8 | {name : "Bits", valueType : ParameterValueType::Binned, valueBinCount : 32, defaultValue : 32, knobMapping : 1, midiCCMapping : -1},
9 | {name : "Cutoff", valueType : ParameterValueType::FloatMagnitude, valueBinCount : 0, defaultValue : 64, knobMapping : 2, midiCCMapping : -1}};
10 |
11 | // Default Constructor
12 | CrusherModule::CrusherModule() : BaseEffectModule(), m_levelMin(0.01), m_levelMax(20), m_cutoffMin(500), m_cutoffMax(20000)
13 | {
14 | // Set the name of the effect
15 | m_name = "Crusher";
16 |
17 | // Setup the meta data reference for this Effect
18 | m_paramMetaData = s_metaData;
19 |
20 | // Initialize Parameters for this Effect
21 | this->InitParams(s_paramCount);
22 | }
23 |
24 | // Destructor
25 | CrusherModule::~CrusherModule()
26 | {
27 | // No Code Needed
28 | }
29 |
30 | void CrusherModule::Init(float sample_rate)
31 | {
32 | BaseEffectModule::Init(sample_rate);
33 | m_tone.Init(sample_rate);
34 | m_bitcrusher.Init();
35 | m_bitcrusher.setNumberOfBits(32.0);
36 | }
37 |
38 | void CrusherModule::ProcessMono(float in)
39 | {
40 | BaseEffectModule::ProcessMono(in);
41 |
42 | float level = m_levelMin + (GetParameterAsMagnitude(0) * (m_levelMax - m_levelMin));
43 | float cutoff = m_cutoffMin + GetParameterAsMagnitude(2) * (m_cutoffMax - m_cutoffMin);
44 | float bits = (float)GetParameterAsBinnedValue(1);
45 |
46 | m_tone.SetFreq(cutoff);
47 | m_bitcrusher.setNumberOfBits(bits);
48 | float out = m_bitcrusher.Process(in);
49 |
50 | m_audioRight = m_audioLeft = out * level;
51 | }
52 |
53 | void CrusherModule::ProcessStereo(float inL, float inR)
54 | {
55 | BaseEffectModule::ProcessStereo(inL, inR);
56 |
57 | float level = m_levelMin + (GetParameterAsMagnitude(0) * (m_levelMax - m_levelMin));
58 | float cutoff = m_cutoffMin + GetParameterAsMagnitude(2) * (m_cutoffMax - m_cutoffMin);
59 | float bits = (float)GetParameterAsBinnedValue(1);
60 |
61 | m_tone.SetFreq(cutoff);
62 | m_bitcrusher.setNumberOfBits(bits);
63 |
64 | float outL = m_bitcrusher.Process(inL);
65 | float outR = m_bitcrusher.Process(inR);
66 |
67 | m_audioLeft = outL * level;
68 | m_audioRight = outR * level;
69 | }
70 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/crusher_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef CRUSHER_MODULE_H
3 | #define CRUSHER_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file crusher_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class Bitcrusher
18 | {
19 | public:
20 | Bitcrusher() {}
21 | ~Bitcrusher() {}
22 |
23 | void Init() { quant = 65536.0; } // need some default value
24 |
25 | float Process(float in) { return truncf(in * quant) / quant; }
26 |
27 | void setNumberOfBits(float nBits)
28 | {
29 | if (nBits < 1.0) {
30 | nBits = 1.0;
31 | } else if (nBits > 32.0) {
32 | nBits = 32.0;
33 | }
34 | quant = powf(2.0, nBits);
35 | }
36 |
37 | private:
38 | float quant;
39 | };
40 |
41 | class CrusherModule : public BaseEffectModule
42 | {
43 | public:
44 | CrusherModule();
45 | ~CrusherModule();
46 |
47 | void Init(float sample_rate) override;
48 | void ProcessMono(float in) override;
49 | void ProcessStereo(float inL, float inR) override;
50 |
51 | private:
52 | Tone m_tone;
53 | Bitcrusher m_bitcrusher;
54 |
55 | // Parameter limits
56 | // float m_bitsMin;
57 | // float m_bitsMax;
58 | float m_levelMin;
59 | float m_levelMax;
60 | float m_cutoffMin;
61 | float m_cutoffMax;
62 | };
63 | } // namespace bkshepherd
64 | #endif
65 | #endif
66 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/metro_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef METRO_MODULE_H
3 | #define METRO_MODULE_H
4 |
5 | #include "daisysp.h"
6 | #include "base_effect_module.h"
7 | #include
8 | #ifdef __cplusplus
9 |
10 | /** @file metro_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 | class Metronome
17 | {
18 | public:
19 | Metronome() {}
20 | ~Metronome() {}
21 | /** Initializes Metronome module.
22 | Arguments:
23 | - freq: frequency at which new clock signals will be generated
24 | Input Range:
25 | - sample_rate: sample rate of audio engine
26 | Input range:
27 | */
28 | void Init(float freq, float sample_rate);
29 |
30 | /** checks current state of Metronome object and updates state if necesary.
31 | */
32 | uint8_t Process();
33 |
34 | /** resets phase to 0
35 | */
36 | inline void Reset() { phs_ = 0.0f; }
37 | /** Sets frequency at which Metronome module will run at.
38 | */
39 | void SetFreq(float freq);
40 |
41 | /** Returns current value for frequency.
42 | */
43 | inline float GetFreq() { return freq_; }
44 |
45 | /** Returns current phase.
46 | */
47 | inline float GetPhase() { return phs_; }
48 |
49 | /** Returns the phase quadrant (0-4)
50 | */
51 | uint16_t GetQuadrant();
52 |
53 | /** Returns the phase quadrant (0-16)
54 | */
55 | uint16_t GetQuadrant16();
56 |
57 | private:
58 | float freq_;
59 | float phs_, sample_rate_, phs_inc_;
60 | };
61 |
62 | enum TimeSignature { meter4x4 = 0, meter3x4 = 1, meter2x4 = 2 };
63 | const uint16_t DefaultTempoBpm = 120;
64 |
65 | class MetroModule : public BaseEffectModule
66 | {
67 | public:
68 | MetroModule();
69 | ~MetroModule();
70 |
71 | void Init(float sample_rate) override;
72 | void ProcessMono(float in) override;
73 | void ProcessStereo(float inL, float inR) override;
74 | float Process();
75 |
76 | void SetTempo(uint32_t bpm) override;
77 | float GetBrightnessForLED(int led_id) override;
78 | void DrawUI(OneBitGraphicsDisplay &display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing) override;
79 |
80 | inline void SetTimeSignature(TimeSignature ts) { m_timeSignature = ts; }
81 | inline TimeSignature GetTimeSignature() { return m_timeSignature; }
82 |
83 | private:
84 | uint16_t m_tempoBpmMin;
85 | uint16_t m_tempoBpmMax;
86 | float m_levelMin;
87 | float m_levelMax;
88 |
89 | uint16_t m_quadrant;
90 | uint16_t m_direction;
91 | uint32_t m_beat;
92 |
93 | TimeSignature m_timeSignature;
94 |
95 | Metronome m_metro;
96 |
97 | daisysp::Oscillator m_osc;
98 | daisysp::Adsr m_env;
99 |
100 | // Utility methods
101 | uint16_t raw_tempo_to_bpm(uint8_t value);
102 | uint8_t bpm_tempo_to_raw(uint16_t bpm);
103 | };
104 | } // namespace bkshepherd
105 | #endif
106 | #endif
107 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/midi_keys_module.cpp:
--------------------------------------------------------------------------------
1 | #include "midi_keys_module.h"
2 | #include "../Util/audio_utilities.h"
3 |
4 | using namespace bkshepherd;
5 |
6 | static VoiceManager<8> voice_handler; // 24 or 16 was too much for 125B pedal, froze when effect engaged, 12 works
7 |
8 | static const int s_paramCount = 2;
9 | static const ParameterMetaData s_metaData[s_paramCount] = {{name: "CutoffFreq", valueType: ParameterValueType::FloatMagnitude, defaultValue: 74, knobMapping: 0, midiCCMapping: 21},
10 | {name: "Level", valueType: ParameterValueType::FloatMagnitude, defaultValue: 74, knobMapping: 1, midiCCMapping: 22}
11 | //{name: "Osc Wave", valueType: ParameterValueType::Binned, valueBinCount: 8, valueBinNames: s_waveBinNames, defaultValue: 0, knobMapping: 4, midiCCMapping: 23}
12 | };
13 |
14 | // Default Constructor
15 | MidiKeysModule::MidiKeysModule() : BaseEffectModule(),
16 | m_freqMin(250.0f),
17 | m_freqMax(8500.0f),
18 | m_cachedEffectMagnitudeValue(1.0f)
19 | {
20 | // Set the name of the effect
21 | m_name = "MidiKeys";
22 |
23 | // Setup the meta data reference for this Effect
24 | m_paramMetaData = s_metaData;
25 |
26 | // Initialize Parameters for this Effect
27 | this->InitParams(s_paramCount);
28 | }
29 |
30 | // Destructor
31 | MidiKeysModule::~MidiKeysModule()
32 | {
33 | // No Code Needed
34 | }
35 |
36 | void MidiKeysModule::Init(float sample_rate)
37 | {
38 | BaseEffectModule::Init(sample_rate);
39 |
40 | voice_handler.Init(sample_rate);
41 |
42 | }
43 |
44 | void MidiKeysModule::OnNoteOn(float notenumber, float velocity)
45 | {
46 | // Note Off can come in as Note On w/ 0 Velocity
47 | if(velocity == 0.f)
48 | {
49 | voice_handler.OnNoteOff(notenumber, velocity);
50 | }
51 | else
52 | {
53 | voice_handler.OnNoteOn(notenumber, velocity);
54 | }
55 | }
56 |
57 | void MidiKeysModule::OnNoteOff(float notenumber, float velocity)
58 | {
59 | voice_handler.OnNoteOff(notenumber, velocity);
60 | }
61 |
62 | void MidiKeysModule::ProcessMono(float in)
63 | {
64 | BaseEffectModule::ProcessMono(in);
65 |
66 | voice_handler.SetCutoff(m_freqMin + GetParameterAsMagnitude(0) * (m_freqMax - m_freqMin));
67 |
68 | float sum = 0.f;
69 | sum = voice_handler.Process() * 0.4f * GetParameterAsMagnitude(1); // was 0.5f, needs more volume reduction
70 | m_audioLeft = sum;
71 | m_audioRight = m_audioLeft;
72 |
73 | }
74 |
75 | void MidiKeysModule::ProcessStereo(float inL, float inR)
76 | {
77 | // Calculate the mono effect
78 | ProcessMono(inL);
79 |
80 | // Do the base stereo calculation (which resets the right signal to be the inputR instead of combined mono)
81 | //BaseEffectModule::ProcessStereo(m_audioLeft, inR);
82 |
83 | }
84 |
85 |
86 |
87 | float MidiKeysModule::GetBrightnessForLED(int led_id)
88 | {
89 | float value = BaseEffectModule::GetBrightnessForLED(led_id);
90 |
91 | if (led_id == 1)
92 | {
93 | return value * m_cachedEffectMagnitudeValue;
94 | }
95 |
96 | return value;
97 | }
98 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/midipitch_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef MIDIPITCH_MODULE_H
3 | #define MIDIPITCH_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file midipitch_module.h */
11 |
12 |
13 | using namespace daisysp;
14 |
15 | namespace bkshepherd
16 | {
17 |
18 |
19 | class MidiPitchModule : public BaseEffectModule
20 | {
21 | public:
22 | MidiPitchModule();
23 | ~MidiPitchModule();
24 |
25 | void Init(float sample_rate) override;
26 | void ParameterChanged(int parameter_id) override;
27 | void OnNoteOn(float notenumber, float velocity) override;
28 | void OnNoteOff(float notenumber, float velocity) override;
29 | void ProcessMono(float in) override;
30 | void ProcessStereo(float inL, float inR) override;
31 | float GetBrightnessForLED(int led_id) override;
32 |
33 | private:
34 |
35 | int numVoices = 3;
36 | int maxVoices = 3;
37 | //PitchShifter voices[3];
38 | //PitchShifter pitch2;
39 | //PitchShifter pitch3;
40 |
41 | float keyNums[3] = {0.0};
42 | int numKeys = 0;
43 | //ReverbSc verb; // Freezes if I include both Pitchshifter and ReverbSc..
44 |
45 | Tone tone; // LP Filter
46 |
47 | float m_freqMin;
48 | float m_freqMax;
49 | float m_verbMin;
50 | float m_verbMax;
51 |
52 | bool voicesActive[3] = {false};
53 | float voiceKeys[3] = {0.0};
54 |
55 | Adsr env_[3];
56 | bool env_gate_[3] = {false};
57 |
58 | float m_cachedEffectMagnitudeValue;
59 | };
60 | } // namespace bkshepherd
61 | #endif
62 | #endif
63 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/modal_keys_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef MODAL_KEYS_MODULE_H
3 | #define MODAL_KEYS_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file modal_keys_module.h */
11 | // Implements DaisySP ModalVoice class
12 |
13 |
14 | using namespace daisysp;
15 |
16 | namespace bkshepherd
17 | {
18 |
19 |
20 | class ModalKeysModule : public BaseEffectModule
21 | {
22 | public:
23 | ModalKeysModule();
24 | ~ModalKeysModule();
25 |
26 | void Init(float sample_rate) override;
27 | void ParameterChanged(int parameter_id) override;
28 | void OnNoteOn(float notenumber, float velocity) override;
29 | void OnNoteOff(float notenumber, float velocity) override;
30 | void ProcessMono(float in) override;
31 | void ProcessStereo(float inL, float inR) override;
32 | float GetBrightnessForLED(int led_id) override;
33 |
34 | private:
35 |
36 | ModalVoice modalvoice;
37 | ReverbSc *verb;
38 |
39 | float m_freqMin;
40 | float m_freqMax;
41 | float m_verbMin;
42 | float m_verbMax;
43 |
44 |
45 | float m_cachedEffectMagnitudeValue;
46 | };
47 | } // namespace bkshepherd
48 | #endif
49 | #endif
50 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/modulated_tremolo_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef MODULATED_TREMOLO_MODULE_H
3 | #define MODULATED_TREMOLO_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file modulated_tremolo_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class ModulatedTremoloModule : public BaseEffectModule
18 | {
19 | public:
20 | ModulatedTremoloModule();
21 | ~ModulatedTremoloModule();
22 |
23 | void Init(float sample_rate) override;
24 | void ProcessMono(float in) override;
25 | void ProcessStereo(float inL, float inR) override;
26 | void SetTempo(uint32_t bpm) override;
27 | float GetBrightnessForLED(int led_id) override;
28 |
29 | private:
30 | Tremolo m_tremolo;
31 | float m_tremoloFreqMin;
32 | float m_tremoloFreqMax;
33 |
34 | Oscillator m_freqOsc;
35 | float m_freqOscFreqMin;
36 | float m_freqOscFreqMax;
37 |
38 | float m_cachedEffectMagnitudeValue;
39 | };
40 | } // namespace bkshepherd
41 | #endif
42 | #endif
43 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/multi_delay_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef MULTI_DELAY_MODULE_H
3 | #define MULTI_DELAY_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file multi_delay_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class MultiDelayModule : public BaseEffectModule
18 | {
19 | public:
20 | MultiDelayModule();
21 | ~MultiDelayModule();
22 |
23 | void Init(float sample_rate) override;
24 | void ProcessMono(float in) override;
25 | void ProcessStereo(float inL, float inR) override;
26 | void SetTempo(uint32_t bpm) override;
27 | float GetBrightnessForLED(int led_id) override;
28 | void SetDelayTime(uint8_t index, float delay);
29 | void ParameterChanged(int parameter_id);
30 | void SetTargetTapDelayTime(uint8_t index, float value, float multiplier);
31 |
32 | private:
33 | bool m_isInitialized;
34 | float m_cachedEffectMagnitudeValue;
35 | float m_delaySamplesMin;
36 | float m_delaySamplesMax;
37 | float m_pitchShiftMin;
38 | float m_pitchShiftMax;
39 | float m_tapTargetDelay[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
40 | };
41 | } // namespace bkshepherd
42 | #endif
43 | #endif
44 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/overdrive_module.cpp:
--------------------------------------------------------------------------------
1 | #include "overdrive_module.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_paramCount = 2;
6 | static const ParameterMetaData s_metaData[s_paramCount] = {{name: "Drive", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 57, knobMapping: 1, midiCCMapping: 1},
7 | {name: "Level", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 40, knobMapping: 0, midiCCMapping: 21}};
8 |
9 | // Default Constructor
10 | OverdriveModule::OverdriveModule() : BaseEffectModule(),
11 | m_driveMin(0.4f),
12 | m_driveMax(0.8f),
13 | m_levelMin(0.01f),
14 | m_levelMax(0.20f)
15 |
16 | {
17 | // Set the name of the effect
18 | m_name = "Overdrive";
19 |
20 | // Setup the meta data reference for this Effect
21 | m_paramMetaData = s_metaData;
22 |
23 | // Initialize Parameters for this Effect
24 | this->InitParams(s_paramCount);
25 | }
26 |
27 | // Destructor
28 | OverdriveModule::~OverdriveModule()
29 | {
30 | // No Code Needed
31 | }
32 |
33 | void OverdriveModule::Init(float sample_rate)
34 | {
35 | BaseEffectModule::Init(sample_rate);
36 |
37 | m_overdriveLeft.Init();
38 | m_overdriveRight.Init();
39 | }
40 |
41 | void OverdriveModule::ProcessMono(float in)
42 | {
43 | BaseEffectModule::ProcessMono(in);
44 |
45 | // Calculate the effect
46 | m_overdriveLeft.SetDrive(m_driveMin + (GetParameterAsMagnitude(0) * (m_driveMax - m_driveMin)));
47 | m_audioLeft = m_overdriveLeft.Process(m_audioLeft);
48 |
49 | // Adjust the level
50 | m_audioLeft = m_audioLeft * (m_levelMin + (GetParameterAsMagnitude(1) * (m_levelMax - m_levelMin)));
51 | m_audioRight = m_audioLeft;
52 | }
53 |
54 | void OverdriveModule::ProcessStereo(float inL, float inR)
55 | {
56 | // Calculate the mono effect
57 | ProcessMono(inL);
58 |
59 | // Do the base stereo calculation (which resets the right signal to be the inputR instead of combined mono)
60 | BaseEffectModule::ProcessStereo(m_audioLeft, inR);
61 |
62 | // Calculate the effect
63 | m_overdriveRight.SetDrive(m_driveMin + (GetParameterAsMagnitude(0) * (m_driveMax - m_driveMin)));
64 | m_audioRight = m_overdriveRight.Process(m_audioRight);
65 |
66 | // Adjust the level
67 | m_audioRight = m_audioRight * (m_levelMin + (GetParameterAsMagnitude(1) * (m_levelMax - m_levelMin)));
68 | }
69 |
70 | float OverdriveModule::GetBrightnessForLED(int led_id)
71 | {
72 | float value = BaseEffectModule::GetBrightnessForLED(led_id);
73 |
74 | if (led_id == 1)
75 | {
76 | return value * GetParameterAsMagnitude(0);
77 | }
78 |
79 | return value;
80 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/overdrive_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef OVERDRIVE_MODULE_H
3 | #define OVERDRIVE_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file overdrive_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class OverdriveModule : public BaseEffectModule
18 | {
19 | public:
20 | OverdriveModule();
21 | ~OverdriveModule();
22 |
23 | void Init(float sample_rate) override;
24 | void ProcessMono(float in) override;
25 | void ProcessStereo(float inL, float inR) override;
26 | float GetBrightnessForLED(int led_id) override;
27 |
28 | private:
29 | Overdrive m_overdriveLeft;
30 | Overdrive m_overdriveRight;
31 | float m_driveMin;
32 | float m_driveMax;
33 | float m_levelMin;
34 | float m_levelMax;
35 | };
36 | } // namespace bkshepherd
37 | #endif
38 | #endif
39 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/pluckecho_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef PLUCKEECHO_MODULE_H
3 | #define PLUCKECHO_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | #define NUM_VOICES 32
11 | #define MAX_DELAY ((size_t)(10.0f * 48000.0f))
12 |
13 | /** @file pluckecho_module.h */
14 |
15 |
16 | using namespace daisysp;
17 |
18 | namespace bkshepherd
19 | {
20 |
21 |
22 | class PluckEchoModule : public BaseEffectModule
23 | {
24 | public:
25 | PluckEchoModule();
26 | ~PluckEchoModule();
27 |
28 | void Init(float sample_rate) override;
29 | void ParameterChanged(int parameter_id) override;
30 | void OnNoteOn(float notenumber, float velocity) override;
31 | void OnNoteOff(float notenumber, float velocity) override;
32 | void ProcessMono(float in) override;
33 | void ProcessStereo(float inL, float inR) override;
34 | float GetBrightnessForLED(int led_id) override;
35 |
36 | private:
37 |
38 | // Synthesis
39 | PolyPluck synth;
40 | // 10 second delay line on the external SDRAM
41 | ReverbSc *verb;
42 |
43 | // Persistent filtered Value for smooth delay time changes.
44 | float smooth_time;
45 |
46 | float m_freqMin;
47 | float m_freqMax;
48 | float m_verbMin;
49 | float m_verbMax;
50 | float nn;
51 | float trig;
52 |
53 |
54 | float m_cachedEffectMagnitudeValue;
55 | };
56 | } // namespace bkshepherd
57 | #endif
58 | #endif
59 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/reverb_module.cpp:
--------------------------------------------------------------------------------
1 | #include "reverb_module.h"
2 |
3 | using namespace bkshepherd;
4 |
5 |
6 | static const int s_paramCount = 3;
7 | static const ParameterMetaData s_metaData[s_paramCount] = {{name: "Time", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 57, knobMapping: 0, midiCCMapping: 1},
8 | {name: "Damp", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 40, knobMapping: 1, midiCCMapping: 21},
9 | {name: "Mix", valueType: ParameterValueType::FloatMagnitude, valueBinCount: 0, defaultValue: 57, knobMapping: 2, midiCCMapping: 22}};
10 |
11 | ReverbSc DSY_SDRAM_BSS reverbStereo;
12 | // Default Constructor
13 | ReverbModule::ReverbModule() : BaseEffectModule(),
14 | m_timeMin(0.6f),
15 | m_timeMax(1.0f),
16 | m_lpFreqMin(600.0f),
17 | m_lpFreqMax(16000.0f)
18 |
19 | {
20 | // Set the name of the effect
21 | m_name = "Reverb";
22 |
23 | // Setup the meta data reference for this Effect
24 | m_paramMetaData = s_metaData;
25 |
26 | // Initialize Parameters for this Effect
27 | this->InitParams(s_paramCount);
28 | }
29 |
30 | // Destructor
31 | ReverbModule::~ReverbModule()
32 | {
33 | // No Code Needed
34 | }
35 |
36 | void ReverbModule::Init(float sample_rate)
37 | {
38 | BaseEffectModule::Init(sample_rate);
39 | m_reverbStereo = &reverbStereo;
40 | m_reverbStereo->Init(sample_rate);
41 |
42 | }
43 |
44 | void ReverbModule::ProcessMono(float in)
45 | {
46 | BaseEffectModule::ProcessMono(in);
47 |
48 | float sendl, sendr, wetl, wetr; // Reverb Inputs/Outputs
49 | sendl = m_audioLeft;
50 | sendr = m_audioRight;
51 |
52 | // Calculate the effect
53 | m_reverbStereo->SetFeedback(m_timeMin + GetParameterAsMagnitude(0) * (m_timeMax - m_timeMin));
54 | float invertedFreq = 1.0 - GetParameterAsMagnitude(1); // Invert the damping param so that knob left is less dampening, knob right is more dampening
55 | invertedFreq = invertedFreq * invertedFreq; // also square it for exponential taper (more control over lower frequencies)
56 | m_reverbStereo->SetLpFreq(m_lpFreqMin + invertedFreq * (m_lpFreqMax - m_lpFreqMin));
57 |
58 | m_reverbStereo->Process(sendl, sendr, &wetl, &wetr);
59 | m_audioLeft = wetl * GetParameterAsMagnitude(2) + sendl * (1.0 - GetParameterAsMagnitude(2));
60 | m_audioRight = wetr * GetParameterAsMagnitude(2) + sendr * (1.0 - GetParameterAsMagnitude(2));
61 |
62 | }
63 |
64 | void ReverbModule::ProcessStereo(float inL, float inR)
65 | {
66 | // Do the base stereo calculation (which resets the right signal to be the inputR instead of combined mono)
67 | BaseEffectModule::ProcessStereo(inL, inR);
68 |
69 | float sendl, sendr, wetl, wetr; // Reverb Inputs/Outputs
70 | sendl = m_audioLeft;
71 | sendr = m_audioRight;
72 |
73 | // Calculate the effect
74 | m_reverbStereo->SetFeedback(m_timeMin + GetParameterAsMagnitude(0) * (m_timeMax - m_timeMin));
75 | float invertedFreq = 1.0 - GetParameterAsMagnitude(1); // Invert the damping param so that knob left is less dampening, knob right is more dampening
76 | invertedFreq = invertedFreq * invertedFreq; // also square it for exponential taper (more control over lower frequencies)
77 | m_reverbStereo->SetLpFreq(m_lpFreqMin + invertedFreq * (m_lpFreqMax - m_lpFreqMin));
78 |
79 | m_reverbStereo->Process(sendl, sendr, &wetl, &wetr);
80 | m_audioLeft = wetl * GetParameterAsMagnitude(2) + inL * (1.0 - GetParameterAsMagnitude(2));
81 | m_audioRight = wetr * GetParameterAsMagnitude(2) + inR * (1.0 - GetParameterAsMagnitude(2));
82 | }
83 |
84 | float ReverbModule::GetBrightnessForLED(int led_id)
85 | {
86 | float value = BaseEffectModule::GetBrightnessForLED(led_id);
87 |
88 | if (led_id == 1)
89 | {
90 | return value; // * GetParameterAsMagnitude(0);
91 | }
92 |
93 | return value;
94 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/reverb_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef REVERB_MODULE_H
3 | #define REVERB_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file reverb_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class ReverbModule : public BaseEffectModule
18 | {
19 | public:
20 | ReverbModule();
21 | ~ReverbModule();
22 |
23 | void Init(float sample_rate) override;
24 | void ProcessMono(float in) override;
25 | void ProcessStereo(float inL, float inR) override;
26 | float GetBrightnessForLED(int led_id) override;
27 |
28 | private:
29 | ReverbSc *m_reverbStereo;
30 | float m_timeMin;
31 | float m_timeMax;
32 | float m_lpFreqMin;
33 | float m_lpFreqMax;
34 | };
35 | } // namespace bkshepherd
36 | #endif
37 | #endif
38 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/scope_module.cpp:
--------------------------------------------------------------------------------
1 | #include "scope_module.h"
2 | #include "../Util/audio_utilities.h"
3 |
4 | using namespace bkshepherd;
5 |
6 | static const ParameterMetaData s_metaData[0] = {};
7 |
8 | // Default Constructor
9 | ScopeModule::ScopeModule() : BaseEffectModule()
10 | {
11 | // Set the name of the effect
12 | m_name = "Scope";
13 |
14 | // Setup the meta data reference for this Effect
15 | m_paramMetaData = s_metaData;
16 |
17 | // Initialize Parameters for this Effect
18 | this->InitParams(0);
19 | }
20 |
21 | // Destructor
22 | ScopeModule::~ScopeModule()
23 | {
24 | // No Code Needed
25 | }
26 |
27 | void ScopeModule::Init(float sample_rate)
28 | {
29 | BaseEffectModule::Init(sample_rate);
30 |
31 | m_bufferIndex = 0;
32 | for (uint16_t i = 0; i < ScreenWidth; i++) {
33 | m_scopeBuffer[i] = 0;
34 | }
35 | }
36 |
37 | void ScopeModule::ProcessMono(float in)
38 | {
39 | BaseEffectModule::ProcessMono(in);
40 |
41 | m_scopeBuffer[m_bufferIndex] = in;
42 | if (++m_bufferIndex >= ScreenWidth)
43 | m_bufferIndex = 0;
44 |
45 | m_audioRight = m_audioLeft = in;
46 | }
47 |
48 | void ScopeModule::ProcessStereo(float inL, float inR)
49 | {
50 | BaseEffectModule::ProcessStereo(inL, inR);
51 |
52 | m_scopeBuffer[m_bufferIndex] = (inL + inR) / 2.0f;
53 | if (++m_bufferIndex >= ScreenWidth)
54 | m_bufferIndex = 0;
55 |
56 | m_audioLeft = inL;
57 | m_audioRight = inR;
58 | }
59 |
60 | void ScopeModule::DrawUI(OneBitGraphicsDisplay &display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing)
61 | {
62 | BaseEffectModule::DrawUI(display, currentIndex, numItemsTotal, boundsToDrawIn, isEditing);
63 | uint16_t center = boundsToDrawIn.GetHeight() / 2;
64 |
65 | for (uint16_t i = 0; i < ScreenWidth; i++) {
66 | display.DrawPixel(i, m_scopeBuffer[i] * center + center, true);
67 | }
68 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/scope_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef SCOPE_MODULE_H
3 | #define SCOPE_MODULE_H
4 |
5 | #include "daisysp.h"
6 | #include "base_effect_module.h"
7 | #include
8 | #ifdef __cplusplus
9 |
10 | /** @file scope_module.h */
11 |
12 | using namespace daisysp;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | const uint16_t ScreenWidth = 128;
18 |
19 | class ScopeModule : public BaseEffectModule
20 | {
21 | public:
22 | ScopeModule();
23 | ~ScopeModule();
24 |
25 | void Init(float sample_rate) override;
26 | void ProcessMono(float in) override;
27 | void ProcessStereo(float inL, float inR) override;
28 | void DrawUI(OneBitGraphicsDisplay &display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing) override;
29 |
30 | private:
31 | float m_scopeBuffer[ScreenWidth];
32 | uint16_t m_bufferIndex;
33 | };
34 | } // namespace bkshepherd
35 | #endif
36 | #endif
37 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Effect-Modules/string_keys_module.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef STRING_KEYS_MODULE_H
3 | #define STRING_KEYS_MODULE_H
4 |
5 | #include
6 | #include "daisysp.h"
7 | #include "base_effect_module.h"
8 | #ifdef __cplusplus
9 |
10 | /** @file modal_keys_module.h */
11 | // Implements DaisySP StringVoice class
12 |
13 |
14 | using namespace daisysp;
15 |
16 | namespace bkshepherd
17 | {
18 |
19 |
20 | class StringKeysModule : public BaseEffectModule
21 | {
22 | public:
23 | StringKeysModule();
24 | ~StringKeysModule();
25 |
26 | void Init(float sample_rate) override;
27 | void ParameterChanged(int parameter_id) override;
28 | void OnNoteOn(float notenumber, float velocity) override;
29 | void OnNoteOff(float notenumber, float velocity) override;
30 | void ProcessMono(float in) override;
31 | void ProcessStereo(float inL, float inR) override;
32 | float GetBrightnessForLED(int led_id) override;
33 |
34 | private:
35 |
36 | StringVoice modalvoice;
37 | ReverbSc verb;
38 |
39 | float m_freqMin;
40 | float m_freqMax;
41 | float m_verbMin;
42 | float m_verbMax;
43 |
44 |
45 | float m_cachedEffectMagnitudeValue;
46 | };
47 | } // namespace bkshepherd
48 | #endif
49 | #endif
50 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_125b.cpp:
--------------------------------------------------------------------------------
1 | #include "guitar_pedal_125b.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_switchParamCount = 2;
6 | static const PreferredSwitchMetaData s_switchMetaData[s_switchParamCount] = {{sfType: SpecialFunctionType::Bypass, switchMapping: 0},
7 | {sfType: SpecialFunctionType::TapTempo, switchMapping: 1}};
8 |
9 | GuitarPedal125B::GuitarPedal125B() : BaseHardwareModule()
10 | {
11 | // Setup the Switch Meta Data for this hardware
12 | m_switchMetaDataParamCount = s_switchParamCount;
13 | m_switchMetaData = s_switchMetaData;
14 | }
15 |
16 | GuitarPedal125B::~GuitarPedal125B()
17 | {
18 |
19 | }
20 |
21 | void GuitarPedal125B::Init(bool boost)
22 | {
23 | BaseHardwareModule::Init(boost);
24 |
25 | m_supportsStereo = true;
26 |
27 | Pin knobPins[] = {seed::D15, seed::D16, seed::D17, seed::D18, seed::D19, seed::D20};
28 | InitKnobs(6, knobPins);
29 |
30 | Pin switchPins[] = {seed::D6, seed::D5};
31 | InitSwitches(2, switchPins);
32 |
33 | Pin encoderPins[][3] = {{seed::D3, seed::D2, seed::D4}};
34 | InitEncoders(1, encoderPins);
35 |
36 | Pin ledPins[] = {seed::D22, seed::D23};
37 | InitLeds(2, ledPins);
38 |
39 | InitMidi(seed::D30, seed::D29);
40 | InitDisplay(seed::D9, seed::D11);
41 | InitTrueBypass(seed::D1, seed::D12);
42 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_125b.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef GUITAR_PEDAL_125B_H
3 | #define GUITAR_PEDAL_125B_H /**< & */
4 |
5 | #include "base_hardware_module.h"
6 |
7 | #ifdef __cplusplus
8 |
9 | /** @file guitar_pedal_125b.h */
10 |
11 | using namespace daisy;
12 |
13 | namespace bkshepherd {
14 |
15 | /**
16 | @brief Helpers and hardware definitions for a 125B sized Guitar Pedal based on the Daisy Seed.
17 | */
18 | class GuitarPedal125B : public BaseHardwareModule
19 | {
20 | public:
21 | GuitarPedal125B();
22 | ~GuitarPedal125B();
23 | void Init(bool boost = false) override;
24 | };
25 | } // namespace bkshepherd
26 | #endif
27 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_1590b-SMD.cpp:
--------------------------------------------------------------------------------
1 | #include "guitar_pedal_1590b-SMD.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_switchParamCount = 2;
6 | static const PreferredSwitchMetaData s_switchMetaData[s_switchParamCount] = {{sfType: SpecialFunctionType::Bypass, switchMapping: 0},
7 | {sfType: SpecialFunctionType::TapTempo, switchMapping: 1}};
8 |
9 | GuitarPedal1590BSMD::GuitarPedal1590BSMD() : BaseHardwareModule()
10 | {
11 | // Setup the Switch Meta Data for this hardware
12 | m_switchMetaDataParamCount = s_switchParamCount;
13 | m_switchMetaData = s_switchMetaData;
14 | }
15 |
16 | GuitarPedal1590BSMD::~GuitarPedal1590BSMD()
17 | {
18 |
19 | }
20 |
21 | void GuitarPedal1590BSMD::Init(bool boost)
22 | {
23 | BaseHardwareModule::Init(boost);
24 |
25 | m_supportsStereo = true;
26 |
27 | Pin knobPins[] = {seed::D15, seed::D16, seed::D17, seed::D18};
28 | InitKnobs(4, knobPins);
29 |
30 | Pin switchPins[] = {seed::D6, seed::D5};
31 | InitSwitches(2, switchPins);
32 |
33 | Pin ledPins[] = {seed::D22, seed::D23};
34 | InitLeds(2, ledPins);
35 |
36 | InitMidi(seed::D30, seed::D29);
37 | InitTrueBypass(seed::D1, seed::D12);
38 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_1590b-SMD.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef GUITAR_PEDAL_1590BSMD_H
3 | #define GUITAR_PEDAL_1590BSMD_H /**< & */
4 |
5 | #include "base_hardware_module.h"
6 |
7 | #ifdef __cplusplus
8 |
9 | /** @file guitar_pedal_1590b-SMD.h */
10 |
11 | using namespace daisy;
12 |
13 | namespace bkshepherd {
14 |
15 | /**
16 | @brief Helpers and hardware definitions for the SMD version of my 1590B sized Guitar Pedal based on the Daisy Seed.
17 | */
18 | class GuitarPedal1590BSMD : public BaseHardwareModule
19 | {
20 | public:
21 | GuitarPedal1590BSMD();
22 | ~GuitarPedal1590BSMD();
23 | void Init(bool boost = false) override;
24 | };
25 | } // namespace bkshepherd
26 | #endif
27 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_1590b.cpp:
--------------------------------------------------------------------------------
1 | #include "guitar_pedal_1590b.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_switchParamCount = 2;
6 | static const PreferredSwitchMetaData s_switchMetaData[s_switchParamCount] = {{sfType: SpecialFunctionType::Bypass, switchMapping: 0},
7 | {sfType: SpecialFunctionType::TapTempo, switchMapping: 1}};
8 |
9 | GuitarPedal1590B::GuitarPedal1590B() : BaseHardwareModule()
10 | {
11 | // Setup the Switch Meta Data for this hardware
12 | m_switchMetaDataParamCount = s_switchParamCount;
13 | m_switchMetaData = s_switchMetaData;
14 | }
15 |
16 | GuitarPedal1590B::~GuitarPedal1590B()
17 | {
18 |
19 | }
20 |
21 | void GuitarPedal1590B::Init(bool boost)
22 | {
23 | BaseHardwareModule::Init(boost);
24 |
25 | m_supportsStereo = true;
26 |
27 | Pin knobPins[] = {seed::D15, seed::D16, seed::D17, seed::D18};
28 | InitKnobs(4, knobPins);
29 |
30 | Pin switchPins[] = {seed::D6, seed::D5};
31 | InitSwitches(2, switchPins);
32 |
33 | Pin ledPins[] = {seed::D22, seed::D23};
34 | InitLeds(2, ledPins);
35 |
36 | InitMidi(seed::D30, seed::D29);
37 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_1590b.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef GUITAR_PEDAL_1590B_H
3 | #define GUITAR_PEDAL_1590B_H /**< & */
4 |
5 | #include "base_hardware_module.h"
6 |
7 | #ifdef __cplusplus
8 |
9 | /** @file guitar_pedal_1590b.h */
10 |
11 | using namespace daisy;
12 |
13 | namespace bkshepherd {
14 |
15 | /**
16 | @brief Helpers and hardware definitions for a 1590B sized Guitar Pedal based on the Daisy Seed.
17 | */
18 | class GuitarPedal1590B : public BaseHardwareModule
19 | {
20 | public:
21 | GuitarPedal1590B();
22 | ~GuitarPedal1590B();
23 | void Init(bool boost = false) override;
24 | };
25 | } // namespace bkshepherd
26 | #endif
27 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_terrarium.cpp:
--------------------------------------------------------------------------------
1 | #include "guitar_pedal_terrarium.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | static const int s_switchParamCount = 2;
6 | static const PreferredSwitchMetaData s_switchMetaData[s_switchParamCount] = {{sfType: SpecialFunctionType::Bypass, switchMapping: 0},
7 | {sfType: SpecialFunctionType::TapTempo, switchMapping: 1}};
8 |
9 | GuitarPedalTerrarium::GuitarPedalTerrarium() : BaseHardwareModule()
10 | {
11 | // Setup the Switch Meta Data for this hardware
12 | m_switchMetaDataParamCount = s_switchParamCount;
13 | m_switchMetaData = s_switchMetaData;
14 | }
15 |
16 | GuitarPedalTerrarium::~GuitarPedalTerrarium()
17 | {
18 |
19 | }
20 |
21 | void GuitarPedalTerrarium::Init(bool boost)
22 | {
23 | BaseHardwareModule::Init(boost);
24 |
25 | Pin knobPins[] = {seed::D16, seed::D17, seed::D18, seed::D19, seed::D20, seed::D21};
26 | InitKnobs(6, knobPins);
27 |
28 | Pin switchPins[] = {seed::D26, seed::D25, seed::D10, seed::D9, seed::D8, seed::D7};
29 | InitSwitches(6, switchPins);
30 |
31 | Pin ledPins[] = {seed::D23, seed::D22};
32 | InitLeds(2, ledPins);
33 | }
34 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Hardware-Modules/guitar_pedal_terrarium.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef GUITAR_PEDAL_TERRARIUM_H
3 | #define GUITAR_PEDAL_TERRARIUM_H /**< & */
4 |
5 | #include "base_hardware_module.h"
6 |
7 | #ifdef __cplusplus
8 |
9 | /** @file guitar_pedal_terrarium.h */
10 |
11 | using namespace daisy;
12 |
13 | namespace bkshepherd {
14 |
15 | /**
16 | @brief Helpers and hardware definitions for a 1590B sized Guitar Pedal based on the Daisy Seed.
17 | */
18 | class GuitarPedalTerrarium : public BaseHardwareModule
19 | {
20 | public:
21 | GuitarPedalTerrarium();
22 | ~GuitarPedalTerrarium();
23 | void Init(bool boost = false) override;
24 | };
25 | } // namespace bkshepherd
26 | #endif
27 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/Makefile:
--------------------------------------------------------------------------------
1 | # Project Name
2 | TARGET = guitarpedal
3 |
4 | #APP_TYPE = BOOT_SRAM
5 |
6 | # Sources
7 | CPP_SOURCES = guitar_pedal.cpp guitar_pedal_storage.cpp $(wildcard */*.cpp) Effect-Modules/Chopper/chopper.cpp Effect-Modules/ImpulseResponse/ImpulseResponse.cpp Effect-Modules/ImpulseResponse/dsp.cpp
8 |
9 | # Compiler options
10 | #OPT = -O1
11 | OPT=-Os
12 |
13 | # Boot options
14 | APP_TYPE = BOOT_SRAM
15 |
16 | OPT=-Os
17 |
18 | # Library Locations
19 | DAISYSP_DIR ?= DaisySP
20 | LIBDAISY_DIR ?= libDaisy
21 | CLOUDSEED_DIR = Effect-Modules/CloudSeed
22 |
23 | C_INCLUDES += \
24 | -Ieurorack \
25 |
26 | # Core location, and generic Makefile.
27 | SYSTEM_FILES_DIR = $(LIBDAISY_DIR)/core
28 | include $(SYSTEM_FILES_DIR)/Makefile
29 |
30 | C_INCLUDES += -Ieigen
31 | C_INCLUDES += -IRTNeural
32 | CPPFLAGS += -DRTNEURAL_DEFAULT_ALIGNMENT=8 -DRTNEURAL_NO_DEBUG=1
33 |
34 | C_INCLUDES += \
35 | -IEffect-Modules/CloudSeed \
36 |
37 | LIBS += -lcloudseed
38 | LIBDIR += -LEffect-Modules/CloudSeed/build
--------------------------------------------------------------------------------
/Software/GuitarPedal/UI/CustomMappedValues.cpp:
--------------------------------------------------------------------------------
1 | #include "CustomMappedValues.h"
2 | #include
3 | #include
4 |
5 | namespace daisy
6 | {
7 | // ==========================================================================
8 |
9 | // ==========================================================================
10 |
11 | MyMappedFloatValue::MyMappedFloatValue(float min,
12 | float max,
13 | float defaultValue,
14 | Mapping mapping,
15 | const char* unitStr,
16 | uint8_t numDecimals,
17 | bool forceSign,
18 | float coarseStepSize0to1_,
19 | float fineStepSize0to1_ )
20 | : value_(defaultValue),
21 | min_(min),
22 | max_(max),
23 | default_(defaultValue),
24 | mapping_(mapping),
25 | unitStr_(unitStr),
26 | numDecimals_(numDecimals),
27 | forceSign_(forceSign),
28 | coarseStepSize0to1_(coarseStepSize0to1_),
29 | fineStepSize0to1_(fineStepSize0to1_)
30 | {
31 | }
32 |
33 | void MyMappedFloatValue::Set(float newValue)
34 | {
35 | value_ = std::max(min_, std::min(max_, newValue));
36 | }
37 |
38 | void MyMappedFloatValue::AppentToString(FixedCapStrBase& string) const
39 | {
40 | string.AppendFloat(value_, numDecimals_, false, forceSign_);
41 | string.Append(unitStr_);
42 | }
43 |
44 | void MyMappedFloatValue::ResetToDefault()
45 | {
46 | value_ = default_;
47 | }
48 |
49 | float MyMappedFloatValue::GetAs0to1() const
50 | {
51 | switch(mapping_)
52 | {
53 | case Mapping::lin: return (value_ - min_) / (max_ - min_);
54 | case Mapping::log:
55 | {
56 | const float a = 1.0f / (log10f(max_ / min_));
57 | return std::max(0.0f, std::min(1.0f, a * log10f(value_ / min_)));
58 | }
59 | case Mapping::pow2:
60 | {
61 | const float valueSq = (value_ - min_) / (max_ - min_);
62 | return std::max(0.0f, std::min(1.0f, sqrtf(valueSq)));
63 | }
64 | default: return 0.0f;
65 | }
66 | }
67 |
68 | void MyMappedFloatValue::SetFrom0to1(float normalizedValue0to1)
69 | {
70 | float v;
71 | switch(mapping_)
72 | {
73 | case Mapping::lin:
74 | v = normalizedValue0to1 * (max_ - min_) + min_;
75 | break;
76 | case Mapping::log:
77 | {
78 | const float a = 1.0f / log10f(max_ / min_);
79 | v = min_ * powf(10, normalizedValue0to1 / a);
80 | }
81 | break;
82 | case Mapping::pow2:
83 | {
84 | const float valueSq = normalizedValue0to1 * normalizedValue0to1;
85 | v = min_ + valueSq * (max_ - min_);
86 | }
87 | break;
88 | default: value_ = 0.0f; return;
89 | }
90 | value_ = std::max(min_, std::min(max_, v));
91 | }
92 |
93 | void MyMappedFloatValue::Step(int16_t numSteps, bool useCoarseStepSize)
94 | {
95 | const auto mapped = GetAs0to1();
96 | const auto step
97 | = numSteps
98 | * (useCoarseStepSize ? coarseStepSize0to1_ : fineStepSize0to1_);
99 | SetFrom0to1(std::max(0.0f, std::min(mapped + step, 1.0f)));
100 | }
101 |
102 | } // namespace daisy
103 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/UI/CustomMappedValues.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include "daisysp.h"
5 | #include "daisy.h"
6 |
7 | namespace daisy
8 | {
9 |
10 | /** @brief An override of `MappedValue` that maps a float value using various mapping functions, but gives the end user the flexibilty to change the step size.
11 | * @author jelliesen, modified by achijos
12 | * @addtogroup utility
13 | */
14 | class MyMappedFloatValue : public MappedValue
15 | {
16 | public:
17 | /** The availablke mapping functions */
18 | enum class Mapping
19 | {
20 | /** The value is mapped linearly between min and max. */
21 | lin,
22 | /** The value is mapped logarithmically. Note that the valid
23 | * values must be strictly larger than zero, so: min > 0, max > 0
24 | */
25 | log,
26 | /** The value is mapped with a square law */
27 | pow2
28 | };
29 |
30 | /** Creates a MyMappedFloatValue.
31 | * @param min The lower end of the range of possible values
32 | * @param max The upper end of the range of possible values
33 | * @param defaultValue The default value
34 | * @param mapping The `Mapping` to use. Note that for `Mapping::log`
35 | * `min`, `max` and ``defaultValue` must be > 0
36 | * @param unitStr A string for the unit, e.g. "Hz"
37 | * @param numDecimals Controls the number of decimals in `AppendToString()`
38 | * @param forceSign Controls whether `AppendToString()` always prints the sign,
39 | * even for positive numbers
40 | */
41 | MyMappedFloatValue(float min,
42 | float max,
43 | float defaultValue,
44 | Mapping mapping = Mapping::lin,
45 | const char* unitStr = "",
46 | uint8_t numDecimals = 1,
47 | bool forceSign = false,
48 | float coarseStepSize0to1_ = 0.05f,
49 | float fineStepSize0to1_ = 0.01f
50 | );
51 |
52 | ~MyMappedFloatValue() override {}
53 |
54 | /** Returns the current value. */
55 | float Get() const { return value_; }
56 |
57 | /** Returns a const pointer to the current value. */
58 | const float* GetPtr() const { return &value_; }
59 |
60 | /** Sets the value, clamping it to the valid range. */
61 | void Set(float newValue);
62 |
63 | /** Returns the current value. */
64 | operator float() const { return value_; }
65 |
66 | /** Sets the value, clamping it to the valid range. */
67 | MyMappedFloatValue& operator=(float val)
68 | {
69 | Set(val);
70 | return *this;
71 | }
72 |
73 | // inherited form MappedValue
74 | void AppentToString(FixedCapStrBase& string) const override;
75 |
76 | // inherited form MappedValue
77 | void ResetToDefault() override;
78 |
79 | // inherited form MappedValue
80 | float GetAs0to1() const override;
81 |
82 | // inherited form MappedValue
83 | void SetFrom0to1(float normalizedValue0to1) override;
84 |
85 | /** Steps the 0..1 normalized representation of the value up or down
86 | * in 1% or 5% steps.
87 | */
88 | void Step(int16_t numStepsUp, bool useCoarseStepSize) override;
89 |
90 | void SetCoarseStepSize(float f) { coarseStepSize0to1_ = f;}
91 |
92 | void SetFineStepSize(float f) { fineStepSize0to1_ = f;}
93 |
94 | private:
95 | float value_;
96 | const float min_;
97 | const float max_;
98 | const float default_;
99 | Mapping mapping_;
100 | const char* unitStr_;
101 | const uint8_t numDecimals_;
102 | const bool forceSign_;
103 | float coarseStepSize0to1_ = 0.05f;
104 | float fineStepSize0to1_ = 0.01f;
105 | };
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/UI/effect_module_menu_item.cpp:
--------------------------------------------------------------------------------
1 | #include "effect_module_menu_item.h"
2 |
3 | using namespace bkshepherd;
4 |
5 | // Default Constructor
6 | EffectModuleMenuItem::EffectModuleMenuItem() : m_parentUI(NULL),
7 | m_effectSettingsPage(NULL),
8 | m_effectModule(NULL),
9 | m_isSavingData(false)
10 |
11 | {
12 |
13 | }
14 |
15 | // Destructor
16 | EffectModuleMenuItem::~EffectModuleMenuItem()
17 | {
18 |
19 | }
20 |
21 | void EffectModuleMenuItem::SetActiveEffectSettingsPage(UI *parentUI, UiPage *page)
22 | {
23 | m_parentUI = parentUI;
24 | m_effectSettingsPage = page;
25 | }
26 |
27 | void EffectModuleMenuItem::SetActiveEffectModule(BaseEffectModule *effectModule)
28 | {
29 | m_effectModule = effectModule;
30 | }
31 |
32 | void EffectModuleMenuItem::SetIsSavingData(bool isSavingData)
33 | {
34 | m_isSavingData = isSavingData;
35 | }
36 |
37 | bool EffectModuleMenuItem::CanBeEnteredForEditing() const
38 | {
39 | return false;
40 | }
41 |
42 | void EffectModuleMenuItem::ModifyValue(int16_t increments, uint16_t stepsPerRevolution, bool isFunctionButtonPressed)
43 | {
44 |
45 | }
46 |
47 | void EffectModuleMenuItem::ModifyValue(float valueSliderPosition0To1, bool isFunctionButtonPressed)
48 | {
49 |
50 | }
51 |
52 | void EffectModuleMenuItem::OnOkayButton()
53 | {
54 | // Default Behavior is to open the effect settings page when the encoder button is pressed
55 | if (m_parentUI != NULL && m_effectSettingsPage != NULL)
56 | {
57 | m_parentUI->OpenPage(*m_effectSettingsPage);
58 | }
59 | }
60 |
61 | void EffectModuleMenuItem::UpdateUI(float elapsedTime)
62 | {
63 | if (m_effectModule != NULL)
64 | {
65 | m_effectModule->UpdateUI(elapsedTime);
66 | }
67 | }
68 |
69 | void EffectModuleMenuItem::Draw(OneBitGraphicsDisplay& display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing)
70 | {
71 | // If there is nothing to draw fill in some basic information.
72 | if (m_effectModule == NULL)
73 | {
74 | display.WriteStringAligned("Daisy Guitar Pedal", Font_7x10, boundsToDrawIn, Alignment::topCentered, true);
75 | display.WriteStringAligned("Made by", Font_7x10, boundsToDrawIn, Alignment::centered, true);
76 | display.WriteStringAligned("Keith Shepherd", Font_7x10, boundsToDrawIn, Alignment::bottomCentered, true);
77 |
78 | return;
79 | }
80 |
81 | // Handle Indicating that data is saving
82 | if (m_isSavingData)
83 | {
84 | display.WriteStringAligned("Saving...", Font_11x18, boundsToDrawIn, Alignment::centered, true);
85 | return;
86 | }
87 |
88 | // Let the Effect Module Handle any custom drawing (currently has the full screen to work with)
89 | m_effectModule->DrawUI(display, currentIndex, numItemsTotal, boundsToDrawIn, isEditing);
90 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/UI/effect_module_menu_item.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef EFFECT_MODULE_MENU_ITEM_H
3 | #define EFFECT_MODULE_MENU_ITEM_H
4 |
5 | #include "daisy_seed.h"
6 | #include "../Effect-Modules/base_effect_module.h"
7 |
8 | using namespace daisy;
9 |
10 | namespace bkshepherd
11 | {
12 |
13 | class EffectModuleMenuItem : public daisy::AbstractMenu::CustomItem
14 | {
15 | public:
16 | EffectModuleMenuItem();
17 | virtual ~EffectModuleMenuItem();
18 |
19 | /** Sets the Active Effect Settings UI Page
20 | * @param parentUI A pointer to the parent UI
21 | * @param page A pointer to the UI Page
22 | */
23 | void SetActiveEffectSettingsPage(UI *parentUI, UiPage *page);
24 |
25 | /** Sets the Active Effect Module
26 | * @param effectModule A pointer to the effect module
27 | */
28 | void SetActiveEffectModule(BaseEffectModule *effectModule);
29 |
30 | /** Sets the flag to indicate the module is saving data
31 | * @param isSavingData a boolean value to indicate saving data
32 | */
33 | void SetIsSavingData(bool isSavingData);
34 |
35 | /** Returns true, if this item can be entered for direct editing of the value. */
36 | bool CanBeEnteredForEditing() const override;
37 |
38 | /** Called when the encoder of the buttons are used to modify the value. */
39 | void ModifyValue(int16_t increments, uint16_t stepsPerRevolution, bool isFunctionButtonPressed) override;
40 |
41 | /** Called when the value slider is used to modify the value. */
42 | void ModifyValue(float valueSliderPosition0To1, bool isFunctionButtonPressed) override;
43 |
44 | /** Called when the okay button is pressed (and CanBeEnteredForEditing() returns false). */
45 | void OnOkayButton() override;
46 |
47 | /** Handles updating the custom UI for this Effect.
48 | * @param elapsedTime a float value of how much time (in seconds) has elapsed since the last update
49 | */
50 | void UpdateUI(float elapsedTime);
51 |
52 | /** Draws the item to a OneBitGraphicsDisplay.
53 | * @param display The display to draw to
54 | * @param currentIndex The index in the menu
55 | * @param numItemsTotal The total number of items in the menu
56 | * @param boundsToDrawIn The Rectangle to draw the item into
57 | * @param isEditing True if the enter button was pressed and the value is being edited directly.
58 | */
59 | void Draw(OneBitGraphicsDisplay& display,
60 | int currentIndex,
61 | int numItemsTotal,
62 | Rectangle boundsToDrawIn,
63 | bool isEditing) override;
64 |
65 | private:
66 | UI* m_parentUI;
67 | UiPage* m_effectSettingsPage;
68 | BaseEffectModule *m_effectModule;
69 | bool m_isSavingData;
70 | };
71 | } // namespace bkshepherd
72 | #endif
73 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/UI/guitar_pedal_ui.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef GUITAR_PEDAL_UI_H
3 | #define GUITAR_PEDAL_UI_H
4 |
5 | #include "daisy_seed.h"
6 | #include "effect_module_menu_item.h"
7 | #include "CustomMappedValues.h"
8 | using namespace daisy;
9 |
10 | const int kNumMainMenuItems = 3;
11 | const int kNumGlobalSettingsMenuItems = 7;
12 | const int kNumPresetSettingsItems = 3;
13 |
14 | namespace bkshepherd
15 | {
16 |
17 | class GuitarPedalUI
18 | {
19 | public:
20 | GuitarPedalUI();
21 | virtual ~GuitarPedalUI();
22 |
23 | void Init();
24 |
25 | /** Handle updating the Active Effect Module based on the ID */
26 | void UpdateActiveEffect(int effectID);
27 |
28 | /** Handle updating a Parameter Value for the Active Effect Module based on the ID */
29 | void UpdateActiveEffectParameterValue(int paramID, bool showChangeOnDisplay = false);
30 |
31 | /** Handle updating all Parameter Values for the Active Effect Module */
32 | void UpdateActiveEffectParameterValues();
33 |
34 | /** Handle Showing the Saving Settings Screen */
35 | void ShowSavingSettingsScreen();
36 |
37 | /** Query the UI to see if the Saving Settings Screen is showing
38 | \return True if the Savings Setting Screen is showing, False otherwise.
39 | */
40 | bool IsShowingSavingSettingsScreen();
41 |
42 | /** Gets the ID of the Active Effect from the Settings Menu
43 | \return the ID of the Active Effect
44 | */
45 | int GetActiveEffectIDFromSettingsMenu();
46 |
47 | /** Generates the Appropriate UI Events */
48 | void GenerateUIEvents();
49 |
50 | /** Handles updating the custom UI for this Effect.
51 | * @param elapsedTime a float value of how much time (in seconds) has elapsed since the last update
52 | */
53 | void UpdateUI(float elapsedTime);
54 |
55 | private:
56 | void InitUi();
57 | void InitEffectUiPages();
58 | void InitGlobalSettingsUIPages();
59 |
60 | UI m_ui;
61 | FullScreenItemMenu m_mainMenu;
62 | FullScreenItemMenu m_activeEffectSettingsMenu;
63 | FullScreenItemMenu m_globalSettingsMenu;
64 | FullScreenItemMenu m_presetsMenu;
65 | UiEventQueue m_eventQueue;
66 |
67 | bool m_needToCloseActiveEffectSettingsMenu;
68 | float m_secondsTilReturnFromParamChange;
69 | int m_paramIdToReturnTo;
70 |
71 | AbstractMenu::ItemConfig m_mainMenuItems[kNumMainMenuItems];
72 | AbstractMenu::ItemConfig m_globalSettingsMenuItems[kNumGlobalSettingsMenuItems];
73 | AbstractMenu::ItemConfig m_presetsMenuItems[kNumPresetSettingsItems];
74 | int m_numActiveEffectSettingsItems;
75 | uint32_t m_activePresetSelected;
76 | AbstractMenu::ItemConfig *m_activeEffectSettingsMenuItems;
77 | EffectModuleMenuItem m_effectModuleMenuItem;
78 |
79 | const char** m_availableEffectNames;
80 | MappedStringListValue *m_availableEffectListMappedValues;
81 | MappedIntValue **m_activeEffectSettingIntValues;
82 | MappedIntValue m_activePresetSettingIntValue;
83 | MappedStringListValue **m_activeEffectSettingStringValues;
84 | MyMappedFloatValue **m_activeEffectSettingFloatValues;
85 | bool *m_activeEffectSettingBoolValues;
86 | MappedIntValue m_midiChannelSettingValue;
87 |
88 | bool m_displayingSaveSettingsNotification;
89 | float m_secondsSinceLastActiveEffectSettingsSave;
90 | };
91 | } // namespace bkshepherd
92 | #endif
93 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/Util/audio_utilities.cpp:
--------------------------------------------------------------------------------
1 | #include "audio_utilities.h"
2 |
3 | float tempo_to_freq(uint32_t tempo)
4 | {
5 | return tempo / 60.0f;
6 | }
7 |
8 | uint32_t freq_to_tempo(float freq)
9 | {
10 | return freq * 60.0f;
11 | }
12 |
13 | uint32_t ms_to_tempo(uint32_t ms)
14 | {
15 | return 60000 / ms;
16 | }
17 |
18 | uint32_t s_to_tempo(float seconds)
19 | {
20 | return 60 / seconds;
21 | }
--------------------------------------------------------------------------------
/Software/GuitarPedal/Util/audio_utilities.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef AUDIO_UTILITIES_H
3 | #define AUDIO_UTILITIES_H
4 |
5 | /** Converts Tempo to Frequency
6 | \param tempo the Tempo in Beats Per Minute (BPM)
7 | \return the Frequency as floating point value measure of cycles per second.
8 | */
9 | float tempo_to_freq(uint32_t tempo);
10 |
11 | /** Converts Frequency to Tempo
12 | \param freq the Frequency as a floating point value measure of cycle per second.
13 | \return the Tempo as uint32_t value measure of Beats Per Minute (BPM)
14 | */
15 | uint32_t freq_to_tempo(float freq);
16 |
17 | /** Converts Time per Beat (ms) in to Tempo in Beats Per Minute (BPM)
18 | \param ms the time per beat in ms
19 | \return the Tempo as integer value measure of Beats Per Minute (BPM)
20 | */
21 | uint32_t ms_to_tempo(uint32_t ms);
22 |
23 | /** Converts Time per Beat (s) in to Tempo in Beats Per Minute (BPM)
24 | \param seconds time per beat in seconds
25 | \return the Tempo as integer value measure of Beats Per Minute (BPM)
26 | */
27 | uint32_t s_to_tempo(float seconds);
28 |
29 | #endif
--------------------------------------------------------------------------------
/Software/GuitarPedal/guitar_pedal_storage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #ifndef GUITAR_PEDAL_STORAGE_H
3 | #define GUITAR_PEDAL_STORAGE_H
4 |
5 | // Peristant Storage Settings
6 | #define SETTINGS_FILE_FORMAT_VERSION 2
7 |
8 | // Absolute maximum on current system, arbitrarily limiting this to 64KB
9 | #define SETTINGS_ABSOLUTE_MAX_PARAM_COUNT 16000
10 | #define ERR_VALUE_MAX 0xffffffff
11 | // Save System Variables
12 | struct Settings
13 | {
14 | int fileFormatVersion;
15 | int globalActiveEffectID;
16 | bool globalMidiEnabled;
17 | bool globalMidiThrough;
18 | int globalMidiChannel;
19 | bool globalRelayBypassEnabled;
20 | bool globalSplitMonoInputToStereo;
21 | uint32_t *globalEffectsSettings; // Set aside a block of memory for individual effect params
22 |
23 | bool operator==(const Settings &rhs)
24 | {
25 | if (fileFormatVersion != rhs.fileFormatVersion
26 | || globalActiveEffectID != rhs.globalActiveEffectID
27 | || globalMidiEnabled != rhs.globalMidiEnabled
28 | || globalMidiThrough != rhs.globalMidiThrough
29 | || globalMidiChannel != rhs.globalMidiChannel
30 | || globalRelayBypassEnabled != rhs.globalRelayBypassEnabled
31 | || globalSplitMonoInputToStereo != rhs.globalSplitMonoInputToStereo)
32 | {
33 | return false;
34 | }
35 |
36 | for (uint32_t i = 0; i < globalEffectsSettings[0]; i++)
37 | {
38 | if (globalEffectsSettings[i] != rhs.globalEffectsSettings[i])
39 | {
40 | return false;
41 | }
42 | }
43 |
44 | return true;
45 | }
46 |
47 | bool operator!=(const Settings &rhs)
48 | {
49 | return !operator==(rhs);
50 | }
51 | };
52 |
53 | void InitPersistantStorage();
54 | void LoadEffectSettingsFromPersistantStorage();
55 | void SaveEffectSettingsToPersitantStorageForEffectID(int effectID, uint32_t presetID);
56 | uint32_t GetSettingsParameterValueForEffect(int effectID, int paramID);
57 | void SetSettingsParameterValueForEffect(int effectID, int paramID, uint32_t paramValue, uint32_t startIdx);
58 | void LoadPresetFromPersistentStorage(uint32_t effectID, uint32_t presetID);
59 | void FactoryReset(void* context);
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/Software/GuitarPedal/images/configure_hardware.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GuitarML/DaisySeedProjects/bb5b55ddf1b6858fb9c46f070f17821c8236d0a0/Software/GuitarPedal/images/configure_hardware.png
--------------------------------------------------------------------------------