ScummVM API documentation
Scumm::Player Class Reference
Inheritance diagram for Scumm::Player:
MidiDriver_BASE Common::Serializable

Public Member Functions

int addParameterFader (int param, int target, int time)
 
void clear ()
 
void clearLoop ()
 
void fixAfterLoad ()
 
PartgetActivePart (uint8 part)
 
uint getBeatIndex ()
 
int16 getDetune () const
 
byte getEffectiveVolume () const
 
int getID () const
 
MidiDrivergetMidiDriver () const
 
int getParam (int param, byte chan)
 
int8 getPan () const
 
PartgetPart (uint8 part)
 
byte getPriority () const
 
uint getTicksPerBeat () const
 
int8 getTranspose () const
 
byte getVolume () const
 
bool isActive () const
 
bool isFadingOut () const
 
bool isMIDI () const
 
bool isMT32 () const
 
bool jump (uint track, uint beat, uint tick)
 
void onTimer ()
 
void removePart (Part *part)
 
int scan (uint totrack, uint tobeat, uint totick)
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
int setHook (byte cls, byte value, byte chan)
 
void setDetune (int detune)
 
void setOffsetNote (int offset)
 
bool setLoop (uint count, uint tobeat, uint totick, uint frombeat, uint fromtick)
 
void setPan (int pan)
 
void setPriority (int pri)
 
void setSpeed (byte speed)
 
int setTranspose (byte relative, int b)
 
int setVolume (byte vol)
 
bool startSound (int sound, MidiDriver *midi)
 
int getMusicTimer () const
 
void send (uint32 b) override
 
void sysEx (const byte *msg, uint16 length) override
 
uint16 sysExNoDelay (const byte *msg, uint16 length) override
 
void metaEvent (byte type, byte *data, uint16 length) override
 
- Public Member Functions inherited from MidiDriver_BASE
virtual void send (int8 source, uint32 b)
 
void send (byte status, byte firstOp, byte secondOp)
 
void send (int8 source, byte status, byte firstOp, byte secondOp)
 
virtual void metaEvent (int8 source, byte type, byte *data, uint16 length)
 
virtual void stopAllNotes (bool stopSustainedNotes=false)
 
virtual bool isReady (int8 source=-1)
 

Public Attributes

IMuseInternal_se
 
uint _vol_chan
 

Protected Types

enum  ParserType { kParserTypeNone = 0, kParserTypeRO, kParserTypeXMI, kParserTypeSMF }
 

Protected Member Functions

void hook_clear ()
 
void uninit_parts ()
 
void part_set_transpose (uint8 chan, byte relative, int8 b)
 
void maybe_jump (byte cmd, uint track, uint beat, uint tick)
 
void maybe_set_transpose (byte *data)
 
void maybe_part_onoff (byte *data)
 
void maybe_set_volume (byte *data)
 
void maybe_set_program (byte *data)
 
void maybe_set_transpose_part (byte *data)
 
void turn_off_pedals ()
 
int query_part_param (int param, byte chan)
 
void turn_off_parts ()
 
void play_active_notes ()
 
void transitionParameters ()
 
int start_seq_sound (int sound, bool reset_vars=true)
 
void loadStartParameters (int sound)
 
- Protected Member Functions inherited from MidiDriver_BASE
void midiDumpInit ()
 
int midiDumpVarLength (const uint32 &delta)
 
void midiDumpDelta ()
 
void midiDumpDo (uint32 b)
 
void midiDumpSysEx (const byte *msg, uint16 length)
 
void midiDumpFinish ()
 

Static Protected Member Functions

static void decode_sysex_bytes (const byte *src, byte *dst, int len)
 

Protected Attributes

MidiDriver_midi
 
MidiParser_parser
 
ParserType _parserType
 
Part_parts
 
bool _active
 
bool _scanning
 
int _id
 
byte _priority
 
byte _volume
 
int8 _pan
 
int8 _transpose
 
int16 _detune
 
int _note_offset
 
byte _vol_eff
 
uint _track_index
 
uint _loop_to_beat
 
uint _loop_from_beat
 
uint _loop_counter
 
uint _loop_to_tick
 
uint _loop_from_tick
 
byte _speed
 
bool _abort
 
uint32 _transitionTimer
 
uint32 _music_tick
 
HookDatas _hook
 
ParameterFader _parameterFaders [4]
 
bool _isMIDI
 
bool _isMT32
 
bool _supportsPercussion
 
- Protected Attributes inherited from MidiDriver_BASE
bool _midiDumpEnable
 
uint32 _prevMillis
 
Common::Array< byte > _midiDumpCache
 

Static Protected Attributes

static uint16 _active_notes [128]
 

Additional Inherited Members

- Static Public Attributes inherited from MidiDriver_BASE
static const uint8 MIDI_CHANNEL_COUNT = 16
 
static const uint8 MIDI_RHYTHM_CHANNEL = 9
 
static const byte MIDI_COMMAND_NOTE_OFF = 0x80
 
static const byte MIDI_COMMAND_NOTE_ON = 0x90
 
static const byte MIDI_COMMAND_POLYPHONIC_AFTERTOUCH = 0xA0
 
