Next: Functions Up: 4 Module playback Previous: Constants

# Data types

This section describes all data types used in MIDAS module playback.

## 4.2.1 MIDASinstrumentInfo

    typedef struct
    {
        char        instName[32];
    } MIDASinstrumentInfo;

Instrument information structure.

### Members

instName
  Instrument name, an ASCIIZ string

### Description

This structure is used with the function MIDASgetInstrumentInfo to query information about an instrument in a module. MIDASgetInstrumentInfo fills a MIDASinstrumentInfo structure with the information.

## 4.2.2 MIDASmodule

    typedef ... MIDASmodule;

### Description

MIDASmodule is a module handle that defines a module that has been loaded into memory.

## 4.2.3 MIDASmoduleInfo

    typedef struct
    {
        char        songName[32];
        unsigned    songLength;
        unsigned    numPatterns;
        unsigned    numInstruments;
        unsigned    numChannels;
    } MIDASmoduleInfo;

Module information structure.

### Members

songName
  Module song name, an ASCIIZ string
songLength
  Module song length in number of positions
numPatterns
  Number of patterns in module
numInstruments
  Number of instruments in module
numChannels
  The number of channels the module uses

### Description

This structure is used with the function MIDASgetModuleInfo to query information about an module. MIDASgetModuleInfo fills a MIDASmoduleInfo structure with the information.

## 4.2.4 MIDASmodulePlayHandle

    typedef ... MIDASmodulePlayHandle;

### Description

MIDASmodulePlayHandle is a module playback handle that defines a module or module section that is being played. One module can be played several times simultaneously.

## 4.2.5 MIDASplayStatus

    typedef struct
    {
        unsigned    position;
        unsigned    pattern;
        unsigned    row;
        int         syncInfo;
        unsigned    songLoopCount;
    } MIDASplayStatus;

Module status information structure.

### Members

position
  Current playback position number
pattern
  Current playback pattern number
row
  Current playback row number
syncInfo
  Latest synchronization command infobyte, -1 if no synchronization command has been encountered yet.
songLoopCount
  Module song loop counter -- incremented by 1 every time the song loops around. Module looping can be detected by checking if this field is nonzero.

### Description

This structure is used with the function MIDASgetPlayStatus to query the current module playback status. MIDASgetPlayStatus fills a MIDASplayStatus structure with the information.

Some more information about the synchronization commands: In FastTracker 2 and Scream Tracker 3 modules, the command `Wxx` is used as a music synchronization command. The infobyte of this command is available as the music synchronization command infobyte above.

Next: Functions Up: 4 Module playback Previous: Constants