Use comptime for fully declarative LV2 and Custom commands #14
1 changed files with 37 additions and 1 deletions
38
src/lang.zig
38
src/lang.zig
|
@ -113,6 +113,13 @@ pub const Command = struct {
|
||||||
.saturator => Saturator,
|
.saturator => Saturator,
|
||||||
.vintagedelay => Vintagedelay,
|
.vintagedelay => Vintagedelay,
|
||||||
|
|
||||||
|
.noise => Noise,
|
||||||
|
.wildnoise => Wildnoise,
|
||||||
|
.write => Write,
|
||||||
|
.embed => Embed,
|
||||||
|
|
||||||
|
.rotate => Rotate,
|
||||||
|
|
||||||
else => @panic("TODO"),
|
else => @panic("TODO"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -146,8 +153,37 @@ pub const Command = struct {
|
||||||
|
|
||||||
pub const RunQS = struct {
|
pub const RunQS = struct {
|
||||||
pub const base_tag = Tag.runqs;
|
pub const base_tag = Tag.runqs;
|
||||||
program: []const u8,
|
|
||||||
base: Command,
|
base: Command,
|
||||||
|
program: []const u8,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const Noise = CustomCommand(Tag.noise, custom.RandomNoise, struct {
|
||||||
|
seed: f32,
|
||||||
|
fill_bytes: f32,
|
||||||
|
});
|
||||||
|
|
||||||
|
pub const Wildnoise = CustomCommand(Tag.wildnoise, custom.WildNoise, struct {
|
||||||
|
seed: f32,
|
||||||
|
fill_bytes: f32,
|
||||||
|
});
|
||||||
|
|
||||||
|
pub const Write = CustomCommand(Tag.write, custom.Write, struct {
|
||||||
|
data: f32,
|
||||||
|
});
|
||||||
|
|
||||||
|
pub const Embed = struct {
|
||||||
|
pub const base_tag = Tag.embed;
|
||||||
|
base: Command,
|
||||||
|
split: usize,
|
||||||
|
index: usize,
|
||||||
|
path: []const u8,
|
||||||
|
};
|
||||||
|
|
||||||
|
pub const Rotate = struct {
|
||||||
|
pub const base_tag = Tag.rotate;
|
||||||
|
base: Command,
|
||||||
|
deg: usize,
|
||||||
|
bgfill: []const u8,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Amp = LV2Command(
|
pub const Amp = LV2Command(
|
||||||
|
|
Loading…
Reference in a new issue