jm.midi.event
Class CChange

java.lang.Object
  extended byjm.midi.event.CChange
All Implemented Interfaces:
java.lang.Cloneable, Event, VoiceEvt

public final class CChange
extends java.lang.Object
implements VoiceEvt, java.lang.Cloneable

Description: The CChange event is one of a set of events whose parent class is VoiceEvt. In total these classes cover all voice event types found in most MIDI file formats. These classes will usually be added to a linked list as type VoiceEvt. (see class VoiceEvt for more information)

Author:
Andrew Sorensen

Constructor Summary
CChange()
          A public constructor used to create default control change events
CChange(short controllerNum, short value, short midiChannel, int time)
          A public constructor used create control change events containing contoller number, value and time information.
 
Method Summary
 Event copy()
          Makes a copy of an event
 short getControllerNum()
          Returns a crontrol change events controller number
 short getID()
          Retrieve an events id
 short getMidiChannel()
          Get a voice events MIDI channel
 int getTime()
          Retrieve an events time
 short getValue()
          Returns a control change events opperation value
 void print()
          Print this events data in a System.out.println format
 int read(java.io.DataInputStream dis)
          read in event data from disk
 void setControllerNum(short controllerNum)
          Sets a control change events controllerNum
 void setMidiChannel(short midiChannel)
          Set a voice events MIDI channel
 void setTime(int time)
          Set an events time
 void setValue(short value)
          Sets a control change events opperation value
 int write(java.io.DataOutputStream dos)
          write out event data to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CChange

public CChange()
A public constructor used to create default control change events


CChange

public CChange(short controllerNum,
               short value,
               short midiChannel,
               int time)
A public constructor used create control change events containing contoller number, value and time information.

Method Detail

getControllerNum

public short getControllerNum()
Returns a crontrol change events controller number


setControllerNum

public void setControllerNum(short controllerNum)
Sets a control change events controllerNum


getValue

public short getValue()
Returns a control change events opperation value


setValue

public void setValue(short value)
Sets a control change events opperation value


getMidiChannel

public short getMidiChannel()
Description copied from interface: VoiceEvt
Get a voice events MIDI channel

Specified by:
getMidiChannel in interface VoiceEvt

setMidiChannel

public void setMidiChannel(short midiChannel)
Description copied from interface: VoiceEvt
Set a voice events MIDI channel

Specified by:
setMidiChannel in interface VoiceEvt

getTime

public int getTime()
Description copied from interface: Event
Retrieve an events time

Specified by:
getTime in interface Event

setTime

public void setTime(int time)
Description copied from interface: Event
Set an events time

Specified by:
setTime in interface Event

getID

public short getID()
Description copied from interface: Event
Retrieve an events id

Specified by:
getID in interface Event

write

public int write(java.io.DataOutputStream dos)
          throws java.io.IOException
Description copied from interface: Event
write out event data to disk

Specified by:
write in interface Event
Throws:
java.io.IOException

read

public int read(java.io.DataInputStream dis)
         throws java.io.IOException
Description copied from interface: Event
read in event data from disk

Specified by:
read in interface Event
Throws:
java.io.IOException

copy

public Event copy()
           throws java.lang.CloneNotSupportedException
Description copied from interface: Event
Makes a copy of an event

Specified by:
copy in interface Event
Throws:
java.lang.CloneNotSupportedException

print

public void print()
Description copied from interface: Event
Print this events data in a System.out.println format

Specified by:
print in interface Event