diff --git a/src/dsp/mod.rs b/src/dsp/mod.rs index 42b9b8e..a84d7ed 100644 --- a/src/dsp/mod.rs +++ b/src/dsp/mod.rs @@ -376,9 +376,36 @@ When doing this, keep the following grid layout in mind: \_____/ ``` +Defining the outputs of a cell is done like this: + +```ignore + Cell::empty(ad).out(None, None, ad.out("sig")) +``` + +[crate::Cell::empty] takes a [NodeId] as first argument. The [crate::Cell] +structure then allows you to specify the output ports using the [crate::Cell::out] +function. The 3 arguments of that function are for the 3 edges of that hex tile: + +```ignore + // TopRight BottomRight Bottom + Cell::empty(ad).out(None, None, ad.out("sig")) +``` + +[crate::Cell::input] works the same way, but the 3 arguments refer to the 3 input +edges of a hex tile: + +```ignore + // Top TopLeft BottomLeft + Cell::empty(out).input(out.inp("ch1"), None, None) +``` + +The [NodeId] interface offers you functions to get the input parameter index from +a name like `out.inp("ch1")` or the output port index from a name: `ad.out("sig")`. + After you have setup everything for the test, you usually want to modify a paramter and look at the values the graph returns. + ```ignore #[test] fn check_node_ad_1() { diff --git a/src/matrix.rs b/src/matrix.rs index cea1c89..57c1291 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -388,7 +388,7 @@ pub trait MatrixObserver { /// Not called, when [MatrixObserver::update_all] tells you that /// everything has changed. fn update_prop(&self, key: &str); - /// Called when a new cell is monitored via [MatrixObserver::monitor_cell]. + /// Called when a new cell is monitored via [Matrix::monitor_cell]. /// Not called, when [MatrixObserver::update_all] tells you that /// everything has changed. fn update_monitor(&self, cell: &Cell);