Skip to content

Commit 1578d7b

Browse files
committed
Slightly more aggressive defaults, and more documentation.
1 parent 35ad4cc commit 1578d7b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ the same idea.
5959

6060
## Adding status indicators and parameter control
6161

62-
With some luck, the above circuit will simply work for you, but in many cases you will have to do some tuning. In order to do that, easily, let's add some status indicators and contols:
62+
With some luck, the above circuit will simply work for you, but in many cases you will have to do some tuning. You can do that tuning entirely from the sketch, by adjusting the variable values near the
63+
top of the code (see the comments in the code, and the following section for details). However, for tuning parameters more comfortably and at runtime, you can easily add some status indicators and controls:
6364

6465
- Connect four LEDs (with appropriate resistors) from pins D10 through D13 to ground. I suggest using green on D10, yellow and D11 and red on D12 and D13.
6566
- Connect a 2 by 4 button matrix to pins D4 through D9. D8 and D9 should be connected to the two row wires, D4 through D7 should be connected to the four column wires.
@@ -79,6 +80,9 @@ Ok, so how to get started?
7980
4. For adjusting attack and release, it's hardest to outline a clear procedure, but also these will generally work quite fine at their default values. Note that too small values of attack can lead
8081
to artifacts, too small values of release can lead to the compressor "pumping" on certain sounds.
8182

83+
*Note*: When adjusting parameters, the status LEDs will briefly change their role from indicating signal and compression levels to a very rough indication of the parameter that was changed. No LEDs active
84+
signifies a very low value, with LEDs lighting up from D12 to D10 in that order for higher values. If either the low or high end of the scale is reached D13 will light up in addition.
85+
8286
## More to come
8387

8488
... but writing this up is more work than it may seem. If you find this useful, consider donating a bread crumb or two via Paypal: thomas.friedrichsmeier@gmx.de

compressor.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ int attack_f = 10; // attack period (how soon the compressor will start attenua
2222
int release_f = 40; // release period (how soon the compressor will soften attenuation after signals have become more silent),
2323
// given in measurement frame units. Default setting corresponds to 200ms; Max buf_len.
2424
// Does not have an effect if <= attack_f
25-
int threshold = 25; // minimum signal amplitude before the compressor will kick in. Each unit corresponds to roughly 5mV
25+
int threshold = 18; // minimum signal amplitude before the compressor will kick in. Each unit corresponds to roughly 5mV
2626
// peak-to-peak.
27-
float ratio = 2.5; // dampening applied to signals exceeding the threshold. n corresponds to limiting the signal to a level of
27+
float ratio = 3.0; // dampening applied to signals exceeding the threshold. n corresponds to limiting the signal to a level of
2828
// threshold level plus 1/3 of the level in excess of the threshold (if possible: see duty_min, below)
2929
// 1(min) = no attenuation; 20(max), essentially limit to threshold, aggressively
3030

0 commit comments

Comments
 (0)