1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/MIDI/inc/mmfmidiconfig.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,325 @@
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 +// Mmf\Common\MmfMidiconfig.h
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __MMF_COMMON_MMFMIDI_CONFIG_H__
1.22 +#define __MMF_COMMON_MMFMIDI_CONFIG_H__
1.23 +
1.24 +/**
1.25 +@internalComponent
1.26 +*/
1.27 +class TMMFMidiConfig1
1.28 + {
1.29 +public:
1.30 + inline TMMFMidiConfig1();
1.31 +public:
1.32 + /**
1.33 + * Number of tracks present in the currently open MIDI resource.
1.34 + */
1.35 + TInt iNumTracks;
1.36 +
1.37 + /**
1.38 + * Current state of the MIDI client utility object
1.39 + * (EMidiStateClosedDisengaged,EMidiStateOpenDisengaged,EMidiStateOpenPlaying,EMidiStatePlaybackIncompatible,
1.40 + * EMidiStatePlaybackSilent, EMidiStateClosedEngaged, EMidiStateOpenEngaged).
1.41 + */
1.42 +
1.43 + TInt iState;
1.44 +
1.45 + /**
1.46 + * Tempo in microbeats per minute (BPM*1000000).
1.47 + */
1.48 + TInt iTempo;
1.49 +
1.50 + /**
1.51 + * Pitch shift in cents, i.e. semitones * 100. One octave equals 1200 cents.
1.52 + */
1.53 + TInt iPitch;
1.54 +
1.55 + /**
1.56 + * Array of logical {channel, MIP} value pairs to send SP-MIDI MIP message to the MIDI engine.
1.57 + */
1.58 + const TArray<TMipMessageEntry>* iMipMessage;
1.59 +
1.60 + /**
1.61 + * The maximum number of notes that the MIDI engine supports simultaneously (polyphony).
1.62 + */
1.63 + TInt iNumNotes;
1.64 +
1.65 + /**
1.66 + * Max polyphony level: 0 <= PolyphonyL() <= iMaxNotes.
1.67 + */
1.68 + TInt iMaxNotes;
1.69 +
1.70 + /**
1.71 + * Overall volume of the MIDI client.
1.72 + */
1.73 + TInt iVolume;
1.74 +
1.75 + /**
1.76 + * Maximum volume that may be applied overall to the MIDI client.
1.77 + */
1.78 + TInt iMaxVolume;
1.79 +
1.80 + /**
1.81 + * Length of time over which the volume is faded up from zero to the current settings when playback is started.
1.82 + */
1.83 + TTimeIntervalMicroSeconds iRampDuration;
1.84 +
1.85 + /**
1.86 + * Stereo balance value: KMMFBalanceMaxLeft <= iBalance <= KMMFBalanceMaxRight.
1.87 + */
1.88 + TInt iBalance;
1.89 +
1.90 + /**
1.91 + * The number of times the current opened resources has to be repeated.
1.92 + * This includes the first instance of playing.
1.93 + */
1.94 + TInt iNumRepeats;
1.95 +
1.96 + /**
1.97 + * Length of time over which the volume is faded out from the current settings to zero.
1.98 + */
1.99 + TTimeIntervalMicroSeconds iFadeOutDuration;
1.100 + };
1.101 +
1.102 +/**
1.103 +@internalComponent
1.104 +*/
1.105 +class TMMFMidiConfig2
1.106 + {
1.107 +public:
1.108 + inline TMMFMidiConfig2();
1.109 +public:
1.110 + /**
1.111 + * Index of the track to mute: 0 <= iTrack < NumTracksL().
1.112 + */
1.113 + TInt iTrack;
1.114 +
1.115 + /**
1.116 + * ETrue to mute the track/channel, EFalse to unmute it.
1.117 + */
1.118 + TBool iMuted;
1.119 +
1.120 + /**
1.121 + * Note to play ot to terminate: 0 <= iNote <= 127.
1.122 + */
1.123 + TInt iNote;
1.124 +
1.125 + /**
1.126 + * Length of time to play the note for.
1.127 + */
1.128 + TTimeIntervalMicroSeconds iDurationMicroSeconds;
1.129 +
1.130 + /**
1.131 + * Specifying the time at which to start playing the note.
1.132 + * It's relative to the MIDI resource playing time or the time elapsed
1.133 + * since Play() was called if no resource is present.
1.134 + */
1.135 + TTimeIntervalMicroSeconds iStartTime;
1.136 +
1.137 + /**
1.138 + * Velocity with which to start the note: 0 <= iNoteOnVelocity <= 127.
1.139 + */
1.140 + TInt iNoteOnVelocity;
1.141 +
1.142 + /**
1.143 + * Velocity with which to stop the note: 0 <= iNoteOffVelocity <= 127.
1.144 + */
1.145 + TInt iNoteOffVelocity;
1.146 +
1.147 + /**
1.148 + * Number of standard or custom sound banks currently available.
1.149 + */
1.150 + TInt iNumBanks;
1.151 +
1.152 + /**
1.153 + * Specifies whether to reference a custom or standard sound bank.
1.154 + */
1.155 + TBool iCustom;
1.156 +
1.157 + /**
1.158 + * Index of custom/deault bank: 0 <= iBankIndex < NumberOfBanksL()
1.159 + */
1.160 + TInt iBankIndex;
1.161 +
1.162 + /**
1.163 + * Custom/deault Bank's Identifier.
1.164 + */
1.165 + TInt iBankId;
1.166 +
1.167 + /**
1.168 + * Identifier of the custom bank in memory.
1.169 + */
1.170 + TInt iMemoryBankId;
1.171 +
1.172 + /**
1.173 + * Name of the file containing the custom sound bank or the name
1.174 + * of the file containing the instrument. Includes the directory path.
1.175 + */
1.176 + const TDesC* iFileName;
1.177 +
1.178 + /**
1.179 + * Descriptor containing the custom sound bank.
1.180 + */
1.181 + const TDesC8* iBankData;
1.182 +
1.183 + /**
1.184 + * Descriptor containing the instrument.
1.185 + */
1.186 + const TDesC8* iInstrumentData;
1.187 +
1.188 + /**
1.189 + * ETrue if the specified bank is in memory, EFalse otherwise.
1.190 + */
1.191 + TBool iBankLoaded;
1.192 +
1.193 + /**
1.194 + * Number of instruments available for the specified sound bank.
1.195 + */
1.196 + TInt iNumInstruments;
1.197 +
1.198 + /**
1.199 + * Index of the instrument to reference: 0 <= aInstrumentIndex < NumberOfInstrumentsL().
1.200 + */
1.201 + TInt iInstrumentIndex;
1.202 +
1.203 + /**
1.204 + * Identifier of specified instrument. This may differ from the index
1.205 + * since the index simply enumerates the instruments, whereas identifiers
1.206 + * may not be contiguous, especially where certain instruments correspond
1.207 + * to General MIDI-defined instruments but not all instruments are present.
1.208 + * 0 <= iInstrumentId <= 127.
1.209 + */
1.210 + TInt iInstrumentId;
1.211 +
1.212 + /**
1.213 + * Identifier of the instrument in memory.
1.214 + */
1.215 + TInt iMemoryInstrumentId;
1.216 +
1.217 + /**
1.218 + * Current metrical position of the MIDI resource being played.
1.219 + * Microbeats (BPM*1000000) relative to the start of the resource.
1.220 + */
1.221 + TInt64 iPositionMicroBeats;
1.222 +
1.223 + /**
1.224 + * Length of the currently open MIDI resource.
1.225 + * Duration in microbeats (beats * 1000000).
1.226 + */
1.227 + TInt64 iDurationMicroBeats;
1.228 +
1.229 + /**
1.230 + * Time at which playback will stop, relative to the start of the resource.
1.231 + * Clamped to 0 and the duration of the resource.
1.232 + */
1.233 + TTimeIntervalMicroSeconds iStopTime;
1.234 +
1.235 + /**
1.236 + * Logical channel: 0 <= iChannel < ChannelsSupportedL().
1.237 + */
1.238 + TInt iChannel;
1.239 +
1.240 + /**
1.241 + * Volume level in dB corresponding to the MIDI Channel:
1.242 + * -infinity <= iChannelVol <= MaxVolumeL().
1.243 + */
1.244 + TReal32 iChannelVol;
1.245 +
1.246 + /**
1.247 + * Maximum volume setting in dB, should always be 0 dB and
1.248 + * correspond to the MIDI Channel Volume controller maximum value.
1.249 + */
1.250 + TReal32 iMaxChannelVol;
1.251 + };
1.252 +
1.253 +/**
1.254 +@internalComponent
1.255 +*/
1.256 +class TMMFMidiConfig3
1.257 + {
1.258 +public:
1.259 + inline TMMFMidiConfig3();
1.260 +public:
1.261 + /**
1.262 + * Temporal interval between MmcuoSyncUpdate callback.
1.263 + */
1.264 + TTimeIntervalMicroSeconds iCallbackIntervalMicroSeconds;
1.265 +
1.266 + /**
1.267 + * Metrical interval between MmcuoSyncUpdate callback.
1.268 + */
1.269 + TInt64 iCallbackIntervalMicroBeats;
1.270 +
1.271 + /**
1.272 + * Number of bytes of the MIDI message buffer actually processed when client
1.273 + * calls SendMessageL.
1.274 + */
1.275 + TInt iBytesProcessed;
1.276 +
1.277 + /**
1.278 + * Time at which to execute the MIDI message sent by SendMessageL.
1.279 + * It's relative to the MIDI resource playing time or the time elapsed
1.280 + * since Play() was called if no resource is present.
1.281 + */
1.282 + TTimeIntervalMicroSeconds iTimeStamp;
1.283 +
1.284 + /**
1.285 + * Number of time to repeat the resource during playback. This includes the first playing.
1.286 + */
1.287 + TInt iRepeatNumberOfTimes;
1.288 +
1.289 + /**
1.290 + * Time in microseconds to pause between repeats.
1.291 + */
1.292 + TTimeIntervalMicroSeconds iTrailingSilence;
1.293 +
1.294 + /**
1.295 + * Playback rate for the playback of the current MIDI resource
1.296 + * in percent times 1000, i.e., 100000 means original playback speed,
1.297 + * 200000 means double speed, and 50000 means half speed playback.
1.298 + */
1.299 + TInt iPlayBackRate;
1.300 +
1.301 + /**
1.302 + * Maximum playback rate supported by MIDI player.
1.303 + */
1.304 + TInt iPlayBackMaxRate;
1.305 +
1.306 + /**
1.307 + * Minimum playback rate supported by MIDI player.
1.308 + */
1.309 + TInt iPlayBackMinRate;
1.310 +
1.311 + /**
1.312 + * Descriptor containing a MIDI message data. If there
1.313 + * are several MIDI messages in the buffer, only the first
1.314 + * one is processed.
1.315 + */
1.316 + const TDesC8* iMidiMessage;
1.317 + };
1.318 +
1.319 +inline TMMFMidiConfig1::TMMFMidiConfig1()
1.320 +{};
1.321 +
1.322 +inline TMMFMidiConfig2::TMMFMidiConfig2()
1.323 +{};
1.324 +
1.325 +inline TMMFMidiConfig3::TMMFMidiConfig3()
1.326 +{};
1.327 +
1.328 +#endif //__MMF_COMMON_MMFMIDI_CONFIG_H__