add dyncomp cmd
This commit is contained in:
parent
7dae50b030
commit
5a0e6934e7
5 changed files with 43 additions and 3 deletions
|
@ -32,6 +32,7 @@ pub const CommandType = enum {
|
|||
Degrade,
|
||||
RePsycho,
|
||||
TalkBox,
|
||||
DynComp,
|
||||
|
||||
Noise,
|
||||
WildNoise,
|
||||
|
@ -202,6 +203,7 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("embed", .Embed);
|
||||
_ = try self.keywords.put("degrade", .Degrade);
|
||||
_ = try self.keywords.put("repsycho", .RePsycho);
|
||||
_ = try self.keywords.put("dyncomp", .RePsycho);
|
||||
|
||||
// even more custom
|
||||
_ = try self.keywords.put("rotate", .Rotate);
|
||||
|
|
|
@ -26,6 +26,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
|||
.Degrade => "Degrade",
|
||||
.RePsycho => "repsycho",
|
||||
.TalkBox => "talkbox",
|
||||
.DynComp => "dyncomp",
|
||||
|
||||
.Noise => "noise",
|
||||
.WildNoise => "wildnoise",
|
||||
|
|
|
@ -324,6 +324,11 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://drobilla.net/plugins/mda/TalkBox", pos, params);
|
||||
}
|
||||
|
||||
fn dynCompCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://gareus.org/oss/lv2/darc#mono", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -566,6 +571,22 @@ pub const Runner = struct {
|
|||
try cmd.appendParam(¶ms, "quality");
|
||||
try self.talkboxCmd(pos, params);
|
||||
},
|
||||
|
||||
.DynComp => {
|
||||
const pos = try cmd.consumePosition();
|
||||
try cmd.appendParam(¶ms, "enable");
|
||||
try cmd.appendParam(¶ms, "hold");
|
||||
try cmd.appendParam(¶ms, "inputgain");
|
||||
try cmd.appendParam(¶ms, "threshold");
|
||||
try cmd.appendParam(¶ms, "ratio");
|
||||
try cmd.appendParam(¶ms, "attack");
|
||||
try cmd.appendParam(¶ms, "release");
|
||||
try cmd.appendParam(¶ms, "gain_min");
|
||||
try cmd.appendParam(¶ms, "gain_max");
|
||||
try cmd.appendParam(¶ms, "rms");
|
||||
try self.dynCompCmd(pos, params);
|
||||
},
|
||||
|
||||
else => blk: {
|
||||
std.debug.warn("Unsupported command: {}\n", .{cmd.command});
|
||||
break :blk RunError.UnknownCommand;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue