ScummVM API documentation
MidiDriver_ADLIB_Multisource::ActiveNote Struct Reference

#include <adlib_ms.h>

Public Member Functions

void init ()
 

Public Attributes

bool noteActive
 
bool noteSustained
 
uint8 note
 
uint8 velocity
 
uint8 channel
 
uint8 source
 
uint8 oplNote
 
uint16 oplFrequency
 
uint32 noteCounterValue
 
uint8 instrumentId
 
OplInstrumentDefinitioninstrumentDef
 
bool channelAllocated
 

Detailed Description

Contains information on the currently active note on an OPL channel.

Member Function Documentation

◆ init()

void MidiDriver_ADLIB_Multisource::ActiveNote::init ( )

Initializes the active note data to default values.

Member Data Documentation

◆ noteActive

bool MidiDriver_ADLIB_Multisource::ActiveNote::noteActive

True if a note is currently playing (including if it is sustained, but not if it is in the "release" phase).

◆ noteSustained

bool MidiDriver_ADLIB_Multisource::ActiveNote::noteSustained

True if the currently playing note is sustained, i.e. note has been turned off but is kept active due to the sustain controller.

◆ note

uint8 MidiDriver_ADLIB_Multisource::ActiveNote::note

The MIDI note value as it appeared in the note on event.

◆ velocity

uint8 MidiDriver_ADLIB_Multisource::ActiveNote::velocity

The MIDI velocity value of the note on event.

◆ channel

uint8 MidiDriver_ADLIB_Multisource::ActiveNote::channel

The MIDI channel that played the current/last note (0xFF if no note has been played since initialization).

◆ source

uint8 MidiDriver_ADLIB_Multisource::ActiveNote::source

The source that played the current/last note (0xFF if no note has been played since initialization).

◆ oplNote

uint8 MidiDriver_ADLIB_Multisource::ActiveNote::oplNote

The MIDI note value that is actually played. This is the same as the note field for melodic instruments, but on the MIDI rhythm channel the note indicates which rhythm instrument should be played instead of the pitch. In that case this field is different (

See also
determineInstrument).

◆ oplFrequency

uint16 MidiDriver_ADLIB_Multisource::ActiveNote::oplFrequency

The OPL frequency (F-num) and octave (block) (in Ax (low byte) and Bx (high byte) register format) that was calculated to play the MIDI note.

◆ noteCounterValue

uint32 MidiDriver_ADLIB_Multisource::ActiveNote::noteCounterValue

The value of the note counter when a note was last turned on or off on this OPL channel.

◆ instrumentId

uint8 MidiDriver_ADLIB_Multisource::ActiveNote::instrumentId

A unique identifier of the instrument that is used to play the note. In the default implementation this is the MIDI program number for melodic instruments and the rhythm channel note number + 0x80 for rhythm instruments (

See also
determineInstrument).

◆ instrumentDef

OplInstrumentDefinition* MidiDriver_ADLIB_Multisource::ActiveNote::instrumentDef

Pointer to the instrument definition used to play the note.

◆ channelAllocated

bool MidiDriver_ADLIB_Multisource::ActiveNote::channelAllocated

True if this OPL channel has been allocated to a MIDI channel. Note that in the default driver implementation only the static channel allocation algorithm uses this field.


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