diff options
author | Grant Shangreaux <grant@unabridgedsoftware.com> | 2021-11-09 21:07:24 -0600 |
---|---|---|
committer | Grant Shangreaux <grant@unabridgedsoftware.com> | 2021-11-09 21:07:24 -0600 |
commit | 2b22b39b08c499798efcb874db6e6268eef43a52 (patch) | |
tree | 1515e6f416ee7a6c647dc43265a55806a24cd19b /klangfarbrs/src/lib.rs | |
parent | e2aec3161f791614fc19fc50a4dadf239d7422ad (diff) |
Fix: module visibility warnings, Add: MonoSynth::envelope stub
Diffstat (limited to 'klangfarbrs/src/lib.rs')
-rw-r--r-- | klangfarbrs/src/lib.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/klangfarbrs/src/lib.rs b/klangfarbrs/src/lib.rs index 087cbd7..0fc7936 100644 --- a/klangfarbrs/src/lib.rs +++ b/klangfarbrs/src/lib.rs @@ -13,9 +13,10 @@ use gdnative::prelude::*; use gdnative::core_types::TypedArray; mod osc; -use osc::{Osc}; +use osc::Osc; -mod adsr; +pub mod adsr; +use adsr::Envelope; /// Aliasing some types to distinguish various audio properties. type Sample = f32; @@ -184,6 +185,13 @@ impl MonoSynth { self.fm_depth = fm_depth } + fn envelope( + &self, _owner: &Node, + attack: Millisecond, decay: Millisecond, sustain: Amplitude, release: Millisecond + ) -> Envelope { + Envelope::new(attack, decay, sustain, release) + } + #[export] pub fn frames(&mut self, _owner: &Node, samples: i32) -> TypedArray<Vector2> { let mut frames = TypedArray::new(); |