File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " caw_modules"
3- version = " 0.3.0 "
3+ version = " 0.3.1 "
44description = " Collection of synthesizer modules for the caw synthesizer framework"
55authors = [
" Stephen Sherratt <[email protected] >" ]
66license = " MIT"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use wide::f32x8;
77#[ derive( Debug , Clone , Copy ) ]
88pub enum SuperSawInit {
99 Random ,
10+ RandomWithSeed ( u64 ) ,
1011 Const ( f32 ) ,
1112}
1213
@@ -124,6 +125,13 @@ where
124125 * x *= mask;
125126 }
126127 }
128+ SuperSawInit :: RandomWithSeed ( seed) => {
129+ let mut rng = StdRng :: seed_from_u64 ( seed) ;
130+ for ( x, mask) in state_01. iter_mut ( ) . zip ( mask. iter ( ) ) {
131+ * x = rng. gen :: < [ f32 ; 8 ] > ( ) . into ( ) ;
132+ * x *= mask;
133+ }
134+ }
127135 }
128136 Sig ( Self {
129137 freq_hz,
You can’t perform that action at this time.
0 commit comments