1 7 8 package javax.sound.midi; 9 10 import java.io.InputStream ; 11 import java.io.IOException ; 12 13 14 53 public interface Sequencer extends MidiDevice { 54 55 56 64 public static final int LOOP_CONTINUOUSLY = -1; 65 66 67 68 78 public void setSequence(Sequence sequence) throws InvalidMidiDataException ; 79 80 81 93 public void setSequence(InputStream stream) throws IOException , InvalidMidiDataException ; 94 95 96 104 public Sequence getSequence(); 105 106 107 131 public void start(); 132 133 134 144 public void stop(); 145 146 147 154 public boolean isRunning(); 155 156 157 175 public void startRecording(); 176 177 178 187 public void stopRecording(); 188 189 190 197 public boolean isRecording(); 198 199 200 209 public void recordEnable(Track track, int channel); 210 211 212 218 public void recordDisable(Track track); 219 220 221 232 public float getTempoInBPM(); 233 234 235 244 public void setTempoInBPM(float bpm); 245 246 247 257 public float getTempoInMPQ(); 258 259 260 270 public void setTempoInMPQ(float mpq); 271 272 273 288 public void setTempoFactor(float factor); 289 290 291 298 public float getTempoFactor(); 299 300 301 306 public long getTickLength(); 307 308 309 318 public long getTickPosition(); 319 320 321 326 public void setTickPosition(long tick); 327 328 329 334 public long getMicrosecondLength(); 335 336 337 343 public long getMicrosecondPosition(); 344 345 346 351 public void setMicrosecondPosition(long microseconds); 352 353 354 369 public void setMasterSyncMode(SyncMode sync); 370 371 372 380 public SyncMode getMasterSyncMode(); 381 382 383 395 public SyncMode[] getMasterSyncModes(); 396 397 398 412 public void setSlaveSyncMode(SyncMode sync); 413 414 415 423 public SyncMode getSlaveSyncMode(); 424 425 426 435 public SyncMode[] getSlaveSyncModes(); 436 437 438 451 public void setTrackMute(int track, boolean mute); 452 453 454 465 public boolean getTrackMute(int track); 466 467 485 public void setTrackSolo(int track, boolean solo); 486 487 488 499 public boolean getTrackSolo(int track); 500 501 502 517 public boolean addMetaEventListener(MetaEventListener listener); 518 519 520 527 public void removeMetaEventListener(MetaEventListener listener); 528 529 530 559 public int[] addControllerEventListener(ControllerEventListener listener, int[] controllers); 560 561 562 583 public int[] removeControllerEventListener(ControllerEventListener listener, int[] controllers); 584 585 586 615 public void setLoopStartPoint(long tick); 616 617 618 627 public long getLoopStartPoint(); 628 629 630 660 public void setLoopEndPoint(long tick); 661 662 663 673 public long getLoopEndPoint(); 674 675 676 715 public void setLoopCount(int count); 716 717 718 729 public int getLoopCount(); 730 731 756 public static class SyncMode { 757 758 761 private String name; 762 763 767 protected SyncMode(String name) { 768 769 this.name = name; 770 } 771 772 773 780 public final boolean equals(Object obj) { 781 782 return super.equals(obj); 783 } 784 785 786 789 public final int hashCode() { 790 791 return super.hashCode(); 792 } 793 794 795 800 public final String toString() { 801 802 return name; 803 } 804 805 806 811 public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock"); 812 813 814 825 public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync"); 826 827 828 840 public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code"); 841 842 843 848 public static final SyncMode NO_SYNC = new SyncMode("No Timing"); 849 850 } } 852 | Popular Tags |