1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/MIDI/inc/midistandardcustomcommands.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,957 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __MIDISTANDARDCUSTOMCOMMANDS_H__
1.20 +#define __MIDISTANDARDCUSTOMCOMMANDS_H__
1.21 +
1.22 +#include <mmf/common/mmfcontroller.h>
1.23 +#include <midiclientutility.h>
1.24 +#include <mmf/common/mmfmidi.h>
1.25 +
1.26 +/**
1.27 +Interface UID for the Midi Controller API.
1.28 +
1.29 +@publishedAll
1.30 +@released
1.31 +*/
1.32 +const TUid KUidInterfaceMidi = { 0x101F945C };
1.33 +
1.34 +/**
1.35 +Describe a MIDI event.
1.36 +Contains a UID to define the actual event type, and an integer to define the event code.
1.37 +
1.38 +@publishedAll
1.39 +@released
1.40 +*/
1.41 +class CMMFMidiEvent: public CBase
1.42 + {
1.43 +public:
1.44 + IMPORT_C CMMFMidiEvent(TUid aEventType, TInt aErrorCode);
1.45 + IMPORT_C CMMFMidiEvent();
1.46 + IMPORT_C ~CMMFMidiEvent();
1.47 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.48 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.49 + IMPORT_C void CopyL(const CMMFMidiEvent& aOther);
1.50 + /**
1.51 + @internalTechnology
1.52 + */
1.53 + void ZeroMembers();
1.54 +public:
1.55 + /**
1.56 + * A UID to define the type of MIDI event.
1.57 + */
1.58 + TUid iEventType;
1.59 + /**
1.60 + * The error code associated with the MIDI event.
1.61 + */
1.62 + TInt iErrorCode;
1.63 + /**
1.64 + * Old state of the MIDI client utility object.
1.65 + */
1.66 + TMidiState iOldState;
1.67 + /**
1.68 + * Current state of the MIDI client utility object.
1.69 + */
1.70 + TMidiState iNewState;
1.71 + /**
1.72 + * General purpose time stamp in microseconds.
1.73 + */
1.74 + TTimeIntervalMicroSeconds iMicroSeconds;
1.75 + /**
1.76 + * General purpose time stamp in micro beats per minute.
1.77 + */
1.78 + TInt64 iMicroBeats;
1.79 + /**
1.80 + * Channel
1.81 + */
1.82 + TInt iChannel;
1.83 + /**
1.84 + * Volume in decibel of a logical channel.
1.85 + */
1.86 + TReal32 iVolumeInDecibels;
1.87 + /**
1.88 + * Mute state of a track or of a channel.
1.89 + */
1.90 + TBool iMute;
1.91 + /**
1.92 + * Meta data entry.
1.93 + * Client will retrieve meta data entry by calling GetMetaDataEntryL()
1.94 + * using this TInt to indicate which meta data entry to retrieve.
1.95 + */
1.96 + TInt iMetaDataEntryId;
1.97 + /**
1.98 + * Array of logical {channel, MIP} value pairs.
1.99 + */
1.100 + RArray<TMipMessageEntry> iMipMessage;
1.101 + /**
1.102 + * Polyphony of the MIDI engine.
1.103 + */
1.104 + TInt iPolyphony;
1.105 + /**
1.106 + * Identifier of a bank occupying, at most, 14 bits.
1.107 + */
1.108 + TInt iBankId;
1.109 + /**
1.110 + * Identifier of a specific instrument.
1.111 + */
1.112 + TInt iInstrumentId;
1.113 + /**
1.114 + * Tempo value in micro beats per minute.
1.115 + */
1.116 + TInt iTempoMicroBeats;
1.117 + };
1.118 +
1.119 +/**
1.120 +Client class to access functionality specific to a MIDI controller.
1.121 +The class uses the custom command function of the controller plugin, and removes the necessity
1.122 +for the client to formulate the custom commands.
1.123 +
1.124 +@publishedAll
1.125 +@released
1.126 +*/
1.127 +class RMidiControllerCustomCommands : public RMMFCustomCommandsBase
1.128 + {
1.129 +public:
1.130 + IMPORT_C RMidiControllerCustomCommands(RMMFController& aController);
1.131 + IMPORT_C TInt SetPositionMicroBeats(TInt64 aMicroBeats) const;
1.132 + IMPORT_C TInt PositionMicroBeats(TInt64& aMicroBeats) const;
1.133 + IMPORT_C TInt PlayNote(TInt aChannel,TInt aNote,const TTimeIntervalMicroSeconds& aDuration,TInt aNoteOnVelocity,TInt aNoteOffVelocity);
1.134 + IMPORT_C TInt PlayNote(TInt aChannel,TInt aNote,const TTimeIntervalMicroSeconds& aStartTime, const TTimeIntervalMicroSeconds& aDuration,TInt aNoteOnVelocity,TInt aNoteOffVelocity);
1.135 + IMPORT_C TInt StopNotes(TInt aChannel);
1.136 + IMPORT_C TInt NoteOn(TInt aChannel,TInt aNote,TInt aVelocity);
1.137 + IMPORT_C TInt NoteOff(TInt aChannel,TInt aNote,TInt aVelocity);
1.138 + IMPORT_C TInt PlaybackRate(TInt& aPlayBackRate) const;
1.139 + IMPORT_C TInt SetPlaybackRate(TInt aPlayBackRate);
1.140 + IMPORT_C TInt MaxPlaybackRate(TInt& aMaxRate) const;
1.141 + IMPORT_C TInt MinPlaybackRate(TInt& aMinRate) const;
1.142 + IMPORT_C TInt TempoMicroBeatsPerMinute(TInt& aMicroBeatsPerMinute) const;
1.143 + IMPORT_C TInt SetTempo(TInt aMicroBeatsPerMinute);
1.144 + IMPORT_C TInt PitchTranspositionCents(TInt& aPitch) const;
1.145 + IMPORT_C TInt SetPitchTransposition(TInt aCents, TInt& aCentsApplied);
1.146 + IMPORT_C TInt DurationMicroBeats(TInt64& aDuration) const;
1.147 + IMPORT_C TInt NumTracks(TInt& aTracks) const;
1.148 + IMPORT_C TInt SetTrackMute(TInt aTrack, TBool aMuted) const;
1.149 + IMPORT_C TInt MimeType(TDes8& aMimeType) const;
1.150 + IMPORT_C TInt SetSyncUpdateCallbackInterval(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats=0);
1.151 + IMPORT_C TInt SendMessage(const TDesC8& aMidiMessage, TInt& aBytes);
1.152 + IMPORT_C TInt SendMessage(const TDesC8& aMidiMessage,const TTimeIntervalMicroSeconds& aTime, TInt& aBytes);
1.153 + IMPORT_C TInt SendMipMessage(const RArray<TMipMessageEntry>& aEntry);
1.154 + IMPORT_C TInt NumberOfBanks(TBool aCustom, TInt& aNumBanks) const;
1.155 + IMPORT_C TInt GetBankId(TBool aCustom, TInt aBankIndex, TInt& aBankId) const;
1.156 + IMPORT_C TInt LoadCustomBank(const TDesC& aFileName,TInt& aBankId);
1.157 + IMPORT_C TInt LoadCustomBankData(const TDesC8& aBankData,TInt& aBankId);
1.158 + IMPORT_C TInt UnloadCustomBank(TInt aBankId);
1.159 + IMPORT_C TInt CustomBankLoaded(TInt aBankId, TBool& aBankLoaded) const;
1.160 + IMPORT_C TInt UnloadAllCustomBanks();
1.161 + IMPORT_C TInt NumberOfInstruments(TInt aBankId, TBool aCustom, TInt& aNumInstruments) const;
1.162 + IMPORT_C TInt GetInstrumentId(TInt aBankId,TBool aCustom,TInt aInstrumentIndex, TInt& aInstrumentId) const;
1.163 + IMPORT_C HBufC* InstrumentNameL(TInt aBankId, TBool aCustom, TInt aInstrumentId) const;
1.164 + IMPORT_C TInt SetInstrument(TInt aChannel,TInt aBankId,TInt aInstrumentId);
1.165 + IMPORT_C TInt LoadCustomInstrument(const TDesC& aFileName, TInt aFileBankId, TInt aFileInstrumentId, TInt aMemoryBankId, TInt aMemoryInstrumentId);
1.166 + IMPORT_C TInt LoadCustomInstrumentData(const TDesC8& aInstrumentData, TInt aBankDataId, TInt aInstrumentDataId, TInt aMemoryBankId, TInt aMemoryInstrumentId);
1.167 + IMPORT_C TInt UnloadCustomInstrument(TInt aCustomBankId,TInt aInstrumentId);
1.168 + IMPORT_C HBufC* PercussionKeyNameL(TInt aNote, TInt aBankId, TBool aCustom, TInt aInstrumentId) const;
1.169 + IMPORT_C TInt StopTime(TTimeIntervalMicroSeconds& aStopTime) const;
1.170 + IMPORT_C TInt SetStopTime(const TTimeIntervalMicroSeconds& aStopTime) const;
1.171 + IMPORT_C TInt Polyphony(TInt& aNumNotes) const;
1.172 + IMPORT_C TInt ChannelsSupported(TInt& aChannels) const;
1.173 + IMPORT_C TInt ChannelVolume(TInt aChannel, TReal32& aChannelVol) const;
1.174 + IMPORT_C TInt MaxChannelVolume(TReal32& aMaxVol) const;
1.175 + IMPORT_C TInt SetChannelVolume(TInt aChannel,TReal32 aVolume);
1.176 + IMPORT_C TInt SetChannelMute(TInt aChannel,TBool aMuted);
1.177 + IMPORT_C TInt Volume(TInt& aVolume) const;
1.178 + IMPORT_C TInt MaxVolume(TInt& aMaxVolume) const;
1.179 + IMPORT_C TInt SetVolume(TInt aVolume);
1.180 + IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration);
1.181 + IMPORT_C TInt GetBalance(TInt& aBalance) const;
1.182 + IMPORT_C TInt SetBalance(TInt aBalance);
1.183 + IMPORT_C TInt SetMaxPolyphony(TInt aMaxNotes);
1.184 + IMPORT_C TInt GetRepeats(TInt& aNumRepeats) const;
1.185 + IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
1.186 + IMPORT_C TInt SetBank(TBool aCustom);
1.187 + IMPORT_C TInt IsTrackMute(TInt aTrack, TBool& aTrackMute) const;
1.188 + IMPORT_C TInt IsChannelMute(TInt aChannel, TBool& aChannelMute) const;
1.189 + IMPORT_C TInt GetInstrument(TInt aChannel, TInt& aInstrumentId, TInt& aBankId);
1.190 + IMPORT_C TInt Close();
1.191 + IMPORT_C TInt Stop(const TTimeIntervalMicroSeconds& aFadeOutDuration);
1.192 + IMPORT_C void ReceiveEvents(TPckgBuf<TInt>& aEventSize, TRequestStatus& aStatus);
1.193 + IMPORT_C TInt RetrieveEvent(TDes8& aMidiEventPckg);
1.194 + IMPORT_C TInt CancelReceiveEvents();
1.195 + IMPORT_C TInt MaxPolyphony(TInt& aNumNotes) const;
1.196 + };
1.197 +
1.198 +
1.199 +/**
1.200 +Mixin class to be derived from by controller plugins wishing
1.201 +to support the MIDI controller custom commands.
1.202 +
1.203 +@publishedAll
1.204 +@released
1.205 +*/
1.206 +class MMidiCustomCommandImplementor
1.207 + {
1.208 +public:
1.209 + /**
1.210 + Change the position of the currently playing MIDI resource to the given position.
1.211 + May be called whenever a MIDI resource is open.
1.212 +
1.213 + @param aMicroBeats
1.214 + Metrical position to move to. Clamped to (0, DurationMicroBeats()).
1.215 + */
1.216 + virtual void MmcSetPositionMicroBeatsL(TInt64 aMicroBeats) = 0;
1.217 + /**
1.218 + Gets the current metrical position of the MIDI resource being played
1.219 +
1.220 + @param aMicroBeats
1.221 + (BPM*1000000) relative to the start of the resource
1.222 + */
1.223 + virtual void MmcPositionMicroBeatsL(TInt64& aMicroBeats) = 0;
1.224 + /**
1.225 + Synchronous function to play a single note.
1.226 + Multiple calls to this function will be accommodated as far as the MIDI engine can
1.227 + manage. The same functionality could be implemented using the SendMessage function
1.228 +
1.229 + @param aChannel
1.230 + Logical channel to play note on. 0 <= aChannel <= 15.
1.231 + @param aNote
1.232 + Note to play. 0 <= aNote <= 127
1.233 + @param aDuration
1.234 + Length of time to play note for.
1.235 + @param aNoteOnVelocity
1.236 + Velocity with which to start the note. 0 <= aNoteOnVelocity <= 127.
1.237 + @param aNoteOffVelocity
1.238 + Velocity with which to stop the note. 0 <= aNoteOffVelocity <= 127.
1.239 + */
1.240 + virtual void MmcPlayNoteL(TInt aChannel,TInt aNote,const TTimeIntervalMicroSeconds& aDuration,TInt aNoteOnVelocity,TInt aNoteOffVelocity) = 0;
1.241 + /**
1.242 + Synchronous function to play a single note at a specified time.
1.243 + Multiple calls to this function will be accommodated as far as the MIDI engine can
1.244 + manage. The same functionality could be implemented using the SendMessage function
1.245 +
1.246 + @param aChannel
1.247 + Logical channel to play note on. 0 <= aChannel <= 15.
1.248 + @param aNote
1.249 + Note to play. 0 <= aNote <= 127
1.250 + @param aStartTime
1.251 + Specifies the time at which to start playing the note, relative to the MIDI
1.252 + resource playing time or the time elapsed since Play() was called if no resource is present.
1.253 + @param aDuration
1.254 + Length of time to play note for.
1.255 + @param aNoteOnVelocity
1.256 + Velocity with which to start the note. 0 <= aNoteOnVelocity <= 127.
1.257 + @param aNoteOffVelocity
1.258 + Velocity with which to stop the note. 0 <= aNoteOffVelocity <= 127.
1.259 + */
1.260 + virtual void MmcPlayNoteL(TInt aChannel,TInt aNote,const TTimeIntervalMicroSeconds& aStartTime, const TTimeIntervalMicroSeconds& aDuration,TInt aNoteOnVelocity,TInt aNoteOffVelocity) = 0;
1.261 + /**
1.262 + Stops the playback of all notes on the given channel,
1.263 + by means of an All Notes Off MIDI message
1.264 +
1.265 + @param aChannel
1.266 + Logical channel to stop notes on. 0 <= aChannel <= 15
1.267 + */
1.268 + virtual void MmcStopNotesL(TInt aChannel) = 0;
1.269 + /**
1.270 + Synchronous function to commence playback of a note.
1.271 + Multiple calls to this function will be accommodated as far as the MIDI engine can manage
1.272 +
1.273 + @param aChannel
1.274 + Logical channel to play note on. 0 <= aChannel <= 15.
1.275 + @param aNote
1.276 + Note to play. 0 <= aNote <= 127.
1.277 + @param aVelocity
1.278 + Velocity with which to start the note. The legal integer range
1.279 + is 0 <= aVelocity <= 127, but the value zero actually causes the
1.280 + message to be interpreted as a Note Off message instead of a Note On.
1.281 + */
1.282 + virtual void MmcNoteOnL(TInt aChannel,TInt aNote,TInt aVelocity) = 0;
1.283 + /**
1.284 + Synchronous function to terminate playback of a note.
1.285 + If no corresponding note is found then no error is raised
1.286 +
1.287 + @param aChannel
1.288 + Logical channel on which the note is playing. 0 <= aChannel <= 15.
1.289 + @param aNote
1.290 + Note to terminate. 0 <= aNote <= 127.
1.291 + @param aVelocity
1.292 + Velocity with which to stop the note. 0 <= aVelocity <= 127.
1.293 + There is no standard behaviour corresponding with note off velocity.
1.294 + */
1.295 + virtual void MmcNoteOffL(TInt aChannel,TInt aNote,TInt aVelocity) = 0;
1.296 + /**
1.297 + Gets the current playback rate factor of the currently open MIDI resource.
1.298 + The playback rate is independent from tempo,
1.299 + i.e., it can be used to give an overall speed factor for playback.
1.300 +
1.301 + @param aPlayBackRate
1.302 + Current playback rate in percent times 1000, i.e., 100000 means original
1.303 + playback speed, 200000 means double speed, and 50000 means half speed playback.
1.304 + */
1.305 + virtual void MmcPlaybackRateL(TInt& aPlayBackRate) = 0;
1.306 + /**
1.307 + Sets the playback rate for the playback of the current MIDI resource.
1.308 + The playback rate is independent from tempo,
1.309 + i.e., it can be used to give an overall speed factor for playback.
1.310 + May be called whether playback is in progress or not.
1.311 +
1.312 + @param aPlayBackRate
1.313 + Playback rate in percent times 1000, i.e., 100000 means original playback speed,
1.314 + 200000 means double speed, and 50000 means half speed playback.
1.315 + */
1.316 + virtual void MmcSetPlaybackRateL(TInt aPlayBackRate) = 0;
1.317 + /**
1.318 + Gets the maximum playback rate in milli-percentage from the MIDI engine.
1.319 + @see SetPlaybackRate() for milli-percentage details.
1.320 +
1.321 + @param aMaxRate
1.322 + Playback rate supported by MIDI player.
1.323 + */
1.324 + virtual void MmcMaxPlaybackRateL(TInt& aMaxRate) = 0;
1.325 + /**
1.326 + Gets the minimum playback rate in milli-percentage from the MIDI engine.
1.327 + @see SetPlaybackRate() for milli-percentage details.
1.328 +
1.329 + @param aMinRate
1.330 + Minimum playback rate supported by MIDI player.
1.331 + */
1.332 + virtual void MmcMinPlaybackRateL(TInt& aMinRate) = 0;
1.333 + /**
1.334 + Gets the current tempo of the currently open MIDI resource. The tempo is independent
1.335 + from the playback rate, i.e., the resulting playback speed will be affected by both.
1.336 +
1.337 + @param aMicroBeatsPerMinute
1.338 + Tempo at the current position of the currently open resource in microbeats
1.339 + per minute, i.e. BPM * 1000000. Filled in by the controller framework.
1.340 + */
1.341 + virtual void MmcTempoMicroBeatsPerMinuteL(TInt& aMicroBeatsPerMinute) = 0;
1.342 + /**
1.343 + Sets the tempo at which the current MIDI resource should be played.
1.344 + May be called whether playback is in progress or not. The tempo is
1.345 + independent from the playback rate, i.e., the resulting playback speed
1.346 + will be affected by both.
1.347 +
1.348 + @param aMicroBeatsPerMinute
1.349 + Tempo in microbeats per minute (BPM*1000000) to set.
1.350 + */
1.351 + virtual void MmcSetTempoL(TInt aMicroBeatsPerMinute) = 0;
1.352 + /**
1.353 + Gets the pitch shift in use for the currently open MIDI resource.
1.354 +
1.355 + @param aPitch
1.356 + Shift in cents, i.e. semitones * 100. One octave equals 1200 cents.
1.357 + @return One of the system-wide error codes.
1.358 + */
1.359 + virtual void MmcPitchTranspositionCentsL(TInt& aPitch) = 0;
1.360 + /**
1.361 + Sets the pitch shift to apply to the currently open MIDI resource.
1.362 + May be called during playback.
1.363 +
1.364 + @param aCents
1.365 + Pitch shift in cents, i.e. semitones * 100. One octave equals 1200 cents.
1.366 + @param aCentsApplied
1.367 + Actual pitch shift applied - may differ from the requested value due
1.368 + to limitations of the MIDI engine.
1.369 + */
1.370 + virtual void MmcSetPitchTranspositionL(TInt aCents, TInt& aCentsApplied) = 0;
1.371 + /**
1.372 + Gets the length of the currently open MIDI resource in micro-beats
1.373 +
1.374 + @param aDuration
1.375 + Duration in microbeats (beats * 1000000).
1.376 + */
1.377 + virtual void MmcDurationMicroBeatsL(TInt64& aDuration) = 0;
1.378 + /**
1.379 + Gets the number of tracks present in the currently open MIDI resource.
1.380 +
1.381 + @param aTracks
1.382 + Number of tracks.
1.383 + */
1.384 + virtual void MmcNumTracksL(TInt& aTracks) = 0;
1.385 + /**
1.386 + Mutes or unmutes a particular track.
1.387 +
1.388 + @param aTrack
1.389 + Index of the track to mute - 0 <= aTrack < NumTracks().
1.390 + @param aMuted
1.391 + ETrue to mute the track, EFalse to unmute it.
1.392 + */
1.393 + virtual void MmcSetTrackMuteL(TInt aTrack, TBool aMuted) = 0;
1.394 + /**
1.395 + Gets the MIME type of the MIDI resource currently open.
1.396 +
1.397 + @param aMimeType
1.398 + Descriptor containing the MIDI mime type.
1.399 + */
1.400 + virtual void MmcMimeTypeL(TDes8& aMimeType) = 0;
1.401 + /**
1.402 + Sets the frequency at which MMIDIClientUtilityObserver::MmcuoSyncUpdateL() is called
1.403 + to allow other components to synchronise with playback of this MIDI resource.
1.404 +
1.405 + @param aMicroSeconds
1.406 + Temporal interval to callback at. Used in preference to aMicroBeats if both are set.
1.407 + @param aMicroBeats
1.408 + Metrical interval to callback at. Set both parameters to zero to cancel.
1.409 + */
1.410 + virtual void MmcSetSyncUpdateCallbackIntervalL(const TTimeIntervalMicroSeconds& aMicroSeconds,TInt64 aMicroBeats=0) = 0;
1.411 + /**
1.412 + Sends a single MIDI message to the MIDI engine.
1.413 +
1.414 + @param aMidiMessage
1.415 + Descriptor containing the MIDI message data. If there are several
1.416 + MIDI messages in the buffer, only the first one is processed.
1.417 + @param aBytes
1.418 + Number of bytes of the message buffer actually processed.
1.419 + */
1.420 + virtual void MmcSendMessageL(const TDesC8& aMidiMessage, TInt& aBytes) = 0;
1.421 + /**
1.422 + Sends a single MIDI message, with time stamp, to the MIDI engine.
1.423 +
1.424 + @param aMidiMessage
1.425 + Descriptor containing the MIDI message data. If there are several
1.426 + MIDI messages in the buffer, only the first one is processed.
1.427 + @param aTime
1.428 + The time at which to execute the message, relative to the MIDI resource playing
1.429 + time or the time elapsed since Play() was called if no resource is present.
1.430 + @param aBytes
1.431 + Number of bytes of the message buffer actually processed.
1.432 + */
1.433 + virtual void MmcSendMessageL(const TDesC8& aMidiMessage,const TTimeIntervalMicroSeconds& aTime, TInt& aBytes) = 0;
1.434 + /**
1.435 + Sends a mip message to the MIDI engine. This is a convenience function,
1.436 + because the same functionality could be achieved with the SendMessage() function.
1.437 +
1.438 + @param aEntry
1.439 + Array of logical {channel, MIP} value pairs to send, highest priority first.
1.440 + */
1.441 + virtual void MmcSendMipMessageL(const TArray<TMipMessageEntry>& aEntry) = 0;
1.442 + /**
1.443 + Gets the number of standard or custom sound banks currently available.
1.444 +
1.445 + @param aCustom
1.446 + Specifies whether to reference a custom or standard sound bank.
1.447 + @param aNumBanks
1.448 + Number of custom or standard sound banks available.
1.449 + */
1.450 + virtual void MmcNumberOfBanksL(TBool aCustom, TInt& aNumBanks) = 0;
1.451 + /**
1.452 + Gets the identifier of a sound bank. Bank identifier (aka bank number) is a
1.453 + 14-bit value consisting of MIDI bank MSB and LSB values.
1.454 +
1.455 + @param aCustom
1.456 + Specifies whether to reference a custom or standard sound bank.
1.457 + @param aBankIndex
1.458 + Index of sound bank where 0 <= aBankIndex < NumberOfBanks().
1.459 + @param aBankId
1.460 + Identifier of the specified bank occupying, at most, 14 bits.
1.461 + */
1.462 + virtual void MmcGetBankIdL(TBool aCustom, TInt aBankIndex, TInt& aBankId) = 0;
1.463 + /**
1.464 + Loads one or more custom sound banks from a file into memory for use.
1.465 + If several banks are loaded with consequent LoadCustomBanksL() function calls,
1.466 + the banks are combined if the bank sets have conflicting bank numbers.
1.467 +
1.468 + @param aFileName
1.469 + Name of the file containing the custom sound bank.
1.470 + @param aBankId
1.471 + Identifier of the custom sound bank loaded, occupying no more than 14 bits.
1.472 + */
1.473 + virtual void MmcLoadCustomBankL(const TDesC& aFileName,TInt& aBankId) = 0;
1.474 + /**
1.475 + Loads one or more custom sound banks from a descriptor into memory for use.
1.476 + If several banks are loaded with consequent LoadCustomBanksL() function calls,
1.477 + the banks are combined if the bank sets have conflicting bank numbers.
1.478 +
1.479 + @param aBankData
1.480 + Descriptor containing the custom sound bank.
1.481 + @param aBankId
1.482 + Identifier of the custom sound bank loaded, occupying no more than 14 bits.
1.483 + */
1.484 + virtual void MmcLoadCustomBankDataL(const TDesC8& aBankData,TInt& aBankId) = 0;
1.485 + /**
1.486 + Removes a custom sound bank from memory. Only valid for sound banks previously
1.487 + loaded from file. Once unloaded the custom sound bank is no longer available for use.
1.488 +
1.489 + @param aBankId
1.490 + Identifier of the custom sound bank to unload,occupying no more than 14 bits.
1.491 + */
1.492 + virtual void MmcUnloadCustomBankL(TInt aBankId) = 0;
1.493 + /**
1.494 + Query if a bank has been loaded to the memory.
1.495 +
1.496 + @param aBankId
1.497 + Identifier of the custom sound bank to check if it's in memory or not.
1.498 + @param aBankLoaded
1.499 + ETrue if the specified bank is in memory, EFalse otherwise.
1.500 + */
1.501 + virtual void MmcCustomBankLoadedL(TInt aBankId, TBool& aBankLoaded) = 0;
1.502 + /**
1.503 + Removes all custom sound banks from memory.
1.504 + */
1.505 + virtual void MmcUnloadAllCustomBanksL() = 0;
1.506 + /**
1.507 + Gets the number of instruments available in a given sound bank.
1.508 +
1.509 + @param aBankId
1.510 + Identifier of sound bank to reference, occupying no more than 14 bits.
1.511 + @param aCustom
1.512 + Specifies whether to reference a custom or standard sound bank.
1.513 + @param aNumInstruments
1.514 + Count of the number of instruments available for the specified sound bank.
1.515 + */
1.516 + virtual void MmcNumberOfInstrumentsL(TInt aBankId, TBool aCustom, TInt& aNumInstruments) = 0;
1.517 + /**
1.518 + Gets the identifier of an instrument.
1.519 +
1.520 + @param aBankId
1.521 + Identifier of the sound bank to reference, occupying no more than 14 bits.
1.522 + @param aCustom
1.523 + Specifies whether to reference a custom or standard sound bank.
1.524 + @param aInstrumentIndex
1.525 + Index of the instrument to reference where 0 <= aInstrumentIndex < NumberOfInstrumentsL().
1.526 + @param aInstrumentId
1.527 + Identifier of specified instrument. This may differ from the index since the
1.528 + index simply enumerates the instruments, whereas identifiers may not be
1.529 + contiguous, especially where certain instruments correspond to General MIDI-defined
1.530 + instruments but not all instruments are present. Instrument identifiers are
1.531 + between 0 and 127 inclusive.
1.532 + */
1.533 + virtual void MmcGetInstrumentIdL(TInt aBankId,TBool aCustom,TInt aInstrumentIndex, TInt& aInstrumentId) = 0;
1.534 + /**
1.535 + Gets the name of the given instrument.
1.536 +
1.537 + @param aBankId
1.538 + Identifier of the bank that the instrument belongs to, occupying no more than 14 bits.
1.539 + @param aCustom
1.540 + Specifies whether to reference a custom or standard sound bank.
1.541 + @param aInstrumentId
1.542 + Identifier of the instrument under scrutiny. 0 <= aInstrumentId <= 127.
1.543 + @return Buffer containing the name of the specified instrument.
1.544 + If it has no name then an empty descriptor is returned.
1.545 + */
1.546 + virtual const TDesC& MmcInstrumentNameL(TInt aBankId, TBool aCustom, TInt aInstrumentId) = 0;
1.547 + /**
1.548 + Sets a logical channel to use the given instrument.
1.549 +
1.550 + @param aChannel
1.551 + Logical channel to set the instrument for. 0 <= aChannel <= 15.
1.552 + @param aBankId
1.553 + Identifier of the bank that the instrument belongs to, occupying no more than 14 bits.
1.554 + The bank ID is a concatenation of MIDI bank MSB and LSB values.
1.555 + @param aInstrumentId
1.556 + Identifier of the instrument under scrutiny. 0 <= aInstrumentId <= 127.
1.557 + */
1.558 + virtual void MmcSetInstrumentL(TInt aChannel,TInt aBankId,TInt aInstrumentId) = 0;
1.559 + /**
1.560 + Loads an individual instrument from file into custom sound bank memory for use.
1.561 + The bank and instrument ids given in the file can be mapped into different bank
1.562 + and instrument ids in memory.
1.563 +
1.564 + @param aFileName
1.565 + Name of the file containing the instrument.
1.566 + @param aFileBankId
1.567 + Identifier of the bank in the file from which to load the instrument,
1.568 + occupying no more than 14 bits.
1.569 + @param aFileInstrumentId
1.570 + Identifier of the instrument to load. 0 <= aInstrumentId <= 127.
1.571 + @param aMemoryBankId
1.572 + Identifier of the custom bank in memory to load the instrument into,
1.573 + occupying no more than 14 bits.
1.574 + @param aMemoryInstrumentId
1.575 + Identifier of the instrument in memory to load the new instrument into.
1.576 + 0 <= aInstrumentId <= 127.
1.577 + */
1.578 + virtual void MmcLoadCustomInstrumentL(const TDesC& aFileName, TInt aFileBankId, TInt aFileInstrumentId, TInt aMemoryBankId, TInt aMemoryInstrumentId) = 0;
1.579 + /**
1.580 + Loads an individual instrument from descriptor into custom sound bank memory for use.
1.581 + The bank and instrument ids given in the descriptor can be mapped into different bank
1.582 + and instrument ids in memory.
1.583 +
1.584 + @param aInstrumentData
1.585 + Descriptor containing the instrument.
1.586 + @param aBankDataId
1.587 + Identifier of the bank in the descriptor from which to load the instrument,
1.588 + occupying no more than 14 bits.
1.589 + @param aInstrumentDataId
1.590 + Identifier of the instrument to load. 0 <= aInstrumentId <= 127.
1.591 + @param aMemoryBankId
1.592 + Identifier of the custom bank in memory to load the instrument into,
1.593 + occupying no more than 14 bits.
1.594 + @param aMemoryInstrumentId
1.595 + Identifier of the instrument in memory to load the new instrument into.
1.596 + 0 <= aInstrumentId <= 127.
1.597 + */
1.598 + virtual void MmcLoadCustomInstrumentDataL(const TDesC8& aInstrumentData, TInt aBankDataId, TInt aInstrumentDataId, TInt aMemoryBankId, TInt aMemoryInstrumentId) = 0;
1.599 + /**
1.600 + Removes an instrument from custom sound bank memory.
1.601 + Only valid for instruments previously loaded from file.
1.602 + Once unloaded the instrument is no longer available for use.
1.603 +
1.604 + @param aCustomBankId
1.605 + Identifier of the custom sound bank containing the instrument
1.606 + to unload, occupying no more than 14 bits.
1.607 + @param aInstrumentId
1.608 + Identifier of the instrument to unload. 0 <= aInstrumentId <= 127.
1.609 + */
1.610 + virtual void MmcUnloadCustomInstrumentL(TInt aCustomBankId,TInt aInstrumentId) = 0;
1.611 + /**
1.612 + Gets the name of a particular percussion key corresponding to a given note.
1.613 +
1.614 + @param aNote
1.615 + Note to query. 0 <= aNote <= 127.
1.616 + @param aBankId
1.617 + Identifier of the bank that the instrument belongs to, occupying no more than 14 bits.
1.618 + The bank ID is a concatenation of MIDI bank MSB and LSB values.
1.619 + @param aCustom
1.620 + Specifies whether to reference a custom or standard sound bank.
1.621 + @param aInstrumentId
1.622 + Identifier of an instrument.
1.623 + @return Descriptor containing the name of the percussion key.
1.624 + If the key does not have a name then an empty descriptor is returned.
1.625 + */
1.626 + virtual const TDesC& MmcPercussionKeyNameL(TInt aNote, TInt aBankId, TBool aCustom, TInt aInstrumentId) = 0;
1.627 + /**
1.628 + Get the stop time currently set for the MIDI resource.
1.629 +
1.630 + @param aStopTime
1.631 + Time at which playback will stop, relative to the start of the resource.
1.632 + @return Descriptor containing the name of the percussion key. If the key
1.633 + does not have a name then an empty descriptor is returned.
1.634 + */
1.635 + virtual void MmcStopTimeL(TTimeIntervalMicroSeconds& aStopTime) = 0;
1.636 + /**
1.637 + Sets the stop time to use for the currently open MIDI resource
1.638 +
1.639 + @param aStopTime
1.640 + Time at which playback will stop, relative to the start of the resource.
1.641 + Clamped to 0 and the duration of the resource.
1.642 + */
1.643 + virtual void MmcSetStopTimeL(const TTimeIntervalMicroSeconds& aStopTime) = 0;
1.644 + /**
1.645 + Gets the number of currently active voices.
1.646 +
1.647 + @param aNumNotes
1.648 + The number of currently active voices.
1.649 + */
1.650 + virtual void MmcPolyphonyL(TInt& aNumNotes) = 0;
1.651 + /**
1.652 + Get the maximum number of logical channels supported by the MIDI engine.
1.653 +
1.654 + @param aChannels
1.655 + The maximum number of logical channels that the MIDI engine supports, 0 <= aChannels <=15.
1.656 + */
1.657 + virtual void MmcChannelsSupportedL(TInt& aChannels) = 0;
1.658 + /**
1.659 + Get the current volume setting of a logical channel.
1.660 +
1.661 + @param aChannel
1.662 + Logical channel to query. 0 <= aChannel <= 15.
1.663 + @param aChannelVol
1.664 + Volume currently set on the specified channel in decibels.
1.665 + */
1.666 + virtual void MmcChannelVolumeL(TInt aChannel, TReal32& aChannelVol) = 0;
1.667 + /**
1.668 + Gets the Maximum volume setting that may be applied to a logical channel.
1.669 +
1.670 + @param aMaxVol
1.671 + Maximum volume setting. Minimum value is -infinity dB, which is
1.672 + the smallest possible value that TReal32 supports.
1.673 + */
1.674 + virtual void MmcMaxChannelVolumeL(TReal32& aMaxVol) = 0;
1.675 + /**
1.676 + Set the volume of a channel.
1.677 +
1.678 + @param aChannel
1.679 + Logical channel to set the volume on. 0 <= aChannel <= 15.
1.680 + @param aVolume
1.681 + The channel volume can be set within a range. The minimum channel
1.682 + volume is -infinity dB, which is the smallest possible value that
1.683 + TReal32 supports while the maximum channel volume is set via MaxVolumeL()
1.684 + which represents the volume level in dB corresponding to the MIDI Channel
1.685 + Volume controller.
1.686 + */
1.687 + virtual void MmcSetChannelVolumeL(TInt aChannel,TReal32 aVolume) = 0;
1.688 + /**
1.689 + Set the muting state of a channel without changing its volume setting.
1.690 + When unmuted the channel goes back to its previous volume setting.
1.691 +
1.692 + @param aChannel
1.693 + Logical channel to set the mute state of. 0 <= aChannel <= 15.
1.694 + @param aMuted
1.695 + ETrue to mute the channel, EFalse to unmute it.
1.696 + */
1.697 + virtual void MmcSetChannelMuteL(TInt aChannel,TBool aMuted) = 0;
1.698 + /**
1.699 + Gets the overall volume of the MIDI client.
1.700 +
1.701 + @param aVolume
1.702 + The current overall volume setting.
1.703 + */
1.704 + virtual void MmcVolumeL(TInt& aVolume) = 0;
1.705 + /**
1.706 + Maximum volume setting that may be applied overall.
1.707 +
1.708 + @param aMaxVolume
1.709 + Maximum volume setting. Minimum value is always zero which is silent.
1.710 + */
1.711 + virtual void MmcMaxVolumeL(TInt& aMaxVolume) = 0;
1.712 + /**
1.713 + Set the overall volume of the MIDI client.
1.714 + This setting scales all channel volumes respectively so the actual volume
1.715 + that a channel is played at becomes (overall volume * channel volume / max volume).
1.716 +
1.717 + @param aVolume Overall volume setting to use.
1.718 + */
1.719 + virtual void MmcSetVolumeL(TInt aVolume) = 0;
1.720 + /**
1.721 + Length of time over which the volume is faded up from zero to the current settings
1.722 + when playback is started.
1.723 +
1.724 + @param aRampDuration
1.725 + Duration of the ramping period.
1.726 + */
1.727 + virtual void MmcSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
1.728 + /**
1.729 + Get the current stereo balance value.
1.730 +
1.731 + @param aBalance
1.732 + Balance value ranging from KMMFBalanceMaxLeft to KMMFBalanceMaxRight.
1.733 + */
1.734 + virtual void MmcGetBalanceL(TInt& aBalance) = 0;
1.735 + /**
1.736 + Set the current stereo balance value.
1.737 +
1.738 + @param aBalance
1.739 + Balance value to set. Defaults to KMMFBalanceCenter to restore equal left-right balance.
1.740 + */
1.741 + virtual void MmcSetBalanceL(TInt aBalance) = 0;
1.742 + /**
1.743 + Set the max polyphony level the engine can handle.
1.744 +
1.745 + @param aMaxNotes
1.746 + Max polyphony level, 0 <= PolyphonyL() <= aMaxNotes.
1.747 + */
1.748 + virtual void MmcSetMaxPolyphonyL(TInt aMaxNotes) = 0;
1.749 + /**
1.750 + Gets the number of times the current opened resources have to be repeated.
1.751 +
1.752 + @param aNumRepeats
1.753 + The number of time the current opened resources have to be repeated.
1.754 + */
1.755 + virtual void MmcGetRepeatsL(TInt& aNumRepeats) = 0;
1.756 + /**
1.757 + Set the number of times to repeat the current MIDI resource.
1.758 + After Stop() has been called, repeat number of times and the trailing silence are reset.
1.759 +
1.760 + @param aRepeatNumberOfTimes
1.761 + Number of times to repeat the resource during playback. This includes the first playing.
1.762 + @param aTrailingSilence
1.763 + Time in microseconds to pause between repeats.
1.764 + */
1.765 + virtual void MmcSetRepeatsL(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;
1.766 + /**
1.767 + Tell the MIDI engine to use a custom bank or a standard bank.
1.768 +
1.769 + @param aCustom
1.770 + If Etrue the custom bank in memory is used otherwise the standard bank
1.771 + is used leaving the custom bank in memory.
1.772 + */
1.773 + virtual void MmcSetBankL(TBool aCustom) = 0;
1.774 + /**
1.775 + Gets the muting status of a specific track.
1.776 +
1.777 + @param aTrack
1.778 + The track to query.
1.779 + @param aTrackMute
1.780 + The mute status of the track.
1.781 + */
1.782 + virtual void MmcIsTrackMuteL(TInt aTrack, TBool& aTrackMute) = 0;
1.783 + /**
1.784 + Gets the muting status of a specific channel.
1.785 +
1.786 + @param aChannel
1.787 + The channel to query.
1.788 + @param aChannelMute
1.789 + The mute status of the channel.
1.790 + */
1.791 + virtual void MmcIsChannelMuteL(TInt aChannel, TBool& aChannelMute) = 0;
1.792 + /**
1.793 + Gets the instrument assigned to a specified channel.
1.794 +
1.795 + @param aChannel
1.796 + Logical channel, 0 <= aChannel <= 15.
1.797 + @param aInstrumentId
1.798 + Identifier of the instrument assigned to aChannel. 0 <= aInstrumentId <= 127.
1.799 + @param aBankId
1.800 + Identifier of the bank that the instrument belongs to, occupying no more than 14 bits.
1.801 + */
1.802 + virtual void MmcGetInstrumentL(TInt aChannel, TInt& aInstrumentId, TInt& aBankId) = 0;
1.803 + /**
1.804 + Closes any currently open resources, such as files, descriptors or URLs in use.
1.805 + Does nothing if there is nothing currently open.
1.806 + */
1.807 + virtual void MmcCloseL() = 0;
1.808 + /**
1.809 + Stops playback of a resource but does not change the current position or release any resources.
1.810 + Pauses the internal timer if no resource is open.
1.811 +
1.812 + @param aFadeOutDuration
1.813 + Length of time over which the volume is faded out from the current settings to zero.
1.814 + */
1.815 + virtual void MmcStopL(const TTimeIntervalMicroSeconds& aFadeOutDuration) = 0;
1.816 + /**
1.817 + Gets the max polyphony level the engine can handle.
1.818 +
1.819 + @param aNumNotes
1.820 + Max polyphony level, PolyphonyL() <= aMaxNotes.
1.821 + */
1.822 + virtual void MmcMaxPolyphonyL(TInt& aMaxNotes) = 0;
1.823 + };
1.824 +
1.825 +
1.826 +/**
1.827 +Mixin class to define an object capable of handling a MIDI event within the controller framework.
1.828 +
1.829 +@publishedAll
1.830 +@released
1.831 +*/
1.832 +class MMidiEventHandler
1.833 + {
1.834 +public:
1.835 + /**
1.836 + Send an event to the client.
1.837 +
1.838 + @param aEvent
1.839 + The MIDI event.
1.840 + @return One of the system-wide error codes.
1.841 + */
1.842 + virtual TInt SendMidiEventToClient(const CMMFMidiEvent& aEvent) = 0;
1.843 + };
1.844 +
1.845 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.846 +#include <mmf/common/midieventreceiver.h>
1.847 +#endif
1.848 +
1.849 +class CMidiEventReceiver;
1.850 +
1.851 +/**
1.852 +Custom command parser class to be used by controller plugins wishing to support
1.853 +MIDI controller commands.
1.854 +The controller plugin must be derived from MMidiCustomCommandImplementor
1.855 +to use this class. The controller plugin should create an object of this type and add
1.856 +it to the list of custom command parsers in the controller framework.
1.857 +
1.858 +@publishedAll
1.859 +@released
1.860 +*/
1.861 +class CMidiCustomCommandParser : public CMMFCustomCommandParserBase,
1.862 + public MMidiEventHandler
1.863 + {
1.864 +public:
1.865 + IMPORT_C static CMidiCustomCommandParser* NewL(MMidiCustomCommandImplementor& aImplementor);
1.866 + IMPORT_C ~CMidiCustomCommandParser();
1.867 + /**
1.868 + @internalTechnology
1.869 + */
1.870 + void HandleRequest(TMMFMessage& aMessage);
1.871 + virtual TInt SendMidiEventToClient(const CMMFMidiEvent& aEvent);
1.872 +private:
1.873 + CMidiCustomCommandParser(MMidiCustomCommandImplementor& aImplementor);
1.874 + // Internal request handling methods.
1.875 + void DoHandleRequestL(TMMFMessage& aMessage);
1.876 +
1.877 + TBool DoSetPositionMicroBeatsL(TMMFMessage& aMessage);
1.878 + TBool DoPositionMicroBeatsL(TMMFMessage& aMessage);
1.879 + TBool DoPlayNoteL(TMMFMessage& aMessage);
1.880 + TBool DoPlayNoteWithStartTimeL(TMMFMessage& aMessage);
1.881 + TBool DoStopNotesL(TMMFMessage& aMessage);
1.882 + TBool DoNoteOnL(TMMFMessage& aMessage);
1.883 + TBool DoNoteOffL(TMMFMessage& aMessage);
1.884 + TBool DoPlaybackRateL(TMMFMessage& aMessage);
1.885 + TBool DoSetPlaybackRateL(TMMFMessage& aMessage);
1.886 + TBool DoMaxPlaybackRateL(TMMFMessage& aMessage);
1.887 + TBool DoMinPlaybackRateL(TMMFMessage& aMessage);
1.888 + TBool DoTempoMicroBeatsPerMinuteL(TMMFMessage& aMessage);
1.889 + TBool DoSetTempoL(TMMFMessage& aMessage);
1.890 + TBool DoPitchTranspositionCentsL(TMMFMessage& aMessage);
1.891 + TBool DoSetPitchTranspositionL(TMMFMessage& aMessage);
1.892 + TBool DoDurationMicroBeatsL(TMMFMessage& aMessage);
1.893 + TBool DoNumTracksL(TMMFMessage& aMessage);
1.894 + TBool DoSetTrackMuteL(TMMFMessage& aMessage);
1.895 + TBool DoMimeTypeL(TMMFMessage& aMessage);
1.896 + TBool DoSetSyncUpdateCallbackIntervalL(TMMFMessage& aMessage);
1.897 + TBool DoSendMessageL(TMMFMessage& aMessage);
1.898 + TBool DoSendMessageWithTimeStampL(TMMFMessage& aMessage);
1.899 + TBool DoSendMipMessageL(TMMFMessage& aMessage);
1.900 + TBool DoNumberOfBanksL(TMMFMessage& aMessage);
1.901 + TBool DoGetBankIdL(TMMFMessage& aMessage);
1.902 + TBool DoLoadCustomBankL(TMMFMessage& aMessage);
1.903 + TBool DoLoadCustomBankDataL(TMMFMessage& aMessage);
1.904 + TBool DoUnloadCustomBankL(TMMFMessage& aMessage);
1.905 + TBool DoCustomBankLoadedL(TMMFMessage& aMessage);
1.906 + TBool DoUnloadAllCustomBanksL(TMMFMessage& aMessage);
1.907 + TBool DoNumberOfInstrumentsL(TMMFMessage& aMessage);
1.908 + TBool DoGetInstrumentIdL(TMMFMessage& aMessage);
1.909 + TBool DoInstrumentNameL(TMMFMessage& aMessage);
1.910 + TBool DoCopyInstrumentNameL(TMMFMessage& aMessage);
1.911 + TBool DoSetInstrumentL(TMMFMessage& aMessage);
1.912 + TBool DoLoadCustomInstrumentL(TMMFMessage& aMessage);
1.913 + TBool DoLoadCustomInstrumentDataL(TMMFMessage& aMessage);
1.914 + TBool DoUnloadCustomInstrumentL(TMMFMessage& aMessage);
1.915 + TBool DoPercussionKeyNameL(TMMFMessage& aMessage);
1.916 + TBool DoCopyPercussionKeyNameL(TMMFMessage& aMessage);
1.917 + TBool DoStopTimeL(TMMFMessage& aMessage);
1.918 + TBool DoSetStopTimeL(TMMFMessage& aMessage);
1.919 + TBool DoPolyphonyL(TMMFMessage& aMessage);
1.920 + TBool DoChannelsSupportedL(TMMFMessage& aMessage);
1.921 + TBool DoChannelVolumeL(TMMFMessage& aMessage);
1.922 + TBool DoMaxChannelVolumeL(TMMFMessage& aMessage);
1.923 + TBool DoSetChannelVolumeL(TMMFMessage& aMessage);
1.924 + TBool DoSetChannelMuteL(TMMFMessage& aMessage);
1.925 + TBool DoVolumeL(TMMFMessage& aMessage);
1.926 + TBool DoMaxVolumeL(TMMFMessage& aMessage);
1.927 + TBool DoSetVolumeL(TMMFMessage& aMessage);
1.928 + TBool DoSetVolumeRampL(TMMFMessage& aMessage);
1.929 + TBool DoGetBalanceL(TMMFMessage& aMessage);
1.930 + TBool DoSetBalanceL(TMMFMessage& aMessage);
1.931 + TBool DoSetMaxPolyphonyL(TMMFMessage& aMessage);
1.932 + TBool DoGetRepeatsL(TMMFMessage& aMessage);
1.933 + TBool DoSetRepeatsL(TMMFMessage& aMessage);
1.934 + TBool DoSetBankL(TMMFMessage& aMessage);
1.935 + TBool DoIsTrackMuteL(TMMFMessage& aMessage);
1.936 + TBool DoIsChannelMuteL(TMMFMessage& aMessage);
1.937 + TBool DoGetInstrumentL(TMMFMessage& aMessage);
1.938 + TBool DoCloseL(TMMFMessage& aMessage);
1.939 + TBool DoStopL(TMMFMessage& aMessage);
1.940 + TBool DoReceiveEventsL(TMMFMessage& aMessage);
1.941 + TBool DoRetrieveEventL(TMMFMessage& aMessage);
1.942 + TBool DoCancelReceiveEventsL(TMMFMessage& aMessage);
1.943 +
1.944 + void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
1.945 + void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
1.946 + TBool DoMaxPolyphonyL(TMMFMessage& aMessage);
1.947 +private:
1.948 + /** The object that implements the MIDI controller interface */
1.949 + MMidiCustomCommandImplementor& iImplementor;
1.950 +
1.951 + CMidiEventReceiver* iMidiEventReceiver;
1.952 + /** The events waiting to be sent to the client.*/
1.953 + RPointerArray<CMMFMidiEvent> iMidiEvents;
1.954 +
1.955 + // variable length data waiting to be copied back to the client
1.956 + CBufFlat* iInstrumentName;
1.957 + CBufFlat* iPercussionKeyName;
1.958 + };
1.959 +
1.960 +#endif