1. /*
  2. * @(#)Sequencer.java 1.31 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.sound.midi;
  8. import java.io.InputStream;
  9. import java.io.IOException;
  10. /**
  11. * A hardware or software device that plays back a MIDI
  12. * <code>{@link Sequence sequence}</code> is known as a <em>sequencer</em>.
  13. * A MIDI sequence contains lists of time-stamped MIDI data, such as
  14. * might be read from a standard MIDI file. Most
  15. * sequencers also provide functions for creating and editing sequences.
  16. * <p>
  17. * The <code>Sequencer</code> interface includes methods for the following
  18. * basic MIDI sequencer operations:
  19. * <ul>
  20. * <li>obtaining a sequence from MIDI file data</li>
  21. * <li>starting and stopping playback</li>
  22. * <li>moving to an arbitrary position in the sequence</li>
  23. * <li>changing the tempo (speed) of playback</li>
  24. * <li>synchronizing playback to an internal clock or to received MIDI
  25. * messages</li>
  26. * <li>controlling the timing of another device</li>
  27. * </ul>
  28. * In addition, the following operations are supported, either directly, or
  29. * indirectly through objects that the <code>Sequencer</code> has access to:
  30. * <ul>
  31. * <li>editing the data by adding or deleting individual MIDI events or entire
  32. * tracks</li>
  33. * <li>muting or soloing individual tracks in the sequence</li>
  34. * <li>notifying listener objects about any meta-events or
  35. * control-change events encountered while playing back the sequence.</li>
  36. * </ul>
  37. *
  38. * @see Sequencer.SyncMode
  39. * @see #addMetaEventListener
  40. * @see ControllerEventListener
  41. * @see Receiver
  42. * @see Transmitter
  43. * @see MidiDevice
  44. *
  45. * @version 1.31, 03/01/23
  46. * @author Kara Kytle
  47. */
  48. public interface Sequencer extends MidiDevice {
  49. // /**
  50. // * The type of event indicating that playback of a sequence has
  51. // * completed because the final event in the sequence has been
  52. // * processed.
  53. // */
  54. // public static final MidiDeviceEvent.Type EOM = new MidiDeviceEvent.Type("EOM");
  55. // /**
  56. // * The type of event indicating that the sequencer has started playback.
  57. // *
  58. // * @see #start()
  59. // */
  60. // public static final MidiDeviceEvent.Type START = new MidiDeviceEvent.Type("Start");
  61. // /**
  62. // * The type of event indicating that the sequencer has actively stopped
  63. // * playback. This event is not generated when the end of the sequence
  64. // * is reached, even though playback also stops in that situation.
  65. // *
  66. // * @see #EOM
  67. // * @see #stop()
  68. // */
  69. // public static final MidiDeviceEvent.Type STOP = new MidiDeviceEvent.Type("Stop");
  70. /**
  71. * Sets the current sequence on which the sequencer operates.
  72. * @param sequence the sequence to be loaded.
  73. * @throws InvalidMidiDataException if the sequence contains invalid
  74. * MIDI data, or is not supported.
  75. */
  76. public void setSequence(Sequence sequence) throws InvalidMidiDataException;
  77. /**
  78. * Sets the current sequence on which the sequencer operates.
  79. * The stream must point to MIDI file data.
  80. * @param stream stream containing MIDI file data.
  81. * @throws IOException if an I/O exception occurs during reading of the stream.
  82. * @throws InvalidMidiDataException if invalid data is encountered
  83. * in the stream, or the stream is not supported.
  84. */
  85. public void setSequence(InputStream stream) throws IOException, InvalidMidiDataException;
  86. /**
  87. * Obtains the sequence on which the Sequencer is currently operating.
  88. * @return the current sequence, or <code>null</code> if no sequence is currently set.
  89. */
  90. public Sequence getSequence();
  91. /**
  92. * Starts playback of the MIDI data in the currently loaded sequence.
  93. *
  94. * @see #start
  95. * @see #stop
  96. */
  97. public void start();
  98. /**
  99. * Stops recording, if active, and playback of the currently loaded sequence,
  100. * if any.
  101. *
  102. * @see #start
  103. * @see #isRunning
  104. */
  105. public void stop();
  106. /**
  107. * Indicates whether the Sequencer is currently running. The default is <code>false</code>.
  108. * The Sequencer starts running when either <code>{@link #start}</code> or <code>{@link #startRecording}</code>
  109. * is called. <code>isRunning</code> then returns <code>true</code> until playback of the
  110. * sequence completes or <code>{@link #stop}</code> is called.
  111. * @return <code>true</code> if the Sequencer is running, otherwise <code>false</code>
  112. */
  113. public boolean isRunning();
  114. /**
  115. * Starts recording and playback of MIDI data. Data is recorded to all enabled tracks,
  116. * on the channel(s) for which they were enabled. Recording begins at the current position
  117. * of the sequencer. Any events already in the track are overwritten for the duration
  118. * of the recording session. Events from the currently loaded sequence,
  119. * if any, are delivered to the sequencer's transmitter(s) along with messages
  120. * received during recording.
  121. * <p>
  122. * Note that tracks are not by default enabled for recording. In order to record MIDI data,
  123. * at least one track must be specifically enabled for recording.
  124. *
  125. * @see #startRecording
  126. * @see #recordEnable
  127. * @see #recordDisable
  128. */
  129. public void startRecording();
  130. /**
  131. * Stops recording, if active. Playback of the current sequence continues.
  132. *
  133. * @see #startRecording
  134. * @see #isRecording
  135. */
  136. public void stopRecording();
  137. /**
  138. * Indicates whether the Sequencer is currently recording. The default is <code>false</code>.
  139. * The Sequencer begins recording when <code>{@link #startRecording}</code> is called,
  140. * and then returns <code>true</code> until <code>{@link #stop}</code> or <code>{@link #stopRecording}</code>
  141. * is called.
  142. * @return <code>true</code> if the Sequencer is recording, otherwise <code>false</code>
  143. */
  144. public boolean isRecording();
  145. /**
  146. * Prepares the specified track for recording events received on a particular channel.
  147. * Once enabled, a track will receive events when recording is active.
  148. * @param track the track to which events will be recorded
  149. * @param channel the channel on which events will be received. If -1 is specified
  150. * for the channel value, the track will receive data from all channels.
  151. * @throws IllegalArgumentException thrown if the track is not part of the current
  152. * sequence.
  153. */
  154. public void recordEnable(Track track, int channel);
  155. /**
  156. * Disables recording to the specified track. Events will no longer be recorded
  157. * into this track.
  158. * @param track the track to disable for recording, or <code>null</code> to disable
  159. * recording for all tracks.
  160. */
  161. public void recordDisable(Track track);
  162. /**
  163. * Obtains the current tempo, expressed in beats per minute. The
  164. * actual tempo of playback is the product of the returned value
  165. * and the tempo factor.
  166. *
  167. * @return the current tempo in beats per minute
  168. *
  169. * @see #getTempoFactor
  170. * @see #setTempoInBPM(float)
  171. * @see #getTempoInMPQ
  172. */
  173. public float getTempoInBPM();
  174. /**
  175. * Sets the tempo in beats per minute. The actual tempo of playback
  176. * is the product of the specified value and the tempo factor.
  177. *
  178. * @param bpm desired new tempo in beats per minute
  179. * @see #getTempoFactor
  180. * @see #setTempoInMPQ(float)
  181. * @see #getTempoInBPM
  182. */
  183. public void setTempoInBPM(float bpm);
  184. /**
  185. * Obtains the current tempo, expressed in microseconds per quarter
  186. * note. The actual tempo of playback is the product of the returned
  187. * value and the tempo factor.
  188. *
  189. * @return the current tempo in microseconds per quarter note
  190. * @see #getTempoFactor
  191. * @see #setTempoInMPQ(float)
  192. * @see #getTempoInBPM
  193. */
  194. public float getTempoInMPQ();
  195. /**
  196. * Sets the tempo in microseconds per quarter note. The actual tempo
  197. * of playback is the product of the specified value and the tempo
  198. * factor.
  199. *
  200. * @param mpq desired new tempo in microseconds per quarter note.
  201. * @see #getTempoFactor
  202. * @see #setTempoInBPM(float)
  203. * @see #getTempoInMPQ
  204. */
  205. public void setTempoInMPQ(float mpq);
  206. /**
  207. * Scales the sequencer's actual playback tempo by the factor provided.
  208. * The default is 1.0. A value of 1.0 represents the natural rate (the
  209. * tempo specified in the sequence), 2.0 means twice as fast, etc.
  210. * The tempo factor does not affect the values returned by
  211. * <code>{@link #getTempoInMPQ}</code> and <code>{@link #getTempoInBPM}</code>.
  212. * Those values indicate the tempo prior to scaling.
  213. * <p>
  214. * Note that the tempo factor cannot be adjusted when external
  215. * synchronization is used. In that situation,
  216. * <code>setTempoFactor</code> always sets the tempo factor to 1.0.
  217. *
  218. * @param factor the requested tempo scalar
  219. * @see #getTempoFactor
  220. */
  221. public void setTempoFactor(float factor);
  222. /**
  223. * Returns the current tempo factor for the sequencer. The default is
  224. * 1.0.
  225. *
  226. * @return tempo factor.
  227. * @see #setTempoFactor(float)
  228. */
  229. public float getTempoFactor();
  230. /**
  231. * Obtains the length of the current sequence, expressed in MIDI ticks.
  232. * @return length of the sequence in ticks
  233. */
  234. public long getTickLength();
  235. /**
  236. * Obtains the current position in the sequence, expressed in MIDI
  237. * ticks. (The duration of a tick in seconds is determined both by
  238. * the tempo and by the timing resolution stored in the
  239. * <code>{@link Sequence}</code>.)
  240. *
  241. * @return current tick
  242. * @see #setTickPosition
  243. */
  244. public long getTickPosition();
  245. /**
  246. * Sets the current sequencer position in MIDI ticks
  247. * @param tick the desired tick position
  248. * @see #getTickPosition
  249. */
  250. public void setTickPosition(long tick);
  251. /**
  252. * Obtains the length of the current sequence, expressed in microseconds.
  253. * @return length of the sequence in microseconds
  254. */
  255. public long getMicrosecondLength();
  256. /**
  257. * Obtains the current position in the sequence, expressed in
  258. * microseconds.
  259. * @return the current position in microseconds
  260. * @see #setMicrosecondPosition
  261. */
  262. public long getMicrosecondPosition();
  263. /**
  264. * Sets the current position in the sequence, expressed in microseconds
  265. * @param microseconds desired position in microseconds
  266. * @see #getMicrosecondPosition
  267. */
  268. public void setMicrosecondPosition(long microseconds);
  269. /**
  270. * Sets the source of timing information used by this sequencer.
  271. * The sequencer synchronizes to the master, which is the internal clock,
  272. * MIDI clock, or MIDI time code, depending on the value of
  273. * <code>sync</code>. The <code>sync</code> argument must be one
  274. * of the supported modes, as returned by
  275. * <code>{@link #getMasterSyncModes}</code>.
  276. *
  277. * @param sync the desired master synchronization mode
  278. *
  279. * @see SyncMode#INTERNAL_CLOCK
  280. * @see SyncMode#MIDI_SYNC
  281. * @see SyncMode#MIDI_TIME_CODE
  282. * @see #getMasterSyncMode
  283. */
  284. public void setMasterSyncMode(SyncMode sync);
  285. /**
  286. * Obtains the current master synchronization mode for this sequencer.
  287. *
  288. * @return the current master synchronization mode
  289. *
  290. * @see #setMasterSyncMode(Sequencer.SyncMode)
  291. * @see #getMasterSyncModes
  292. */
  293. public SyncMode getMasterSyncMode();
  294. /**
  295. * Obtains the set of master synchronization modes supported by this
  296. * sequencer.
  297. *
  298. * @return the available master synchronization modes
  299. *
  300. * @see SyncMode#INTERNAL_CLOCK
  301. * @see SyncMode#MIDI_SYNC
  302. * @see SyncMode#MIDI_TIME_CODE
  303. * @see #getMasterSyncMode
  304. * @see #setMasterSyncMode(Sequencer.SyncMode)
  305. */
  306. public SyncMode[] getMasterSyncModes();
  307. /**
  308. * Sets the slave synchronization mode for the sequencer.
  309. * This indicates the type of timing information sent by the sequencer
  310. * to its receiver. The <code>sync</code> argument must be one
  311. * of the supported modes, as returned by
  312. * <code>{@link #getSlaveSyncModes}</code>.
  313. *
  314. * @param sync the desired slave synchronization mode
  315. *
  316. * @see SyncMode#MIDI_SYNC
  317. * @see SyncMode#MIDI_TIME_CODE
  318. * @see SyncMode#NO_SYNC
  319. * @see #getSlaveSyncModes
  320. */
  321. public void setSlaveSyncMode(SyncMode sync);
  322. /**
  323. * Obtains the current slave synchronization mode for this sequencer.
  324. *
  325. * @return the current slave synchronization mode
  326. *
  327. * @see #setSlaveSyncMode(Sequencer.SyncMode)
  328. * @see #getSlaveSyncModes
  329. */
  330. public SyncMode getSlaveSyncMode();
  331. /**
  332. * Obtains the set of slave synchronization modes supported by the sequencer.
  333. *
  334. * @return the available slave synchronization modes
  335. *
  336. * @see SyncMode#MIDI_SYNC
  337. * @see SyncMode#MIDI_TIME_CODE
  338. * @see SyncMode#NO_SYNC
  339. */
  340. public SyncMode[] getSlaveSyncModes();
  341. /**
  342. * Sets the mute state for a track. This method may fail for a number
  343. * of reasons. For example, the track number specified may not be valid
  344. * for the current sequence, or the sequencer may not support this functionality.
  345. * An application which needs to verify whether this operation succeeded should
  346. * follow this call with a call to <code>{@link #getTrackMute}</code>.
  347. *
  348. * @param track the track number. Tracks in the current sequence are numbered
  349. * from 0 to the number of tracks in the sequence minus 1.
  350. * @param mute the new mute state for the track. <code>true</code> implies the
  351. * track should be muted, <code>false</code> implies the track should be unmuted.
  352. * @see #getSequence
  353. */
  354. public void setTrackMute(int track, boolean mute);
  355. /**
  356. * Obtains the current mute state for a track. The default mute
  357. * state for all tracks which have not been muted is false. In any
  358. * case where the specified track has not been muted, this method should
  359. * return false. This applies if the sequencer does not support muting
  360. * of tracks, and if the specified track index is not valid.
  361. *
  362. * @param track the track number. Tracks in the current sequence are numbered
  363. * from 0 to the number of tracks in the sequence minus 1.
  364. * @return <code>true</code> if muted, <code>false</code> if not.
  365. */
  366. public boolean getTrackMute(int track);
  367. /**
  368. * Sets the solo state for a track. If <code>solo</code> is <code>true</code>
  369. * only this track and other solo'd tracks will sound. If <code>solo</code>
  370. * is <code>false</code> then only other solo'd tracks will sound, unless no
  371. * tracks are solo'd in which case all un-muted tracks will sound.
  372. * <p>
  373. * This method may fail for a number
  374. * of reasons. For example, the track number specified may not be valid
  375. * for the current sequence, or the sequencer may not support this functionality.
  376. * An application which needs to verify whether this operation succeeded should
  377. * follow this call with a call to <code>{@link #getTrackSolo}</code>.
  378. *
  379. * @param track the track number. Tracks in the current sequence are numbered
  380. * from 0 to the number of tracks in the sequence minus 1.
  381. * @param solo the new solo state for the track. <code>true</code> implies the
  382. * track should be solo'd, <code>false</code> implies the track should not be solo'd.
  383. * @see #getSequence
  384. */
  385. public void setTrackSolo(int track, boolean solo);
  386. /**
  387. * Obtains the current solo state for a track. The default mute
  388. * state for all tracks which have not been solo'd is false. In any
  389. * case where the specified track has not been solo'd, this method should
  390. * return false. This applies if the sequencer does not support soloing
  391. * of tracks, and if the specified track index is not valid.
  392. *
  393. * @param track the track number. Tracks in the current sequence are numbered
  394. * from 0 to the number of tracks in the sequence minus 1.
  395. * @return <code>true</code> if solo'd, <code>false</code> if not.
  396. */
  397. public boolean getTrackSolo(int track);
  398. /**
  399. * Registers a meta-event listener to receive
  400. * notification whenever a meta-event is encountered in the sequence
  401. * and processed by the sequencer. This method can fail if, for
  402. * instance,this class of sequencer does not support meta-event
  403. * notification.
  404. *
  405. * @param listener listener to add
  406. * @return <code>true</code> if the listener was successfully added,
  407. * otherwise <code>false</code>
  408. *
  409. * @see #removeMetaEventListener
  410. * @see MetaEventListener
  411. * @see MetaMessage
  412. */
  413. public boolean addMetaEventListener(MetaEventListener listener);
  414. /**
  415. * Removes the specified meta-event listener from this sequencer's
  416. * list of registered listeners, if in fact the listener is registered.
  417. *
  418. * @param listener the meta-event listener to remove
  419. * @see #addMetaEventListener
  420. */
  421. public void removeMetaEventListener(MetaEventListener listener);
  422. /**
  423. * Registers a controller event listener to receive notification
  424. * whenever the sequencer processes a control-change event of the
  425. * requested type or types. The types are specified by the
  426. * <code>controllers</code> argument, which should contain an array of
  427. * MIDI controller numbers. (Each number should be between 0 and 127,
  428. * inclusive. See the MIDI 1.0 Specification for the numbers that
  429. * correspond to various types of controllers.)
  430. * <p>
  431. * The returned array contains the MIDI controller
  432. * numbers for which the listener will now receive events.
  433. * Some sequencers might not support controller event notification, in
  434. * which case the array has a length of 0. Other sequencers might
  435. * support notification for some controllers but not all.
  436. * This method may be invoked repeatedly.
  437. * Each time, the returned array indicates all the controllers
  438. * that the listener will be notified about, not only the controllers
  439. * requested in that particular invocation.
  440. *
  441. * @param listener the controller event listener to add to the list of
  442. * registered listeners
  443. * @param controllers the MIDI controller numbers for which change
  444. * notification is requested
  445. * @return the numbers of all the MIDI controllers whose changes will
  446. * now be reported to the specified listener
  447. *
  448. * @see #removeControllerEventListener
  449. * @see ControllerEventListener
  450. */
  451. public int[] addControllerEventListener(ControllerEventListener listener, int[] controllers);
  452. /**
  453. * Removes a controller event listener's interest in one or more
  454. * types of controller event. The <code>controllers</code> argument
  455. * is an array of MIDI numbers corresponding to the controllers for
  456. * which the listener should no longer receive change notifications.
  457. * To completely remove this listener from the list of registered
  458. * listeners, pass in <code>null</code> for <code>controllers</code>.
  459. * The returned array contains the MIDI controller
  460. * numbers for which the listener will now receive events. The
  461. * array has a length of 0 if the listener will not receive
  462. * change notifications for any controllers.
  463. *
  464. * @param listener old listener
  465. * @param controllers the MIDI controller numbers for which change
  466. * notification should be cancelled, or <code>null</code> to cancel
  467. * for all controllers
  468. * @return the numbers of all the MIDI controllers whose changes will
  469. * now be reported to the specified listener
  470. *
  471. * @see #addControllerEventListener
  472. */
  473. public int[] removeControllerEventListener(ControllerEventListener listener, int[] controllers);
  474. /**
  475. * Loads the specified sequence.
  476. * @param sequence sequence to be loaded.
  477. */
  478. //public void load(Sequence sequence);
  479. /**
  480. * Loads the specified sequence from file data.
  481. * @param stream stream containing file data.
  482. * @throws IOException if an I/O exception occurs during reading of the stream.
  483. * @throws InvalidMidiDataException if invalid data is encountered
  484. * in the stream, or the stream is not supported.
  485. */
  486. //public void load(MidiFile stream) throws IOException, InvalidMidiDataException;
  487. /**
  488. * Unloads the currently loaded sequence, if any.
  489. */
  490. //public void unload();
  491. /**
  492. * Obtains the length of the current sequence, expressed in measures,
  493. * beats, and ticks.
  494. * @return length of the sequence
  495. */
  496. //public TimeMBT getMBTLength();
  497. /**
  498. * Obtains the current position in the sequence, expressed in measures,
  499. * beats, and ticks.
  500. * @return the current position
  501. */
  502. //public TimeMBT getMBTPosition();
  503. /**
  504. * Sets the current position in the sequence, expressed in measures,
  505. * beats, and ticks.
  506. *
  507. * @param time the desired position
  508. */
  509. //public void setMBTPosition(TimeMBT time);
  510. /**
  511. * Obtains the length of the current sequence, expressed in hours,
  512. * minutes, seconds, and frames.
  513. * @return length of the sequence
  514. */
  515. //public TimeSMPTE getSMPTELength();
  516. /**
  517. * Obtains the current position in the sequence, expressed in hours,
  518. * minutes, seconds, and frames.
  519. * @return the current position
  520. */
  521. //public TimeSMPTE getSMPTEPosition();
  522. /**
  523. * Sets the current position in the sequence, expressed in hours,
  524. * minutes, seconds, and frames.
  525. *
  526. * @param time desired position
  527. */
  528. //public void setSMPTEPosition(TimeSMPTE time);
  529. /**
  530. * A <code>SyncMode</code> object represents one of the ways in which
  531. * a MIDI sequencer's notion of time can be synchronized with a master
  532. * or slave device.
  533. * If the sequencer is being synchronized to a master, the
  534. * sequencer revises its current time in response to messages from
  535. * the master. If the sequencer has a slave, the sequencer
  536. * similarly sends messages to control the slave's timing.
  537. * <p>
  538. * There are three predefined modes that specify possible masters
  539. * for a sequencer: <code>INTERNAL_CLOCK</code>,
  540. * <code>MIDI_SYNC</code>, and <code>MIDI_TIME_CODE</code>. The
  541. * latter two work if the sequencer receives MIDI messages from
  542. * another device. In these two modes, the sequencer's time gets reset
  543. * based on system real-time timing clock messages or MIDI time code
  544. * (MTC) messages, respectively. These two modes can also be used
  545. * as slave modes, in which case the sequencer sends the corresponding
  546. * types of MIDI messages to its receiver (whether or not the sequencer
  547. * is also receiving them from a master). A fourth mode,
  548. * <code>NO_SYNC</code>, is used to indicate that the sequencer should
  549. * not control its receiver's timing.
  550. *
  551. * @see Sequencer#setMasterSyncMode(Sequencer.SyncMode)
  552. * @see Sequencer#setSlaveSyncMode(Sequencer.SyncMode)
  553. */
  554. public static class SyncMode {
  555. /**
  556. * Synchronization mode name.
  557. */
  558. private String name;
  559. /**
  560. * Constructs a synchronization mode.
  561. * @param name name of the synchronization mode
  562. */
  563. protected SyncMode(String name) {
  564. this.name = name;
  565. }
  566. /**
  567. * Determines whether two objects are equal.
  568. * Returns <code>true</code> if the objects are identical
  569. * @param obj the reference object with which to compare
  570. * @return <code>true</code> if this object is the same as the
  571. * <code>obj</code> argument, <code>false</code> otherwise
  572. */
  573. public final boolean equals(Object obj) {
  574. return super.equals(obj);
  575. }
  576. /**
  577. * Finalizes the hashcode method.
  578. */
  579. public final int hashCode() {
  580. return super.hashCode();
  581. }
  582. /**
  583. * Provides this synchronization mode's name as the string
  584. * representation of the mode.
  585. * @return the name of this synchronization mode
  586. */
  587. public final String toString() {
  588. return name;
  589. }
  590. /**
  591. * A master synchronization mode that makes the sequencer get
  592. * its timing information from its internal clock. This is not
  593. * a legal slave sync mode.
  594. */
  595. public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock");
  596. /**
  597. * A master or slave synchronization mode that specifies the
  598. * use of MIDI clock
  599. * messages. If this mode is used as the master sync mode,
  600. * the sequencer gets its timing information from system real-time
  601. * MIDI clock messages. This mode only applies as the master sync
  602. * mode for sequencers that are also MIDI receivers. If this is the
  603. * slave sync mode, the sequencer sends system real-time MIDI clock
  604. * messages to its receiver. MIDI clock messages are sent at a rate
  605. * of 24 per quarter note.
  606. */
  607. public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync");
  608. /**
  609. * A master or slave synchronization mode that specifies the
  610. * use of MIDI Time Code.
  611. * If this mode is used as the master sync mode,
  612. * the sequencer gets its timing information from MIDI Time Code
  613. * messages. This mode only applies as the master sync
  614. * mode to sequencers that are also MIDI receivers. If this
  615. * mode is used as the
  616. * slave sync mode, the sequencer sends MIDI Time Code
  617. * messages to its receiver. (See the MIDI 1.0 Detailed
  618. * Specification for a description of MIDI Time Code.)
  619. */
  620. public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code");
  621. /**
  622. * A slave synchronization mode indicating that no timing information
  623. * should be sent to the receiver. This is not a legal master sync
  624. * mode.
  625. */
  626. public static final SyncMode NO_SYNC = new SyncMode("No Timing");
  627. } // class SyncMode
  628. }