add gverb cmd
This commit is contained in:
parent
c73b7440a6
commit
299a39fc27
5 changed files with 35 additions and 0 deletions
|
@ -276,3 +276,15 @@ other presets:
|
||||||
Fast Overdrive from SWH plugins.
|
Fast Overdrive from SWH plugins.
|
||||||
|
|
||||||
- drive: 1..3, default 1
|
- drive: 1..3, default 1
|
||||||
|
|
||||||
|
## `gverb split index roomsize revtime damping drylevel earlylevel taillevel`
|
||||||
|
|
||||||
|
GVerb algorithm from SWH plugins.
|
||||||
|
|
||||||
|
- roomsize (meters): 1..300, default 75.75
|
||||||
|
- revtime (reverb time, seconds): 0.1..30, default 7.575
|
||||||
|
- damping: 0..1, default 0.5
|
||||||
|
- inputbandwidth: 0..1, default 0.75
|
||||||
|
- drylevel (dB): -70..0, default 0
|
||||||
|
- earlylevel (dB): -70..0, default 0
|
||||||
|
- taillevel (dB): -70..0, default -17.5
|
||||||
|
|
3
examples/gverb.scri
Normal file
3
examples/gverb.scri
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
load :0;
|
||||||
|
gverb 3 1 75.75 7.575 0.5 0.75 0 0 -17.5;
|
||||||
|
quicksave;
|
|
@ -35,6 +35,7 @@ pub const CommandType = enum {
|
||||||
DynComp,
|
DynComp,
|
||||||
ThruZero,
|
ThruZero,
|
||||||
Foverdrive,
|
Foverdrive,
|
||||||
|
Gverb,
|
||||||
|
|
||||||
Noise,
|
Noise,
|
||||||
WildNoise,
|
WildNoise,
|
||||||
|
@ -199,6 +200,7 @@ pub const Lang = struct {
|
||||||
_ = try self.keywords.put("talkbox", .TalkBox);
|
_ = try self.keywords.put("talkbox", .TalkBox);
|
||||||
_ = try self.keywords.put("thruzero", .ThruZero);
|
_ = try self.keywords.put("thruzero", .ThruZero);
|
||||||
_ = try self.keywords.put("foverdrive", .Foverdrive);
|
_ = try self.keywords.put("foverdrive", .Foverdrive);
|
||||||
|
_ = try self.keywords.put("gverb", .Gverb);
|
||||||
|
|
||||||
// custom implementations (not lv2)
|
// custom implementations (not lv2)
|
||||||
_ = try self.keywords.put("noise", .Noise);
|
_ = try self.keywords.put("noise", .Noise);
|
||||||
|
|
|
@ -29,6 +29,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
||||||
.DynComp => "dyncomp",
|
.DynComp => "dyncomp",
|
||||||
.ThruZero => "thruzero",
|
.ThruZero => "thruzero",
|
||||||
.Foverdrive => "foverdrive",
|
.Foverdrive => "foverdrive",
|
||||||
|
.Gverb => "gverb",
|
||||||
|
|
||||||
.Noise => "noise",
|
.Noise => "noise",
|
||||||
.WildNoise => "wildnoise",
|
.WildNoise => "wildnoise",
|
||||||
|
|
|
@ -339,6 +339,11 @@ pub const Runner = struct {
|
||||||
try image.runPlugin("http://drobilla.net/plugins/mda/ThruZero", pos, params);
|
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 {
|
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||||
var params = ParamList.init(self.allocator);
|
var params = ParamList.init(self.allocator);
|
||||||
defer params.deinit();
|
defer params.deinit();
|
||||||
|
@ -612,6 +617,18 @@ pub const Runner = struct {
|
||||||
try self.foverdriveCmd(pos, params);
|
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: {
|
else => blk: {
|
||||||
std.debug.warn("Unsupported command: {}\n", .{cmd.command});
|
std.debug.warn("Unsupported command: {}\n", .{cmd.command});
|
||||||
break :blk RunError.UnknownCommand;
|
break :blk RunError.UnknownCommand;
|
||||||
|
|
Loading…
Reference in a new issue