net.charlesames.music.midi
Class MidiChannel

java.lang.Object
  extended by net.charlesames.utility.common.Disposable
      extended by net.charlesames.music.midi.MidiEntity
          extended by net.charlesames.music.midi.MidiChannel
Direct Known Subclasses:
GeneralMidiChannel

public class MidiChannel
extends MidiEntity

MidiChannel instances keep track of what is going on in a channel during a MIDI file export.

Author:
Charles Ames

Method Summary
 int getBank()
          Get the MIDI bank that is currently in force on this channel.
 int getChannel()
          Get the MIDI channel number.
 MidiDevice getMidiDevice()
          Get the MIDI device.
 MidiNote getMidiNote()
          Get the MidiNote instance that currently occupies this channel.
 int getProgram()
          Get the MIDI program that is currently in force on this channel.
 void setBank(int bank)
          Set the MIDI bank that should be in force on this channel going forward.
 void setMidiNote(MidiNote note)
          Set the MidiNote instance that currently occupies this channel.
 void setProgram(int program)
          Set the MIDI program that should be in force on this channel going forward.
 
Methods inherited from class net.charlesames.music.midi.MidiEntity
dispose, getContainer, getID, getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMidiNote

public MidiNote getMidiNote()
Get the MidiNote instance that currently occupies this channel. This property is relevant only when the MIDI channel mode is Dynamic.

Returns:
The current MidiNote instance.

setMidiNote

public void setMidiNote(MidiNote note)
Set the MidiNote instance that currently occupies this channel. This property is relevant only when the MIDI channel mode is Dynamic.

Parameters:
note - The intended MidiNote instance. Null clears the channel.

getProgram

public int getProgram()
Get the MIDI program that is currently in force on this channel.

Returns:
The current MIDI program.

setProgram

public void setProgram(int program)
Set the MIDI program that should be in force on this channel going forward.

Parameters:
program - The intended MIDI program.

getBank

public int getBank()
Get the MIDI bank that is currently in force on this channel.

Returns:
The current MIDI bank.

setBank

public void setBank(int bank)
Set the MIDI bank that should be in force on this channel going forward.

Parameters:
bank - The intended MIDI bank.

getChannel

public int getChannel()
Get the MIDI channel number.

Returns:
The MIDI channel number.

getMidiDevice

public MidiDevice getMidiDevice()
Get the MIDI device.

Returns:
The MIDI device.