OpenMIDIProject

Home | News | Forums | Documentations | FAQ | Links | Contributors | Author

Japanese | English | Chinese


MIDI instrument definition library "MIDIInstrumentLibrary" (DLL)

"MIDIInstrument library" is free, open source library for creating and editing MIDI instrument definition. It enables you to create and delete MIDI instrument definition, import Cakewalk's Instrument Definition files (*.ins), add, remove, get and set tone names, control-change names, and so on. It provides functions to access each element in MIDI instrument definition.

/* Get tone name list from Cakewalk's instrument definition file. */
#include <stdio.h>
#include <tchar.h>
#include <MIDIInstrument.h>
int _tmain () {
	MIDIInstrument* pMIDIInstrument = NULL;
	MIDIInstrumentDefinition* pMIDIInstrumentDef = NULL;
	MIDIPatchNameTable* pMIDIPatchNameTable = NULL;
	TCHAR szTitle[256];
	TCHAR szName[256];
	long j = 0;
	long ret = 0;
	/* Load instrument definition file */
	pMIDIInstrument = MIDIInstrument_Load (_T("SC-8850.ins"));
	if (pMIDIInstrument == NULL) {
		_tprintf (_T("MIDIInstrument_Load failed.\n"));
		return 0;
	}
	/* about each instrument definition including this file */
	forEachInstrumentDefinition (pMIDIInstrument, pMIDIInstrumentDef) {
		/* show instrument definition name */
		MIDIInstrumentDefinition_GetTitle (pMIDIInstrumentDef, szTitle, 255);
		_tprintf (_T("[%s]\n"), szTitle);
		/* get patch name table of bank select No.= 0(CC#0=0,CC#32=0) */
		pMIDIPatchNameTable = MIDIInstrumentDefinition_GetPatchNameTable 
			(pMIDIInstrumentDef, 0);
		if (pMIDIPatchNameTable) {
			/* show this patch name table's title */
			MIDIPatchNameTable_GetTitle (pMIDIPatchNameTable, szTitle, 255);
			_tprintf (_T("    PatchNameTable(0)=%s\n"), szTitle);
			/* show this patch name table's each tone names. */
			for (j = 0; j < 128; j++) {
				ret = MIDIPatchNameTable_GetName 
					(pMIDIPatchNameTable, j, szName, 255);
				if (ret > 0) {
					_tprintf (_T("        %d=%s\n"), j, szName);
				}
			}
		}
	}
	MIDIInstrument_Delete (pMIDIInstrument);
	pMIDIInstrument = NULL;
	return 1;
}
Name OS FileName Release day Size
■MIDIInstrumentLibrary8.0 Windows 7 / 8.1 / 10 / 11 MIDIInstrumentLib8.0.zip 2024/01/21 1.47MB
■MIDIInstrumentLibrary7.0 Windows 7 / 8.1 / 10 / 11 MIDIInstrumentLib7.0.zip 2021/08/15 760KB
■MIDIInstrumentLibrary0.7 Windows XP / Vista / 7 / 8.1 MIDIInstrumentLib0.7.zip 2014/04/29 324KB
■MIDIInstrumentLibrary0.6 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIInstrumentLib0.6.zip 2012/02/19 216KB
■MIDIInstrumentLibrary0.5 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIInstrumentLib0.5.zip 2010/02/28 196KB
■MIDIInstrumentLibrary0.4 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIInstrumentLib0.4.zip 2009/05/04 192KB
■MIDIInstrumentLibrary0.3 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIInstrumentLib0.3.zip 2008/03/31 85KB


(C)2000-2025 kuzu All rights reserved.