CHAI SDK  Version 1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CPNS::IEventMessage Class Referenceabstract

Event message dedicated class. More...

+ Inheritance diagram for CPNS::IEventMessage:
+ Collaboration diagram for CPNS::IEventMessage:

Public Member Functions

virtual void SetTransaction (CPNS::Enums::TransactionModes const status)=0
 Set the transaction status. More...
 
virtual
CPNS::Enums::TransactionModes 
GetTransaction () const =0
 Get the transaction status. More...
 
virtual CPNS::boolean IsVoiceIDAvailable () const =0
 Check if VoiceID is available. More...
 
virtual void SetVoiceID (CPNS::uint16 const wValue)=0
 Set VoiceID data The Voice ID information can be used to reconcile Events, Modifiers, Selectors and Texts. More...
 
virtual CPNS::uint16 GetVoiceID () const =0
 Get the VoiceID value The Voice ID information can be used to reconcile Events, Modifiers, Selectors and Texts. More...
 
virtual void SetGate (CPNS::Enums::EventGateModes const gate)=0
 Set the Gate information. More...
 
virtual CPNS::Enums::EventGateModes GetGate () const =0
 Get the Gate information. More...
 
virtual CPNS::boolean IsImpulseAvailable () const =0
 Check if Impulse is available. More...
 
virtual void SetImpulse (CPNS::uint16 const wImpulse)=0
 Set Impulse data. More...
 
virtual CPNS::uint16 GetImpulse () const =0
 Get the Impulse value. More...
 
virtual void SetMIDIImpulse (CPNS::byte const bImpulse)=0
 Set Impulse data in 7 bits. More...
 
virtual CPNS::byte GetMIDIImpulse () const =0
 Get the Impulse value in 7 bits. More...
 
virtual CPNS::boolean IsToneAvailable () const =0
 Check if Tone is available. More...
 
virtual void SetTone (CPNS::uint16 const wTone)=0
 Set Tone data A semitone value placed in the bits 15 to 8, where value 185 is the note A above middle C, usually with a reference frequency of 440Hz. More...
 
virtual CPNS::uint16 GetTone () const =0
 Get the Tone value A semitone value placed in the bits 15 to 8, where value 185 is the note A above middle C, usually with a reference frequency of 440Hz. More...
 
virtual void SetMIDINote (CPNS::byte const bNote)=0
 Set Tone data from MIDI note. More...
 
virtual CPNS::byte GetMIDINote () const =0
 Get the Tone value in 7 bits. More...
 
virtual CPNS::boolean IsWaveSettingAvailable () const =0
 Check if wave settings are available. More...
 
virtual void SetWaveSettingStartPoint (CPNS::uint16 const wValue)=0
 Set the Wave Settings start point Tells the start point as a position within the selected boundaries. More...
 
virtual CPNS::uint16 GetWaveSettingStartPoint () const =0
 Get the Wave Settings start point. More...
 
virtual void SetWaveSettingBoundaries (CPNS::Enums::EventWaveBoundaries const eValue)=0
 Set the Wave Settings boundaries Tells what portion of the wave and loop should be considered. More...
 
virtual
CPNS::Enums::EventWaveBoundaries 
GetWaveSettingBoundaries () const =0
 Get the Wave Settings boundaries. More...
 
virtual void SetWaveSettingReset (CPNS::boolean const fValue)=0
 Set the Wave Settings reset Tells the wave reset value that overrides the default value as defined by the Gate mode. More...
 
virtual CPNS::boolean GetWaveSettingReset () const =0
 Get the Wave Settings reset. More...
 
virtual void SetOffsetTone (CPNS::boolean const fValue)=0
 Set the Offset tone flag Tells if the Tone information is absolute or relative. More...
 
virtual CPNS::boolean GetOffsetTone () const =0
 Get the Offset tone flag Tells if the Tone information is absolute or relative. More...
 
