#include <ICubeXDevice.H>
Inherits IS3D::PolledDevice.
Public Member Functions | |
ICubeXDevice (const std::string &activeChannels) | |
ICubeXDevice (const std::string &activeChannels, int midiInDeviceNum, int midiOutDeviceNum) | |
virtual | ~ICubeXDevice () |
void | pollForEvents () |
Static Public Member Functions | |
static ICubeXDevice * | fromConfigVals (const std::string &devname) |
Creates a device from settings stored in ConfigVals. | |
Protected Member Functions | |
void | init () |
void | reportChannel (int channel, double data) |
Protected Attributes | |
std::string | _activeChannelsStr |
Array< int > | _activeChannels |
int | _inDevNum |
int | _outDevNum |
MidiInDevice * | _in |
MidiOutDevice * | _out |
double | _channelData [32] |
IS3D::ICubeXDevice::ICubeXDevice | ( | const std::string & | activeChannels | ) |
This constructor will prompt the user for the midi ports to open. activeChannels is a space separated list of channel numbers to listen for events on. These range from 1 to 32 and correspond to the numbers printed on the device itself.
IS3D::ICubeXDevice::ICubeXDevice | ( | const std::string & | activeChannels, | |
int | midiInDeviceNum, | |||
int | midiOutDeviceNum | |||
) |
This constructor opens a midi-in and midi-out device by their number. You can get the available midi device names with the calls: IS3D::MidiInDevice::getAvailableDeviceNames() and also IS3D::MidiOutDevice::getAvailableDeviceNames(). The device number is the index of the device in the array returned by these calls.
virtual IS3D::ICubeXDevice::~ICubeXDevice | ( | ) | [virtual] |
static ICubeXDevice* IS3D::ICubeXDevice::fromConfigVals | ( | const std::string & | devname | ) | [static] |
Creates a device from settings stored in ConfigVals.
void IS3D::ICubeXDevice::pollForEvents | ( | ) | [virtual] |
Implements IS3D::PolledDevice.
void IS3D::ICubeXDevice::init | ( | ) | [protected] |
void IS3D::ICubeXDevice::reportChannel | ( | int | channel, | |
double | data | |||
) | [protected] |
std::string IS3D::ICubeXDevice::_activeChannelsStr [protected] |
Array<int> IS3D::ICubeXDevice::_activeChannels [protected] |
int IS3D::ICubeXDevice::_inDevNum [protected] |
int IS3D::ICubeXDevice::_outDevNum [protected] |
MidiInDevice* IS3D::ICubeXDevice::_in [protected] |
MidiOutDevice* IS3D::ICubeXDevice::_out [protected] |
double IS3D::ICubeXDevice::_channelData[32] [protected] |