[feature]: ADSR (#15)

closes #14

Reviewed-on: #15
This commit is contained in:
2023-09-06 11:29:46 +03:00
parent 64fa6396bc
commit c50a8335d7
20 changed files with 444 additions and 140 deletions

BIN
docs/ADSR States.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

View File

@@ -26,6 +26,7 @@ release_samples = int(release_time * sample_rate)
# Attack phase
envelope[:attack_samples] = np.linspace(0, 1, num=attack_samples)
# 1/n * count;
# Decay phase
decay_slope = (1 - sustain_level) / decay_samples

BIN
docs/Attack Formula.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB