codesimian
Class WholeMP3

java.lang.Object
  extended by codesimian.CS
      extended by codesimian.DefaultCS
          extended by codesimian.WholeMP3
All Implemented Interfaces:
CodeSimian, java.io.Serializable

Deprecated.

public class WholeMP3
extends DefaultCS

WholeMP3 has been replaced by SlowMP3. The only useful parts left are the static functions, like combineArrays(List).

See Also:
Serialized Form

Field Summary
protected  int timeIndex
          Deprecated. timeIndex is only used if P(1) does not exist (countP()<2).
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, FUEL, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER
 
Constructor Summary
WholeMP3()
          Deprecated.  
 
Method Summary
 short[] audioData(java.io.InputStream mp3File)
          Deprecated.  
static short[] combineArrays(java.util.List<short[]> listOfShortArrays)
          Deprecated.  
 java.lang.String description()
          Deprecated. a short description of this CS, shorter than the javadoc, but long enough to tell what the params are for.
 double DForProxy()
          Deprecated. D() and DForProxy() are the 2 most important functions in CS.
 java.io.InputStream fileToInputStream(java.io.File f)
          Deprecated.  
 java.io.File findMP3File(java.lang.String fileName)
          Deprecated. finds a File with given name (and optionally path).
 java.lang.String keyword()
          Deprecated. For the CodeSimian language as a String.
CodeSimian language keyword, like "+" "*" "max" ">" etc.

Override this function if you want to specify a keyword other than how I derive them from the class name, like + for Add.

Some CSs might never be intended to be used in the language by their keyword.
The best example (4/05) is Num, because it is used in the language like "3.4" instead of "num()".
static int[] locationOfLargestRepeatedSubset(short[] array)
          Deprecated. Used for debugging sound data.
static void main(java.lang.String[] s)
          Deprecated.  
 double maxD()
          Deprecated. maximum value D() can ever return (or any of the other primitive EXECUTE functions).
 int maxP()
          Deprecated. Maximum quantity of Params
 double minD()
          Deprecated. minimum value D() can ever return (or any of the other primitive EXECUTE functions).
 int minP()
          Deprecated. For DForProxy().
Minimum number of parameters in param[] needed to call DForProxy().
Defines which indexs of param[] DForProxy() can use.
Functions with a different number of parameters must override this.
OVERRIDE THIS FUNCTION IF EXEC USES A DIFFERENT NUMBER OF PARAMETERS.
Default is 1.
 void playAudio(short[] audioData)
          Deprecated.  
static short[] reverseBytes(short[] array)
          Deprecated.  
static void testLocationOfLargestRepeatedSubset()
          Deprecated. returns true if locationOfLargestRepeatedSubset works correctly on a test array
 
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, LForProxy, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setS, setZ, start, toString, V, Z
 
Methods inherited from class codesimian.CS
addP, addP, addP, addP, addP, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, IForProxy, isIllusion, javaCode, JForProxy, L, L, L, L, L, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, setB, setC, setCost, setDescription, setF, setHeap, setI, setJ, setL, setL, setParent, setParsePriority, setProxyOf, setPType, setS, setTester, setZ, SForProxy, tester, VForProxy, voidReflect, ZForProxy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

timeIndex

protected int timeIndex
Deprecated. 
timeIndex is only used if P(1) does not exist (countP()<2). P(1) is time index. (P(0) is filename.)

Constructor Detail

WholeMP3

public WholeMP3()
Deprecated. 
Method Detail

DForProxy

public double DForProxy()
Deprecated. 
Description copied from class: CS
D() and DForProxy() are the 2 most important functions in CS. They execute this CS. All other execute functions, by default, use DForProxy instead of reinventing-the-wheel for their own type.

For example, J() calls JForProxy() which calls DForProxy(). D() calls DForProxy() directly.

Execute this CS and cast to double. D() is the main EXECUTE function. D() uses DForProxy(). DForProxy() is the main action of every CS, the most important function. By default, all other primitive EXECUTE functions defer to D.
Functions that EXECUTE this CS: L(Class) L(int,Class,int) Z() B() C() S() I() J() F() D() V()

Specified by:
DForProxy in class DefaultCS

minP

public int minP()
Deprecated. 
Description copied from class: DefaultCS
For DForProxy().
Minimum number of parameters in param[] needed to call DForProxy().
Defines which indexs of param[] DForProxy() can use.
Functions with a different number of parameters must override this.
OVERRIDE THIS FUNCTION IF EXEC USES A DIFFERENT NUMBER OF PARAMETERS.
Default is 1.

Overrides:
minP in class DefaultCS

maxP

public int maxP()
Deprecated. 
Description copied from class: CS
Maximum quantity of Params

Overrides:
maxP in class CS

minD

public double minD()
Deprecated. 
Description copied from class: CS
minimum value D() can ever return (or any of the other primitive EXECUTE functions). Default is -Double.MAX_VALUE, but functions like Math.sin(double) range from -1 to 1, so return -1.

Overrides:
minD in class CS

maxD

public double maxD()
Deprecated. 
Description copied from class: CS
maximum value D() can ever return (or any of the other primitive EXECUTE functions). Default is Double.MAX_VALUE, but functions like Math.sin(double) range from -1 to 1, so return 1.

Overrides:
maxD in class CS

keyword

public java.lang.String keyword()
Deprecated. 
Description copied from class: DefaultCS
For the CodeSimian language as a String.
CodeSimian language keyword, like "+" "*" "max" ">" etc.

Override this function if you want to specify a keyword other than how I derive them from the class name, like + for Add.

Some CSs might never be intended to be used in the language by their keyword.
The best example (4/05) is Num, because it is used in the language like "3.4" instead of "num()".
Default: Returns class name, minus package name (and its dots), and change the first letter to lowercase.

For example, CS.MaxParams does not override keyword(), which returns "maxP".

Overrides:
keyword in class DefaultCS
See Also:
CS.parent(), CS.newInstance(), CS.name()

description

public java.lang.String description()
Deprecated. 
Description copied from class: CS
a short description of this CS, shorter than the javadoc, but long enough to tell what the params are for. Example use: in automatically generated webpages for CodeSimian. Example: "returns sum of all params" for Add.

Overrides:
description in class DefaultCS

audioData

public short[] audioData(java.io.InputStream mp3File)
Deprecated. 

playAudio

public void playAudio(short[] audioData)
Deprecated. 

findMP3File

public java.io.File findMP3File(java.lang.String fileName)
Deprecated. 
finds a File with given name (and optionally path). (not done yet: If cant find it, opens a file-dialog so the user can select a different mp3 file.)


fileToInputStream

public java.io.InputStream fileToInputStream(java.io.File f)
Deprecated. 

combineArrays

public static short[] combineArrays(java.util.List<short[]> listOfShortArrays)
Deprecated. 

reverseBytes

public static short[] reverseBytes(short[] array)
Deprecated. 

testLocationOfLargestRepeatedSubset

public static void testLocationOfLargestRepeatedSubset()
Deprecated. 
returns true if locationOfLargestRepeatedSubset works correctly on a test array


locationOfLargestRepeatedSubset

public static int[] locationOfLargestRepeatedSubset(short[] array)
Deprecated. 
Used for debugging sound data. Returns new int[]{startIndex,size} where startIndex is an index in array[] and size is the size of the repeated subset. A repeated subset is any of 2 or more (nonintersecting?) subsets that have equal contents.

This function is VERY SLOW. It is approximately big-O: array.length^2 and array is usually huge


main

public static void main(java.lang.String[] s)
Deprecated.