static const byte MIDI_COMMAND_CONTROL_CHANGE = 0xB0
 
static const byte MIDI_COMMAND_PROGRAM_CHANGE = 0xC0
 
static const byte MIDI_COMMAND_CHANNEL_AFTERTOUCH = 0xD0
 
static const byte MIDI_COMMAND_PITCH_BEND = 0xE0
 
static const byte MIDI_COMMAND_SYSTEM = 0xF0
 
static const byte MIDI_CONTROLLER_BANK_SELECT_MSB = 0x00
 
static const byte MIDI_CONTROLLER_MODULATION = 0x01
 
static const byte MIDI_CONTROLLER_DATA_ENTRY_MSB = 0x06
 
static const byte MIDI_CONTROLLER_VOLUME = 0x07
 
static const byte MIDI_CONTROLLER_BALANCE = 0x08
 
static const byte MIDI_CONTROLLER_PANNING = 0x0A
 
static const byte MIDI_CONTROLLER_EXPRESSION = 0x0B
 
static const byte MIDI_CONTROLLER_BANK_SELECT_LSB = 0x20
 
static const byte MIDI_CONTROLLER_DATA_ENTRY_LSB = 0x26
 
static const byte MIDI_CONTROLLER_SUSTAIN = 0x40
 
static const byte MIDI_CONTROLLER_PORTAMENTO = 0x41
 
static const byte MIDI_CONTROLLER_SOSTENUTO = 0x42
 
static const byte MIDI_CONTROLLER_SOFT = 0x43
 
static const byte MIDI_CONTROLLER_REVERB = 0x5B
 
static const byte MIDI_CONTROLLER_CHORUS = 0x5D
 
static const byte MIDI_CONTROLLER_RPN_LSB = 0x64
 
static const byte MIDI_CONTROLLER_RPN_MSB = 0x65
 
static const byte MIDI_CONTROLLER_ALL_SOUND_OFF = 0x78
 
static const byte MIDI_CONTROLLER_RESET_ALL_CONTROLLERS = 0x79
 
static const byte MIDI_CONTROLLER_ALL_NOTES_OFF = 0x7B
 
static const byte MIDI_CONTROLLER_OMNI_ON = 0x7C
 
static const byte MIDI_CONTROLLER_OMNI_OFF = 0x7D
 
static const byte MIDI_CONTROLLER_MONO_ON = 0x7E
 
static const byte MIDI_CONTROLLER_POLY_ON = 0x7F
 
static const uint16 MIDI_RPN_PITCH_BEND_SENSITIVITY = 0x0000
 
static const uint16 MIDI_RPN_MASTER_TUNING_FINE = 0x0001
 
static const uint16 MIDI_RPN_MASTER_TUNING_COARSE = 0x0002
 
static const uint16 MIDI_RPN_NULL = 0x7F7F
 
static const uint8 MIDI_META_END_OF_TRACK = 0x2F
 
static const uint8 MIDI_META_SEQUENCER = 0x7F
 
static const uint16 MIDI_PITCH_BEND_DEFAULT = 0x2000
 
static const uint8 MIDI_PANNING_DEFAULT = 0x40
 
static const uint8 MIDI_EXPRESSION_DEFAULT = 0x7F
 
static const uint16 MIDI_MASTER_TUNING_FINE_DEFAULT = 0x2000
 
static const uint8 MIDI_MASTER_TUNING_COARSE_DEFAULT = 0x40
 
static const uint8 MT32_PITCH_BEND_SENSITIVITY_DEFAULT = 0x0C
 
static const uint8 GM_PITCH_BEND_SENSITIVITY_DEFAULT = 0x02
 
static const uint8 GS_RHYTHM_FIRST_NOTE = 0x1B
 
static const uint8 GS_RHYTHM_LAST_NOTE = 0x58
 

Member Function Documentation

◆ send()

void Scumm::Player::send ( uint32  b)
overridevirtual

Output a packed midi command to the midi stream. The 'lowest' byte (i.e. b & 0xFF) is the status code, then come (if used) the first and second opcode.

Implements MidiDriver_BASE.

◆ sysEx()

void Scumm::Player::sysEx ( const byte *  msg,
uint16  length 
)
overridevirtual

Transmit a SysEx to the MIDI device.

The given msg MUST NOT contain the usual SysEx frame, i.e. do NOT include the leading 0xF0 and the trailing 0xF7.

Furthermore, the maximal supported length of a SysEx is 268 bytes. Passing longer buffers can lead to undefined behavior (most likely, a crash).

Reimplemented from MidiDriver_BASE.

◆ sysExNoDelay()

uint16 Scumm::Player::sysExNoDelay ( const byte *  msg,
uint16  length 
)
overridevirtual

Transmit a SysEx to the MIDI device and return the necessary delay until the next SysEx event in milliseconds.

This can be used to implement an alternate delay method than the OSystem::delayMillis function used by most sysEx implementations. Note that not every driver needs a delay, or supports this method. In this case, 0 is returned and the driver itself will do a delay if necessary.

For information on the SysEx data requirements, see the sysEx method.

Reimplemented from MidiDriver_BASE.


The documentation for this class was generated from the following file: