$$ \definecolor{rr}{rgb}{0.95,0.1,0} \definecolor{bb}{rgb}{0,0.4,1} \definecolor{gg}{rgb}{0,0.6,0} \definecolor{yy}{rgb}{0.8,0.5,0} \definecolor{pp}{rgb}{0.9,0,0.5} $$
내성적 물망초
: 내 성적 물리 때문에 망하기 10초 전

Sequencer 인터페이스

~카테고리:
java/midi
패키지: javax.sound.midi
모든 부모인터페이스:
AutoCloseable, MidiDevice

public interface Sequencer extends MidiDevice

미디시퀀스를 연주하는 하드웨어 또는 소프트웨어 장치는 ‘시퀀서’라고 알려져있다. 미디시퀀스 하나는 표준미디파일에서 읽힐 것과 같은 시간 표시된 미디데이터의 목록을 포함한다. 또한, 시퀀서 대부분은 시퀀스를 만들고 편집하는 기능을 제공한다.

Sequencer 인터페이스는 다음과 같은 기초 미디 시퀀서 조작 메쏘드를 포함한다.

  • 미디파일 데이터에서 시퀀스를 얻어내기
  • 재생을 시작하고 멈추기
  • 시퀀스 내 임의의 위치로 이동
  • 재생 빠르기를 바꾸기
  • 내부 클럭 또는 수신 된 MIDI 메시지에 재생 동기화
  • 다른 장치의 타이밍 제어

덧붙여, Sequencer가 접근할 수 있는 오브젝트를 통해 직·간접적으로 다음 조작이 지원된다.

  • 미디이벤트나 전체 트랙을 더하거나 뺌으로써 데이터 수정
  • 시퀀스 안의 각 트랙들을 음소거 또는 ` soloing
  • 시퀀스를 재생하는 도중에 메타이벤트나 컨트롤변경이벤트를 마주쳤음을 리스너 오브젝들에게 알리기
같이보기:
Sequencer.SyncMode, addMetaEventListener(javax.sound.midi.MetaEventListener), ControllerEventListener, Receiver, Transmitter, MidiDevice

중첩 클래스 요약

중첩 클래스
제한자, 자료형 식별자, 설명
static class Sequencer.SyncMode 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. `slave 디바이쓰가 우리말로 모냐 ???
javax.sound.midi.MidiDevice에서 상속받은 중첩 클래스 또는 인터페이스
MidiDevice.Info

필드 요약

필드
제한자, 자료형 식별자, 설명
static int LOOP_CONTINUOUSLY 반복을 특정횟수 한 뒤에도 반복이 완료되기보단 무한정 계속돼야 함을 나타내는 값

메쏘드 요약

메쏘드
제한자, 자료형 식별자, 설명
int[] addControllerEventListener(
ControllerEventListener listener
,
int[] controllers
)
`Registers a controller event listener to receive notification whenever the sequencer processes a control-change event of the requested type or types.
boolean addMetaEventListener(
MetaEventListener listener
)
`Registers a meta-event listener to receive notification whenever a meta-event is encountered in the sequence and processed by the sequencer.
int getLoopCount() 재생 반복 횟수를 얻기.
long getLoopEndPoint() Obtains the end position of the loop, in MIDI ticks.
long getLoopStartPoint() Obtains the start position of the loop, in MIDI ticks.
Sequencer.SyncMode getMasterSyncMode() Obtains the current master synchronization mode for this sequencer.
Sequencer.SyncMode[] getMasterSyncModes() Obtains the set of master synchronization modes supported by this sequencer.
long getMicrosecondLength() Obtains the length of the current sequence, expressed in microseconds, or 0 if no sequence is set.
long getMicrosecondPosition() Obtains the current position in the sequence, expressed in microseconds.
Sequence getSequence() Obtains the sequence on which the Sequencer is currently operating.
Sequencer.SyncMode getSlaveSyncMode() Obtains the current slave synchronization mode for this sequencer.
Sequencer.SyncMode[] getSlaveSyncModes() Obtains the set of slave synchronization modes supported by the sequencer.
float getTempoFactor() Returns the current tempo factor for the sequencer.
float getTempoInBPM() Obtains the current tempo, expressed in beats per minute.
float getTempoInMPQ() Obtains the current tempo, expressed in microseconds per quarter note.
long getTickLength() Obtains the length of the current sequence, expressed in MIDI ticks, or 0 if no sequence is set.
long getTickPosition() Obtains the current position in the sequence, expressed in MIDI ticks.
boolean getTrackMute(
int track
)
Obtains the current mute state for a track.
boolean getTrackSolo(
int track
)
Obtains the current solo state for a track.
boolean isRecording() Indicates whether the Sequencer is currently recording.
boolean isRunning() Indicates whether the Sequencer is currently running.
void recordDisable(
Track track
)
Disables recording to the specified track.
void recordEnable(
Track track
,
int channel
)
Prepares the specified track for recording events received on a particular channel.
int[] removeControllerEventListener(
ControllerEventListener listener
,
int[] controllers
)
Removes a controller event listener's interest in one or more types of controller event.
void removeMetaEventListener(
MetaEventListener listener
)
Removes the specified meta-event listener from this sequencer's list of registered listeners, if in fact the listener is registered.
void setLoopCount(
int count
)
재생 반복 횟수를 설정.
void setLoopEndPoint(
long tick
)
Sets the last MIDI tick that will be played in the loop.
void setLoopStartPoint(
long tick
)
Sets the first MIDI tick that will be played in the loop.
void setMasterSyncMode(
Sequencer.SyncMode sync
)
Sets the source of timing information used by this sequencer.
void setMicrosecondPosition(
long microseconds
)
Sets the current position in the sequence, expressed in microseconds
void setSequence(
InputStream stream
)
Sets the current sequence on which the sequencer operates.
void setSequence(
Sequence sequence
)
Sets the current sequence on which the sequencer operates.
void setSlaveSyncMode(
Sequencer.SyncMode sync
)
Sets the slave synchronization mode for the sequencer.
void setTempoFactor(
float factor
)
Scales the sequencer's actual playback tempo by the factor provided.
void setTempoInBPM(
float bpm
)
Sets the tempo in beats per minute.
void setTempoInMPQ(
float mpq
)
Sets the tempo in microseconds per quarter note.
void setTickPosition(
long tick
)
Sets the current sequencer position in MIDI ticks
void setTrackMute(
int track
,
boolean mute
)
Sets the mute state for a track.
void setTrackSolo(
int track
,
boolean solo
)
Sets the solo state for a track.
void start() Starts playback of the MIDI data in the currently loaded sequence.
void startRecording() Starts recording and playback of MIDI data.
void stop() Stops recording, if active, and playback of the currently loaded sequence, if any.
void stopRecording() Stops recording, if active.
javax.sound.midi.MidiDevice에서 상속받은 메쏘드
close, getDeviceInfo, getMaxReceivers, getMaxTransmitters, getReceiver, getReceivers, getTransmitter, getTransmitters, isOpen, open
https://docs.oracle.com/javase/7/docs/api/javax/sound/midi/Sequencer.html