add tapedelay cmd (broken)
This commit is contained in:
parent
8c3c5a3ac2
commit
a0a75579dd
5 changed files with 50 additions and 0 deletions
|
@ -37,6 +37,7 @@ pub const CommandType = enum {
|
|||
Foverdrive,
|
||||
Gverb,
|
||||
Invert,
|
||||
TapeDelay,
|
||||
|
||||
Noise,
|
||||
WildNoise,
|
||||
|
@ -203,6 +204,7 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("foverdrive", .Foverdrive);
|
||||
_ = try self.keywords.put("gverb", .Gverb);
|
||||
_ = try self.keywords.put("invert", .Invert);
|
||||
_ = try self.keywords.put("tapedelay", .TapeDelay);
|
||||
|
||||
// custom implementations (not lv2)
|
||||
_ = try self.keywords.put("noise", .Noise);
|
||||
|
|
|
@ -31,6 +31,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
|||
.Foverdrive => "foverdrive",
|
||||
.Gverb => "gverb",
|
||||
.Invert => "invert",
|
||||
.TapeDelay => "tapedelay",
|
||||
|
||||
.Noise => "noise",
|
||||
.WildNoise => "wildnoise",
|
||||
|
|
|
@ -349,6 +349,11 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://plugin.org.uk/swh-plugins/inv", pos, params);
|
||||
}
|
||||
|
||||
fn tapedelayCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://plugin.org.uk/swh-plugins/tapeDelay", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -639,6 +644,26 @@ pub const Runner = struct {
|
|||
try self.gverbCmd(pos, params);
|
||||
},
|
||||
|
||||
.TapeDelay => {
|
||||
const pos = try cmd.consumePosition();
|
||||
try cmd.appendParam(¶ms, "speed");
|
||||
try cmd.appendParam(¶ms, "da_db");
|
||||
|
||||
try cmd.appendParam(¶ms, "t1d");
|
||||
try cmd.appendParam(¶ms, "t1a_db");
|
||||
|
||||
try cmd.appendParam(¶ms, "t2d");
|
||||
try cmd.appendParam(¶ms, "t2a_db");
|
||||
|
||||
try cmd.appendParam(¶ms, "t3d");
|
||||
try cmd.appendParam(¶ms, "t3a_db");
|
||||
|
||||
try cmd.appendParam(¶ms, "t4d");
|
||||
try cmd.appendParam(¶ms, "t4a_db");
|
||||
|
||||
try self.tapedelayCmd(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