add saturator, vintagedelay cmd
This commit is contained in:
parent
bc8ab98689
commit
08d9923e75
6 changed files with 114 additions and 0 deletions
|
@ -337,3 +337,43 @@ Calf Multi Chorus
|
|||
- `level_in` (Input Gain): 0.0156250..64, default 1
|
||||
- `level_out` (Output Gain): 0.0156250..64, default 1
|
||||
- `lfo` (toggle): 0..1, default 1
|
||||
|
||||
## `saturator split index bypass level_in level_out mix drive blend lp_pre_freq hp_pre_fre lp_post_freq hp_post_freq p_freq p_level p_q pre post`
|
||||
|
||||
- `bypass` (toggle): 0..1, default 0
|
||||
- `level_in` (Input Gain): 0.0156250..64, default 1
|
||||
- `level_out` (Output Gain): 0.0156250..64, default 1
|
||||
- `mix`: 0..1, default 1
|
||||
- `drive` (saturation, coef): 0.1..10, default 5
|
||||
- `blend` (coef): -10..10, default 10
|
||||
- `lp_pre_freq` (lowpass, hz): 10..20000, default 20000
|
||||
- `hp_pre_freq` (highpass, hz): 10..20000, default 10
|
||||
- `lp_post_freq` (lowpass, hz): 10..20000, default 20000
|
||||
- `hp_post_freq` (highpass, hz): 10..20000, default 10
|
||||
- `p_freq` (Tone, hz): 80..8000, default 2000
|
||||
- `p_level` (Amount): 0.0625..16, default 1
|
||||
- `p_q` (???, coef): 0.1..10, default 1
|
||||
- `pre` (Activate Pre, toggle): 0..1, default 0
|
||||
- `post` (Activate Post, toggle): 0..1, default 0
|
||||
|
||||
## `vintagedelay split index ...`
|
||||
|
||||
- `level_in` (Input Gain): 0.0156250..64, default 1
|
||||
- `level_out` (Output Gain): 0.0156250..64, default 1
|
||||
- `subdiv` (int): 1..16, default 4
|
||||
- `time_l` (int): 1..16, default 3
|
||||
- `time_r` (int): 1..16, default 5
|
||||
- `feedback`: 0..1, default 0.5
|
||||
- `amount` (Wet): 0..4, default 0.25
|
||||
- `mix_mode` (enum): Stereo=0, Ping-Pong=1, L then R=2, R then L=3, default 1
|
||||
- `medium` (enum): Plain=0, Tape=1, Old Tape=2, default 1
|
||||
- `dry` (dry): 0..4, default 1
|
||||
- `width` (stereo width, strict): -1..1, default 1
|
||||
- `fragmentation` (enum): Repeating=0, Pattern=1, default 0
|
||||
- `pbeats` (Pattern Beats, int): 1..8, default 4
|
||||
- `pfrag` (Pattern Fragmentation, int): 1..8, default 4
|
||||
- `timing` (enum): BPM=0, ms=1, Hz=2, Sync=3, default 0
|
||||
- `bpm`: 30..300, default 120
|
||||
- `ms` (int): 10..2000, default 500
|
||||
- `hz`: 0.01..100, default 2
|
||||
- `bpm_host` (strict): 1..300, default 120
|
||||
|
|
3
examples/saturator.scri
Normal file
3
examples/saturator.scri
Normal file
|
@ -0,0 +1,3 @@
|
|||
load :0;
|
||||
saturator 3 1 0 1 1 1 5 10 20000 10 20000 10 2000 1 1 0 0;
|
||||
quicksave;
|
3
examples/vintagedelay.scri
Normal file
3
examples/vintagedelay.scri
Normal file
|
@ -0,0 +1,3 @@
|
|||
load :0;
|
||||
vintagedelay 3 1 1 1 4 3 5 0.5 0.25 1 1 1 1 0 4 4 0 120 500 2 120;
|
||||
quicksave;
|
|
@ -40,6 +40,8 @@ pub const CommandType = enum {
|
|||
TapeDelay,
|
||||
ModDelay,
|
||||
MultiChorus,
|
||||
Saturator,
|
||||
VintageDelay,
|
||||
|
||||
Noise,
|
||||
WildNoise,
|
||||
|
@ -209,6 +211,8 @@ pub const Lang = struct {
|
|||
_ = try self.keywords.put("tapedelay", .TapeDelay);
|
||||
_ = try self.keywords.put("moddelay", .ModDelay);
|
||||
_ = try self.keywords.put("multichorus", .MultiChorus);
|
||||
_ = try self.keywords.put("saturator", .Saturator);
|
||||
_ = try self.keywords.put("vintagedelay", .VintageDelay);
|
||||
|
||||
// custom implementations (not lv2)
|
||||
_ = try self.keywords.put("noise", .Noise);
|
||||
|
|
|
@ -34,6 +34,8 @@ pub fn printList(list: langs.CommandList, stream: var) !void {
|
|||
.TapeDelay => "tapedelay",
|
||||
.ModDelay => "moddelay",
|
||||
.MultiChorus => "multichorus",
|
||||
.Saturator => "saturator",
|
||||
.VintageDelay => "vintagedelay",
|
||||
|
||||
.Noise => "noise",
|
||||
.WildNoise => "wildnoise",
|
||||
|
|
|
@ -364,6 +364,16 @@ pub const Runner = struct {
|
|||
try image.runPlugin("http://calf.sourceforge.net/plugins/MultiChorus", pos, params);
|
||||
}
|
||||
|
||||
fn saturatorCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://calf.sourceforge.net/plugins/Saturator", pos, params);
|
||||
}
|
||||
|
||||
fn vintagedelayCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||
var image = try self.getImage();
|
||||
try image.runPlugin("http://calf.sourceforge.net/plugins/VintageDelay", pos, params);
|
||||
}
|
||||
|
||||
fn runCommand(self: *Runner, cmd: *lang.Command) !void {
|
||||
var params = ParamList.init(self.allocator);
|
||||
defer params.deinit();
|
||||
|
@ -700,6 +710,58 @@ pub const Runner = struct {
|
|||
try self.multichorusCmd(pos, params);
|
||||
},
|
||||
|
||||
.Saturator => {
|
||||
const pos = try cmd.consumePosition();
|
||||
|
||||
try cmd.appendParam(¶ms, "bypass");
|
||||
try cmd.appendParam(¶ms, "level_in");
|
||||
try cmd.appendParam(¶ms, "level_out");
|
||||
try cmd.appendParam(¶ms, "mix");
|
||||
try cmd.appendParam(¶ms, "drive");
|
||||
try cmd.appendParam(¶ms, "blend");
|
||||
try cmd.appendParam(¶ms, "lp_pre_freq");
|
||||
try cmd.appendParam(¶ms, "hp_pre_freq");
|
||||
try cmd.appendParam(¶ms, "lp_post_freq");
|
||||
try cmd.appendParam(¶ms, "hp_post_freq");
|
||||
try cmd.appendParam(¶ms, "p_freq");
|
||||
try cmd.appendParam(¶ms, "p_level");
|
||||
try cmd.appendParam(¶ms, "p_q");
|
||||
try cmd.appendParam(¶ms, "pre");
|
||||
try cmd.appendParam(¶ms, "post");
|
||||
try self.saturatorCmd(pos, params);
|
||||
},
|
||||
|
||||
.VintageDelay => {
|
||||
const pos = try cmd.consumePosition();
|
||||
const PARAMS = [_][]const u8{
|
||||
"level_in",
|
||||
"level_out",
|
||||
"subdiv",
|
||||
"time_l",
|
||||
"time_r",
|
||||
"feedback",
|
||||
"amount",
|
||||
"mix_mode",
|
||||
"medium",
|
||||
"dry",
|
||||
"width",
|
||||
"fragmentation",
|
||||
"pbeats",
|
||||
"pfrag",
|
||||
"timing",
|
||||
"bpm",
|
||||
"ms",
|
||||
"hz",
|
||||
"bpm_host",
|
||||
};
|
||||
|
||||
inline for (PARAMS) |param| {
|
||||
try cmd.appendParam(¶ms, param);
|
||||
}
|
||||
|
||||
try self.vintagedelayCmd(pos, params);
|
||||
},
|
||||
|
||||
else => blk: {
|
||||
std.debug.warn("Unsupported command: {}\n", .{cmd.command});
|
||||
break :blk RunError.UnknownCommand;
|
||||
|
|
Loading…
Reference in a new issue