javax.sound.midi
Class Sequencer.SyncMode

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.sound.midi.Sequencer.SyncMode
Enclosing interface:
Sequencer sample code for javax.sound.midi.Sequencer definition code for javax.sound.midi.Sequencer

public static class Sequencer.SyncMode
extends Object sample code for java.lang.Object definition code for java.lang.Object

A SyncMode object represents one of the ways in which a MIDI sequencer's notion of time can be synchronized with a master or slave device. If the sequencer is being synchronized to a master, the sequencer revises its current time in response to messages from the master. If the sequencer has a slave, the sequencer similarly sends messages to control the slave's timing.

There are three predefined modes that specify possible masters for a sequencer: INTERNAL_CLOCK, MIDI_SYNC, and MIDI_TIME_CODE. The latter two work if the sequencer receives MIDI messages from another device. In these two modes, the sequencer's time gets reset based on system real-time timing clock messages or MIDI time code (MTC) messages, respectively. These two modes can also be used as slave modes, in which case the sequencer sends the corresponding types of MIDI messages to its receiver (whether or not the sequencer is also receiving them from a master). A fourth mode, NO_SYNC, is used to indicate that the sequencer should not control its receiver's timing.

See Also:
Sequencer.setMasterSyncMode(Sequencer.SyncMode) sample code for javax.sound.midi.Sequencer.setMasterSyncMode(javax.sound.midi.Sequencer.SyncMode) definition code for javax.sound.midi.Sequencer.setMasterSyncMode(javax.sound.midi.Sequencer.SyncMode) , Sequencer.setSlaveSyncMode(Sequencer.SyncMode) sample code for javax.sound.midi.Sequencer.setSlaveSyncMode(javax.sound.midi.Sequencer.SyncMode) definition code for javax.sound.midi.Sequencer.setSlaveSyncMode(javax.sound.midi.Sequencer.SyncMode)

Field Summary
static Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode INTERNAL_CLOCK sample code for javax.sound.midi.Sequencer.SyncMode.INTERNAL_CLOCK definition code for javax.sound.midi.Sequencer.SyncMode.INTERNAL_CLOCK
          A master synchronization mode that makes the sequencer get its timing information from its internal clock.
static Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode MIDI_SYNC sample code for javax.sound.midi.Sequencer.SyncMode.MIDI_SYNC definition code for javax.sound.midi.Sequencer.SyncMode.MIDI_SYNC
          A master or slave synchronization mode that specifies the use of MIDI clock messages.
static Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode MIDI_TIME_CODE sample code for javax.sound.midi.Sequencer.SyncMode.MIDI_TIME_CODE definition code for javax.sound.midi.Sequencer.SyncMode.MIDI_TIME_CODE
          A master or slave synchronization mode that specifies the use of MIDI Time Code.
static Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode NO_SYNC sample code for javax.sound.midi.Sequencer.SyncMode.NO_SYNC definition code for javax.sound.midi.Sequencer.SyncMode.NO_SYNC
          A slave synchronization mode indicating that no timing information should be sent to the receiver.
 
Constructor Summary
protected Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode.Sequencer.SyncMode(java.lang.String) definition code for javax.sound.midi.Sequencer.SyncMode.Sequencer.SyncMode(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Constructs a synchronization mode.
 
Method Summary
 boolean equals sample code for javax.sound.midi.Sequencer.SyncMode.equals(java.lang.Object) definition code for javax.sound.midi.Sequencer.SyncMode.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Determines whether two objects are equal.
 int hashCode sample code for javax.sound.midi.Sequencer.SyncMode.hashCode() definition code for javax.sound.midi.Sequencer.SyncMode.hashCode() ()
          Finalizes the hashcode method.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.sound.midi.Sequencer.SyncMode.toString() definition code for javax.sound.midi.Sequencer.SyncMode.toString() ()
          Provides this synchronization mode's name as the string representation of the mode.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

INTERNAL_CLOCK sample code for javax.sound.midi.Sequencer.SyncMode.INTERNAL_CLOCK

public static final Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode  INTERNAL_CLOCK
A master synchronization mode that makes the sequencer get its timing information from its internal clock. This is not a legal slave sync mode.


MIDI_SYNC sample code for javax.sound.midi.Sequencer.SyncMode.MIDI_SYNC

public static final Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode  MIDI_SYNC
A master or slave synchronization mode that specifies the use of MIDI clock messages. If this mode is used as the master sync mode, the sequencer gets its timing information from system real-time MIDI clock messages. This mode only applies as the master sync mode for sequencers that are also MIDI receivers. If this is the slave sync mode, the sequencer sends system real-time MIDI clock messages to its receiver. MIDI clock messages are sent at a rate of 24 per quarter note.


MIDI_TIME_CODE sample code for javax.sound.midi.Sequencer.SyncMode.MIDI_TIME_CODE

public static final Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode  MIDI_TIME_CODE
A master or slave synchronization mode that specifies the use of MIDI Time Code. If this mode is used as the master sync mode, the sequencer gets its timing information from MIDI Time Code messages. This mode only applies as the master sync mode to sequencers that are also MIDI receivers. If this mode is used as the slave sync mode, the sequencer sends MIDI Time Code messages to its receiver. (See the MIDI 1.0 Detailed Specification for a description of MIDI Time Code.)


NO_SYNC sample code for javax.sound.midi.Sequencer.SyncMode.NO_SYNC

public static final Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode definition code for javax.sound.midi.Sequencer.SyncMode  NO_SYNC
A slave synchronization mode indicating that no timing information should be sent to the receiver. This is not a legal master sync mode.

Constructor Detail

Sequencer.SyncMode sample code for javax.sound.midi.Sequencer.SyncMode(java.lang.String) definition code for javax.sound.midi.Sequencer.SyncMode(java.lang.String)

protected Sequencer.SyncMode(String sample code for java.lang.String definition code for java.lang.String  name)
Constructs a synchronization mode.

Parameters:
name - name of the synchronization mode
Method Detail

equals sample code for javax.sound.midi.Sequencer.SyncMode.equals(java.lang.Object) definition code for javax.sound.midi.Sequencer.SyncMode.equals(java.lang.Object)

public final boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Determines whether two objects are equal. Returns true if the objects are identical

Overrides:
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) in class Object sample code for java.lang.Object definition code for java.lang.Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this object is the same as the obj argument, false otherwise
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.sound.midi.Sequencer.SyncMode.hashCode() definition code for javax.sound.midi.Sequencer.SyncMode.hashCode()

public final int hashCode()
Finalizes the hashcode method.

Overrides:
hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for javax.sound.midi.Sequencer.SyncMode.toString() definition code for javax.sound.midi.Sequencer.SyncMode.toString()

public final String sample code for java.lang.String definition code for java.lang.String  toString()
Provides this synchronization mode's name as the string representation of the mode.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
the name of this synchronization mode