MIDIDevice Class Reference
[Input DevicesOutput Devices]

Class MIDIDevice. More...

#include <MIDIDevice.h>

Inherits Device.

Inheritance diagram for MIDIDevice:

Inheritance graph
[legend]
Collaboration diagram for MIDIDevice:

Collaboration graph
[legend]
List of all members.

Public Slots

void update (QVector< unsigned char >, QTime)
 Slot.
void updateFromGUI (int)
 Slot for the wizard of oz facility.
void update (int pValue)
 Slot.
void updateOutput (int pValue)
 Slot.
void updateOutputFromGUI (int pValue)
 Slot for the wizard of oz facility.

Signals

void updated (int pMessage, QTime pTime)
 emitted when outcoming value processed by the MIDI device changed.
void updated (QVariant pMessage, QTime pTime)
 emitted when outcoming value processed by the MIDI device changed.
void updated (int pMessage, QTime pTime, QString pName)
 emitted when outcoming value processed by the MIDI device changed.

Public Member Functions

 MIDIDevice (char *, LinkingComponent::LinkingComponentDirection, int, bool, int)
 Constructor.
 MIDIDevice (char *, LinkingComponent::LinkingComponentDirection, int, bool, int, int)
 Constructor.
 ~MIDIDevice ()
 Destructor.
int GetNumber (void) const
 Getter.
void SetNumber (int pNumber)
 Setter.
int GetHardMin (void) const
 Getter.
void SetHardMin (int)
 Setter.
int GetHardMax (void) const
 Getter.
void SetHardMax (int)
 Setter.
bool GetIsAnalogue (void) const
 Getter.
void SetIsAnalogue (bool)
 Setter.
unsigned char GetMIDIMessageType (void)
 Getter.
int GetResolution (void) const
 Getter.
void SetResolution (int)
 Setter.
MIDIPortRef GetOutPort () const
 Getter.
int GetOutDestNb () const
 Getter.
void SetOutDestNb (int)
 Setter.
MIDIEndpointRef GetOutDest () const
 Getter.
void SetOutDest (MIDIEndpointRef)
 Setter.
unsigned char GetMessage (void)
 Getter.
void SetMessage (unsigned char pMessage)
 Setter.
QTime GetTime (void)
 Getter.
void SetTime (QTime)
 Setter.

Static Public Member Functions

static void ReadProc (const MIDIPacketList *, void *, void *)
 Callback provided to the MIDIClientCreate proc in order to read the MIDI input stream.

Properties

int number
 Number of physical sensor(/actuator?) on the board.
bool isAnalogue
 data type: analogue (continuous) or digital (on/off) data.
int resolution
 sensor measures on 7 bits or 12 bits
int _outDestNb
 index of MIDI Output on the MIDI-USB interface

Detailed Description

Class MIDIDevice.

This component is for handling two Interface-Z MIDI hardware (input and output). For more information on the Interface-Z input hardware, see http://www.interface-z.com/produits/docs/Midi-12-16-capteurs.pdf and for more information on the Interface-Z output hardware see http://www.interface-z.com/produits/docs/2-servo-4-transistors.pdf . It handles MIDI stream and controls devices connected to Languages. It uses Apple CoreMIDI framework for handling MIDI data from and to devices.

Output values of this component depends on the resolution property. resolution can be 7 or 12, due to sensor measures on 7 bits or 12 bits. If resolution is 7, then the output of the component is between 0 and 127. If resolution is 12, then the output values of the component are between 0 and 4 096.

More throughout description TODO.

The following figure illustrates the properties of the MIDIDevice Component on the interface-Z MIDI input board :

Schema-doc-InterfaceZInputBoard.pdf

Interface-Z MIDI Input Board and MIDIDevice Properties.

The following figure illustrates the properties of the MIDIDevice Component on the interface-Z MIDI output board :

Schema-doc-InterfaceZOutputBoard.pdf

Interface-Z MIDI Output Board and MIDIDevice Properties.


Constructor & Destructor Documentation

MIDIDevice::MIDIDevice ( char *  pName,
LinkingComponent::LinkingComponentDirection  pDirection,
int  pNumber,
bool  pIsAnalogue,
int  pResolution 
)

Constructor.

