CMidiClientUtility Class Reference

class CMidiClientUtility : public CBase

Utility class to provide a standard client interface to a MIDI controller.

Inherits from

Public Member Functions
~CMidiClientUtility()
IMPORT_C TReal32ChannelVolumeL(TInt)
IMPORT_C TIntChannelsSupportedL()
IMPORT_C voidClose()
IMPORT_C TBoolCustomBankLoadedL(TInt)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidCustomCommandSyncL(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C voidCustomCommandSyncL(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C TInt64DurationMicroBeatsL()
IMPORT_C TTimeIntervalMicroSecondsDurationMicroSecondsL()
IMPORT_C TIntGetBalanceL()
IMPORT_C TIntGetBankIdL(TBool, TInt)
IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()
IMPORT_C TIntGetInstrumentIdL(TInt, TBool, TInt)
IMPORT_C voidGetInstrumentL(TInt, TInt &, TInt &)
IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TInt)
IMPORT_C TIntGetRepeats()
IMPORT_C HBufC *InstrumentNameL(TInt, TBool, TInt)
IMPORT_C TBoolIsChannelMuteL(TInt)
IMPORT_C TBoolIsTrackMuteL(TInt)
IMPORT_C voidLoadCustomBankDataL(const TDesC8 &, TInt &)
IMPORT_C voidLoadCustomBankL(const TDesC &, TInt &)
IMPORT_C voidLoadCustomInstrumentDataL(const TDesC8 &, TInt, TInt, TInt, TInt)
IMPORT_C voidLoadCustomInstrumentL(const TDesC &, TInt, TInt, TInt, TInt)
IMPORT_C TReal32MaxChannelVolumeL()
IMPORT_C TIntMaxPlaybackRateL()
IMPORT_C TIntMaxPolyphonyL()
IMPORT_C TIntMaxVolumeL()
IMPORT_C const TDesC8 &MimeTypeL()
IMPORT_C TIntMinPlaybackRateL()
IMPORT_C CMidiClientUtility *NewL(MMidiClientUtilityObserver &, TInt, TInt)
IMPORT_C CMidiClientUtility *NewL(MMidiClientUtilityObserver &, TInt, TInt, TBool)
IMPORT_C voidNoteOffL(TInt, TInt, TInt)
IMPORT_C voidNoteOnL(TInt, TInt, TInt)
IMPORT_C TIntNumTracksL()
IMPORT_C TIntNumberOfBanksL(TBool)
IMPORT_C TIntNumberOfInstrumentsL(TInt, TBool)
IMPORT_C TIntNumberOfMetaDataEntriesL()
IMPORT_C voidOpenDes(const TDesC8 &)
IMPORT_C voidOpenFile(const TDesC &)
IMPORT_C voidOpenFile(const RFile &)
IMPORT_C voidOpenFile(const TMMSource &)
IMPORT_C voidOpenUrl(const TDesC &, TInt, const TDesC8 &)
IMPORT_C HBufC *PercussionKeyNameL(TInt, TInt, TBool, TInt)
IMPORT_C TIntPitchTranspositionCentsL()
IMPORT_C voidPlay()
IMPORT_C voidPlayNoteL(TInt, TInt, const TTimeIntervalMicroSeconds &, TInt, TInt)
IMPORT_C voidPlayNoteL(TInt, TInt, const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &, TInt, TInt)
IMPORT_C TIntPlaybackRateL()
IMPORT_C TIntPolyphonyL()
IMPORT_C TInt64PositionMicroBeatsL()
IMPORT_C TTimeIntervalMicroSecondsPositionMicroSecondsL()
IMPORT_C TIntSendMessageL(const TDesC8 &)
IMPORT_C TIntSendMessageL(const TDesC8 &, const TTimeIntervalMicroSeconds &)
IMPORT_C voidSendMipMessageL(const RArray< TMipMessageEntry > &)
IMPORT_C voidSetBalanceL(TInt)
IMPORT_C voidSetBankL(TBool)
IMPORT_C voidSetChannelMuteL(TInt, TBool)
IMPORT_C voidSetChannelVolumeL(TInt, TReal32)
IMPORT_C voidSetInstrumentL(TInt, TInt, TInt)
IMPORT_C voidSetMaxPolyphonyL(TInt)
IMPORT_C TIntSetPitchTranspositionL(TInt)
IMPORT_C voidSetPlaybackRateL(TInt)
IMPORT_C voidSetPositionMicroBeatsL(TInt64)
IMPORT_C voidSetPositionMicroSecondsL(const TTimeIntervalMicroSeconds &)
IMPORT_C voidSetPriorityL(TInt, TInt)
IMPORT_C voidSetRepeatsL(TInt, const TTimeIntervalMicroSeconds &)
IMPORT_C voidSetStopTimeL(const TTimeIntervalMicroSeconds &)
IMPORT_C voidSetSyncUpdateCallbackIntervalL(const TTimeIntervalMicroSeconds &, TInt64)
IMPORT_C voidSetTempoL(TInt)
IMPORT_C voidSetTrackMuteL(TInt, TBool)
IMPORT_C voidSetVolumeL(TInt)
IMPORT_C voidSetVolumeRampL(const TTimeIntervalMicroSeconds &)
IMPORT_C TMidiStateState()
IMPORT_C voidStop(const TTimeIntervalMicroSeconds &)
IMPORT_C voidStopNotes(TInt)
IMPORT_C voidStopTimeL(TTimeIntervalMicroSeconds &)
IMPORT_C TIntTempoMicroBeatsPerMinuteL()
IMPORT_C voidUnloadAllCustomBanksL()
IMPORT_C voidUnloadCustomBankL(TInt)
IMPORT_C voidUnloadCustomInstrumentL(TInt, TInt)
IMPORT_C TIntVolumeL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CBody *iBody

Constructor & Destructor Documentation

~CMidiClientUtility()

~CMidiClientUtility()[virtual]

Destructor

Member Functions Documentation

ChannelVolumeL(TInt)

IMPORT_C TReal32ChannelVolumeL(TIntaChannel)const

Parameters

TInt aChannel

ChannelsSupportedL()

IMPORT_C TIntChannelsSupportedL()const

Close()

IMPORT_C voidClose()

CustomBankLoadedL(TInt)

IMPORT_C TBoolCustomBankLoadedL(TIntaBankCollectionIndex)const

Parameters

TInt aBankCollectionIndex

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom,
TRequestStatus &aStatus
)

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2
TDes8 & aDataFrom
TRequestStatus & aStatus

CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TRequestStatus &aStatus
)

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2
TRequestStatus & aStatus

CustomCommandSyncL(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)

IMPORT_C voidCustomCommandSyncL(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom
)

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2
TDes8 & aDataFrom

CustomCommandSyncL(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)

IMPORT_C voidCustomCommandSyncL(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2
)

Parameters

const TMMFMessageDestinationPckg & aDestination
TInt aFunction
const TDesC8 & aDataTo1
const TDesC8 & aDataTo2

DurationMicroBeatsL()

IMPORT_C TInt64DurationMicroBeatsL()const

DurationMicroSecondsL()

IMPORT_C TTimeIntervalMicroSecondsDurationMicroSecondsL()const

GetBalanceL()

IMPORT_C TIntGetBalanceL()const

GetBankIdL(TBool, TInt)

IMPORT_C TIntGetBankIdL(TBoolaCustom,
TIntaBankIndex
)const

Parameters

TBool aCustom
TInt aBankIndex

GetDRMCustomCommand()

IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()

GetInstrumentIdL(TInt, TBool, TInt)

IMPORT_C TIntGetInstrumentIdL(TIntaBankId,
TBoolaCustom,
TIntaInstrumentIndex
)const

Parameters

TInt aBankId
TBool aCustom
TInt aInstrumentIndex

GetInstrumentL(TInt, TInt &, TInt &)

IMPORT_C voidGetInstrumentL(TIntaChannel,
TInt &aInstrumentId,
TInt &aBankId
)

Parameters

TInt aChannel
TInt & aInstrumentId
TInt & aBankId

GetMetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TIntaMetaDataIndex)const

Parameters

TInt aMetaDataIndex

GetRepeats()

IMPORT_C TIntGetRepeats()const

InstrumentNameL(TInt, TBool, TInt)

IMPORT_C HBufC *InstrumentNameL(TIntaBankId,
TBoolaCustom,
TIntaInstrumentId
)const

Parameters

TInt aBankId
TBool aCustom
TInt aInstrumentId

IsChannelMuteL(TInt)

IMPORT_C TBoolIsChannelMuteL(TIntaChannel)const

Parameters

TInt aChannel