- Public Member Functions inherited from CPNS::IBaseMessage
virtual CPNS::IEventMessageGetIEventMessage () const =0
 Check message type and return an IEventMessage object pointer if type match. More...
 
virtual CPNS::IModifierMessageGetIModifierMessage () const =0
 Check message type and return an IModifierMessage object pointer if type match. More...
 
virtual CPNS::ISelectorMessageGetISelectorMessage () const =0
 Check message type and return an ISelectorMessage object pointer if type match. More...
 
virtual CPNS::ITextMessageGetITextMessage () const =0
 Check message type and return an ITextMessage object pointer if type match. More...
 
virtual CPNS::IMIDISysexMessageGetIMIDISysexMessage () const =0
 Check message type and return an IMIDISysexMessage object pointer if type match. More...
 
virtual
CPNS::IDataTransferMessage
GetIDataTransferMessage () const =0
 Check message type and return an IDataTransferMessage object pointer if type match. More...
 
virtual
CPNS::CombinedTimeStampFlags 
GetTimeStampFlags () const =0
 Get time stamp flags, informing about time stamp types available and offline mode. More...
 
virtual CPNS::SongPosition GetTimeStampSongPosition () const =0
 Get the Song Position time stamp. More...
 
virtual CPNS::SystemTime GetTimeStampSystemTime () const =0
 Get the System Time time stamp. More...
 
virtual CPNS::Endpoint GetSource () const =0
 Get the message source endpoint. More...
 
virtual CPNS::uint16 GetDestinationNumber () const =0
 Get the number of destinations This methods is only useful in case of message trapped during recording session. More...
 
virtual CPNS::Endpoint GetDestination (CPNS::uint16 const wDestinationIndex)=0
 Get a destination Get the number of destinations This methods is only useful in case of message trapped during recording session. More...
 
- Public Member Functions inherited from CPNS::IHookedObject
virtual void Acquire ()=0
 Acquire an object. More...
 
virtual void Release ()=0
 Release an object. More...
 
virtual CPNS::uint32 GetHookCounter () const =0
 Get object's hook counter. More...
 
- Public Member Functions inherited from CPNS::IObject
virtual CPNS::ICHAIGetCHAI ()=0
 Get a pointer to the CHAI hosting this object. More...
 
virtual void RegisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Register an Object's notification handler. More...
 
virtual void UnregisterObjectNotificationHandler (CPNS::IObject_NotificationHandler *const pHandler)=0
 Unregister an Object's notification handler. More...
 
virtual CPNS::Enums::ObjectTypes GetObjectType () const =0
 Get the object type. More...
 
virtual CPNS::uint32 GetHandle () const =0
 Get a unique handle to the object if this object is handled by the trashcan. More...
 
virtual void SetUserDataPtr (void const *const pData)=0
 Set a custom user ptr data. More...
 
virtual void * GetUserDataPtr () const =0
 Get custom user ptr data. More...
 
virtual void SetUserDataUInt32 (const CPNS::uint32 dwData)=0
 Set a custom user uint32 data. More...
 
virtual CPNS::uint32 GetUserDataUInt32 () const =0
 Get custom user uint32 data. More...
 

Detailed Description

Event message dedicated class.

Member Function Documentation

virtual CPNS::Enums::EventGateModes CPNS::IEventMessage::GetGate ( ) const
pure virtual

Get the Gate information.

Returns
the Gate value
virtual CPNS::uint16 CPNS::IEventMessage::GetImpulse ( ) const
pure virtual

Get the Impulse value.

Returns
the Impulse value
virtual CPNS::byte CPNS::IEventMessage::GetMIDIImpulse ( ) const
pure virtual

Get the Impulse value in 7 bits.

Returns
the Impulse value in 7 bits
virtual CPNS::byte CPNS::IEventMessage::GetMIDINote ( ) const
pure virtual

Get the Tone value in 7 bits.

