add multichorus cmd
This commit is contained in:
parent
127ea389fd
commit
bc8ab98689
6 changed files with 53 additions and 1 deletions
|
@ -39,6 +39,7 @@ pub const CommandType = enum {
|
|||
Invert,
|
||||
TapeDelay,
|
||||
ModDelay,
|
||||
MultiChorus,
|
||||
|
||||
Noise,
|
||||
WildNoise,
|
||||
|
@ -207,6 +208,7 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("invert", .Invert);
|
||||
_ = try self.keywords.put("tapedelay", .TapeDelay);
|
||||
_ = try self.keywords.put("moddelay", .ModDelay);
|
||||
_ = try self.keywords.put("multichorus", .MultiChorus);
|
||||
|
||||
// custom implementations (not lv2)
|
||||
_ = try self.keywords.put("noise", .Noise);
|
||||
|
|
|
@ -33,6 +33,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
|||
.Invert => "invert",
|
||||
.TapeDelay => "tapedelay",
|
||||
.ModDelay => "moddelay",
|
||||
.MultiChorus => "multichorus",
|
||||
|
||||
.Noise => "noise",
|
||||
.WildNoise => "wildnoise",
|
||||
|
|
|
@ -359,6 +359,11 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://plugin.org.uk/swh-plugins/modDelay", pos, params);
|
||||
}
|
||||
|
||||
fn multichorusCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://calf.sourceforge.net/plugins/MultiChorus", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -675,6 +680,26 @@ pub const Runner = struct {
|
|||
try self.moddelayCmd(pos, params);
|
||||
},
|
||||
|
||||
.MultiChorus => {
|
||||
const pos = try cmd.consumePosition();
|
||||
try cmd.appendParam(¶ms, "min_delay");
|
||||
try cmd.appendParam(¶ms, "mod_depth");
|
||||
try cmd.appendParam(¶ms, "mod_rate");
|
||||
try cmd.appendParam(¶ms, "stereo");
|
||||
try cmd.appendParam(¶ms, "voices");
|
||||
try cmd.appendParam(¶ms, "vphase");
|
||||
try cmd.appendParam(¶ms, "amount");
|
||||
try cmd.appendParam(¶ms, "dry");
|
||||
try cmd.appendParam(¶ms, "freq");
|
||||
try cmd.appendParam(¶ms, "freq2");
|
||||
try cmd.appendParam(¶ms, "q");
|
||||
try cmd.appendParam(¶ms, "overlap");
|
||||
try cmd.appendParam(¶ms, "level_in");
|
||||
try cmd.appendParam(¶ms, "level_out");
|
||||
try cmd.appendParam(¶ms, "lfo");
|
||||
try self.multichorusCmd(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