⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tchord.h

📁 在linux下多媒体开发实例linux下多媒体开发
💻 H
字号:
// tchord.h// definitions for guitar chord database and sound functions#ifndef TCHORD_H#define TCHORD_H// maximum number of chords, increase if neededconst int maxChords = 100;// it's a 6 string guitarconst int numStrings = 6;// show this many fretsconst int numFrets = 8;typedef char strings_t[numStrings];// data structure for one guitar chordtypedef struct tutChord{  char longName[40];   // long name (e.g. "C Major"), must be unique  char shortName[8];   // short name (e.g. "C")                       // each string is either 0 (open), X (dead),                       // or a fret number (first fret is 1)  strings_t strings;   // finger for each string (ordered EADGBE)  char sampleFile[80]; // sound sample filename};// type to hold array of chord namestypedef char *chordList_t[maxChords];// class for a database of chordsclass tutChords{public:  tutChords() { fileName[0] = 0; numChords = 0; }  tutChords(char *filename); ~tutChords() { fileName[0] = 0; numChords = 0; }  void chordNames(chordList_t list);  // these return -1 on error  int load(char *fileName); // load chord file  int save(char *fileName); // save chord file  int play(char *longName); // play a chord  int fingering(char *longName, strings_t &strings);private:  char fileName[80];         // database file name  tutChord chord[maxChords]; // array of chords  chordList_t chordList;     // list of long chord names  int numChords;             // current number of chords};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -