skeleton & stubs

This commit is contained in:
2026-04-19 02:13:56 +03:00
parent e3f641d646
commit 4f14980610
13 changed files with 468 additions and 609 deletions

View File

@@ -0,0 +1,13 @@
[package]
name = "plugin-lv2"
version.workspace = true
edition.workspace = true
[lib]
name = "tenko_lv2"
crate-type = ["cdylib"]
[dependencies]
params = { workspace = true }
engine = { workspace = true }
lv2 = { workspace = true }

View File

@@ -0,0 +1,7 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<https://git.yokai.digital/deadYokai/tenko>
a lv2:Plugin ;
lv2:binary <libtenko_lv2.so> ;
rdfs:seeAlso <tenko.ttl> .

View File

@@ -0,0 +1,21 @@
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<https://git.yokai.digital/deadYokai/tenko>
a lv2:Plugin, lv2:InstrumentPlugin ;
doap:name "Tenko" ;
doap:license <https://spdx.org/licenses/MIT> ;
lv2:port [
a lv2:OutputPort, lv2:AudioPort ;
lv2:index 0 ;
lv2:symbol "out_l" ;
rdfs:label "Left Out"
] , [
a lv2:OutputPort, lv2:AudioPort ;
lv2:index 1 ;
lv2:symbol "out_r" ;
rdfs:label "Right Out"
] .

View File

@@ -0,0 +1,37 @@
use engine::Engine;
use lv2::prelude::*;
use params::ParamStore;
#[derive(PortCollection)]
struct Ports {
out_l: OutputPort<Audio>,
out_r: OutputPort<Audio>,
}
#[uri("https://git.yokai.digital/deadYokai/tenko")]
struct TenkoLv2 {
engine: Engine,
}
impl Plugin for TenkoLv2 {
type Ports = Ports;
type InitFeatures = ();
type AudioFeatures = ();
fn new(info: &PluginInfo, _features: &mut ()) -> Option<Self> {
let params = ParamStore::new();
let engine = Engine::new(params, info.sample_rate() as f32);
Some(Self { engine })
}
fn run(&mut self, ports: &mut Ports, _: &mut (), _: u32) {
for s in ports.out_l.iter_mut() {
*s = 0.0;
}
for s in ports.out_r.iter_mut() {
*s = 0.0;
}
}
}
lv2_descriptors!(TenkoLv2);