org.rubato.rubettes.bigbang.view.player
Class SmoothOscillatorModule

java.lang.Object
  extended by org.rubato.rubettes.bigbang.view.player.SmoothOscillatorModule

public class SmoothOscillatorModule
extends java.lang.Object

A synthesizer module that can easily be plugged together with others. Input B is where the oscillator is plugged into and input A serves to potentially connect to other modules. Plugging can be done using the insertAfter, insertBetween, and remove methods. A B |/ O

Author:
florian thalmann

Constructor Summary
SmoothOscillatorModule(BigBangPlayer player, int type)
           
 
Method Summary
 void disconnect()
          Disconnects this module and reconnects the thing in inputA to the thing in the output.
 SmoothOscillator getOscillator()
           
 com.jsyn.ports.UnitOutputPort getOutput()
           
 com.jsyn.ports.UnitOutputPort getThingInInputA()
           
 com.jsyn.ports.UnitInputPort getThingInOutput()
           
 int getType()
           
 void insertAfter(SmoothOscillatorModule module)
          Inserts this module after (or before) the given one by disconnecting and reconnecting a and o as shown below.
 void insertBetween(com.jsyn.ports.UnitOutputPort out, com.jsyn.ports.UnitInputPort in)
          Disconnects the given out from the in and inserts this module between them.
 void removeFromSynthAndStop()
           
 void setType(int moduleType)
          Sets the type of this module and creates or replaces the operator unit if needed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmoothOscillatorModule

public SmoothOscillatorModule(BigBangPlayer player,
                              int type)
Method Detail

setType

public void setType(int moduleType)
Sets the type of this module and creates or replaces the operator unit if needed.


insertAfter

public void insertAfter(SmoothOscillatorModule module)
Inserts this module after (or before) the given one by disconnecting and reconnecting a and o as shown below. a a b | |/ -> A B o |/ O b |/ o

Parameters:
module - any module

insertBetween

public void insertBetween(com.jsyn.ports.UnitOutputPort out,
                          com.jsyn.ports.UnitInputPort in)
Disconnects the given out from the in and inserts this module between them. the given out ends up in inputA and the output of the module goes to the given in. i o | | -> A B i |/ O | i

Parameters:
out - a unit connected to the given in
in - a unit connected that the given out is connected to

disconnect

public void disconnect()
Disconnects this module and reconnects the thing in inputA to the thing in the output.


getThingInOutput

public com.jsyn.ports.UnitInputPort getThingInOutput()

getThingInInputA

public com.jsyn.ports.UnitOutputPort getThingInInputA()

getOscillator

public SmoothOscillator getOscillator()

getOutput

public com.jsyn.ports.UnitOutputPort getOutput()

getType

public int getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

removeFromSynthAndStop

public void removeFromSynthAndStop()