summaryrefslogtreecommitdiff
path: root/klangfarbrs/src/phasor.rs
AgeCommit message (Collapse)Author
2021-12-02Clean: factor out a utils module and fix some testsGrant Shangreaux
2021-11-13Clean: a bit of junk moved around, Add: Osc::sample methodGrant Shangreaux
2021-11-12Add: Osc Iterator refactorGrant Shangreaux
Now the MonoSynth has one main `osc` property, and it holds an Osc struct which contains its own instance of a Phasor. The Phasor has been mostly hidden away from the top level, though we still have our Bender for bending phase. I think we can implement methods on Osc in order to manipulate the Phasor of a particular instance of osc if need be. The outer `frames` function has been partially refactored. However, I think we should/could wrap the Osc's `next` function in something like `next_sample` which returns a Sample (vs an Option). we could also do something like `osc.take(frames_count).map { |s| frames.push(s) }`
2021-11-12Add: phasor iterator implementationGrant Shangreaux