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

java.lang.Object
  extended by org.rubato.rubettes.bigbang.view.player.JSynObject
All Implemented Interfaces:
java.lang.Comparable<JSynObject>
Direct Known Subclasses:
JSynMonitorObject

public class JSynObject
extends java.lang.Object
implements java.lang.Comparable<JSynObject>


Field Summary
static int ADDITIVE
           
static int FREQUENCY_MODULATION
           
static int RING_MODULATION
           
 
Constructor Summary
JSynObject(JSynObject parent, BigBangObject bbObject, int satelliteType)
           
 
Method Summary
 void addSatellite(JSynObject satellite)
           
 JSynObject clone()
           
 int compareTo(JSynObject other)
           
 int frequencyToMidi(double frequency)
           
 double getAmplitude()
           
 BigBangObject getBigBangObject()
           
 double getDuration()
           
 java.util.List<java.lang.Double> getFrequencies()
           
 int getLoudness()
           
 double getMainFrequency()
           
 java.lang.Double getOffset()
           
 double getOnset()
           
 double getPan()
           
 JSynObject getParent()
           
 long getRate()
           
 java.util.List<JSynObject> getSatellites()
           
 int getSatelliteType()
           
 int getVoice()
           
 boolean isAudible()
           
 boolean playsAt(double onset, double offset)
           
 void setLoudnessRatio(double ratio)
           
 void setTranspositionInterval(double interval)
          Sets a transposition interval by which all frequencies of the object and satellites will be transposed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADDITIVE

public static final int ADDITIVE
See Also:
Constant Field Values

RING_MODULATION

public static final int RING_MODULATION
See Also:
Constant Field Values

FREQUENCY_MODULATION

public static final int FREQUENCY_MODULATION
See Also:
Constant Field Values
Constructor Detail

JSynObject

public JSynObject(JSynObject parent,
                  BigBangObject bbObject,
                  int satelliteType)
Method Detail

getParent

public JSynObject getParent()

getBigBangObject

public BigBangObject getBigBangObject()

isAudible

public boolean isAudible()
Returns:
true if the object is worth being played. for now this is only the case if it contains at least one frequency.

getOnset

public double getOnset()

getDuration

public double getDuration()

getRate

public long getRate()

getOffset

public java.lang.Double getOffset()

playsAt

public boolean playsAt(double onset,
                       double offset)

getMainFrequency

public double getMainFrequency()

getFrequencies

public java.util.List<java.lang.Double> getFrequencies()

setTranspositionInterval

public void setTranspositionInterval(double interval)
Sets a transposition interval by which all frequencies of the object and satellites will be transposed.

Parameters:
interval - an interval in half steps (can be microtonal)

getAmplitude

public double getAmplitude()

getLoudness

public int getLoudness()

setLoudnessRatio

public void setLoudnessRatio(double ratio)

getVoice

public int getVoice()

getPan

public double getPan()

addSatellite

public void addSatellite(JSynObject satellite)

getSatellites

public java.util.List<JSynObject> getSatellites()

getSatelliteType

public int getSatelliteType()

frequencyToMidi

public int frequencyToMidi(double frequency)

clone

public JSynObject clone()
Overrides:
clone in class java.lang.Object

toString

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

compareTo

public int compareTo(JSynObject other)
Specified by:
compareTo in interface java.lang.Comparable<JSynObject>