|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.Translator
public class Translator
Translators are used for converting from one numeric system to another. Examples might be converting a generic note index to a midi value in the key of D minor. This would be a key translator.
Constructor Summary | |
---|---|
Translator()
|
|
Translator(int[] array,
int modulus)
|
Method Summary | |
---|---|
int |
detranslate(int n)
Detranslate an integer value generated by the translate method. |
void |
setArray(int[] array)
Set array to be used for table lookup. |
void |
setModulus(int modulus)
Set length of the repeating pattern in the output. |
void |
setOffset(int offset)
Set offset to be added at end of translation. |
int |
translate(int n)
Translate input to output. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Translator()
public Translator(int[] array, int modulus)
Method Detail |
---|
public void setArray(int[] array)
public void setOffset(int offset)
public void setModulus(int modulus)
public int translate(int n)
public int detranslate(int n) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |