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) BoundedRangeModel
getModel
(int resolution) Return a model which can be linked to some GUI widget.double
getRatio()
Return the currently valid R-value.void
send
(MidiMessage msg, long timeStamp) Filter function: Receive a message and send it to the drain.void
Change the data to play.void
setRatio
(double r) Change the currently valid R-value.protected void
update()
Fill the local cachetable
according 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 cachetable
according 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 ainvalid reference
NOTE_ON
bend(int, long)
. -
getModel
Return a model which can be linked to some GUI widget.
-