CSequencer class and Midi Player sample | CodeGuru

CSequencer class and Midi Player sample

  CSequencer The CSequencer class is the second piece of my MCI wrapper class hierachy after CCdAudio. Unfortunately, It is not well documented yet. Class Constants Time formats for SetTimeFormat() FormatMilliseconds FormatSmpte24 FormatSmpte25 FormatSmpte30 FormatSmpte30drop FormatSongPtr Specific status items for GetStatus() StatusCurrentTrack StatusDivisionType StatusLength StatusMaster StatusOffset StatusPort StatusPosition StatusSlave; StatusStart StatusTempo Specific info items for […]

Written By
CodeGuru Staff
CodeGuru Staff
Nov 14, 1998
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

The simple CD player dialog 

CSequencer

The CSequencer class is the second piece of my MCI
wrapper class hierachy after CCdAudio.
Unfortunately, It is not well documented yet.

Class Constants

	Time formats for SetTimeFormat()
	FormatMilliseconds
	FormatSmpte24
	FormatSmpte25
	FormatSmpte30
	FormatSmpte30drop
	FormatSongPtr

	Specific status items for GetStatus()
	StatusCurrentTrack
	StatusDivisionType
	StatusLength
	StatusMaster
	StatusOffset
	StatusPort
	StatusPosition
	StatusSlave;
	StatusStart
	StatusTempo

	Specific info items for GetInfo()
	InfoCopyright
	InfoFile
	InfoName

	Constants for SetPort()
	SeqNone
	MidiMapper

	Constants for SetMaster() and SetSlave()
	SeqSmpte
	SeqMidi

	Constats for SetSlave()
	SeqFile

	Values returned by GetStatus(StatusDivisionType)
	DivPpqn
	DivSmpte24
	DivSmpte25
	DivSmpte30
	DivSmpte30drop

Member Functions

	Open/Save
	DWORD Open(LPCSTR lpszFileName, BOOL bShareable = FALSE);
	DWORD Save(LPCSTR lpszFileName);

	Play/Stop/Pause
	DWORD Play(BOOL bAsync = TRUE);
	DWORD Play(DWORD dwFrom, DWORD dwTo, BOOL bAsync = TRUE);
	DWORD Stop();
	DWORD Pause();
	DWORD Resume();

	Seek
	DWORD Seek(DWORD dwTo, BOOL bAsync = FALSE);
	DWORD SeekToStart(BOOL bAsync = FALSE);
	DWORD SeekToEnd(BOOL bAsync = FALSE);

	Device status items
	DWORD GetSongLength(DWORD dwTrack);
	DWORD GetNumberOfTracks();
	DWORD GetCurrentTrack();
	DWORD GetCurrentPos();
	DWORD GetStartPos();
	DWORD GetPort();
	DWORD GetTempo();
	DWORD GetOffset();
	DWORD GetMaster();
	DWORD GetSlave();
	BOOL IsReady();

	Track info
	DWORD GetTrackPos(DWORD dwTrack);
	DWORD GetTrackLength(DWORD dwTrack);

	Get/Set time format
	DWORD GetTimeFormat();
	DWORD SetTimeFormat(DWORD dwTimeFormat);

	Set
	DWORD SetTempo(DWORD dwTempo);
	DWORD SetPort(DWORD dwPort);
	DWORD SetOffset(DWORD dwOffset);
	DWORD SetMaster(DWORD dwSynchType);
	DWORD SetSlave(DWORD dwSynchType);

Author’s note

This is a work in progress: I ‘m continuously working to
improve it. I’ll be grateful to you if you mail me your comments,
advice, or bug apparition reports!.

Download source – 68 KB

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.