com.cycling74.msp
Class MSPSignal

java.lang.Object
  extended by com.cycling74.msp.MSPSignal

public class MSPSignal
extends Object

Signals representation; signals inlets will copy signal data to this object.


Field Summary
 short cc
          Tells the number of time this signal is connected.
 boolean connected
          Tells if this signal is connected.
 int n
          Number of sample in vector.
 double sr
          The sampling rate.
 float[] vec
          The current sample data.
 
Constructor Summary
MSPSignal(float[] vec, double sr, int n, short cc)
           
 
Method Summary
 MSPSignal alias()
          Returns a copy of this signal but with the same sample buffer.
 MSPSignal dup()
          Returns the a duplicated signal object.
 MSPSignal dupclean()
          Returns the a duplicated signal object, but the sample vector is re-initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cc

public short cc
Tells the number of time this signal is connected. This is always 1 in pure-data.


connected

public boolean connected
Tells if this signal is connected. This is always true in pure-data.


n

public int n
Number of sample in vector.


sr

public double sr
The sampling rate.


vec

public float[] vec
The current sample data.

Constructor Detail

MSPSignal

public MSPSignal(float[] vec,
                 double sr,
                 int n,
                 short cc)
Method Detail

alias

public MSPSignal alias()
Returns a copy of this signal but with the same sample buffer.

Returns:
the new signal with the same buffer

dup

public MSPSignal dup()
Returns the a duplicated signal object. Also copies the array.

Returns:
the new signal with the same value

dupclean

public MSPSignal dupclean()
Returns the a duplicated signal object, but the sample vector is re-initialized.

Returns:
the new signal with empty value (silence)


This API is based on mxj for Max/MSP by Cycling74. Please see original MXJ implementation.