»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Multimedia MMF »
RMidiControllerCustomCommands
Location:
midistandardcustomcommands.h
Link against: midistandardcustomcommands.lib
This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.
Class RMidiControllerCustomCommands
class RMidiControllerCustomCommands : public RMMFCustomCommandsBase;
Description
Client class to access functionality specific to a MIDI controller. The class uses the custom command function of the controller
plugin, and removes the necessity for the client to formulate the custom commands.
Derivation
RMidiControllerCustomCommands
- Client class to access functionality specific to a MIDI controller
Members
Defined in RMidiControllerCustomCommands
:
CancelReceiveEvents()
, ChannelVolume()
, ChannelsSupported()
, Close()
, CustomBankLoaded()
, DurationMicroBeats()
, GetBalance()
, GetBankId()
, GetInstrument()
, GetInstrumentId()
, GetRepeats()
, InstrumentNameL()
, IsChannelMute()
, IsTrackMute()
, LoadCustomBank()
, LoadCustomBankData()
, LoadCustomInstrument()
, LoadCustomInstrumentData()
, MaxChannelVolume()
, MaxPlaybackRate()
, MaxPolyphony()
, MaxVolume()
, MimeType()
, MinPlaybackRate()
, NoteOff()
, NoteOn()
, NumTracks()
, NumberOfBanks()
, NumberOfInstruments()
, PercussionKeyNameL()
, PitchTranspositionCents()
, PlayNote()
, PlayNote()
, PlaybackRate()
, Polyphony()
, PositionMicroBeats()
, RMidiControllerCustomCommands()
, ReceiveEvents()
, RetrieveEvent()
, SendMessage()
, SendMessage()
, SendMipMessage()
, SetBalance()
, SetBank()
, SetChannelMute()
, SetChannelVolume()
, SetInstrument()
, SetMaxPolyphony()
, SetPitchTransposition()
, SetPlaybackRate()
, SetPositionMicroBeats()
, SetRepeats()
, SetStopTime()
, SetSyncUpdateCallbackInterval()
, SetTempo()
, SetTrackMute()
, SetVolume()
, SetVolumeRamp()
, Stop()
, StopNotes()
, StopTime()
, TempoMicroBeatsPerMinute()
, UnloadAllCustomBanks()
, UnloadCustomBank()
, UnloadCustomInstrument()
, Volume()
Inherited from RMMFCustomCommandsBase
:
iController
,
iDestinationPckg
Construction and destruction
RMidiControllerCustomCommands()
IMPORT_C RMidiControllerCustomCommands(RMMFController &aController);
Description
Constructor.
Parameters
RMMFController &aController |
The client side controller object to be used by this custom command interface.
|
|
IMPORT_C TInt SetPositionMicroBeats(TInt64 aMicroBeats) const;
Description
Change the position of the currently playing MIDI resource to the given position. May be called whenever a MIDI resource is
open.
Parameters
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt PositionMicroBeats(TInt64 &aMicroBeats) const;
Description
Gets the current metrical position of the MIDI resource being played.
Parameters
TInt64 &aMicroBeats |
(BPM*1000000) relative to the start of the resource.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt PlayNote(TInt aChannel, TInt aNote, const TTimeIntervalMicroSeconds &aDuration, TInt aNoteOnVelocity, TInt aNoteOffVelocity);
Description
Synchronous function to play a single note. Multiple calls to this function will be accommodated as far as the MIDI engine
can manage. The same functionality could be implemented using the SendMessage function.
Parameters
TInt aChannel |
Logical channel to play note on. 0 <= aChannel <= 15.
|
TInt aNote |
Note to play. 0 <= aNote <= 127
|
const TTimeIntervalMicroSeconds &aDuration |
Length of time to play note for.
|
TInt aNoteOnVelocity |
Velocity with which to start the note. 0 <= aNoteOnVelocity <= 127.
|
TInt aNoteOffVelocity |
Velocity with which to stop the note. 0 <= aNoteOffVelocity <= 127.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt PlayNote(TInt aChannel, TInt aNote, const TTimeIntervalMicroSeconds &aStartTime, const TTimeIntervalMicroSeconds
&aDuration, TInt aNoteOnVelocity, TInt aNoteOffVelocity);
Description
Synchronous function to play a single note at a specified time. Multiple calls to this function will be accommodated as far
as the MIDI engine can manage. The same functionality could be implemented using the SendMessage function.
Parameters
TInt aChannel |
Logical channel to play note on. 0 <= aChannel <= 15.
|
TInt aNote |
Note to play. 0 <= aNote <= 127
|
const TTimeIntervalMicroSeconds &aStartTime |
Specifies the time at which to start playing the note, relative to the MIDI resource playing time or the time elapsed since
Play() was called if no resource is present.
|
const TTimeIntervalMicroSeconds &aDuration |
Length of time to play note for.
|
TInt aNoteOnVelocity |
Velocity with which to start the note. 0 <= aNoteOnVelocity <= 127.
|
TInt aNoteOffVelocity |
Velocity with which to stop the note. 0 <= aNoteOffVelocity <= 127.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt StopNotes(TInt aChannel);
Description
Stops the playback of all notes on the given channel, by means of an All Notes Off MIDI message.
Parameters
TInt aChannel |
Logical channel to stop notes on. 0 <= aChannel <= 15.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt NoteOn(TInt aChannel, TInt aNote, TInt aVelocity);
Description
Synchronous function to commence playback of a note. Multiple calls to this function will be accommodated as far as the MIDI
engine can manage.
Parameters
TInt aChannel |
Logical channel to play note on. 0 <= aChannel <= 15.
|
TInt aNote |
Note to play. 0 <= aNote <= 127.
|
TInt aVelocity |
Velocity with which to start the note. The legal integer range is 0 <= aVelocity <= 127, but the value zero actually causes
the message to be interpreted as a Note Off message instead of a Note On.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt NoteOff(TInt aChannel, TInt aNote, TInt aVelocity);
Description
Synchronous function to terminate playback of a note. If no corresponding note is found then no error is raised.
Parameters
TInt aChannel |
Logical channel on which the note is playing. 0 <= aChannel <= 15.
|
TInt aNote |
Note to terminate. 0 <= aNote <= 127.
|
TInt aVelocity |
Velocity with which to stop the note. 0 <= aVelocity <= 127. There is no standard behaviour corresponding with note off velocity.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt PlaybackRate(TInt &aPlayBackRate) const;
Description
Gets the current playback rate factor of the currently open MIDI resource. The playback rate is independent from tempo, i.e.,
it can be used to give an overall speed factor for playback.
Parameters
TInt &aPlayBackRate |
Current playback rate in percent times 1000, i.e., 100000 means original playback speed, 200000 means double speed, and 50000
means half speed playback.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetPlaybackRate(TInt aPlayBackRate);
Description
Sets the playback rate for the playback of the current MIDI resource. The playback rate is independent from tempo, i.e., it
can be used to give an overall speed factor for playback. May be called whether playback is in progress or not.
Parameters
TInt aPlayBackRate |
Playback rate in percent times 1000, i.e., 100000 means original playback speed, 200000 means double speed, and 50000 means
half speed playback.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt MaxPlaybackRate(TInt &aMaxRate) const;
Description
Gets the maximum playback rate in milli-percentage from the MIDI engine.
Parameters
TInt &aMaxRate |
Playback rate supported by MIDI player.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
See also:
IMPORT_C TInt MinPlaybackRate(TInt &aMinRate) const;
Description
Gets the minimum playback rate in milli-percentage from the MIDI engine.
Parameters
TInt &aMinRate |
Minimum playback rate supported by MIDI player.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
See also:
TempoMicroBeatsPerMinute()
IMPORT_C TInt TempoMicroBeatsPerMinute(TInt &aMicroBeatsPerMinute) const;
Description
Gets the current tempo of the currently open MIDI resource. The tempo is independent from the playback rate, i.e., the resulting
playback speed will be affected by both.
Parameters
TInt &aMicroBeatsPerMinute |
Tempo at the current position of the currently open resource in microbeats per minute, i.e. BPM * 1000000. Filled in by the
controller framework.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetTempo(TInt aMicroBeatsPerMinute);
Description
Sets the tempo at which the current MIDI resource should be played. May be called whether playback is in progress or not.
The tempo is independent from the playback rate, i.e., the resulting playback speed will be affected by both.
Parameters
TInt aMicroBeatsPerMinute |
Tempo in microbeats per minute (BPM*1000000) to set.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
PitchTranspositionCents()
IMPORT_C TInt PitchTranspositionCents(TInt &aPitch) const;
Description
Gets the pitch shift in use for the currently open MIDI resource.
Parameters
TInt &aPitch |
Shift in cents, i.e. semitones * 100. One octave equals 1200 cents.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetPitchTransposition(TInt aCents, TInt &aCentsApplied);
Description
Sets the pitch shift to apply to the currently open MIDI resource. May be called during playback.
Parameters
TInt aCents |
Pitch shift in cents, i.e. semitones * 100. One octave equals 1200 cents.
|
TInt &aCentsApplied |
Actual pitch shift applied - may differ from the requested value due to limitations of the MIDI engine.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt DurationMicroBeats(TInt64 &aDuration) const;
Description
Gets the length of the currently open MIDI resource in micro-beats.
Parameters
TInt64 &aDuration |
Duration in microbeats (beats * 1000000).
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt NumTracks(TInt &aTracks) const;
Description
Gets the number of tracks present in the currently open MIDI resource.
Parameters
TInt &aTracks |
Number of tracks.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetTrackMute(TInt aTrack, TBool aMuted) const;
Description
Mutes or unmutes a particular track.
Parameters
TInt aTrack |
Index of the track to mute - 0 <= aTrack < NumTracksL().
|
TBool aMuted |
ETrue to mute the track, EFalse to unmute it.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt MimeType(TDes8 &aMimeType) const;
Description
Gets the MIME type of the MIDI resource currently open.
Parameters
TDes8 &aMimeType |
Descriptor containing the MIDI mime type.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
SetSyncUpdateCallbackInterval()
IMPORT_C TInt SetSyncUpdateCallbackInterval(const TTimeIntervalMicroSeconds &aMicroSeconds, TInt64 aMicroBeats=0);
Description
Sets the frequency at which MMIDIClientUtilityObserver::MmcuoSyncUpdateL() is called to allow other components to synchronise
with playback of this MIDI resource.
Parameters
const TTimeIntervalMicroSeconds &aMicroSeconds |
Temporal interval to callback at. Used in preference to aMicroBeats if both are set.
|
TInt64 aMicroBeats |
Metrical interval to callback at. Set both parameters to zero to cancel.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SendMessage(const TDesC8 &aMidiMessage, TInt &aBytes);
Description
Sends a single MIDI message to the MIDI engine.
Parameters
const TDesC8 &aMidiMessage |
Descriptor containing the MIDI message data. If there are several MIDI messages in the buffer, only the first one is processed.
|
TInt &aBytes |
Number of bytes of the message buffer actually processed.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SendMessage(const TDesC8 &aMidiMessage, const TTimeIntervalMicroSeconds &aTime, TInt &aBytes);
Description
Sends a single MIDI message, with time stamp, to the MIDI engine.
Parameters
const TDesC8 &aMidiMessage |
Descriptor containing the MIDI message data. If there are several MIDI messages in the buffer, only the first one is processed.
|
const TTimeIntervalMicroSeconds &aTime |
The time at which to execute the message, relative to the MIDI resource playing time or the time elapsed since Play() was
called if no resource is present.
|
TInt &aBytes |
Number of bytes of the message buffer actually processed.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SendMipMessage(const RArray< TMipMessageEntry > &aEntry);
Description
Sends a mip message to the MIDI engine. This is a convenience function, because the same functionality could be achieved with
the SendMessage()
function.
Parameters
const RArray < TMipMessageEntry > &aEntry |
Array of logical {channel, MIP} value pairs to send, highest priority first.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt NumberOfBanks(TBool aCustom, TInt &aNumBanks) const;
Description
Gets the number of standard or custom sound banks currently available.
Parameters
TBool aCustom |
Specifies whether to reference a custom or standard sound bank.
|
TInt &aNumBanks |
Number of custom or standard sound banks available.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt GetBankId(TBool aCustom, TInt aBankIndex, TInt &aBankId) const;
Description
Gets the identifier of a sound bank. Bank identifier (aka bank number) is a 14-bit value consisting of MIDI bank MSB and LSB
values.
Parameters
TBool aCustom |
Specifies whether to reference a custom or standard sound bank.
|
TInt aBankIndex |
Index of sound bank where 0 <= aBankIndex < NumberOfBanks() .
|
TInt &aBankId |
Identifier of the specified bank occupying, at most, 14 bits.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt LoadCustomBank(const TDesC &aFileName, TInt &aBankId);
Description
Loads one or more custom sound banks from a file into memory for use. If several banks are loaded with consequent LoadCustomBanks()
function calls, the banks are combined if the bank sets have conflicting bank numbers.
Parameters
const TDesC &aFileName |
Name of the file containing the custom sound bank.
|
TInt &aBankId |
Identifier of the custom sound bank loaded, occupying no more than 14 bits.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt LoadCustomBankData(const TDesC8 &aBankData, TInt &aBankId);
Description
Loads one or more custom sound banks from a descriptor into memory for use. If several banks are loaded with consequent LoadCustomBanks()
function calls, the banks are combined if the bank sets have conflicting bank numbers.
Parameters
const TDesC8 &aBankData |
Descriptor containing the custom sound bank.
|
TInt &aBankId |
Identifier of the custom sound bank loaded, occupying no more than 14 bits.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt UnloadCustomBank(TInt aBankId);
Description
Removes a custom sound bank from memory. Only valid for sound banks previously loaded from file. Once unloaded the custom
sound bank is no longer available for use.
Parameters
TInt aBankId |
Identifier of the custom sound bank to unload,occupying no more than 14 bits.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt CustomBankLoaded(TInt aBankId, TBool &aBankLoaded) const;
Description
Query if a bank has been loaded to the memory.
Parameters
TInt aBankId |
Identifier of the custom sound bank to check if it's in memory or not.
|
TBool &aBankLoaded |
ETrue if the specified bank is in memory, EFalse otherwise.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt UnloadAllCustomBanks();
Description
Removes all custom sound banks from memory.
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt NumberOfInstruments(TInt aBankId, TBool aCustom, TInt &aNumInstruments) const;
Description
Gets the number of instruments available in a given sound bank.
Parameters
TInt aBankId |
Identifier of sound bank to reference, occupying no more than 14 bits.
|
TBool aCustom |
Specifies whether to reference a custom or standard sound bank.
|
TInt &aNumInstruments |
Count of the number of instruments available for the specified sound bank.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt GetInstrumentId(TInt aBankId, TBool aCustom, TInt aInstrumentIndex, TInt &aInstrumentId) const;
Description
Gets the identifier of an instrument.
Parameters
TInt aBankId |
Identifier of the sound bank to reference, occupying no more than 14 bits.
|
TBool aCustom |
Specifies whether to reference a custom or standard sound bank.
|
TInt aInstrumentIndex |
Index of the instrument to reference where 0 <= aInstrumentIndex < NumberOfInstruments() .
|
TInt &aInstrumentId |
Identifier of specified instrument. This may differ from the index since the index simply enumerates the instruments, whereas
identifiers may not be contiguous, especially where certain instruments correspond to General MIDI-defined instruments but
not all instruments are present. Instrument identifiers are between 0 and 127 inclusive.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C HBufC *InstrumentNameL(TInt aBankId, TBool aCustom, TInt aInstrumentId) const;
Description
Gets the name of the given instrument.
Parameters
TInt aBankId |
Identifier of the bank that the instrument belongs to, occupying no more than 14 bits.
|
TBool aCustom |
Specifies whether to reference a custom or standard sound bank.
|
TInt aInstrumentId |
Identifier of the instrument under scrutiny. 0 <= aInstrumentId <= 127.
|
|
Return value
HBufC *
|
Buffer containing the name of the specified instrument. If it has no name then an empty descriptor is returned.
|
|
IMPORT_C TInt SetInstrument(TInt aChannel, TInt aBankId, TInt aInstrumentId);
Description
Sets a logical channel to use the given instrument.
Parameters
TInt aChannel |
Logical channel to set the instrument for. 0 <= aChannel <= 15.
|
TInt aBankId |
Identifier of the bank that the instrument belongs to, occupying no more than 14 bits. The bank ID is a concatenation of MIDI
bank MSB and LSB values.
|
TInt aInstrumentId |
Identifier of the instrument under scrutiny. 0 <= aInstrumentId <= 127.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt LoadCustomInstrument(const TDesC &aFileName, TInt aFileBankId, TInt aFileInstrumentId, TInt aMemoryBankId, TInt
aMemoryInstrumentId);
Description
Loads an individual instrument from file into custom sound bank memory for use. The bank and instrument id given in the file
can be mapped into different bank and instrument id in memory.
Parameters
const TDesC &aFileName |
Name of the file containing the instrument.
|
TInt aFileBankId |
Identifier of the bank in the file from which to load the instrument, occupying no more than 14 bits.
|
TInt aFileInstrumentId |
Identifier of the instrument to load. 0 <= aInstrumentId <= 127.
|
TInt aMemoryBankId |
Identifier of the custom bank in memory to load the instrument into, occupying no more than 14 bits.
|
TInt aMemoryInstrumentId |
Identifier of the instrument in memory to load the new instrument into. 0 <= aInstrumentId <= 127.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
LoadCustomInstrumentData()
IMPORT_C TInt LoadCustomInstrumentData(const TDesC8 &aInstrumentData, TInt aBankDataId, TInt aInstrumentDataId, TInt aMemoryBankId,
TInt aMemoryInstrumentId);
Description
Loads an individual instrument from descriptor into custom sound bank memory for use. The bank and instrument id given in
the descriptor can be mapped into different bank and instrument id in memory.
Parameters
const TDesC8 &aInstrumentData |
Descriptor containing the instrument.
|
TInt aBankDataId |
Identifier of the bank in the descriptor from which to load the instrument, occupying no more than 14 bits.
|
TInt aInstrumentDataId |
Identifier of the instrument to load. 0 <= aInstrumentId <= 127.
|
TInt aMemoryBankId |
Identifier of the custom bank in memory to load the instrument into, occupying no more than 14 bits.
|
TInt aMemoryInstrumentId |
Identifier of the instrument in memory to load the new instrument into. 0 <= aInstrumentId <= 127.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt UnloadCustomInstrument(TInt aCustomBankId, TInt aInstrumentId);
Description
Removes an instrument from custom sound bank memory. Only valid for instruments previously loaded from file. Once unloaded
the instrument is no longer available for use.
Parameters
TInt aCustomBankId |
Identifier of the custom sound bank containing the instrument to unload, occupying no more than 14 bits.
|
TInt aInstrumentId |
Identifier of the instrument to unload. 0 <= aInstrumentId <= 127.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C HBufC *PercussionKeyNameL(TInt aNote, TInt aBankId, TBool aCustom, TInt aInstrumentId) const;
Description
Gets the name of a particular percussion key corresponding to a given note.
Parameters
TInt aNote |
Note to query. 0 <= aNote <= 127.
|
TInt aBankId |
Identifier of the bank that the instrument belongs to, occupying no more than 14 bits. The bank ID is a concatenation of MIDI
bank MSB and LSB values.
|
TBool aCustom |
Specifies whether to reference a custom or standard sound bank.
|
TInt aInstrumentId |
Identifier of an instrument.
|
|
Return value
HBufC *
|
Descriptor containing the name of the percussion key. If the key does not have a name then an empty descriptor is returned.
|
|
IMPORT_C TInt StopTime(TTimeIntervalMicroSeconds &aStopTime) const;
Description
Get the stop time currently set for the MIDI resource.
Parameters
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetStopTime(const TTimeIntervalMicroSeconds &aStopTime) const;
Description
Sets the stop time to use for the currently open MIDI resource
Parameters
const TTimeIntervalMicroSeconds &aStopTime |
Time at which playback will stop, relative to the start of the resource. Clamped to 0 and the duration of the resource.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt Polyphony(TInt &aNumNotes) const;
Description
Gets the polyphony of the MIDI engine.
Parameters
TInt &aNumNotes |
The number of currently active voices.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt ChannelsSupported(TInt &aChannels) const;
Description
Get the maximum number of logical channels supported by the MIDI engine.
Parameters
TInt &aChannels |
The maximum number of logical channels that the MIDI engine supports, 0 <= aChannels <=15.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt ChannelVolume(TInt aChannel, TReal32 &aChannelVol) const;
Description
Get the current volume setting of a logical channel.
Parameters
TInt aChannel |
Logical channel to query. 0 <= aChannel <= 15.
|
TReal32 &aChannelVol |
Volume currently set on the specified channel in decibels.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt MaxChannelVolume(TReal32 &aMaxVol) const;
Description
Gets the Maximum volume setting that may be applied to a logical channel.
Parameters
TReal32 &aMaxVol |
Maximum volume setting. Minimum value is -infinity dB, which is the smallest possible value that TReal32 supports.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetChannelVolume(TInt aChannel, TReal32 aVolume);
Description
Set the volume of a channel.
Parameters
TInt aChannel |
Logical channel to set the volume on. 0 <= aChannel <= 15.
|
TReal32 aVolume |
The channel volume can be set within a range. The minimum channel volume is -infinity dB, which is the smallest possible value
that TReal32 supports while the maximum channel volume is set via MaxVolumeL() which represents the volume level in dB corresponding
to the MIDI Channel Volume controller.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetChannelMute(TInt aChannel, TBool aMuted);
Description
Set the muting state of a channel without changing its volume setting. When unmuted the channel goes back to its previous
volume setting.
Parameters
TInt aChannel |
Logical channel to set the mute state of. 0 <= aChannel <= 15.
|
TBool aMuted |
ETrue to mute the channel, EFalse to unmute it.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt Volume(TInt &aVolume) const;
Description
Gets the overall volume of the MIDI client.
Parameters
TInt &aVolume |
The current overall volume setting.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt MaxVolume(TInt &aMaxVolume) const;
Description
Maximum volume setting that may be applied overall.
Parameters
TInt &aMaxVolume |
Maximum volume setting. Minimum value is always zero which is silent.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetVolume(TInt aVolume);
Description
Set the overall volume of the MIDI client. This setting scales all channel volumes respectively so the actual volume that
a channel is played at is (overall volume * channel volume / max volume).
Parameters
TInt aVolume |
Overall volume setting to use.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds &aRampDuration);
Description
Length of time over which the volume is faded up from zero to the current setting when playback is started.
Parameters
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt GetBalance(TInt &aBalance) const;
Description
Get the current stereo balance value.
Parameters
TInt &aBalance |
Balance value ranging from KMMFBalanceMaxLeft to KMMFBalanceMaxRight.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetBalance(TInt aBalance);
Description
Set the current stereo balance value.
Parameters
TInt aBalance |
Balance value to set. Defaults to KMMFBalanceCenter to restore equal left-right balance.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetMaxPolyphony(TInt aMaxNotes);
Description
Set the max polyphony the engine can handle.
Parameters
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt GetRepeats(TInt &aNumRepeats) const;
Description
Gets the number of times the current opened resources has to be repeated.
Parameters
TInt &aNumRepeats |
The number of times the current opened resources has to be repeated.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds &aTrailingSilence);
Description
Set the number of times to repeat the current MIDI resource. After Stop()
has been called, repeat number of times and the trailing silence are reset.
Parameters
TInt aRepeatNumberOfTimes |
Number of times to repeat the resource during playback. This includes the first playing.
|
const TTimeIntervalMicroSeconds &aTrailingSilence |
Time in microseconds to pause between repeats.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt SetBank(TBool aCustom);
Description
Tell the MIDI engine to use a custom bank or a standard bank.
Parameters
TBool aCustom |
If Etrue the custom bank in memory is used otherwise the standard bank is used leaving the custom bank in memory.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt IsTrackMute(TInt aTrack, TBool &aTrackMute) const;
Description
Gets the muting status of a specific track.
Parameters
TInt aTrack |
The track to query.
|
TBool &aTrackMute |
The mute status of the track.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt IsChannelMute(TInt aChannel, TBool &aChannelMute) const;
Description
Gets the muting status of a specific channel.
Parameters
TInt aChannel |
The channel to query.
|
TBool &aChannelMute |
The mute status of the channel.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt GetInstrument(TInt aChannel, TInt &aInstrumentId, TInt &aBankId);
Description
Gets the instrument assigned to a specified channel.
Parameters
TInt aChannel |
Logical channel, 0 <= aChannel <= 15.
|
TInt &aInstrumentId |
Identifier of the instrument assigned to aChannel. 0 <= aInstrumentId <= 127.
|
TInt &aBankId |
Identifier of the bank that the instrument belongs to, occupying no more than 14 bits.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt Close();
Description
Closes any currently open resources, such as files, descriptors or URLs in use. Does nothing if there is nothing currently
open.
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt Stop(const TTimeIntervalMicroSeconds &aFadeOutDuration);
Description
Stops playback of a resource but does not change the current position or release any resources. Pauses the internal timer
if no resource is open.
Parameters
const TTimeIntervalMicroSeconds &aFadeOutDuration |
Length of time over which the volume is faded out from the current setting to zero.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C void ReceiveEvents(TPckgBuf< TInt > &aEventSize, TRequestStatus &aStatus);
Description
Start receiving events from the controller. This can only be called once the controller is open.
Parameters
TPckgBuf < TInt > &aEventSize |
The size of the MIDI event object.
|
TRequestStatus &aStatus |
Status flag belonging to an active object that will have it's RunL() called when this request complete.
|
|
IMPORT_C TInt RetrieveEvent(TDes8 &aMidiEventPckg);
Description
Get the MIDI event from the MIDI controller.
Parameters
TDes8 &aMidiEventPckg |
MIDI event.
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt CancelReceiveEvents();
Description
Stop receiving events from the MIDI controller.
Return value
TInt
|
One of the system-wide error codes.
|
|
IMPORT_C TInt MaxPolyphony(TInt &aNumNotes) const;
Description
Gets the current maximum number of notes the engine can handle This can be greater than the value returned by RMidiControllerCustomCommands::Polyphony
Parameters
TInt &aNumNotes |
The maximum number of notes the engine can handle
|
|
Return value
TInt
|
One of the system-wide error codes.
|
|