IsTrackMuteL(TInt)

IMPORT_C TBoolIsTrackMuteL(TIntaTrack)const

Parameters

TInt aTrack

LoadCustomBankDataL(const TDesC8 &, TInt &)

IMPORT_C voidLoadCustomBankDataL(const TDesC8 &aBankData,
TInt &aBankCollectionIndex
)

Parameters

const TDesC8 & aBankData
TInt & aBankCollectionIndex

LoadCustomBankL(const TDesC &, TInt &)

IMPORT_C voidLoadCustomBankL(const TDesC &aFileName,
TInt &aBankCollectionIndex
)

Parameters

const TDesC & aFileName
TInt & aBankCollectionIndex

LoadCustomInstrumentDataL(const TDesC8 &, TInt, TInt, TInt, TInt)

IMPORT_C voidLoadCustomInstrumentDataL(const TDesC8 &aInstrumentData,
TIntaBankDataId,
TIntaInstrumentDataId,
TIntaMemoryBankId,
TIntaMemoryInstrumentId
)

Parameters

const TDesC8 & aInstrumentData
TInt aBankDataId
TInt aInstrumentDataId
TInt aMemoryBankId
TInt aMemoryInstrumentId

LoadCustomInstrumentL(const TDesC &, TInt, TInt, TInt, TInt)

IMPORT_C voidLoadCustomInstrumentL(const TDesC &aFileName,
TIntaFileBankId,
TIntaFileInstrumentId,
TIntaMemoryBankId,
TIntaMemoryInstrumentId
)

Parameters

const TDesC & aFileName
TInt aFileBankId
TInt aFileInstrumentId
TInt aMemoryBankId
TInt aMemoryInstrumentId

MaxChannelVolumeL()

IMPORT_C TReal32MaxChannelVolumeL()const

MaxPlaybackRateL()

IMPORT_C TIntMaxPlaybackRateL()const

MaxPolyphonyL()

IMPORT_C TIntMaxPolyphonyL()const

MaxVolumeL()

IMPORT_C TIntMaxVolumeL()const

MimeTypeL()

IMPORT_C const TDesC8 &MimeTypeL()

MinPlaybackRateL()

IMPORT_C TIntMinPlaybackRateL()const

NewL(MMidiClientUtilityObserver &, TInt, TInt)

IMPORT_C CMidiClientUtility *NewL(MMidiClientUtilityObserver &aObserver,
TIntaPriority = EMdaPriorityNormal,
TIntaPref = EMdaPriorityPreferenceTimeAndQuality
)[static]

Parameters

MMidiClientUtilityObserver & aObserver
TInt aPriority = EMdaPriorityNormal
TInt aPref = EMdaPriorityPreferenceTimeAndQuality

NewL(MMidiClientUtilityObserver &, TInt, TInt, TBool)

IMPORT_C CMidiClientUtility *NewL(MMidiClientUtilityObserver &aObserver,
TIntaPriority,
TIntaPref,
TBoolaUseSharedHeap
)[static]

Parameters

MMidiClientUtilityObserver & aObserver
TInt aPriority
TInt aPref
TBool aUseSharedHeap

NoteOffL(TInt, TInt, TInt)

IMPORT_C voidNoteOffL(TIntaChannel,
TIntaNote,
TIntaVelocity
)

Parameters

TInt aChannel
TInt aNote
TInt aVelocity

NoteOnL(TInt, TInt, TInt)

IMPORT_C voidNoteOnL(TIntaChannel,
TIntaNote,
TIntaVelocity
)

Parameters

TInt aChannel
TInt aNote
TInt aVelocity

NumTracksL()

IMPORT_C TIntNumTracksL()const

NumberOfBanksL(TBool)

IMPORT_C TIntNumberOfBanksL(TBoolaCustom)const

Parameters

TBool aCustom

NumberOfInstrumentsL(TInt, TBool)

IMPORT_C TIntNumberOfInstrumentsL(TIntaBankId,
TBoolaCustom
)const

Parameters

TInt aBankId
TBool aCustom

NumberOfMetaDataEntriesL()

IMPORT_C TIntNumberOfMetaDataEntriesL()const

OpenDes(const TDesC8 &)

IMPORT_C voidOpenDes(const TDesC8 &aDescriptor)

Parameters

const TDesC8 & aDescriptor

OpenFile(const TDesC &)

IMPORT_C voidOpenFile(const TDesC &aFileName)

Parameters

const TDesC & aFileName

OpenFile(const RFile &)

IMPORT_C voidOpenFile(const RFile &aFile)

Parameters

const RFile & aFile

OpenFile(const TMMSource &)

IMPORT_C voidOpenFile(const TMMSource &aSource)

Parameters

const TMMSource & aSource

OpenUrl(const TDesC &, TInt, const TDesC8 &)

IMPORT_C voidOpenUrl(const TDesC &aUrl,
TIntaIapId =  KUseDefaultIap ,
const TDesC8 &aMimeType =  KNullDesC8
)

Parameters

const TDesC & aUrl
TInt aIapId =  KUseDefaultIap
const TDesC8 & aMimeType =  KNullDesC8

PercussionKeyNameL(TInt, TInt, TBool, TInt)

IMPORT_C HBufC *PercussionKeyNameL(TIntaNote,
TIntaBankId,
TBoolaCustom,
TIntaInstrumentId
)const

Parameters

TInt aNote
TInt aBankId
TBool aCustom
TInt aInstrumentId

PitchTranspositionCentsL()

IMPORT_C TIntPitchTranspositionCentsL()const

Play()

IMPORT_C voidPlay()

PlayNoteL(TInt, TInt, const TTimeIntervalMicroSeconds &, TInt, TInt)

IMPORT_C voidPlayNoteL(TIntaChannel,
TIntaNote,
const TTimeIntervalMicroSeconds &aDuration,
TIntaNoteOnVelocity,
TIntaNoteOffVelocity
)

Parameters

TInt aChannel
TInt aNote
const TTimeIntervalMicroSeconds & aDuration
TInt aNoteOnVelocity
TInt aNoteOffVelocity

PlayNoteL(TInt, TInt, const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &, TInt, TInt)

IMPORT_C voidPlayNoteL(TIntaChannel,
TIntaNote,
const TTimeIntervalMicroSeconds &aStartTime,
const TTimeIntervalMicroSeconds &aDuration,
TIntaNoteOnVelocity,
TIntaNoteOffVelocity
)

Parameters

TInt aChannel
TInt aNote
const TTimeIntervalMicroSeconds & aStartTime
const TTimeIntervalMicroSeconds & aDuration
TInt aNoteOnVelocity
TInt aNoteOffVelocity

PlaybackRateL()

IMPORT_C TIntPlaybackRateL()const

PolyphonyL()

IMPORT_C TIntPolyphonyL()const

PositionMicroBeatsL()

IMPORT_C TInt64PositionMicroBeatsL()const

PositionMicroSecondsL()

IMPORT_C TTimeIntervalMicroSecondsPositionMicroSecondsL()const

SendMessageL(const TDesC8 &)

IMPORT_C TIntSendMessageL(const TDesC8 &aMidiMessage)

Parameters

const TDesC8 & aMidiMessage

SendMessageL(const TDesC8 &, const TTimeIntervalMicroSeconds &)

IMPORT_C TIntSendMessageL(const TDesC8 &aMidiMessage,
const TTimeIntervalMicroSeconds &aTime
)

Parameters

const TDesC8 & aMidiMessage
const TTimeIntervalMicroSeconds & aTime

SendMipMessageL(const RArray< TMipMessageEntry > &)

IMPORT_C voidSendMipMessageL(const RArray< TMipMessageEntry > &aEntry)

Parameters

const RArray< TMipMessageEntry > & aEntry

SetBalanceL(TInt)

IMPORT_C voidSetBalanceL(TIntaBalance =  KMMFBalanceCenter )

Parameters

TInt aBalance =  KMMFBalanceCenter

SetBankL(TBool)

IMPORT_C voidSetBankL(TBoolaCustom)

SetBankL is deprecated due to Mobile XMF specification requirement that user instruments (custom instruments) override standard instruments.

Parameters

TBool aCustom

SetChannelMuteL(TInt, TBool)

IMPORT_C voidSetChannelMuteL(TIntaChannel,
TBoolaMuted
)

Parameters

TInt aChannel
TBool aMuted

SetChannelVolumeL(TInt, TReal32)

IMPORT_C voidSetChannelVolumeL(TIntaChannel,
TReal32aVolumeInDecibels
)

Parameters

TInt aChannel
TReal32 aVolumeInDecibels