Returns
the MIDI note
virtual CPNS::boolean CPNS::IEventMessage::GetOffsetTone ( ) const
pure virtual

Get the Offset tone flag Tells if the Tone information is absolute or relative.

Returns
FALSE if the Tone is absolute, TRUE if the Tone is relative
virtual CPNS::uint16 CPNS::IEventMessage::GetTone ( ) const
pure virtual

Get the Tone value A semitone value placed in the bits 15 to 8, where value 185 is the note A above middle C, usually with a reference frequency of 440Hz.

A fine pitch setting, which is a fractional value in the bottom 8 bits, allowing a precision of 1/256th of a semitone. So the data format is: tone = 256 * (note_number + 116) Frequency in Hz: 440.0f * pow(2.0f, ((wTone - 47360.0f)/3072.0f)) Some values:

  • Lowest MIDI note: 0x7400
  • Highest MIDI note: 0xF300
  • Middle C: 0xB000
    Returns
    the Tone value
virtual CPNS::Enums::TransactionModes CPNS::IEventMessage::GetTransaction ( ) const
pure virtual

Get the transaction status.

Returns
one of the TransactionModes values
virtual CPNS::uint16 CPNS::IEventMessage::GetVoiceID ( ) const
pure virtual

Get the VoiceID value The Voice ID information can be used to reconcile Events, Modifiers, Selectors and Texts.

The range 0xFF00 to 0xFF7F is reserved for MIDI backward compatibility. A MIDI to CopperLan translator automatically set the VoiceID to the value 0xFF00 + MIDI note. Value 0xFFFE is reserved and means "Voice ID unavailable". Value 0xFFFF is reserved and means "All Voice IDs".

Warning
If no VoiceID is present in the message, and if the application needs a VoiceID, it is recommended to use the tone information in place of the missing VoiceID.
Returns
the VoiceID value
virtual CPNS::Enums::EventWaveBoundaries CPNS::IEventMessage::GetWaveSettingBoundaries ( ) const
pure virtual

Get the Wave Settings boundaries.

Returns
one of the EventWaveBoundaries values
virtual CPNS::boolean CPNS::IEventMessage::GetWaveSettingReset ( ) const
pure virtual

Get the Wave Settings reset.

Returns
FALSE, Wave is not reset, the other Wave Settings fields are ignored. TRUE, the Wave Boundaries and Start Point are applied.
virtual CPNS::uint16 CPNS::IEventMessage::GetWaveSettingStartPoint ( ) const
pure virtual

Get the Wave Settings start point.

Returns
starting point in 1/1440th of length. 0 starts at the beginning, 1439 means playing the last 1440th segment 720 means start playing precisely at half length
virtual CPNS::boolean CPNS::IEventMessage::IsImpulseAvailable ( ) const
pure virtual

Check if Impulse is available.

Returns
TRUE if VoiceID data is available (EP_ImpulseAvailable is set)
virtual CPNS::boolean CPNS::IEventMessage::IsToneAvailable ( ) const
pure virtual

Check if Tone is available.

Returns
TRUE if Tone data is available (EP_ToneAvailable is set)
virtual CPNS::boolean CPNS::IEventMessage::IsVoiceIDAvailable ( ) const
pure virtual

Check if VoiceID is available.

Returns
TRUE if VoiceID data is available (EP_VoiceID is set)
virtual CPNS::boolean CPNS::IEventMessage::IsWaveSettingAvailable ( ) const
pure virtual

Check if wave settings are available.

Returns
TRUE if profile bit EP_WaveSettingAvailable is set
virtual void CPNS::IEventMessage::SetGate ( CPNS::Enums::EventGateModes const  gate)
pure virtual

Set the Gate information.

Parameters
[in]gatethe Gate value
virtual void CPNS::IEventMessage::SetImpulse ( CPNS::uint16 const  wImpulse)
pure virtual

Set Impulse data.

