//--------------------------------------------------------------------------- #ifndef ComposeStageUnitH #define ComposeStageUnitH //--------------------------------------------------------------------------- #include using namespace std; #define POINTS_PER_BAR 120 #define CHECK_STAGE_LENGTH 1 #define CHECK_STAGE_VAR 2 #define CHECK_STAGE_EVENT 3 #define CHECK_STAGE_ALL 4 /***************************************************************************************/ // 全局类定义 /***************************************************************************************/ /* class CFill { public: int iPos; int iType; CFill( int pos, int type ){ iPos = pos; iType = type; } CFill( CFill* pFill ){ iPos = pFill->iPos; iType = pFill->iType; } }; class CVolumeSet { public: UINT iChannel; UINT nVolSet; UINT nVolConfirm; UINT nVolInit; CVolumeSet( UINT chan, UINT volSet, UINT volComfirm, UINT volInit ){ iChannel = chan; nVolSet = volSet; nVolConfirm = volComfirm; nVolInit = volInit; } CVolumeSet( CVolumeSet* pSet ){ iChannel = pSet->iChannel; nVolSet = pSet->nVolSet; nVolConfirm = pSet->nVolConfirm; nVolInit = pSet->nVolInit; } }; class CInstrumentSet { public: UINT iChannel; UINT nInsSet; UINT nInsConfirm; UINT nInsInit; CInstrumentSet( UINT chan, UINT insSet, UINT insComfirm, UINT insInit ){ iChannel = chan; nInsSet = insSet; nInsConfirm = insComfirm; nInsInit = insInit; } CInstrumentSet( CInstrumentSet* pSet ){ iChannel = pSet->iChannel; nInsSet = pSet->nInsSet; nInsConfirm = pSet->nInsConfirm; nInsInit = pSet->nInsInit; } }; */ typedef struct tagBarVols { DWORD aVols[POINTS_PER_BAR]; bool bRecording, bInvalid; tagBarVols() { bRecording = true; bInvalid = false; memset( aVols, 0, POINTS_PER_BAR*sizeof(DWORD) ); } } BARVOLS, *PBARVOLS; typedef struct tagMelodyBar { BARVOLS tBarVol; char iFill; char iChords[2]; tagMelodyBar() { iFill = -1; iChords[0] = iChords[1] = -1; } } MELODYBAR, *PMELODYBAR; typedef struct tagMelodyStage //旋律分段信息 { int iFirstBar; int iLastBar; int iVar; } MELODYSTAGE, *PMELODYSTAGE; typedef struct tagComposeStage //曲式分段信息 { int iMelodyStage; //旋律或前间尾奏号 int nStageBars; //该段小节数 int iVar; //伴奏类型 int idStyle; //风格ID vector aFills; //加花LOWORD=小节数 HIWORD=类型 string strStyleName; tagComposeStage() { iMelodyStage = -1; nStageBars = 0; iVar = -1; idStyle = -1; } ~tagComposeStage() { aFills.clear(); } } COMPOSESTAGE, *PCOMPOSESTAGE; typedef vector BARVOLSLIST; typedef vector MELODYBARLIST; typedef vector MELODYSTAGELIST; typedef vector COMPOSESTAGELIST; #endif