|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodesimian.CS<CSGeneric>
codesimian.DefaultCS
codesimian.Microphone
public class Microphone
Reads audio samples from the microphone hole of the computer, and returns them 1 at a time in range -1 to 1.
Can set/get this object as an AudioFormat or TargetDataLine.
If you want to connect an electric-guitar (or other audio device) to the microphone hole(s)
of your sound-card, you will probably get distorted audio when you play the guitar harder.
To solve that problem, I bought a Creative Sound Blaster XFi Fatal1ty card
which has 2 large (and 1 small) microphone holes, and optical and spdif and midi and analog input and output.
TODO: Each of those inputs (but not the outputs) should be mapped to some channel index in each microphone object.
TODO: Create some way to reorder the channel indexs of microphone.
TODO: create X quantity of MicrophoneX objects, 1 for each channel. For example: microphone7 is the 8th channel.
Field Summary |
---|
Fields inherited from class codesimian.CS |
---|
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS |
Constructor Summary | |
---|---|
Microphone()
|
Method Summary | |
---|---|
static void |
close()
|
java.lang.String |
description()
a short description of this CS, shorter than the javadoc, but long enough to tell what the params are for. |
double |
DForProxy()
Execute this CS and cast to double. |
static double |
estimateAudioAccuracy()
|
static double |
getNextAmplitude(int channel)
Range -1 to 1. |
static boolean |
isOpen()
|
java.lang.String |
keyword()
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()". |
java.lang.Object |
LForProxy(java.lang.Class c)
the default implementation can use many Class parameters. |
static int |
micBufSiz()
quantity of audio samples. |
int |
minP()
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. |
static void |
open()
|
boolean |
setL(java.lang.Object value)
setL setD setF setJ setI setS setC setB setZ are functions that SET THE VALUE OF THIS CS to some object, primitive, or 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, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setPType, setS, setZ, start, toString, V, Z |
Methods inherited from class codesimian.CS |
---|
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, JForProxy, L, L, L, L, L, maxD, maxP, minD, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, reflect6, setB, SETB, setC, SETC, setCost, SETD, setDescription, setF, SETF, setHeap, setI, SETI, setJ, SETJ, SETL, setL, setL, setParent, setParsePriority, setProxyOf, setS, SETS, setTester, setZ, SETZ, SForProxy, tester, toJavaCode, VForProxy, voidReflect, ZForProxy |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Microphone()
Method Detail |
---|
public java.lang.String keyword()
DefaultCS
keyword
in class DefaultCS
CS.parent()
,
CS.newInstance()
,
CS.name()
public int minP()
DefaultCS
minP
in class DefaultCS
public java.lang.String description()
CS
description
in class DefaultCS
public static double getNextAmplitude(int channel)
public double DForProxy()
CS
DForProxy
in class DefaultCS
public static int micBufSiz()
public static double estimateAudioAccuracy()
public static void open()
public static boolean isOpen()
public static void close()
public java.lang.Object LForProxy(java.lang.Class c)
DefaultCS
LForProxy
in class DefaultCS
execProxy()
,
setExecProxy(CS)
public boolean setL(java.lang.Object value)
CS
setL
in class DefaultCS
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |