Use comptime for fully declarative LV2 and Custom commands #14

Merged
luna merged 69 commits from declarative-commands into master 2020-06-02 21:37:47 +00:00
1 changed files with 37 additions and 1 deletions
Showing only changes of commit ca751e58f7 - Show all commits

View File

@ -113,6 +113,13 @@ pub const Command = struct {
.saturator => Saturator,
.vintagedelay => Vintagedelay,
.noise => Noise,
.wildnoise => Wildnoise,
.write => Write,
.embed => Embed,
.rotate => Rotate,
else => @panic("TODO"),
};
}
@ -146,8 +153,37 @@ pub const Command = struct {
pub const RunQS = struct {
pub const base_tag = Tag.runqs;
program: []const u8,
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(