skeleton & stubs
This commit is contained in:
13
crates/plugin-lv2/Cargo.toml
Normal file
13
crates/plugin-lv2/Cargo.toml
Normal 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 }
|
||||
7
crates/plugin-lv2/lv2/manifest.ttl
Normal file
7
crates/plugin-lv2/lv2/manifest.ttl
Normal 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> .
|
||||
21
crates/plugin-lv2/lv2/tenko.ttl
Normal file
21
crates/plugin-lv2/lv2/tenko.ttl
Normal 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"
|
||||
] .
|
||||
37
crates/plugin-lv2/src/lib.rs
Normal file
37
crates/plugin-lv2/src/lib.rs
Normal 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);
|
||||
Reference in New Issue
Block a user