add gverb cmd
This commit is contained in:
parent
c73b7440a6
commit
299a39fc27
5 changed files with 35 additions and 0 deletions
|
@ -35,6 +35,7 @@ pub const CommandType = enum {
|
|||
DynComp,
|
||||
ThruZero,
|
||||
Foverdrive,
|
||||
Gverb,
|
||||
|
||||
Noise,
|
||||
WildNoise,
|
||||
|
@ -199,6 +200,7 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("talkbox", .TalkBox);
|
||||
_ = try self.keywords.put("thruzero", .ThruZero);
|
||||
_ = try self.keywords.put("foverdrive", .Foverdrive);
|
||||
_ = try self.keywords.put("gverb", .Gverb);
|
||||
|
||||
// custom implementations (not lv2)
|
||||
_ = try self.keywords.put("noise", .Noise);
|
||||
|
|
|
@ -29,6 +29,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
|||
.DynComp => "dyncomp",
|
||||
.ThruZero => "thruzero",
|
||||
.Foverdrive => "foverdrive",
|
||||
.Gverb => "gverb",
|
||||
|
||||
.Noise => "noise",
|
||||
.WildNoise => "wildnoise",
|
||||
|
|
|
@ -339,6 +339,11 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://drobilla.net/plugins/mda/ThruZero", pos, params);
|
||||
}
|
||||
|
||||
fn gverbCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://plugin.org.uk/swh-plugins/gverb", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -612,6 +617,18 @@ pub const Runner = struct {
|
|||
try self.foverdriveCmd(pos, params);
|
||||
},
|
||||
|
||||
.Gverb => {
|
||||
const pos = try cmd.consumePosition();
|
||||
try cmd.appendParam(¶ms, "roomsize");
|
||||
try cmd.appendParam(¶ms, "revtime");
|
||||
try cmd.appendParam(¶ms, "damping");
|
||||
try cmd.appendParam(¶ms, "inputbandwidth");
|
||||
try cmd.appendParam(¶ms, "drylevel");
|
||||
try cmd.appendParam(¶ms, "earlylevel");
|
||||
try cmd.appendParam(¶ms, "taillevel");
|
||||
try self.gverbCmd(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