SetInstrumentL(TInt, TInt, TInt)

IMPORT_C voidSetInstrumentL(TIntaChannel,
TIntaBankId,
TIntaInstrumentId
)

Parameters

TInt aChannel
TInt aBankId
TInt aInstrumentId

SetMaxPolyphonyL(TInt)

IMPORT_C voidSetMaxPolyphonyL(TIntaMaxNotes)

Parameters

TInt aMaxNotes

SetPitchTranspositionL(TInt)

IMPORT_C TIntSetPitchTranspositionL(TIntaCents)

Parameters

TInt aCents

SetPlaybackRateL(TInt)

IMPORT_C voidSetPlaybackRateL(TIntaRate)

Parameters

TInt aRate

SetPositionMicroBeatsL(TInt64)

IMPORT_C voidSetPositionMicroBeatsL(TInt64aMicroBeats)

Parameters

TInt64 aMicroBeats

SetPositionMicroSecondsL(const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetPositionMicroSecondsL(const TTimeIntervalMicroSeconds &aPosition)

Parameters

const TTimeIntervalMicroSeconds & aPosition

SetPriorityL(TInt, TInt)

IMPORT_C voidSetPriorityL(TIntaPriority,
TIntaPref
)

Parameters

TInt aPriority
TInt aPref

SetRepeatsL(TInt, const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetRepeatsL(TIntaRepeatNumberOfTimes,
const TTimeIntervalMicroSeconds &aTrailingSilence
)

Parameters

TInt aRepeatNumberOfTimes
const TTimeIntervalMicroSeconds & aTrailingSilence

SetStopTimeL(const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetStopTimeL(const TTimeIntervalMicroSeconds &aStopTime)

Parameters

const TTimeIntervalMicroSeconds & aStopTime

SetSyncUpdateCallbackIntervalL(const TTimeIntervalMicroSeconds &, TInt64)

IMPORT_C voidSetSyncUpdateCallbackIntervalL(const TTimeIntervalMicroSeconds &aMicroSeconds,
TInt64aMicroBeats = 0
)

Parameters

const TTimeIntervalMicroSeconds & aMicroSeconds
TInt64 aMicroBeats = 0

SetTempoL(TInt)

IMPORT_C voidSetTempoL(TIntaMicroBeatsPerMinute)

Parameters

TInt aMicroBeatsPerMinute

SetTrackMuteL(TInt, TBool)

IMPORT_C voidSetTrackMuteL(TIntaTrack,
TBoolaMuted
)const

Parameters

TInt aTrack
TBool aMuted

SetVolumeL(TInt)

IMPORT_C voidSetVolumeL(TIntaVolume)

Parameters

TInt aVolume

SetVolumeRampL(const TTimeIntervalMicroSeconds &)

IMPORT_C voidSetVolumeRampL(const TTimeIntervalMicroSeconds &aRampDuration)

Parameters

const TTimeIntervalMicroSeconds & aRampDuration

State()

IMPORT_C TMidiStateState()const

Stop(const TTimeIntervalMicroSeconds &)

IMPORT_C voidStop(const TTimeIntervalMicroSeconds &aFadeOutDuration)

Parameters

const TTimeIntervalMicroSeconds & aFadeOutDuration

StopNotes(TInt)

IMPORT_C voidStopNotes(TIntaChannel)

Parameters

TInt aChannel

StopTimeL(TTimeIntervalMicroSeconds &)

IMPORT_C voidStopTimeL(TTimeIntervalMicroSeconds &aStopTime)const

Parameters

TTimeIntervalMicroSeconds & aStopTime

TempoMicroBeatsPerMinuteL()

IMPORT_C TIntTempoMicroBeatsPerMinuteL()const

UnloadAllCustomBanksL()

IMPORT_C voidUnloadAllCustomBanksL()

UnloadCustomBankL(TInt)

IMPORT_C voidUnloadCustomBankL(TIntaBankCollectionIndex)

Parameters

TInt aBankCollectionIndex

UnloadCustomInstrumentL(TInt, TInt)

IMPORT_C voidUnloadCustomInstrumentL(TIntaCustomBankId,
TIntaInstrumentId
)

Parameters

TInt aCustomBankId
TInt aInstrumentId

VolumeL()

IMPORT_C TIntVolumeL()const

Member Data Documentation

CBody * iBody

CBody *iBody[private]

a pointer to the implementation.