routes.lib

A library to handle signal routing in Faust. Its official prefix is ro.

Functions Reference


(ro.)cross

Cross n signals: (x1,x2,..,xn) -> (xn,..,x2,x1). cross is a standard Faust function.

Usage

cross(n)
_,_,_ : cross(3) : _,_,_

Where:

  • n: number of signals (int, must be known at compile time)

Note

Special case: cross2:

cross2 = _,cross(2),_;

(ro.)crossnn

Cross two bus(n)s.

Usage

(si.bus(2*n)) : crossnn(n) : (si.bus(2*n))

Where:

  • n: the number of signals in the bus

(ro.)crossn1

Cross bus(n) and bus(1).

Usage

(si.bus(n),_) : crossn1(n) : (_,si.bus(n))

Where:

  • n: the number of signals in the first bus

(ro.)cross1n

Cross bus(1) and bus(n).

Usage

(_,si.bus(n)) : crossn1(n) : (si.bus(n),_)

Where:

  • n: the number of signals in the second bus

(ro.)crossNM

Cross bus(n) and bus(m).

Usage

(si.bus(n),si.bus(m)) : crossNM(n,m) : (si.bus(m),si.bus(n))

Where:

  • n: the number of signals in the first bus
  • m: the number of signals in the second bus

(ro.)interleave

Interleave rowcol cables from column order to row order. input : x(0), x(1), x(2) ..., x(rowcol-1) output: x(0+0row), x(0+1row), x(0+2row), ..., x(1+0row), x(1+1row), x(1+2row), ...

Usage

_,_,_,_,_,_ : interleave(row,column) : _,_,_,_,_,_

Where:

  • row: the number of row (int, known at compile time)
  • column: the number of column (int, known at compile time)

(ro.)butterfly

Addition (first half) then substraction (second half) of interleaved signals.

Usage

_,_,_,_ : butterfly(n) : _,_,_,_

Where:

  • n: size of the butterfly (n is int, even and known at compile time)

(ro.)hadamard

Hadamard matrix function of size n = 2^k.

Usage

_,_,_,_ : hadamard(n) : _,_,_,_

Where:

  • n: 2^k, size of the matrix (int, must be known at compile time)

Note:

Implementation contributed by Remy Muller.


(ro.)recursivize

Create a recursion from two arbitrary processors p and q.

Usage

_,_ : recursivize(p,q) : _,_

Where:

  • p: the forward arbitrary processor
  • q: the feedback arbitrary processor