ScummVM API documentation
OplInstrumentDefinition Struct Reference

#include <adlib_ms.h>

Public Member Functions

bool isEmpty ()
 
uint8 getNumberOfOperators ()
 
OplInstrumentOperatorDefinitiongetOperatorDefinition (uint8 operatorNum)
 

Public Attributes

bool fourOperator
 
OplInstrumentOperatorDefinition operator0
 
OplInstrumentOperatorDefinition operator1
 
OplInstrumentOperatorDefinition operator2
 
OplInstrumentOperatorDefinition operator3
 
uint8 connectionFeedback0
 
uint8 connectionFeedback1
 
uint8 rhythmNote
 
OplInstrumentRhythmType rhythmType
 

Detailed Description

Instrument definition for an OPL2 or OPL3 chip. Contains the data for all registers belonging to an OPL channel, except the Ax and Bx registers (these determine the frequency and are derived from the note played).

Member Function Documentation

◆ isEmpty()

bool OplInstrumentDefinition::isEmpty ( )

Check if this instrument definition contains any data.

Returns
True if this instrument is empty; false otherwise.

◆ getNumberOfOperators()

uint8 OplInstrumentDefinition::getNumberOfOperators ( )

Returns the number of operators used by this instrument definition.

Returns
The number of operators (2 or 4).

◆ getOperatorDefinition()

OplInstrumentOperatorDefinition& OplInstrumentDefinition::getOperatorDefinition ( uint8  operatorNum)

Returns the definition data for the operator with the specified number. Specify 0 or 1 for 2 operator instruments or 0-3 for 4 operator instruments.

Parameters
operatorNumThe operator for which the data should be returned.
Returns
Pointer to the definition data for the specified operator.

Member Data Documentation

◆ fourOperator

bool OplInstrumentDefinition::fourOperator

Indicates if this instrument uses 2 or 4 operators.

◆ operator0

OplInstrumentOperatorDefinition OplInstrumentDefinition::operator0

Operator data. 2 operator instruments use operators 0 and 1 only.

◆ connectionFeedback0

uint8 OplInstrumentDefinition::connectionFeedback0

Cx register: connection and feedback. Note: panning is determined by a MIDI controller and not part of the instrument definition.

◆ connectionFeedback1

uint8 OplInstrumentDefinition::connectionFeedback1

Second Cx register (used by 4 operator instruments).

◆ rhythmNote

uint8 OplInstrumentDefinition::rhythmNote

Notes played on a MIDI rhythm channel indicate which rhythm instrument should be played, not which note should be played. This field indicates the pitch (MIDI note) which should be used to play this rhythm instrument. Not used for melodic instruments.

◆ rhythmType

OplInstrumentRhythmType OplInstrumentDefinition::rhythmType

The type of OPL rhythm instrument that this definition should be used with. Type undefined indicates that this definition should not be used with rhythm mode.


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