|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.emn.reactiveinput.AbstractDevice fr.emn.reactiveinput.devices.DMidiIn
Title: Input Configurator Description: Copyright: Copyright (c) 2001 Company: Ecole des Mines de Nantes
Field Summary | |
Out[] |
ctrl_val
|
Out |
kbd_ch
|
Out |
kbd_key
|
Out |
kbd_pressed
|
Out |
kbd_vel
|
Out |
ppress_ch
|
Out |
ppress_key
|
Out |
ppress_val
|
Out |
press_ch
|
Out |
press_key
|
Out |
press_val
|
Out |
prg_ch
|
Out |
prg_num
|
Out |
sysex
|
Out |
wheel_ch
|
Out |
wheel_val
|
Fields inherited from class fr.emn.reactiveinput.AbstractDevice |
currIndex, ins, outs |
Fields inherited from interface fr.emn.reactiveinput.Device |
AUTO_PROPERTIES |
Constructor Summary | |
DMidiIn()
|
|
DMidiIn(java.lang.String name,
javax.sound.midi.MidiDevice mididev)
|
Method Summary | |
void |
close()
Add closing code here if needed. |
Device |
copy()
Is isCopiable() returns true, copies the device by calling DeviceUtilities.defaultCopy(). |
boolean |
hasExternalInput()
Specifies whether this device has external (implicit) input or not. |
Processor |
open(OpenContext context)
Subclass this method if you want to specialize data processing, or if you want to perform some initializations before running the device. |
void |
update()
Updates device's output values. |
Methods inherited from class fr.emn.reactiveinput.AbstractDevice |
addIn, addIn, addOut, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, init, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, setEnabled, setInfo, setInfo, setLastError, setName |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public final Out kbd_pressed
public final Out kbd_key
public final Out kbd_vel
public final Out kbd_ch
public final Out ppress_key
public final Out ppress_val
public final Out ppress_ch
public final Out press_key
public final Out press_val
public final Out press_ch
public final Out[] ctrl_val
public final Out prg_num
public final Out prg_ch
public final Out wheel_val
public final Out wheel_ch
public final Out sysex
Constructor Detail |
public DMidiIn()
public DMidiIn(java.lang.String name, javax.sound.midi.MidiDevice mididev)
Method Detail |
public Device copy()
AbstractDevice
Subclass this method if you want to provide another strategy.
copy
in interface Device
copy
in class AbstractDevice
public boolean hasExternalInput()
AbstractDevice
Return false if the device is deterministic from the data & time points of view, i.e. if its output production only depend on the explicit input history (input slots) and device's initial configuration. This is the case of most of the processing devices.
Return true if output values not only depend on the values of input slots, or if output production takes undefined time. Examples of devices with external input are input peripherals and asynchronous devices.
This method is used by the reactive machine to determine if this device is triggered by its input slots, or if it must be triggered continuously (i.e. each tick). This method can also be used by the editor for the device's graphical representation.
hasExternalInput
in interface Device
hasExternalInput
in class AbstractDevice
public Processor open(OpenContext context)
AbstractDevice
By default, open() does nothing and returns the device itself as the Processor (or null if it is not openable): AbstractDevice implements both Device and Processor interfaces, so that you can add processing code directly into the device.
If you want to add specialization features, subclass this method to return a specific processor implementation depending on your device configuration.
Example :
public Processor getProcessor() {
if (super.open() == null)
return null;
// Select the right processor
if (in2.isValid()) {
return new twoParamProcessor(in1, in2, out);
else
return new oneParamProcessor(in1, out);
}
In this method, you may also perform all necessary pre-running initialization. If initialization fails, return null even if isOpenable() returns true.
In all cases, return null if isOpenable() returns false.
open
in interface Device
open
in class AbstractDevice
Processor
,
Device.open()
public void close()
AbstractDevice
close
in interface Device
close
in class AbstractDevice
public void update()
AbstractDevice
Subclass init() and update() methods if you want the device to process the data itself. Otherwise, subclass getProcessor() method to use extern processors.
update
in interface Processor
update
in class AbstractDevice
Processor.update()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |