public Individual(Tree.RootNode tree, bool useMask) { Tree = tree; Topology = DevelopManager.DevelopTopology(tree); Data = Enumerable.Range(0, DevelopManager.TableLength).Select(x => (float)Topology.RequireValue(x)).ToArray(); Normalize(); Analyzer = new AudioLib.Analyzer(Data, (int)FileUtil.SampleRate); Analyzer.CalcSpectrogram(useMask); }
public DevelopManager() { render = CreateEmbryo(); //tree = CreateInitialTree(); //Util.Visualizer.ShowTree(tree); //tree.Target = firstPoint; //foreach (var item in tree.ToBreadthFirstList()) //{ // item.Process(); //} //Util.Visualizer.ShowTopology(render); }
public Unit.Renderer CreateEmbryo() { var src0 = new Unit.TableSource(freqTable); var src1 = new Unit.TableSource(powerTable); var stub = new Unit.Multiplier(); var render = new Unit.Renderer(); Unit.UnitBase.Connect(src0, 0, stub, 0); Unit.UnitBase.Connect(src1, 0, stub, 1); Unit.UnitBase.Connect(stub, 0, render, 0); firstPoint = stub; return(render); }