jazz.core
Class Device

java.lang.Object
  |
  +--jazz.core.Device
All Implemented Interfaces:
java.io.Serializable

public class Device
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
protected  java.util.Vector pitches
           
 
Constructor Summary
Device()
           
Device(java.lang.String name)
           
 
Method Summary
 void addDevicePitch(DevicePitch dp)
           
 java.lang.Object clone()
           
 DevicePitch getCyclicalDevicePitch(int index)
          Note that this treats the scale as cyclical.
 DevicePitch getDevicePitch(int i)
          Return the device pitch at a given index.
 int getIndex(Pitch p)
          Return index of a given pitch in the device.
 java.lang.String getName()
           
 void insertDevicePitch(int i, DevicePitch dp)
           
 void removeDevicePitch(int i)
          Remove a deivce pitch at a given index.
 void setDevicePitch(int i, DevicePitch dp)
           
 void setName(java.lang.String name)
           
 int size()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

pitches

protected java.util.Vector pitches
Constructor Detail

Device

public Device()

Device

public Device(java.lang.String name)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

addDevicePitch

public void addDevicePitch(DevicePitch dp)

getIndex

public int getIndex(Pitch p)
Return index of a given pitch in the device. Note the index returned is the cyclical index.

removeDevicePitch

public void removeDevicePitch(int i)
Remove a deivce pitch at a given index. Throw an error if the index is out of bounds

getDevicePitch

public DevicePitch getDevicePitch(int i)
Return the device pitch at a given index. An exception is raised if the pitch index is out of bounds.

getCyclicalDevicePitch

public DevicePitch getCyclicalDevicePitch(int index)
Note that this treats the scale as cyclical. If the index is out of bounds it uses offsets of octaves.

setDevicePitch

public void setDevicePitch(int i,
                           DevicePitch dp)

insertDevicePitch

public void insertDevicePitch(int i,
                              DevicePitch dp)

size

public int size()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object