Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jm.midi.event
Interface VoiceEvt  view VoiceEvt download VoiceEvt.java

All Superinterfaces:
Event
All Known Implementing Classes:
ATouch, CChange, CPres, NoteOff, NoteOn, PChange, PWheel

public interface VoiceEvt
extends Event

Description: The interface VoiceEvt is the "parent" to a group of child classes representing MIDI voice event messages. These classes will usually be added to a linked list as type Event. The child classes instance variable id can be used to distinguish easily between the child event types.

001 - ATouch
002 - ChPres
003 - CChange
004 - NoteOff
005 - NoteOn
006 - PWheel
007 - PChange


//This example shows how to add voice events to a list
class makeScore
{
List violinPart = new List();
VoiceEvt voiceEvt = new CChange();
violinPart.insertAtBack(voiceEvt);
}

//This example prints the contents of a voice event list
//using the abstract method print().

class play_part
{
ListNode node = violinPart.getFirstNode();
while(node != null)
{
VoiceEvt voiceEvt = (VoiceEvt) node.getObject();
voiceEvt.print();
}
}


Method Summary
 short getMidiChannel()
          Get a voice events MIDI channel
 void setMidiChannel(short midiChannel)
          Set a voice events MIDI channel
 
Methods inherited from interface jm.midi.event.Event
copy, getID, getTime, print, read, setTime, write
 

Method Detail

getMidiChannel

public short getMidiChannel()
Get a voice events MIDI channel


setMidiChannel

public void setMidiChannel(short midiChannel)
Set a voice events MIDI channel