Compare commits
No commits in common. "223fb6628ce9582c05267aac63905983640080ab" and "387984bff1e8266aa3fa3fe24430c61fba517077" have entirely different histories.
223fb6628c
...
387984bff1
6 changed files with 5 additions and 48 deletions
|
@ -104,7 +104,7 @@ Parameters:
|
||||||
- `gain`: Gain, 0..12, default 0
|
- `gain`: Gain, 0..12, default 0
|
||||||
- `noClip`: Soft Clip (assumed boolean), 0..1, default 0
|
- `noClip`: Soft Clip (assumed boolean), 0..1, default 0
|
||||||
|
|
||||||
## `delay seed gain feedback_pc tap_count first_delay delay_range delay_scale delay_rand_pc gain_scale wet`
|
## `delay seed gain`
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- `seed`: Random seed, 0..1000, default 0
|
- `seed`: Random seed, 0..1000, default 0
|
||||||
|
@ -118,25 +118,10 @@ Parameters:
|
||||||
- `gain_scale`: Amplitude change, 0.2..5, default 1
|
- `gain_scale`: Amplitude change, 0.2..5, default 1
|
||||||
- `wet`: Dry/wet mix, 0..1, default 1
|
- `wet`: Dry/wet mix, 0..1, default 1
|
||||||
|
|
||||||
## TODO `vinyl split index year warp click wear`
|
|
||||||
|
|
||||||
VyNil effect from SWH.
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
- `year`: Year (int), 1900..1990, default 1990
|
|
||||||
- `rpm`: RPM (int), 33..78, default 33
|
|
||||||
- `warp`: Surface Warping, 0..1, default 0
|
|
||||||
- `click`: Crackle, 0..1, default 0
|
|
||||||
- `wear`: Wear, 0..1, default 0
|
|
||||||
|
|
||||||
## 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.
|
||||||
|
|
||||||
## TODO `noise split index seed`
|
|
||||||
|
|
||||||
Inject white noise on the image.
|
|
||||||
|
|
||||||
## `quicksave`
|
## `quicksave`
|
||||||
|
|
||||||
Save the file on the same directory of the file specified by `load`, but
|
Save the file on the same directory of the file specified by `load`, but
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
load :0;
|
|
||||||
vinyl 3 1 1990 33 0 0 0;
|
|
||||||
quicksave;
|
|
|
@ -212,12 +212,12 @@ pub const Image = struct {
|
||||||
|
|
||||||
var ports = try lv2.setupPorts(&ctx);
|
var ports = try lv2.setupPorts(&ctx);
|
||||||
|
|
||||||
if (ctx.n_audio_in > 2) {
|
if (ctx.n_audio_in != 1) {
|
||||||
std.debug.warn("plugin <{}> accepts more than two channels.\n", plugin_uri);
|
std.debug.warn("plugin <{}> does not accept mono input.\n", plugin_uri);
|
||||||
return ImageError.InvalidPlugin;
|
return ImageError.InvalidPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO check n_audio_out > 2
|
// TODO check n_audio_out
|
||||||
|
|
||||||
// now, for each param for the plugin, we find its port, and set
|
// now, for each param for the plugin, we find its port, and set
|
||||||
// the value for the port there.
|
// the value for the port there.
|
||||||
|
|
|
@ -24,7 +24,6 @@ pub const CommandType = enum {
|
||||||
Reverb,
|
Reverb,
|
||||||
Highpass,
|
Highpass,
|
||||||
Delay,
|
Delay,
|
||||||
Vinyl,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Command = struct {
|
pub const Command = struct {
|
||||||
|
@ -140,7 +139,6 @@ pub const Lang = struct {
|
||||||
_ = try self.keywords.put("reverb", .Reverb);
|
_ = try self.keywords.put("reverb", .Reverb);
|
||||||
_ = try self.keywords.put("highpass", .Highpass);
|
_ = try self.keywords.put("highpass", .Highpass);
|
||||||
_ = try self.keywords.put("delay", .Delay);
|
_ = try self.keywords.put("delay", .Delay);
|
||||||
_ = try self.keywords.put("vinyl", .Vinyl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse(self: *Lang, data: []const u8) !CommandList {
|
pub fn parse(self: *Lang, data: []const u8) !CommandList {
|
||||||
|
|
|
@ -72,14 +72,8 @@ pub const RunContext = struct {
|
||||||
return ImageError.InstantiateFail;
|
return ImageError.InstantiateFail;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we allocate []f32 with size 2 to account for stereo plugins, however
|
|
||||||
// we only use &in_buf[0] and &out_buf[0], and don't use the
|
|
||||||
// (supposedly) right side of neither input or output.
|
|
||||||
var in_buf = try allocator.alloc(f32, 2);
|
|
||||||
std.mem.secureZero(f32, in_buf);
|
|
||||||
|
|
||||||
return RunContext{
|
return RunContext{
|
||||||
.in_buf = in_buf,
|
.in_buf = try allocator.alloc(f32, 1),
|
||||||
.out_buf = try allocator.alloc(f32, 2),
|
.out_buf = try allocator.alloc(f32, 2),
|
||||||
.instance = instance.?,
|
.instance = instance.?,
|
||||||
};
|
};
|
||||||
|
|
|
@ -235,11 +235,6 @@ pub const Runner = struct {
|
||||||
try image.runPlugin("http://plugin.org.uk/swh-plugins/delayorama", pos, params);
|
try image.runPlugin("http://plugin.org.uk/swh-plugins/delayorama", pos, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn vinylCmd(self: *Runner, pos: Position, params: ParamList) !void {
|
|
||||||
var image = try self.getImage();
|
|
||||||
try image.runPlugin("http://plugin.org.uk/swh-plugins/vynil", 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();
|
||||||
|
@ -355,18 +350,6 @@ pub const Runner = struct {
|
||||||
try self.delayCmd(pos, params);
|
try self.delayCmd(pos, params);
|
||||||
},
|
},
|
||||||
|
|
||||||
.Vinyl => blk: {
|
|
||||||
const pos = try cmd.consumePosition();
|
|
||||||
|
|
||||||
try cmd.appendParam(¶ms, "year");
|
|
||||||
try cmd.appendParam(¶ms, "rpm");
|
|
||||||
try cmd.appendParam(¶ms, "warp");
|
|
||||||
try cmd.appendParam(¶ms, "click");
|
|
||||||
try cmd.appendParam(¶ms, "wear");
|
|
||||||
|
|
||||||
try self.vinylCmd(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…
Add table
Add a link
Reference in a new issue