lejos.nxt
Class Sound

java.lang.Object
  extended by lejos.nxt.Sound

public class Sound
extends Object

NXT sound routines. Only playTone() works.


Method Summary
static void beep()
          Beeps once - not yet implemented.
static void beepSequence()
          Downward tones - not yet implemented.
static void buzz()
          Low buzz - not yet implemented.
static void playTone(int aFrequency, int aDuration)
          Plays a tone, given its frequency and duration.
static void systemSound(boolean aQueued, int aCode)
          Play a system sound - not yet implemented.
static void twoBeeps()
          Beeps twice - not yet implemented.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Method Detail

systemSound

public static void systemSound(boolean aQueued,
                               int aCode)
Play a system sound - not yet implemented.
aCodeResulting Sound
0short beep
1double beep
2descending arpeggio
3ascending arpeggio
4long, low beep
5quick ascending arpeggio


beep

public static void beep()
Beeps once - not yet implemented.


twoBeeps

public static void twoBeeps()
Beeps twice - not yet implemented.


beepSequence

public static void beepSequence()
Downward tones - not yet implemented.


buzz

public static void buzz()
Low buzz - not yet implemented.


playTone

public static void playTone(int aFrequency,
                            int aDuration)
Plays a tone, given its frequency and duration. Frequency is audible from about 31 to 2100 Hertz. The duration argument is in hundreds of a seconds (centiseconds, not milliseconds) and is truncated at 256, so the maximum duration of a tone is 2.56 seconds.

Parameters:
aFrequency - The frequency of the tone in Hertz (Hz).
aDuration - The duration of the tone, in centiseconds. Value is truncated at 256 centiseconds.