jfrace.device
Class GI_AY_3_8910ToneGenerator

java.lang.Object
  |
  +--jfrace.device.WaveTablePlayer
        |
        +--jfrace.device.GI_AY_3_8910ToneGenerator
All Implemented Interfaces:
java.lang.Runnable

public class GI_AY_3_8910ToneGenerator
extends WaveTablePlayer
implements java.lang.Runnable

Simulating class of a voice of the GI's sound generator AY-3-8910.

Author:
Franz-Josef Elmer

Fields inherited from class jfrace.device.WaveTablePlayer
waveTable
 
Constructor Summary
GI_AY_3_8910ToneGenerator(int clockRate)
          Create an instance for a given clock rate.
 
Method Summary
 int getAmplitude()
          Return the amplitude.
 int getEnvelopePeriod()
          Return the envelope period.
 int getPeriod()
          Return the period.
 boolean isAmplitudeMode()
          Return true if in the amplitude mode.
 void run()
          Running envelope thread for changing waveform du to the envelope shape.
 void setAmplitude(int value)
          Set the amplitude.
 void setAmplitudeMode(boolean value)
          Set amplitude mode.
 void setEnvelopePeriod(int value)
          Set envelope period.
 void setEnvelopeShape(int value)
          Set envelope shape.
 void setPeriod(int value)
          Set the period.
 
Methods inherited from class jfrace.device.WaveTablePlayer
getLength, getSize, isPlaying, linear2ulaw, play, setLength, setWaveTable, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GI_AY_3_8910ToneGenerator

public GI_AY_3_8910ToneGenerator(int clockRate)
Create an instance for a given clock rate.
Parameters:
clockRate - Clock rate in Hz.
Method Detail

getPeriod

public int getPeriod()
Return the period.

setPeriod

public void setPeriod(int value)
Set the period. Only the 12 lower bits are used.

getAmplitude

public int getAmplitude()
Return the amplitude.

setAmplitude

public void setAmplitude(int value)
Set the amplitude. Only the 4 lower bits are used.

isAmplitudeMode

public boolean isAmplitudeMode()
Return true if in the amplitude mode.

setAmplitudeMode

public void setAmplitudeMode(boolean value)
Set amplitude mode.

getEnvelopePeriod

public int getEnvelopePeriod()
Return the envelope period.

setEnvelopePeriod

public void setEnvelopePeriod(int value)
Set envelope period.

setEnvelopeShape

public void setEnvelopeShape(int value)
Set envelope shape. Only the lower 4 bits are used.

run

public void run()
Running envelope thread for changing waveform du to the envelope shape.
Specified by:
run in interface java.lang.Runnable