add reverb command
This commit is contained in:
parent
ab9eaa1400
commit
159048550d
|
@ -18,6 +18,7 @@ glitch art "framework", ???????? language??? something?
|
||||||
## plugin depedencies:
|
## plugin depedencies:
|
||||||
- lv2 default plugins (most specifically the eg-amp plugin)
|
- lv2 default plugins (most specifically the eg-amp plugin)
|
||||||
- the SWH plugins ( https://github.com/swh/lv2 )
|
- the SWH plugins ( https://github.com/swh/lv2 )
|
||||||
|
- the Invada Studio plugins ( https://launchpad.net/invada-studio/ )
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# build and install
|
# build and install
|
||||||
|
|
|
@ -89,6 +89,12 @@ Runs the Higher Quality Pitch Scaler from the SWH plugins.
|
||||||
|
|
||||||
The `mult` parameter is the pitch coefficient, range from 0.5..2, default 1.
|
The `mult` parameter is the pitch coefficient, range from 0.5..2, default 1.
|
||||||
|
|
||||||
|
## `reverb split index bypass roomLength roomHeight sourceLR sourceFB listLR listFB hpf warmth diffusion`
|
||||||
|
|
||||||
|
Run the Early Reflection Reverb from the Invada Studio plugins.
|
||||||
|
|
||||||
|
**TODO** Parameters.
|
||||||
|
|
||||||
## TODO `echo split index delay`
|
## TODO `echo split index delay`
|
||||||
|
|
||||||
Run an echo filter on the given loaded file.
|
Run an echo filter on the given loaded file.
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
load :0;
|
||||||
|
reverb 3 1 0 25 30 0 0.8 0 0.2 1000 50 50;
|
||||||
|
quicksave;
|
|
@ -20,6 +20,7 @@ pub const CommandType = enum {
|
||||||
Mbeq,
|
Mbeq,
|
||||||
Chorus,
|
Chorus,
|
||||||
PitchScaler,
|
PitchScaler,
|
||||||
|
Reverb,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Command = struct {
|
pub const Command = struct {
|
||||||
|
@ -128,6 +129,7 @@ pub const Lang = struct {
|
||||||
_ = try self.keywords.put("phaser", .Phaser);
|
_ = try self.keywords.put("phaser", .Phaser);
|
||||||
_ = try self.keywords.put("chorus", .Chorus);
|
_ = try self.keywords.put("chorus", .Chorus);
|
||||||
_ = try self.keywords.put("pitchscaler", .PitchScaler);
|
_ = try self.keywords.put("pitchscaler", .PitchScaler);
|
||||||
|
_ = try self.keywords.put("reverb", .Reverb);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse(self: *Lang, data: []const u8) !CommandList {
|
pub fn parse(self: *Lang, data: []const u8) !CommandList {
|
||||||
|
|
|
@ -74,7 +74,7 @@ pub const RunContext = struct {
|
||||||
|
|
||||||
return RunContext{
|
return RunContext{
|
||||||
.in_buf = try allocator.alloc(f32, 1),
|
.in_buf = try allocator.alloc(f32, 1),
|
||||||
.out_buf = try allocator.alloc(f32, 1),
|
.out_buf = try allocator.alloc(f32, 2),
|
||||||
.instance = instance.?,
|
.instance = instance.?,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,6 +199,11 @@ pub const Runner = struct {
|
||||||
try image.runPlugin("http://plugin.org.uk/swh-plugins/pitchScaleHQ", pos, params);
|
try image.runPlugin("http://plugin.org.uk/swh-plugins/pitchScaleHQ", pos, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn reverbCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
||||||
|
var image = try self.getImage();
|
||||||
|
try image.runPlugin("http://invadarecords.com/plugins/lv2/erreverb/mono", 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();
|
||||||
|
@ -270,6 +275,23 @@ pub const Runner = struct {
|
||||||
try self.pitchScalerCmd(pos, params);
|
try self.pitchScalerCmd(pos, params);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
.Reverb => blk: {
|
||||||
|
const pos = try cmd.consumePosition();
|
||||||
|
|
||||||
|
try cmd.appendParam(¶ms, "bypass", 2);
|
||||||
|
try cmd.appendParam(¶ms, "roomLength", 3);
|
||||||
|
try cmd.appendParam(¶ms, "roomHeight", 4);
|
||||||
|
try cmd.appendParam(¶ms, "sourceLR", 5);
|
||||||
|
try cmd.appendParam(¶ms, "sourceFB", 6);
|
||||||
|
try cmd.appendParam(¶ms, "listLR", 7);
|
||||||
|
try cmd.appendParam(¶ms, "listFB", 8);
|
||||||
|
try cmd.appendParam(¶ms, "hpf", 9);
|
||||||
|
try cmd.appendParam(¶ms, "warmth", 10);
|
||||||
|
try cmd.appendParam(¶ms, "diffusion", 11);
|
||||||
|
|
||||||
|
try self.reverbCmd(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 New Issue