Update contrib.
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Mmf\Common\MmfMidiconfig.h
18 #ifndef __MMF_COMMON_MMFMIDI_CONFIG_H__
19 #define __MMF_COMMON_MMFMIDI_CONFIG_H__
27 inline TMMFMidiConfig1();
30 * Number of tracks present in the currently open MIDI resource.
35 * Current state of the MIDI client utility object
36 * (EMidiStateClosedDisengaged,EMidiStateOpenDisengaged,EMidiStateOpenPlaying,EMidiStatePlaybackIncompatible,
37 * EMidiStatePlaybackSilent, EMidiStateClosedEngaged, EMidiStateOpenEngaged).
43 * Tempo in microbeats per minute (BPM*1000000).
48 * Pitch shift in cents, i.e. semitones * 100. One octave equals 1200 cents.
53 * Array of logical {channel, MIP} value pairs to send SP-MIDI MIP message to the MIDI engine.
55 const TArray<TMipMessageEntry>* iMipMessage;
58 * The maximum number of notes that the MIDI engine supports simultaneously (polyphony).
63 * Max polyphony level: 0 <= PolyphonyL() <= iMaxNotes.
68 * Overall volume of the MIDI client.
73 * Maximum volume that may be applied overall to the MIDI client.
78 * Length of time over which the volume is faded up from zero to the current settings when playback is started.
80 TTimeIntervalMicroSeconds iRampDuration;
83 * Stereo balance value: KMMFBalanceMaxLeft <= iBalance <= KMMFBalanceMaxRight.
88 * The number of times the current opened resources has to be repeated.
89 * This includes the first instance of playing.
94 * Length of time over which the volume is faded out from the current settings to zero.
96 TTimeIntervalMicroSeconds iFadeOutDuration;
102 class TMMFMidiConfig2
105 inline TMMFMidiConfig2();
108 * Index of the track to mute: 0 <= iTrack < NumTracksL().
113 * ETrue to mute the track/channel, EFalse to unmute it.
118 * Note to play ot to terminate: 0 <= iNote <= 127.
123 * Length of time to play the note for.
125 TTimeIntervalMicroSeconds iDurationMicroSeconds;
128 * Specifying the time at which to start playing the note.
129 * It's relative to the MIDI resource playing time or the time elapsed
130 * since Play() was called if no resource is present.
132 TTimeIntervalMicroSeconds iStartTime;
135 * Velocity with which to start the note: 0 <= iNoteOnVelocity <= 127.
137 TInt iNoteOnVelocity;
140 * Velocity with which to stop the note: 0 <= iNoteOffVelocity <= 127.
142 TInt iNoteOffVelocity;
145 * Number of standard or custom sound banks currently available.
150 * Specifies whether to reference a custom or standard sound bank.
155 * Index of custom/deault bank: 0 <= iBankIndex < NumberOfBanksL()
160 * Custom/deault Bank's Identifier.
165 * Identifier of the custom bank in memory.
170 * Name of the file containing the custom sound bank or the name
171 * of the file containing the instrument. Includes the directory path.
173 const TDesC* iFileName;
176 * Descriptor containing the custom sound bank.
178 const TDesC8* iBankData;
181 * Descriptor containing the instrument.
183 const TDesC8* iInstrumentData;
186 * ETrue if the specified bank is in memory, EFalse otherwise.
191 * Number of instruments available for the specified sound bank.
193 TInt iNumInstruments;
196 * Index of the instrument to reference: 0 <= aInstrumentIndex < NumberOfInstrumentsL().
198 TInt iInstrumentIndex;
201 * Identifier of specified instrument. This may differ from the index
202 * since the index simply enumerates the instruments, whereas identifiers
203 * may not be contiguous, especially where certain instruments correspond
204 * to General MIDI-defined instruments but not all instruments are present.
205 * 0 <= iInstrumentId <= 127.
210 * Identifier of the instrument in memory.
212 TInt iMemoryInstrumentId;
215 * Current metrical position of the MIDI resource being played.
216 * Microbeats (BPM*1000000) relative to the start of the resource.
218 TInt64 iPositionMicroBeats;
221 * Length of the currently open MIDI resource.
222 * Duration in microbeats (beats * 1000000).
224 TInt64 iDurationMicroBeats;
227 * Time at which playback will stop, relative to the start of the resource.
228 * Clamped to 0 and the duration of the resource.
230 TTimeIntervalMicroSeconds iStopTime;
233 * Logical channel: 0 <= iChannel < ChannelsSupportedL().
238 * Volume level in dB corresponding to the MIDI Channel:
239 * -infinity <= iChannelVol <= MaxVolumeL().
244 * Maximum volume setting in dB, should always be 0 dB and
245 * correspond to the MIDI Channel Volume controller maximum value.
247 TReal32 iMaxChannelVol;
253 class TMMFMidiConfig3
256 inline TMMFMidiConfig3();
259 * Temporal interval between MmcuoSyncUpdate callback.
261 TTimeIntervalMicroSeconds iCallbackIntervalMicroSeconds;
264 * Metrical interval between MmcuoSyncUpdate callback.
266 TInt64 iCallbackIntervalMicroBeats;
269 * Number of bytes of the MIDI message buffer actually processed when client
270 * calls SendMessageL.
272 TInt iBytesProcessed;
275 * Time at which to execute the MIDI message sent by SendMessageL.
276 * It's relative to the MIDI resource playing time or the time elapsed
277 * since Play() was called if no resource is present.
279 TTimeIntervalMicroSeconds iTimeStamp;
282 * Number of time to repeat the resource during playback. This includes the first playing.
284 TInt iRepeatNumberOfTimes;
287 * Time in microseconds to pause between repeats.
289 TTimeIntervalMicroSeconds iTrailingSilence;
292 * Playback rate for the playback of the current MIDI resource
293 * in percent times 1000, i.e., 100000 means original playback speed,
294 * 200000 means double speed, and 50000 means half speed playback.
299 * Maximum playback rate supported by MIDI player.
301 TInt iPlayBackMaxRate;
304 * Minimum playback rate supported by MIDI player.
306 TInt iPlayBackMinRate;
309 * Descriptor containing a MIDI message data. If there
310 * are several MIDI messages in the buffer, only the first
313 const TDesC8* iMidiMessage;
316 inline TMMFMidiConfig1::TMMFMidiConfig1()
319 inline TMMFMidiConfig2::TMMFMidiConfig2()
322 inline TMMFMidiConfig3::TMMFMidiConfig3()
325 #endif //__MMF_COMMON_MMFMIDI_CONFIG_H__