diff options
author | Grant Shangreaux <grant@unabridgedsoftware.com> | 2021-12-03 12:52:49 -0600 |
---|---|---|
committer | Grant Shangreaux <grant@unabridgedsoftware.com> | 2021-12-03 12:52:49 -0600 |
commit | 1e64d804eda19f52b998f81a2d7fd1fc699f271d (patch) | |
tree | 6152faffa62c67364646329be1a183eb64ae774d /docs | |
parent | 7574c5c7acaebe120de3efbaba56b8e9f474d330 (diff) |
Add: sketch of Instrument implementation
Diffstat (limited to 'docs')
-rw-r--r-- | docs/design.org | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/design.org b/docs/design.org index 4f5e701..d52ce05 100644 --- a/docs/design.org +++ b/docs/design.org @@ -79,3 +79,14 @@ This is how its working now. It is possible this will only get us so far, but I think we can roll with it. The currently implemented [[../klangfarbrs/src/envelope.rs][Envelope]] module is actually wrapping three of the =line~= type objects. ~attack~ ~decay~ and ~release~ could all be described by a ~Line~ struct that has a target amplitude and a duration. + +* Instrument (basic) + +An Instrument is N Sine(?) waves with an Envelope applied to it. + +(OscBank, Envelope) + +it implements Iterator so that ~next()~ sums the oscillators, +scales them down by 1/N, and multiplies by the Envelope value. + + |