Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
robstave committed May 2, 2019
1 parent 6bf6e81 commit a29cf2d
Show file tree
Hide file tree
Showing 15 changed files with 1,096 additions and 25 deletions.
Binary file added .vscode/ipch/57cc873775371866/mmap_address.bin
Binary file not shown.
Binary file added .vscode/ipch/e4de61fa58a60478/mmap_address.bin
Binary file not shown.
Binary file added .vscode/ipch/ed19bba0b6e59f9c/mmap_address.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion M0_Simple_Synth_06/M0_Simple_Synth_06.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "pitchToFrequency.h"

// M0 Trinket Synth - Exercise 06
// make a squarewave sound whose pitch is controlled by two CC and is gated (on/off) by another two CCs acting as an LFOs.
// make a squarewave synth whose pitch is controlled by two midi CC values and is gated (on/off) by another two CCs acting as an LFOs.
//
// Note some of the boilerplate/extra stuff as been moved to other .ino files. Arduino IDE just combines them
// with the dir filename.ino first and the remaining in alphabetical order.
Expand Down
17 changes: 14 additions & 3 deletions M0_Simple_Synth_06/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# M0_Simple_Synth_06

L
Continuation of the last sketch, but with two circuits.

The basic equivalent is something in this direction. Not exactly...but close.

![Capture1](https://github.com/robstave/trinketM0Synth/blob/master/M0_Simple_Synth_06/images/circuita2.PNG)

In this case, really, the switch to turn the LFO off and on is really stuck to ON...and we will be playing with that later. But feel free to tweek whatever.

![Capture1](https://github.com/robstave/trinketM0Synth/blob/master/M0_Simple_Synth_06/images/circuit2.PNG)
In addition, I split up the files a bit. In the Arduino IDE, its smart enough to combine all the files so long as one of them as the same name as the parent directory. The order is Alphabetical from that point on so if you have compile issues, make sure you take that into account.

![Capture1](https://github.com/robstave/trinketM0Synth/blob/master/M0_Simple_Synth_06/images/circuita2.PNG)
So there are 4 CC channels you need to use. The easiest way is to probably just run the sketch and turn some knobs to find the values.
Reassign in your code and recompile.

# Example

Example using the Arturia Beatstep and 4 knobs.
This runs into Ableton where it is broadcast to the Trinkek

![example](https://www.youtube.com/watch?v=Z4xIJpqLlFo)
6 changes: 3 additions & 3 deletions M0_Simple_Synth_06/images/circuit2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions M0_Simple_Synth_07/M0_Simple_Synth_07.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ Adafruit_DotStar strip = Adafruit_DotStar(

// Control channels we are listening for.
// Run this and watch the serial port while twisting a knob. Note the values and set them here and recompile/reload the sketch.
uint8_t CC1HF = 10;
uint8_t CC1LFO = 74;
uint8_t CC1LFO_ON = 71;
uint8_t CC1HF = 10; // Control HF 1 pitch
uint8_t CC1LFO = 74; // Control LFO 1 pitch
uint8_t CC1LFO_ON = 71; // LFO 1 on/off state

uint8_t CC2HF = 114;
uint8_t CC2LFO = 18;
uint8_t CC2LFO_ON = 19;
uint8_t CC2HF = 114; // Control HF 2 pitch
uint8_t CC2LFO = 18; // Control LFO 2 pitch
uint8_t CC2LFO_ON = 19;// LFO 2 on/off state


uint8_t MIX_MODE = 7;
uint8_t MIX_MODE = 7; // Control Mix Mode pitch

volatile uint8_t mix_mode_value = 10; // default on at 50/50

Expand Down
27 changes: 27 additions & 0 deletions M0_Simple_Synth_07/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# M0_Simple_Synth_07

Modest improvments on 06.


![Capture1](https://github.com/robstave/trinketM0Synth/blob/master/M0_Simple_Synth_07/images/circuit3.PNG)

Added a knob to control the LFO entirely.
- NO LFO, always on
- LFO ON
- Cut the Circuit

Replaced the NAND summer with a Function that can be either

- NAND
- XOR
- Mixer


Previously, we were flipping the output bit from 0 to 100% percent, but really, its an analog bit, so
we can actually sum the two values. You will note that the volume drops a little in this case too.

By this point, if you are following the code, you will note that its starting to have a lot of variables and getting messy. I will do a refactor in the next one.

# Example

![example](https://www.youtube.com/watch?v=09VcLD3l2AE)
Binary file added M0_Simple_Synth_07/images/circuit3.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a29cf2d

Please sign in to comment.