]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_snd.h
seriously i want sound!!! bakapee!
[16.git] / src / lib / 16_snd.h
index 86c1de581beae3e5708bc42eeeb4a6361dacec00..afadb348d5ca77374aea392b893c26d56fb5341d 100644 (file)
 #define ADLIB_FM_ADDRESS       0x388   /* adlib address/status register */\r
 #define ADLIB_FM_DATA          0x389   /* adlib data register           */
 
+/*\r
+* FM Instrument definition for .SBI files - SoundBlaster instrument\r
+* - these are the important parts - we will skip the header, but since\r
+*   I am not sure where it starts and ends so I have had to guess.\r
+*   However it SEEMS! to work. Each array has two values, one for\r
+*   each operator.\r
+*/\r
+typedef struct{\r
+       byte SoundCharacteristic[2];    /* modulator frequency multiple...  */\r
+       byte Level[2];                  /* modulator frequency level...     */\r
+       byte AttackDecay[2];            /* modulator attack/decay...        */\r
+       byte SustainRelease[2];         /* modulator sustain/release...     */\r
+       byte WaveSelect[2];             /* output waveform distortion       */\r
+       byte Feedback;                  /* feedback algorithm and strength  */\r
+} FMInstrument;\r
+
+
 void opl2out(word reg, word data);
 void opl3out(word reg, word data);
 void opl3exp(word data);
+
+//Unknown licence!
 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_*/