jcaas.script_nodes
Class EvalFunctions

java.lang.Object
  extended by jcaas.script_nodes.AnnotationFunctions
      extended by jcaas.script_nodes.EvalFunctions

public class EvalFunctions
extends AnnotationFunctions

This class defines several functions which can be called from within an evaluation script.


Constructor Summary
EvalFunctions()
           
 
Method Summary
static SList CreateList()
           
static NumericValue getFreeMemory()
           
static NumericValue getValue(java.lang.String field)
          Gives the value of the named static field in main.BlackBoard.
static void ignorePackage(java.lang.String pack)
           
static void print(java.lang.Object o)
           
static void setChord(java.lang.String chord)
           
static void setCycleDelay(NumericValue n)
          Sets how long the script should sleep before reevaluating all conditions.
static void setInstrument(NumericValue value)
          Sets the instrument of the singleton MusicThread's MIDIPlayer instance.
static void setMelody(java.lang.String melody)
           
static void setModeGenerate()
           
static void setSong(java.lang.String title)
           
static void setTempo(NumericValue speed)
          Sets the tempo of the singleton MuisThread's MIDIPlayer instance.
static void setVolume(NumericValue value)
          Sets the volume of the singleton MusicThread's MIDIPlayer instance.
static void switchMelody(java.lang.String melody)
           
static void switchSong(java.lang.String title)
           
 
Methods inherited from class jcaas.script_nodes.AnnotationFunctions
annotateLoops, countInstructions, pow, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvalFunctions

public EvalFunctions()
Method Detail

CreateList

public static SList CreateList()

print

public static void print(java.lang.Object o)

setCycleDelay

public static void setCycleDelay(NumericValue n)
Sets how long the script should sleep before reevaluating all conditions.

Parameters:
c -
n -

setModeGenerate

public static void setModeGenerate()

setChord

public static void setChord(java.lang.String chord)

setMelody

public static void setMelody(java.lang.String melody)

switchMelody

public static void switchMelody(java.lang.String melody)

setSong

public static void setSong(java.lang.String title)

switchSong

public static void switchSong(java.lang.String title)

ignorePackage

public static void ignorePackage(java.lang.String pack)

getFreeMemory

public static NumericValue getFreeMemory()

getValue

public static NumericValue getValue(java.lang.String field)
Gives the value of the named static field in main.BlackBoard.

Parameters:
context - the context of the current eval script.
field - the field to get the value of.
Returns:
the value of the field (assumed to be an Integer).

setTempo

public static void setTempo(NumericValue speed)
Sets the tempo of the singleton MuisThread's MIDIPlayer instance.

Parameters:
c - the context of the current eval script.
milliseconds - the new value for the tempo.

setVolume

public static void setVolume(NumericValue value)
Sets the volume of the singleton MusicThread's MIDIPlayer instance.

Parameters:
c - the context of the current eval script.
value - the value to set the volume to.

setInstrument

public static void setInstrument(NumericValue value)
Sets the instrument of the singleton MusicThread's MIDIPlayer instance.

Parameters:
c - the context of the current eval script.
value - the numeric value of the instrument to use.