Package eu.bandm.music.midi
Class PTITuningFilter
java.lang.Object
eu.bandm.music.midi.Filter
eu.bandm.music.midi.PTITuningFilter
- All Implemented Interfaces:
AutoCloseable,Receiver,Transmitter
Adds a micro-tuning command to every passing NOTE ON message.
Considers (a) the current factor "R", as described in the
documentation of TI tuning,
and (b) the tonality of the currently played example.
This tonality is fixed and encoded in the "Playable" object.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) BoundedRangeModelgetModel(int resolution) Return a model which can be linked to some GUI widget.doublegetRatio()Return the currently valid R-value.voidsend(MidiMessage msg, long timeStamp) Filter function: Receive a message and send it to the drain.voidChange the data to play.voidsetRatio(double r) Change the currently valid R-value.protected voidupdate()Fill the local cachetableaccording to the pre-selected tonality and r-value and send the pitch bend messages iff channels are currently sounding.Methods inherited from class eu.bandm.music.midi.Filter
close, getReceiver, setReceiver
-
Field Details
-
PAUSE
public static final int PAUSE- See Also:
-
-
Constructor Details
-
PTITuningFilter
Only constructor. Sets initial values, which can be altered later.- Parameters:
p- can be zero on construction only.
-
-
Method Details
-
getRatio
public double getRatio()Return the currently valid R-value. -
setRatio
public void setRatio(double r) Change the currently valid R-value.- Parameters:
r- between 0.0 and 1.0, inclusive.
-
setPlayable
Change the data to play. This is filename and tonality, but only tonality is considered in this class. -
update
protected void update()Fill the local cachetableaccording to the pre-selected tonality and r-value and send the pitch bend messages iff channels are currently sounding. -
send
Filter function: Receive a message and send it to the drain. (The latter is achieved by propagating to the super class.) If it its a, then send an immediately following pitch bend on the same channel, to adjust the sounding pitch from equally tempered to TiTuning(R), by callinginvalid reference
NOTE_ONbend(int, long). -
getModel
Return a model which can be linked to some GUI widget.
-