Remarks
Automatically set the EP_ImpulseAvailable profile bit
Parameters
[in]wImpulsethe Impulse
virtual void CPNS::IEventMessage::SetMIDIImpulse ( CPNS::byte const  bImpulse)
pure virtual

Set Impulse data in 7 bits.

Remarks
Automatically set the EP_ImpulseAvailable profile bit
Parameters
[in]bImpulsethe Impulse in 7 bits
virtual void CPNS::IEventMessage::SetMIDINote ( CPNS::byte const  bNote)
pure virtual

Set Tone data from MIDI note.

Remarks
Automatically set the EP_ToneAvailable profile bit
Parameters
[in]bNotethe MIDI note
virtual void CPNS::IEventMessage::SetOffsetTone ( CPNS::boolean const  fValue)
pure virtual

Set the Offset tone flag Tells if the Tone information is absolute or relative.

Parameters
[in]fValueFALSE if the Tone is absolute, TRUE if the Tone is relative
virtual void CPNS::IEventMessage::SetTone ( CPNS::uint16 const  wTone)
pure virtual

Set Tone data A semitone value placed in the bits 15 to 8, where value 185 is the note A above middle C, usually with a reference frequency of 440Hz.

A fine pitch setting, which is a fractional value in the bottom 8 bits, allowing a precision of 1/256th of a semitone. So the data format is: tone = 256 * (note_number + 116) Frequency in Hz: 440.0f * pow(2.0f, ((wTone - 47360.0f)/3072.0f)) Some values:

  • Lowest MIDI note: 0x7400
  • Highest MIDI note: 0xF300
  • Middle C: 0xB000
    Remarks
    Automatically set the EP_ToneAvailable profile bit
    Parameters
    [in]wTonethe Tone
virtual void CPNS::IEventMessage::SetTransaction ( CPNS::Enums::TransactionModes const  status)
pure virtual

Set the transaction status.

Parameters
[in]statusThe current transaction status
virtual void CPNS::IEventMessage::SetVoiceID ( CPNS::uint16 const  wValue)
pure virtual

Set VoiceID data The Voice ID information can be used to reconcile Events, Modifiers, Selectors and Texts.

The range 0xFF00 to 0xFF7F is reserved for MIDI backward compatibility. A MIDI to CopperLan translator automatically set the VoiceID to the value 0xFF00 + MIDI note. Value 0xFFFE is reserved and means "Voice ID unavailable". Value 0xFFFF is reserved and means "All Voice IDs".

Remarks
Automatically set the EP_VoiceID profile bit
Warning
If no VoiceID is present in the message, and if the application needs a VoiceID, it is recommended to use the tone information in place of the missing VoiceID.
Parameters
[in]wValuethe VoiceID
virtual void CPNS::IEventMessage::SetWaveSettingBoundaries ( CPNS::Enums::EventWaveBoundaries const  eValue)
pure virtual

Set the Wave Settings boundaries Tells what portion of the wave and loop should be considered.

Remarks
Automatically set the EP_WaveSettingAvailable profile bit
Parameters
[in]eValueone of the EventWaveBoundaries values
virtual void CPNS::IEventMessage::SetWaveSettingReset ( CPNS::boolean const  fValue)
pure virtual

Set the Wave Settings reset Tells the wave reset value that overrides the default value as defined by the Gate mode.

Remarks
Automatically set the EP_WaveSettingAvailable profile bit
Parameters
[in]fValueFALSE, Wave is not reset, the other Wave Settings fields are ignored. TRUE, the Wave Boundaries and Start Point are applied.
virtual void CPNS::IEventMessage::SetWaveSettingStartPoint ( CPNS::uint16 const  wValue)
pure virtual

Set the Wave Settings start point Tells the start point as a position within the selected boundaries.

Remarks
Automatically set the EP_WaveSettingAvailable profile bit
Parameters
[in]wValuestarting point in 1/1440th of length. 0 starts at the beginning, 1439 means playing the last 1440th segment 720 means start playing precisely at half length