This program generates sound by using FM tone generator YMF825 via SPI.
Embed:
(wiki syntax)
Show/hide line numbers
fmvoice.h
00001 #ifndef FMVOICE_H 00002 #define FMVOICE_H 00003 #include <stdbool.h> 00004 00005 // Fmvoice Class 00006 typedef struct _Fmvoice Fmvoice; 00007 struct _Fmvoice { 00008 unsigned char _vnum; 00009 bool _keyon; 00010 Fmvoice* _nextVc; 00011 void* _parent; 00012 }; 00013 00014 // public 00015 extern void Fmvoice_init( Fmvoice* _this ); 00016 extern void Fmvoice_keyon( Fmvoice* _this, void* nt, void* pt, void* tn, unsigned char note, unsigned char vel ); 00017 extern void Fmvoice_keyoff( Fmvoice* _this ); 00018 extern void Fmvoice_release( Fmvoice* _this ); 00019 extern void Fmvoice_chgVibDpt( Fmvoice* _this, unsigned char vibDpt ); 00020 extern void Fmvoice_chgPit( Fmvoice* _this, unsigned short pb ); 00021 extern void Fmvoice_setBasicPit( Fmvoice* _this, unsigned char note ); 00022 00023 // setter 00024 extern void Fmvoice_setVoiceNum( Fmvoice* _this, unsigned char vn ); 00025 extern void Fmvoice_setNextVc( Fmvoice* _this, Fmvoice* vc ); 00026 00027 // getter 00028 extern unsigned char Fmvoice_vnum( Fmvoice* _this ); 00029 extern bool Fmvoice_isKeyon( Fmvoice* _this ); 00030 extern Fmvoice* Fmvoice_nextVc( Fmvoice* _this ); 00031 #endif
Generated on Wed Jul 13 2022 08:46:10 by 1.7.2