public final class NoteOn extends java.lang.Object implements VoiceEvt, java.lang.Cloneable
| Constructor and Description |
|---|
NoteOn()
Public constructor for creating a default (Empty) note on event
|
NoteOn(short pitch,
short velocity,
short midiChannel,
int time)
Public constructor for creating a note on event containing
pitch, velocity, midi channel and time
|
| Modifier and Type | Method and Description |
|---|---|
Event |
copy()
Makes a copy of an event
|
short |
getID()
Retrieve an events id
|
short |
getMidiChannel()
Get a voice events MIDI channel
|
short |
getPitch()
Returns a note on events pitch value
|
int |
getTime()
Retrieve an events time
|
short |
getVelocity()
Returns a note on events velocity 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 |
setMidiChannel(short midiChannel)
Set a voice events MIDI channel
|
void |
setPitch(short pitch)
Sets a note on events pitch value
|
void |
setTime(int time)
Set an events time
|
void |
setVelocity(short velocity)
Sets a note on events velocity value
|
int |
write(java.io.DataOutputStream dos)
write out event data to disk
|
public NoteOn()
public NoteOn(short pitch,
short velocity,
short midiChannel,
int time)
public short getPitch()
public void setPitch(short pitch)
public short getVelocity()
public void setVelocity(short velocity)
public short getMidiChannel()
VoiceEvtgetMidiChannel in interface VoiceEvtpublic void setMidiChannel(short midiChannel)
VoiceEvtsetMidiChannel in interface VoiceEvtpublic int getTime()
Eventpublic void setTime(int time)
Eventpublic short getID()
Eventpublic Event copy() throws java.lang.CloneNotSupportedException
Eventpublic int write(java.io.DataOutputStream dos)
throws java.io.IOException
Eventpublic int read(java.io.DataInputStream dis)
throws java.io.IOException
Event