add dyncomp cmd
This commit is contained in:
parent
7dae50b030
commit
5a0e6934e7
5 changed files with 43 additions and 3 deletions
|
@ -245,3 +245,16 @@ other presets:
|
|||
- dry: 0..1, default 0
|
||||
- carrier: 0..1, default 0
|
||||
- quality: 0..1, default 1
|
||||
|
||||
## `dyncomp split index enable hold inputgain threshold ratio attack release gain_min gain_max rms`
|
||||
|
||||
- enable (bool): 0..1, default 1
|
||||
- hold (bool): 0..1, default 0
|
||||
- inputgain (dB): -10..30, default 0
|
||||
- threshold (dB): -50..-10, default -30
|
||||
- ratio (???): 0..1, default 0
|
||||
- attack (seconds): 0.001..0.1, default 0.01
|
||||
- release (seconds): 0.03..3.0, default 0.3
|
||||
- gain\_min (dB): -20..40
|
||||
- gain\_max (dB): -20..40
|
||||
- rms (signal level, dB): -80..10
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
load :0;
|
||||
degrade 5 1 0.8 0.5 0.65 0.9 0.58 0.5;
|
||||
degrade 5 2 0.1 1 0.65 0.5 0.5 0.4;
|
||||
degrade 5 3 0.1 1 0.65 0.9 0.58 0.5;
|
||||
degrade 8 1 0.8 0.5 0.65 0.9 0.58 0.5;
|
||||
degrade 8 2 0.1 1 0.65 0.5 0.5 0.4;
|
||||
degrade 8 3 0.1 1 0.65 0.9 0.58 0.5;
|
||||
degrade 8 4 0 1 1 0 0 1;
|
||||
degrade 8 5 0 1 1 0 0 0;
|
||||
degrade 8 6 0 0 0 0 0 0;
|
||||
quicksave;
|
||||
|
|
|
@ -32,6 +32,7 @@ pub const CommandType = enum {
|
|||
Degrade,
|
||||
RePsycho,
|
||||
TalkBox,
|
||||
DynComp,
|
||||
|
||||
Noise,
|
||||
WildNoise,
|
||||
|
@ -202,6 +203,7 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("embed", .Embed);
|
||||
_ = try self.keywords.put("degrade", .Degrade);
|
||||
_ = try self.keywords.put("repsycho", .RePsycho);
|
||||
_ = try self.keywords.put("dyncomp", .RePsycho);
|
||||
|
||||
// even more custom
|
||||
_ = try self.keywords.put("rotate", .Rotate);
|
||||
|
|
|
@ -26,6 +26,7 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
|||
.Degrade => "Degrade",
|
||||
.RePsycho => "repsycho",
|
||||
.TalkBox => "talkbox",
|
||||
.DynComp => "dyncomp",
|
||||
|
||||
.Noise => "noise",
|
||||
.WildNoise => "wildnoise",
|
||||
|
|
|
@ -324,6 +324,11 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://drobilla.net/plugins/mda/TalkBox", pos, params);
|
||||
}
|
||||
|
||||
fn dynCompCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://gareus.org/oss/lv2/darc#mono", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -566,6 +571,22 @@ pub const Runner = struct {
|
|||
try cmd.appendParam(¶ms, "quality");
|
||||
try self.talkboxCmd(pos, params);
|
||||
},
|
||||
|
||||
.DynComp => {
|
||||
const pos = try cmd.consumePosition();
|
||||
try cmd.appendParam(¶ms, "enable");
|
||||
try cmd.appendParam(¶ms, "hold");
|
||||
try cmd.appendParam(¶ms, "inputgain");
|
||||
try cmd.appendParam(¶ms, "threshold");
|
||||
try cmd.appendParam(¶ms, "ratio");
|
||||
try cmd.appendParam(¶ms, "attack");
|
||||
try cmd.appendParam(¶ms, "release");
|
||||
try cmd.appendParam(¶ms, "gain_min");
|
||||
try cmd.appendParam(¶ms, "gain_max");
|
||||
try cmd.appendParam(¶ms, "rms");
|
||||
try self.dynCompCmd(pos, params);
|
||||
},
|
||||
|
||||
else => blk: {
|
||||
std.debug.warn("Unsupported command: {}\n", .{cmd.command});
|
||||
break :blk RunError.UnknownCommand;
|
||||
|
|
Loading…
Reference in a new issue