uk.org.toot.midi.core
Class MidiConnection

java.lang.Object
  extended by uk.org.toot.midi.core.MidiConnection

public class MidiConnection
extends java.lang.Object

This class represents a connection from a MidiOutput to a MidiInput. The connection may be created with various flags.

Author:
st

Field Summary
static int INPUT_LOCKED
          INPUT_LOCKED indicates that the connection may not ne connected to a different MidiInput, the connection destination is immutable.
static int OUTPUT_LOCKED
          OUTPUT_LOCKED indicates that the connection may not ne connected from a different MidiOutput, the connection source is immutable.
static int PLAYBACK
          PLAYBACK indicates that the Midi messages are already recorded such that Midi recording can ignore these connections
static int SYSTEM
          SYSTEM indicates that the connection is created by the system rather than by a user.
 
Constructor Summary
MidiConnection(MidiOutput from, MidiInput to)
           
MidiConnection(MidiOutput from, MidiInput to, int flags)
          Create a connection from a MidiOutput to a MidiInput with the specified flags.
 
Method Summary
 void close()
           
 void connectFrom(MidiOutput from)
           
 void connectTo(MidiInput to)
           
 MidiInput getMidiInput()
           
 MidiOutput getMidiOutput()
           
 boolean isPlayback()
           
 boolean isSystem()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAYBACK

public static final int PLAYBACK
PLAYBACK indicates that the Midi messages are already recorded such that Midi recording can ignore these connections

See Also:
Constant Field Values

SYSTEM

public static final int SYSTEM
SYSTEM indicates that the connection is created by the system rather than by a user. Typically this might inhibit a user from closing a connection.

See Also:
Constant Field Values

OUTPUT_LOCKED

public static final int OUTPUT_LOCKED
OUTPUT_LOCKED indicates that the connection may not ne connected from a different MidiOutput, the connection source is immutable.

See Also:
Constant Field Values

INPUT_LOCKED

public static final int INPUT_LOCKED
INPUT_LOCKED indicates that the connection may not ne connected to a different MidiInput, the connection destination is immutable.

See Also:
Constant Field Values
Constructor Detail

MidiConnection

public MidiConnection(MidiOutput from,
                      MidiInput to)

MidiConnection

public MidiConnection(MidiOutput from,
                      MidiInput to,
                      int flags)
Create a connection from a MidiOutput to a MidiInput with the specified flags.

Parameters:
from - the MidiOutput to connect from
to - the MidiInput to connect to.
flags - for the connection.
Method Detail

connectTo

public void connectTo(MidiInput to)
               throws javax.sound.midi.MidiUnavailableException
Throws:
javax.sound.midi.MidiUnavailableException

connectFrom

public void connectFrom(MidiOutput from)
                 throws javax.sound.midi.MidiUnavailableException
Throws:
javax.sound.midi.MidiUnavailableException

close

public void close()

getMidiOutput

public MidiOutput getMidiOutput()
Returns:
MidiOutput - the connection source.

getMidiInput

public MidiInput getMidiInput()
Returns:
MidiInput - the connection destination.

isSystem

public boolean isSystem()

isPlayback

public boolean isPlayback()


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.