Purpose: Keeps information of a specific high
level DLS 1.0/2.0 instrument
Remark: The returns values are based on the DirectX9
constants except DM_FAILED
The functions raise a CDMusicException
exception type with the error
data.
Member functions:
Properties:
Function: SetPatch
Declaration: HRESULT CInstrument::SetPatch(DWORD
dwdstPatchMidi)
Purpose: Sets the destination midi
program (patch) of the instrument in a wave-table
synthesizer
Parameters:
dwdstPatchMidi
[in]: Number of the destination midi
program
Returns:
S_OK |
Succeeds |
Throws:
DMUS_E_NOT_INIT | A required object is not initialized or failed to initialize |
DM_FAILED | Error, see DirectMidi causes |
DMUS_E_INVALIDPATCH | No instrument in the collection matches the patch number |
Function:
SetNoteRange
Declaration: HRESULT CInstrument::SetNoteRange(DWORD dwLowNote,DWORD dwHighNote)
Purpose: Sets the
MIDI note range where the instrument must respond
Parameters:
dwLowNote [in]: A MIDI value between 0 and 127
dwHighNote [in]: A MIDI value between 0 and 127
Returns: void
Throws: none
Function:
GetNoteRange
Declaration: HRESULT CInstrument::GetNoteRange(LPDWORD pdwLowNote, LPDWORD pdwHighNote)
Purpose: Gets the MIDI note range where the instrument is
respondonding
Parameters:
pdwLowNote [out]: A MIDI value between 0 and 127
pdwHighNote [out]: A MIDI value between 0 and 127
Returns: void
Throws: none