add highpass cmd
- remove bypass arg from reverb cmd
This commit is contained in:
parent
159048550d
commit
c743681515
5 changed files with 41 additions and 13 deletions
|
@ -21,6 +21,7 @@ pub const CommandType = enum {
|
|||
Chorus,
|
||||
PitchScaler,
|
||||
Reverb,
|
||||
Highpass,
|
||||
};
|
||||
|
||||
pub const Command = struct {
|
||||
|
@ -130,6 +131,7 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("chorus", .Chorus);
|
||||
_ = try self.keywords.put("pitchscaler", .PitchScaler);
|
||||
_ = try self.keywords.put("reverb", .Reverb);
|
||||
_ = try self.keywords.put("highpass", .Highpass);
|
||||
}
|
||||
|
||||
pub fn parse(self: *Lang, data: []const u8) !CommandList {
|
||||
|
|
|
@ -204,6 +204,11 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://invadarecords.com/plugins/lv2/erreverb/mono", pos, params);
|
||||
}
|
||||
|
||||
fn highpassCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://invadarecords.com/plugins/lv2/filter/hpf/mono", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -278,20 +283,29 @@ pub const Runner = struct {
|
|||
.Reverb => blk: {
|
||||
const pos = try cmd.consumePosition();
|
||||
|
||||
try cmd.appendParam(¶ms, "bypass", 2);
|
||||
try cmd.appendParam(¶ms, "roomLength", 3);
|
||||
try cmd.appendParam(¶ms, "roomHeight", 4);
|
||||
try cmd.appendParam(¶ms, "sourceLR", 5);
|
||||
try cmd.appendParam(¶ms, "sourceFB", 6);
|
||||
try cmd.appendParam(¶ms, "listLR", 7);
|
||||
try cmd.appendParam(¶ms, "listFB", 8);
|
||||
try cmd.appendParam(¶ms, "hpf", 9);
|
||||
try cmd.appendParam(¶ms, "warmth", 10);
|
||||
try cmd.appendParam(¶ms, "diffusion", 11);
|
||||
try cmd.appendParam(¶ms, "roomLength", 2);
|
||||
try cmd.appendParam(¶ms, "roomHeight", 3);
|
||||
try cmd.appendParam(¶ms, "sourceLR", 4);
|
||||
try cmd.appendParam(¶ms, "sourceFB", 5);
|
||||
try cmd.appendParam(¶ms, "listLR", 6);
|
||||
try cmd.appendParam(¶ms, "listFB", 7);
|
||||
try cmd.appendParam(¶ms, "hpf", 8);
|
||||
try cmd.appendParam(¶ms, "warmth", 9);
|
||||
try cmd.appendParam(¶ms, "diffusion", 10);
|
||||
|
||||
try self.reverbCmd(pos, params);
|
||||
},
|
||||
|
||||
.Highpass => blk: {
|
||||
const pos = try cmd.consumePosition();
|
||||
|
||||
try cmd.appendParam(¶ms, "freq", 2);
|
||||
try cmd.appendParam(¶ms, "gain", 3);
|
||||
try cmd.appendParam(¶ms, "noClip", 4);
|
||||
|
||||
try self.highpassCmd(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