Sona 0.50 Source

Sona 0.50/tools/tfi2spat/main.h

#ifndef MAIN_H_
#define MAIN_H_

#include <stddef.h>
#include <stdint.h>

// Structure to hold the data for a FM patch
typedef struct {
   // Common to entire patch
   uint8_t algorithm;
   uint8_t feedback;
   
   // Data for each slot
   // Same values as used by YM2612, except for detune which is stored
   // in a plus-3 format (i.e. 0 = -3 ... 6 = +3), same as TFI/VGI
   struct {
      uint8_t multiplier;
      uint8_t detune;
      uint8_t total_level;
      uint8_t rate_scaling;
      uint8_t attack_rate;
      uint8_t decay_rate;
      uint8_t sustain_rate;
      uint8_t release_rate;
      uint8_t sustain_level;
      uint8_t ssg_eg;
      uint8_t am_enable;
   } slot[4];
} Patch;

#endif