OpenMIDIProject

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

Japanese | English | Chinese


MIDI clock measurement library "MIDIClockLibrary" (DLL)

"MIDIClockLibrary" is free, open source library for measuring time and tick count. MIDIClock has a self-timer and can keep current millisecond, tick count, tempo and clock speed. It can be started and stopped like stopwatch. You may get or set current millisecond, tick count, tempo, and clock speed. It provides essential functions to access each value in MIDIClock which keeps MIDI's timing.

/* get current time[msec] and current tick for 3 sec. */
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include <MIDIClock.h>
int _tmain () {
	long lMilliSec = 0;
	long lTickCount = 0;
	MIDIClock* pMIDIClock = MIDIClock_Create (MIDICLOCK_MASTERTPQNBASE, 120, 60000000/100);
	if (pMIDIClock == NULL) {
		_tprintf (_T("MIDIClock_Create failed.\n"));
		return 0;
	}
	MIDIClock_Start (pMIDIClock);
	while (lMilliSec < 3000) {
		lMilliSec = MIDIClock_GetMillisec (pMIDIClock);
		lTickCount = MIDIClock_GetTickCount (pMIDIClock);
		_tprintf (_T("%6d[msec]、%6d[tick]\n"), lMilliSec, lTickCount);
		Sleep (10);
	}
	MIDIClock_Stop (pMIDIClock);
	MIDIClock_Delete (pMIDIClock);
	pMIDIClock = NULL;
	return 1;
}
Name OS FileName Relase day Size
■MIDIClockLibrary7.0 Windows 7 / 8.1 / 10 MIDIClockLib7.0.zip 2021/08/15 544KB
■MIDIClockLibrary1.0 Windows XP / Vista / 7 / 8.1 MIDIClockLib1.0.zip 2014/04/29 288KB
■MIDIClockLibrary0.9 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIClockLib0.9.zip 2012/09/30 181KB
■MIDIClockLibrary0.8 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIClockLib0.8.zip 2009/07/05 181KB
■MIDIClockLibrary0.7 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIClockLib0.7.zip 2009/04/07 133KB
■MIDIClockLibrary0.6 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIClockLib0.6.zip 2008/07/26 137KB
■MIDIClockLibrary0.5 Windows 95 / 98 / ME / 2000 / XP / Vista / 7 MIDIClockLib0.5.zip 2008/03/31 132KB


(C)2002-2023 kuzu OSDN