|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uiuc.cs397rhc.sound.MidiFilter
edu.uiuc.cs397rhc.sound.ConditionalMidiFilter
ConditionalMidiFilter is a MidiFilter whose
isApplicable() method is based entirely on an associated
MidiCondition. These are suited for transformations on incoming
ShortMessages.
| Constructor Summary | |
|---|---|
ConditionalMidiFilter()
Creates a ConditionalMidiFilter with no
Receiverthat always applies. |
|
ConditionalMidiFilter(MidiCondition condition)
Creates a ConditionalMidiFilter with no
Receiverthat applies when the given
MidiCondition is satisfied. |
|
ConditionalMidiFilter(javax.sound.midi.Receiver receiver)
Creates a ConditionalMidiFilter with the given
Receiver that always applies. |
|
ConditionalMidiFilter(javax.sound.midi.Receiver receiver,
MidiCondition condition)
Creates a ConditionalMidiFilter with the given
Receiver that applies when the given
MidiCOndition is satisfied. |
|
| Method Summary | |
|---|---|
MidiCondition |
getCondition()
Gets the MidiCondition used to determine when this
ConditionalMidiFilter applies. |
boolean |
isApplicable(javax.sound.midi.MidiMessage msg,
long time)
Determines whether this ConditionalMidiFilter applies to the
given MidiMessage and timestamp. |
void |
setCondition(MidiCondition condition)
Sets the MidiCondition used to determine when this
ConditionalMidiFilter applies. |
| Methods inherited from class edu.uiuc.cs397rhc.sound.MidiFilter |
|---|
applyFilter, close, getMicrosecondPosition, getReceiver, getSequencer, send, setReceiver, setSequencer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConditionalMidiFilter()
ConditionalMidiFilter with no
Receiverthat always applies.
public ConditionalMidiFilter(MidiCondition condition)
ConditionalMidiFilter with no
Receiverthat applies when the given
MidiCondition is satisfied.
condition - the conditionpublic ConditionalMidiFilter(javax.sound.midi.Receiver receiver)
ConditionalMidiFilter with the given
Receiver that always applies.
receiver - the receiver
public ConditionalMidiFilter(javax.sound.midi.Receiver receiver,
MidiCondition condition)
ConditionalMidiFilter with the given
Receiver that applies when the given
MidiCOndition is satisfied.
condition - the conditionreceiver - the receiver| Method Detail |
|---|
public boolean isApplicable(javax.sound.midi.MidiMessage msg,
long time)
ConditionalMidiFilter applies to the
given MidiMessage and timestamp. This is called by
send(), with the timestamp replaced by the microsecond
position of the associated sequencer if the original timestamp was -1 and
a sequencer has been specified.
isApplicable in class MidiFiltermsg - the messagetime - the timestamp
true if the given condition's
isSatisfiedBy(msg,time) returns true,
false otherwisepublic void setCondition(MidiCondition condition)
MidiCondition used to determine when this
ConditionalMidiFilter applies.
condition - the new conditionpublic MidiCondition getCondition()
MidiCondition used to determine when this
ConditionalMidiFilter applies.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||