diff --git a/doc/README.md b/doc/README.md index e895de2..cd0ccd1 100644 --- a/doc/README.md +++ b/doc/README.md @@ -104,7 +104,7 @@ Parameters: - `gain`: Gain, 0..12, default 0 - `noClip`: Soft Clip (assumed boolean), 0..1, default 0 -## `delay seed gain` +## `delay seed gain feedback_pc tap_count first_delay delay_range delay_scale delay_rand_pc gain_scale wet` Parameters: - `seed`: Random seed, 0..1000, default 0 @@ -118,10 +118,25 @@ Parameters: - `gain_scale`: Amplitude change, 0.2..5, default 1 - `wet`: Dry/wet mix, 0..1, default 1 +## TODO `vynil split index year warp click wear` + +VyNil effect from SWH. + +Parameters: + - `year`: Year (int), 1900..1990, default 1990 + - `rpm`: RPM (int), 33..78, default 33 + - `warp`: Surface Warping, 0..1, default 0 + - `click`: Crackle, 0..1, default 0 + - `wear`: Wear, 0..1, default 0 + ## TODO `echo split index delay` Run an echo filter on the given loaded file. +## TODO `noise split index seed` + +Inject white noise on the image. + ## `quicksave` Save the file on the same directory of the file specified by `load`, but diff --git a/src/plugin.zig b/src/plugin.zig index 79094f6..abc22f5 100644 --- a/src/plugin.zig +++ b/src/plugin.zig @@ -72,8 +72,14 @@ pub const RunContext = struct { return ImageError.InstantiateFail; } + // we allocate []f32 with size 2 to account for stereo plugins, however + // we only use &in_buf[0] and &out_buf[0], and don't use the + // (supposedly) right side of neither input or output. + var in_buf = try allocator.alloc(f32, 2); + std.mem.secureZero(f32, in_buf); + return RunContext{ - .in_buf = try allocator.alloc(f32, 1), + .in_buf = in_buf, .out_buf = try allocator.alloc(f32, 2), .instance = instance.?, };