Version 1 of Analyzing combined filter types with BWise graphs for Jack

Updated 2013-05-06 18:15:42 by theover

From Manipulating Jack/Ladspa Audio processing graphs from Bwise we know we can generate sequences of "jack-rack" processing racks and automatically connect up their streams with Jack audio processing (mainly in Linux, though there is a Windows jack).

Here is a start to actually compute something with Bwise that makes sense to electrical engineers, namely if there's a signal path within the filtering graph where a certain type of filter runs from input to output (or the converse).

So say we have the graph from the page above, we could assign a filtertype to each block, in the simplest case "1" or "2", and lets give the blocks a color which represents their type (for instance type 1=no poles, 2=no zeros, so that we can know if some paths give through DC components or leave high frequencies in peace):

 # say these three blocks get a variable saying they're type 1
 set higexp.filtertype 1
 set lowmidspea14.filtertype 1
 set df6.filtertype 1

 # now the ohers in the graph must get type 2
 foreach  i [net_allleft higpasslow] { 
    if ![info exists $i.filtertype] { 
       set $i.filtertype 2 
    }
 }
 # Now color according to type
 foreach  i [net_allleft higpasslow] {
    if {[set $i.filtertype] == 2 } { 
       $mc itemco [tag_and "$i block"] -fill red
    } {
       $mc itemco [tag_and "$i block"] -fill green
    }
 }

http://www.theover.org/Bwise/filtertype1.png

The idea is in this case we have no path of one color from input to output, but we want to ascertain this fact in an automated fashion.