diff --git a/doc/README.md b/doc/README.md index 40d9976..5611dc3 100644 --- a/doc/README.md +++ b/doc/README.md @@ -258,3 +258,14 @@ other presets: - gain\_min (dB): -20..40 - gain\_max (dB): -20..40 - rms (signal level, dB): -80..10 + +## `thruzero split index + +> Tape flanger and ADT + +> This plug simulates tape-flanging, where two copies of a signal cancel out completely as the tapes pass each other. It can also be used for other "modulated delay" effects such as phasing and simple chorusing. + + - rate (modulation rate, set to minimum for static comb filtering): 0..1, default 0.3 + - mix (wet/dry mix, set to 50% for complete cancelling): 0..1, default 0.47 + - feedback (add positive or negative feedback for harsher or "ringing" sound): 0..1, default 0.3 + - depth_mod (modulation depth, set to less than 100% to limit build up of low frequencies with feedback): 0..1, default 1 diff --git a/examples/thruzero.scri b/examples/thruzero.scri new file mode 100644 index 0000000..99b4899 --- /dev/null +++ b/examples/thruzero.scri @@ -0,0 +1,3 @@ +load :0; +thruzero 3 1 0.3 0.47 0.3 1; +quicksave; diff --git a/src/lang.zig b/src/lang.zig index 02ce56a..67cbfcc 100644 --- a/src/lang.zig +++ b/src/lang.zig @@ -33,6 +33,7 @@ pub const CommandType = enum { RePsycho, TalkBox, DynComp, + ThruZero, Noise, WildNoise, @@ -195,6 +196,7 @@ pub const Lang = struct { _ = try self.keywords.put("detune", .Detune); _ = try self.keywords.put("overdrive", .Overdrive); _ = try self.keywords.put("talkbox", .TalkBox); + _ = try self.keywords.put("thruzero", .ThruZero); // custom implementations (not lv2) _ = try self.keywords.put("noise", .Noise); diff --git a/src/printer.zig b/src/printer.zig index 3d7a72b..b02f226 100644 --- a/src/printer.zig +++ b/src/printer.zig @@ -27,6 +27,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void { .RePsycho => "repsycho", .TalkBox => "talkbox", .DynComp => "dyncomp", + .ThruZero => "thruzero", .Noise => "noise", .WildNoise => "wildnoise", diff --git a/src/runner.zig b/src/runner.zig index 34c77a1..ab02cd5 100644 --- a/src/runner.zig +++ b/src/runner.zig @@ -329,6 +329,11 @@ pub const Runner = struct { try image.runPlugin("http://gareus.org/oss/lv2/darc#mono", pos, params); } + fn thruZeroCmd(self: *Runner, pos: Position, params: ParamList) !void { + var image = try self.getImage(); + try image.runPlugin("http://drobilla.net/plugins/mda/ThruZero", pos, params); + } + fn runCommand(self: *Runner, cmd: *lang.Command) !void { var params = ParamList.init(self.allocator); defer params.deinit(); @@ -587,6 +592,15 @@ pub const Runner = struct { try self.dynCompCmd(pos, params); }, + .ThruZero => { + const pos = try cmd.consumePosition(); + try cmd.appendParam(¶ms, "rate"); + try cmd.appendParam(¶ms, "mix"); + try cmd.appendParam(¶ms, "feedback"); + try cmd.appendParam(¶ms, "depth_mod"); + try self.thruZeroCmd(pos, params); + }, + else => blk: { std.debug.warn("Unsupported command: {}\n", .{cmd.command}); break :blk RunError.UnknownCommand;