// // DMCompP.H // // Private include for DMCompos.DLL // // Copyright (c) 1997-1998 Microsoft Corporation // // #ifndef _DMCOMPP_ #define _DMCOMPP_ #define ALL_TRACK_GROUPS 0xffffffff extern long g_cComponent; // Class factory // class CDirectMusicPersonalityFactory : public IClassFactory { public: // IUnknown // virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv); virtual STDMETHODIMP_(ULONG) AddRef(); virtual STDMETHODIMP_(ULONG) Release(); // Interface IClassFactory // virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv); virtual STDMETHODIMP LockServer(BOOL bLock); // Constructor // CDirectMusicPersonalityFactory() : m_cRef(1) {} // Destructor // ~CDirectMusicPersonalityFactory() {} private: long m_cRef; }; class CDirectMusicComposerFactory : public IClassFactory { public: // IUnknown // virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv); virtual STDMETHODIMP_(ULONG) AddRef(); virtual STDMETHODIMP_(ULONG) Release(); // Interface IClassFactory // virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv); virtual STDMETHODIMP LockServer(BOOL bLock); // Constructor // CDirectMusicComposerFactory() : m_cRef(1) {} // Destructor // ~CDirectMusicComposerFactory() {} private: long m_cRef; }; class CDirectMusicTemplateFactory : public IClassFactory { public: // IUnknown // virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv); virtual STDMETHODIMP_(ULONG) AddRef(); virtual STDMETHODIMP_(ULONG) Release(); // Interface IClassFactory // virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv); virtual STDMETHODIMP LockServer(BOOL bLock); // Constructor // CDirectMusicTemplateFactory() : m_cRef(1) {} // Destructor // ~CDirectMusicTemplateFactory() {} private: long m_cRef; }; class CDirectMusicSignPostTrackFactory : public IClassFactory { public: // IUnknown // virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv); virtual STDMETHODIMP_(ULONG) AddRef(); virtual STDMETHODIMP_(ULONG) Release(); // Interface IClassFactory // virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv); virtual STDMETHODIMP LockServer(BOOL bLock); // Constructor // CDirectMusicSignPostTrackFactory() : m_cRef(1) {} // Destructor // ~CDirectMusicSignPostTrackFactory() {} private: long m_cRef; }; class CDirectMusicPersonalityTrackFactory : public IClassFactory { public: // IUnknown // virtual STDMETHODIMP QueryInterface(const IID &iid, void **ppv); virtual STDMETHODIMP_(ULONG) AddRef(); virtual STDMETHODIMP_(ULONG) Release(); // Interface IClassFactory // virtual STDMETHODIMP CreateInstance(IUnknown* pUnknownOuter, const IID& iid, void** ppv); virtual STDMETHODIMP LockServer(BOOL bLock); // Constructor // CDirectMusicPersonalityTrackFactory() : m_cRef(1) {} // Destructor // ~CDirectMusicPersonalityTrackFactory() {} private: long m_cRef; }; // private interfaces interface IDMPers : IUnknown { virtual HRESULT STDMETHODCALLTYPE GetPersonalityStruct(void** ppPersonality)=0; }; interface IDMTempl : IUnknown { virtual HRESULT STDMETHODCALLTYPE CreateSegment(IDirectMusicSegment* pSegment)=0; virtual HRESULT STDMETHODCALLTYPE Init(void* pTemplate)=0; }; // private CLSIDs and IIDs (some IIDs should no longer be needed...) const CLSID CLSID_DMTempl = {0xD30BCC65,0x60E8,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}}; const IID IID_IDMPers = {0x93BE9414,0x5C4E,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}}; //const IID IID_IDMCompos = {0x6724A8C0,0x60C3,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}}; const IID IID_IDMTempl = {0xD30BCC64,0x60E8,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}}; //const IID IID_ISPstTrk = {0xB65019E0,0x61B6,0x11D1,{0xA7,0xCE,0x00,0xA0,0xC9,0x13,0xF7,0x3C}}; /* // stuff that will move to dmusici.h DEFINE_GUID(CLSID_DirectMusicPersonalityTrack, 0xf1edefe1, 0xae0f, 0x11d1, 0xa7, 0xce, 0x0, 0xa0, 0xc9, 0x13, 0xf7, 0x3c); DEFINE_GUID(GUID_PersonalityTrack, 0xf1edefe2, 0xae0f, 0x11d1, 0xa7, 0xce, 0x0, 0xa0, 0xc9, 0x13, 0xf7, 0x3c); */ /* // stuff that will move to dmusicf.h // personalities // runtime chunks #define FOURCC_PERSONALITY mmioFOURCC('D','M','P','R') #define FOURCC_IOPERSONALITY mmioFOURCC('p','e','r','h') #define DM_FOURCC_GUID_CHUNK mmioFOURCC('g','u','i','d') #define DM_FOURCC_INFO_LIST mmioFOURCC('I','N','F','O') #define DM_FOURCC_VERSION_CHUNK mmioFOURCC('v','e','r','s') #define FOURCC_SUBCHORD mmioFOURCC('c','h','d','t') #define FOURCC_CHORDENTRY mmioFOURCC('c','h','e','h') #define FOURCC_SUBCHORDID mmioFOURCC('s','b','c','n') #define FOURCC_IONEXTCHORD mmioFOURCC('n','c','r','d') #define FOURCC_NEXTCHORDSEQ mmioFOURCC('n','c','s','q') #define FOURCC_IOSIGNPOST mmioFOURCC('s','p','s','h') #define FOURCC_CHORDNAME mmioFOURCC('I','N','A','M') // runtime list chunks #define FOURCC_LISTCHORDENTRY mmioFOURCC('c','h','o','e') #define FOURCC_LISTCHORDMAP mmioFOURCC('c','m','a','p') #define FOURCC_LISTCHORD mmioFOURCC('c','h','r','d') #define FOURCC_LISTCHORDPALETTE mmioFOURCC('c','h','p','l') #define FOURCC_LISTCADENCE mmioFOURCC('c','a','d','e') #define FOURCC_LISTSIGNPOSTITEM mmioFOURCC('s','p','s','t') #define FOURCC_SIGNPOSTLIST mmioFOURCC('s','p','s','q') // constants const int MaxSubChords = 4; // run time data structs struct ioPersonality { char szLoadName[20]; DWORD dwScalePattern; DWORD dwFlags; }; struct ioSubChord { DWORD dwChordPattern; DWORD dwScalePattern; DWORD dwInvertPattern; BYTE bChordRoot; BYTE bScaleRoot; WORD wCFlags; DWORD dwLevels; // parts or which subchord levels this chord supports }; struct ioChordEntry { DWORD dwFlags; WORD wConnectionID; // replaces runtime "pointer to this" }; struct ioNextChord { DWORD dwFlags; WORD nWeight; WORD wMinBeats; WORD wMaxBeats; WORD wConnectionID; // points to an ioChordEntry }; struct ioSignPost { DWORD dwChords; // 1bit per group DWORD dwFlags; }; ///* RIFF ( 'DMPR' // Personality header chunk [] // guid chunk [] // version chunk (two DWORDS) // standard MS Info chunk // subchord database // chord palette // chord map // signpost list [] // optional chordmap position data ) ::= chdt( ... ) ::= LIST('chpl' ... // chord definition ) ::= LIST('chrd' // name of chord in wide char format // list of subchords composing chord [] // optional chord edit flags ) ::= LIST('cmap' ) ::= LIST('choe' // chord entry data // chord definition // connecting(next) chords ) ::= LIST('spst' [] ) ::= LIST('cade' ...) ::= sbcn() ::= ceed(ioChordEntryEdit) ::= ched(DMChordEdit) ::= cheh(i) ::= ncrd() ::= ncsq( ...) ::= spsh() /// // Signpost tracks #define DMUS_FOURCC_SIGNPOST_TRACK_CHUNK mmioFOURCC( 's', 'g', 'n', 'p' ) struct ioDMSignPost { MUSIC_TIME m_mtTime; DWORD m_dwChords; WORD m_wMeasure; }; ///* // 'sgnp' ( //sizeof ioDMSignPost, followed by a number of ) /// // Personality tracks #define DMUS_FOURCC_PERF_TRACK_LIST mmioFOURCC('p', 'f', 't', 'r') #define DMUS_FOURCC_PERF_REF_LIST mmioFOURCC('p', 'f', 'r', 'f') #define DMUS_FOURCC_TIME_STAMP_CHUNK mmioFOURCC('s', 't', 'm', 'p') ///* // LIST('pftr' ( // some number of ) // LIST('pfrf' ( ) // 'stmp' ( // time:DWORD ) /// */ #endif