25#ifndef H_ADPLUG_SOPPLAYER
26#define H_ADPLUG_SOPPLAYER
42#define MAX_VOLUME 0x7f
47#define SOP_TOM_PITCH 36
49#define SOP_SD_PITCH (SOP_TOM_PITCH + TOM_TO_SD)
53#define NB_STEP_PITCH 32
54#define LOG_NB_STEP_PITCH 5
55#define NB_TABLE_DEMI_TON OCTAVE
56#define TABLE_SIZE (NB_STEP_PITCH * NB_TABLE_DEMI_TON)
77 void NoteOn_SOP(
unsigned chan,
unsigned pitch);
88 void SetFreq_SOP(
int voice,
unsigned note,
int pitch,
int keyOn);
95 unsigned char Ksl[20];
106 static const unsigned char VolReg[11 * 2];
113#define SOP_HEAD_SIZE 76
114#define SOP_SIGN_SIZE 7
115#define SOP_FILENAME 13
117#define SOP_DEF_TEMPO 120
118#define SOP_COMMENT 13
119#define SOP_INSTNAME 8
120#define SOP_LONGNAME 19
121#define SOP_INST2OP 11
122#define SOP_INST4OP 22
123#define SOP_MAX_INST 128
124#define SOP_MAX_TRACK 20
125#define SOP_MAX_VOL 127
127#define SOP_CHAN_NONE 0
128#define SOP_CHAN_4OP 1
129#define SOP_CHAN_2OP 2
131#define SOP_INST_4OP 0
132#define SOP_INST_2OP 1
137#define SOP_INST_HH 10
138#define SOP_INST_NONE 12
140#define SOP_EVNT_SPEC 1
141#define SOP_EVNT_NOTE 2
142#define SOP_EVNT_TEMPO 3
143#define SOP_EVNT_VOL 4
144#define SOP_EVNT_PITCH 5
145#define SOP_EVNT_INST 6
146#define SOP_EVNT_PAN 7
147#define SOP_EVNT_MVOL 8
169 if (
drv)
drv->~Cad262Driver();
193 return std::string(
"Note Sequencer by sopepos");
CPlayer(Copl *newopl)
Definition player.cpp:34
void SetVoiceVolume_SOP(unsigned chan, unsigned vol)
Definition sop.cpp:545
unsigned char OP4[20]
Definition sop.h:100
int Set_4OP_Mode(unsigned chan, unsigned value)
Definition sop.cpp:799
void SetMode_SOP(int mode)
Definition sop.cpp:400
unsigned char VoiceVolume[20]
Definition sop.h:98
void SetVoicePitch_SOP(unsigned chan, int pitch)
Definition sop.cpp:740
void SetYM_262_SOP(int VX)
Definition sop.cpp:505
unsigned char Stereo[22]
Definition sop.h:101
unsigned char OP_MASK
Definition sop.h:98
static const int fNumTbl[TABLE_SIZE]
Definition sop.h:330
char percussion
Definition sop.h:90
unsigned char VolumeTable[64 *128]
Definition sop.h:91
void SetFreq_SOP(int voice, unsigned note, int pitch, int keyOn)
Definition sop.cpp:708
void SndOutput3(int addr, int value)
Definition sop.cpp:480
void SEND_INS(int base_addr, unsigned char *value, int mode)
Definition sop.cpp:490
void UpdateFNums(int chan)
Definition sop.cpp:462
void NoteOn_SOP(unsigned chan, unsigned pitch)
Definition sop.cpp:755
char voiceKeyOn[20]
Definition sop.h:93
~Cad262Driver()
Definition sop.h:67
void SndOutput1(int addr, int value)
Definition sop.cpp:470
void SetStereoPan_SOP(int chan, int value)
Definition sop.cpp:511
unsigned char Ksl[20]
Definition sop.h:95
unsigned char Ksl2V[20]
Definition sop.h:97
void SoundWarmInit()
Definition sop.cpp:418
unsigned char ymbuf[2 *YMB_SIZE]
Definition sop.h:99
unsigned char vPitchBend[20]
Definition sop.h:94
unsigned char Ksl2[20]
Definition sop.h:96
static const unsigned char SlotX[maxVoices *2]
Definition sop.h:365
void NoteOff_SOP(unsigned chan)
Definition sop.cpp:782
void SetVoiceTimbre_SOP(unsigned chan, unsigned char *array)
Definition sop.cpp:625
static const unsigned DIV12[OCTAVE *8]
Definition sop.h:389
static const unsigned MOD12[OCTAVE *11]
Definition sop.h:375
Cad262Driver(Copl *newopl)
Definition sop.h:64
char voiceNote[20]
Definition sop.h:92
Copl * opl
Definition sop.h:82
static const unsigned char VolReg[11 *2]
Definition sop.h:370
void executeCommand(uint8_t t)
Definition sop.cpp:214
std::string getinstrument(unsigned int n)
Definition sop.h:206
sop_trk * track
Definition sop.h:250
CsopPlayer(Copl *newopl)
Definition sop.h:154
static CPlayer * factory(Copl *newopl)
Definition sop.cpp:29
bool update()
Definition sop.cpp:286
uint8_t cur_tempo
Definition sop.h:219
char title[SOP_TITLE]
Definition sop.h:225
void SetTempo(uint8_t tempo)
Definition sop.cpp:204
uint8_t * chanMode
Definition sop.h:248
Cad262Driver * drv
Definition sop.h:214
uint8_t basicTempo
Definition sop.h:226
uint8_t tickBeat
Definition sop.h:226
uint8_t master_vol
Definition sop.h:222
uint8_t lastvol[SOP_MAX_TRACK]
Definition sop.h:221
std::string gettitle()
Definition sop.h:186
float timer
Definition sop.h:218
void rewind(int subsong)
Definition sop.cpp:168
std::string gettype()
Definition sop.h:191
uint8_t percussive
Definition sop.h:226
unsigned int getinstruments()
Definition sop.h:201
char comment[SOP_COMMENT]
Definition sop.h:227
std::string getdesc()
Definition sop.h:196
uint8_t nTracks
Definition sop.h:228
char fname[SOP_FILENAME]
Definition sop.h:224
unsigned int getspeed()
Definition sop.h:181
~CsopPlayer()
Definition sop.h:157
bool songend
Definition sop.h:217
sop_inst * inst
Definition sop.h:249
uint8_t nInsts
Definition sop.h:228
float getrefresh()
Definition sop.h:176
uint8_t volume[SOP_MAX_TRACK]
Definition sop.h:220
bool load(const std::string &filename, const CFileProvider &fp)
Definition sop.cpp:34
struct huft * t
Definition inflate.c:943
register unsigned i
Definition inflate.c:1575
static char filename[]
Definition features.c:5
static PuglViewHint int value
Definition pugl.h:1708
JSAMPIMAGE data
Definition jpeglib.h:945
unsigned short uint16_t
Definition mid.cpp:99
unsigned int uint32_t
Definition mid.cpp:100
unsigned char uint8_t
Definition mid.cpp:98
png_structrp int mode
Definition png.h:1139
#define TABLE_SIZE
Definition sop.h:56
#define SOP_MAX_TRACK
Definition sop.h:124
#define SOP_INSTNAME
Definition sop.h:119
#define OCTAVE
Definition sop.h:52
#define SOP_FILENAME
Definition sop.h:115
#define SOP_LONGNAME
Definition sop.h:120
#define YMB_SIZE
Definition sop.h:59
#define SOP_COMMENT
Definition sop.h:118
#define SOP_INST4OP
Definition sop.h:122
#define SOP_TITLE
Definition sop.h:116
#define maxVoices
Definition sop.h:58
char filename[SOP_INSTNAME+1]
Definition sop.h:232
uint8_t data[SOP_INST4OP]
Definition sop.h:234
uint8_t type
Definition sop.h:231
char longname[SOP_LONGNAME+1]
Definition sop.h:233
uint32_t pos
Definition sop.h:243
uint16_t dur
Definition sop.h:246
uint16_t nEvents
Definition sop.h:238
uint32_t counter
Definition sop.h:244
uint16_t ticks
Definition sop.h:245
uint32_t size
Definition sop.h:239
uint8_t * data
Definition sop.h:240
int n
Definition crypt.c:458