X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_snd.h;h=3242e81418d51d17f4fd7dc41486b6f3dc1e8ef8;hb=b6dd51c3b756f09551ea2c731b7aaf370676617a;hp=86c1de581beae3e5708bc42eeeb4a6361dacec00;hpb=4920b124799b21bd91ebf26600f316cd72508821;p=16.git diff --git a/src/lib/16_snd.h b/src/lib/16_snd.h old mode 100644 new mode 100755 index 86c1de58..3242e814 --- a/src/lib/16_snd.h +++ b/src/lib/16_snd.h @@ -30,9 +30,30 @@ #define ADLIB_FM_ADDRESS 0x388 /* adlib address/status register */ #define ADLIB_FM_DATA 0x389 /* adlib data register */ +/* +* FM Instrument definition for .SBI files - SoundBlaster instrument +* - these are the important parts - we will skip the header, but since +* I am not sure where it starts and ends so I have had to guess. +* However it SEEMS! to work. Each array has two values, one for +* each operator. +*/ +typedef struct{ + byte SoundCharacteristic[2]; /* modulator frequency multiple... */ + byte Level[2]; /* modulator frequency level... */ + byte AttackDecay[2]; /* modulator attack/decay... */ + byte SustainRelease[2]; /* modulator sustain/release... */ + byte WaveSelect[2]; /* output waveform distortion */ + byte Feedback; /* feedback algorithm and strength */ +} FMInstrument; + + void opl2out(word reg, word data); void opl3out(word reg, word data); void opl3exp(word data); + void FMReset(void/*int percusiveMode*/); +void FMKeyOff(int voice); +void FMKeyOn(int voice, int freq, int octave); +void FMSetVoice(int voiceNum, FMInstrument *ins); #endif /*__16_SND_H_*/