Parameters:
name 
direction IN or OUT
number Number of physical sensor/actuator on the board. /*! For a sensor, this number depends on the place where the sensor is plugged. See http://www.interface-z.com/produits/docs/Midi-12-16-capteurs.pdf (See first picture with "Entrees Analogiques" and their number) to find the number of your sensor.
isAnalogue 
resolution Output values of this component depends on the resolution property. resolution can be 7 or 12, due to sensor measures on 7 bits or 12 bits. If resolution is 7, then the output of the component is between 0 and 127. If resolution is 12, then the output values of the component are between 0 and 4 096.

MIDIDevice::MIDIDevice ( char *  pName,
LinkingComponent::LinkingComponentDirection  pDirection,
int  pNumber,
bool  pIsAnalogue,
int  pResolution,
int  pOutDestNb 
)

Constructor.

Parameters:
name 
direction IN or OUT
number Number of physical sensor/actuator on the board. /*! For a sensor, this number depends on the place where the sensor is plugged. See http://www.interface-z.com/produits/docs/Midi-12-16-capteurs.pdf (See first picture with "Entrees Analogiques" and their number) to find the number of your sensor.
isAnalogue 
resolution Output values of this component depends on the resolution property. resolution can be 7 or 12, due to sensor measures on 7 bits or 12 bits. If resolution is 7, then the output of the component is between 0 and 127. If resolution is 12, then the output values of the component are between 0 and 4 096.
pOutDestNb 

to reach the final actuator, we need


Member Function Documentation

void MIDIDevice::SetNumber ( int  pNumber  ) 

Setter.

Parameters:
pNumber 

void MIDIDevice::SetHardMin ( int  pHardMin  ) 

Setter.

Parameters:
pHardMin 

void MIDIDevice::SetHardMax ( int  pHardMax  ) 

Setter.

Parameters:
pHardMin 

void MIDIDevice::SetIsAnalogue ( bool  pIsAnalogue  ) 

Setter.

Parameters:
pIsAnalogue 

void MIDIDevice::SetResolution ( int  pResolution  ) 

Setter.

Parameters:
pResolution 

void MIDIDevice::SetOutDestNb ( int  pOutDestNb  ) 

Setter.

Parameters:
pOutDestNb 

void MIDIDevice::SetOutDest ( MIDIEndpointRef  pOutDest  ) 

Setter.

Parameters:
pOutDest 

void MIDIDevice::SetMessage ( unsigned char  pMessage  ) 

Setter.

Parameters:
pMessage 

void MIDIDevice::SetTime ( QTime  pTime  ) 

Setter.

Parameters:
pTime 

void MIDIDevice::ReadProc ( const MIDIPacketList *  pktlist,
void *  refCon,
void *  connRefCon 
) [static]

Callback provided to the MIDIClientCreate proc in order to read the MIDI input stream.

Parameters:
MIDIPacketList *pktlist
void *refCon
void *connRefCon

void MIDIDevice::update ( QVector< unsigned char >  pMessage,
QTime  pTime 
) [slot]

Slot.

Parameters:
pMessage vector

void MIDIDevice::updateFromGUI ( int  pMessage  )  [slot]

Slot for the wizard of oz facility.

Parameters:
int pMessage

void MIDIDevice::update ( int  pValue  )  [slot]

Slot.

Parameters:
pValue data/value of the MIDI control change message
This slot build a MIDIPacketList* containing a MIDI Control Change message. This generated message is 6 Bytes long and has to be of type (B)(channel) ((number of control change)) ((data)) Need:

void MIDIDevice::updateOutput ( int  pValue  )  [slot]

Slot.

Parameters:
int pMessage

void MIDIDevice::updateOutputFromGUI ( int  pValue  )  [slot]

Slot for the wizard of oz facility.

Parameters:
int pMessage

void MIDIDevice::updated ( int  pMessage,
QTime  pTime 
) [signal]

emitted when outcoming value processed by the MIDI device changed.

Parameters:
pMessage value emitted
pTime Time stamp

void MIDIDevice::updated ( QVariant  pMessage,
QTime  pTime 
) [signal]

emitted when outcoming value processed by the MIDI device changed.

Parameters:
pMessage value emitted
pTime Time stamp

void MIDIDevice::updated ( int  pMessage,
QTime  pTime,
QString  pName 
) [signal]

emitted when outcoming value processed by the MIDI device changed.

Parameters:
pMessage value emitted
pTime Time stamp
pName Name of the updated MIDI Input Device, for identification (needed for composition)


Property Documentation

int MIDIDevice::number [read, write]

Number of physical sensor(/actuator?) on the board.

For a sensor, this number depends on the place where the sensor is plugged. See http://www.interface-z.com/produits/docs/Midi-12-16-capteurs.pdf (See first picture with "Entrees Analogiques" and their number) to find the number of your sensor.

For an actuator, TODO.

bool MIDIDevice::isAnalogue [read, write]

data type: analogue (continuous) or digital (on/off) data.

isAnalogue


The documentation for this class was generated from the following files:
Generated on Tue Mar 10 11:18:18 2009 for Mixed Objects by  doxygen 1.5.2