Package de.maramuse.soundcomp.parser.math

Examples of de.maramuse.soundcomp.parser.math.Plus


   *  effect of this process should be just forwarding input to output
   * @return a new Process
   */
  public static Process createProcess(){
  Process subprocess=new Process();
  Plus subplus=new Plus("subplus");
  Number number=new Number(1);
  subplus.append(number);
  subplus.append(new Element("input_sub"));
  subprocess.setInputs(new NameList(new Element("input_sub")));
  ConnectionList suboutputs=new ConnectionList();
  Connection subconn=new Connection(subplus, "out", "output_sub");
  suboutputs.append(subconn);
  subprocess.setOutputs(suboutputs);
  subprocess.setName(new Element("subprocess"));
  InputAssignment subipa=new InputAssignment(new Equals("="));
  subipa.setInputName("input_sub");
  subipa.setFormula(new Element("input_sub"));
  InputAssignments subipas=new InputAssignments(subipa);
  ProcessRef subsubreference=new ProcessRef("subsub");
  subsubreference.setLocalName(new Element("mysubplus"));
  subsubreference.setElementType("subplus");
  subsubreference.setInputAssignments(subipas);
 
 
  Process process=new Process();
  Processes processes=new Processes("processes");
  ProcessRef subreference=new ProcessRef("sub");
  subreference.setElementType("subprocess");
  subreference.setLocalName(new Element("mysubprocess"));
  processes.append(subreference);
  process.setElements(processes);
  process.setInputs(new NameList(new Element("input")));
  // no variables
  ConnectionList outputs=new ConnectionList();
  Connection conn=new Connection(new ConnectionPoint("mysubprocess", "out"), "output");
  InputAssignment ipa=new InputAssignment(new Equals("="));
  ipa.setInputName("input_sub");
  Plus plus=new Plus("+2");
  plus.append(new Number(0));
  plus.append(new Element("input"));
  ipa.setFormula(plus);
  InputAssignments ipas=new InputAssignments(ipa);
  subreference.setInputAssignments(ipas);
  outputs.append(conn);
  process.setOutputs(outputs);
View Full Code Here

TOP

Related Classes of de.maramuse.soundcomp.parser.math.Plus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.