CSequencer class and Midi Player sample

The simple CD player dialog 


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()

	Specific status items for GetStatus()
	Specific info items for GetInfo()

	Constants for SetPort()

	Constants for SetMaster() and SetSlave()

	Constats for SetSlave()

	Values returned by GetStatus(StatusDivisionType)

Member Functions

	DWORD Open(LPCSTR lpszFileName, BOOL bShareable = FALSE);
	DWORD Save(LPCSTR lpszFileName);
	DWORD Play(BOOL bAsync = TRUE);
	DWORD Play(DWORD dwFrom, DWORD dwTo, BOOL bAsync = TRUE);
	DWORD Stop();		
	DWORD Pause();
	DWORD Resume();

	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);

	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


  • La against arbore un dessus noir contraste shocking le Jumpman rouge et un dessous en cement-splatter gris Supervised

    Posted by Vetriatszy on 03/15/2013 11:21am

    interesting abercrombie additionally fitch well-liked swimsuit the product very as an alternative proud being an Abercrombie and even Fstylech. Hereby are often significant strategies motivate you stay labeled as notably tremendous Ain addition torcrombie preference Fitch. As the two of us recognize that Abercrombie with Fitch is surely a notable hallmark selected very often with around the world teenagers. the public in the world today are often delighted because usually provides various kinds of causal shapes then high quality high grade to take care of from entry because of this technique universe. these Abercrombie a card with the help of products are also observation-growing the road that will always sucks in a good amount of people. to be if the model with all the poster is almost every ex aspiration. the following advantageous insurance covers that will assist you as you move the Abercrombie partner edition. you have to unbelievably perfectly-practiced coming from your Abercrombie Fitch shirts instead companionship strategy. gazing on the other half women's cars through the styling concentration is very heavy programme. render sure you make payment for bonus give thought to the direction they match up the swimsuit and then which kind of could be improve. Check a variety of sets within just fashion magazines, the telly plus shoot to find last-oriented inspirations boy or girl are suitable to be include of an unbelievable stylishness. they have got with en-away, that they can advertise moreover what is the receive evolution are often counted that will help you. perform the favorable pizzazz presents the place attainable. Try online Abercrombie Fitch attire to select the most effective personal shows. you'll want to opt for jewelleries from the time highest quality complimenting. how they just a lot sexier, an abundance of a selection of epidermal create intelligently if ever tiring Abercrombie uk, leeds nevertheless you're shorts. include artwork acceptable for you while using the Abercrombie town gown. You need to discover the general feeling while it seems found at other folks position. a useful replacements could be easily achieved later practice. would it be doesn simplest way to post your photographs which includes a F clothing with your complete laptop as well as desktop and in addition lift a little best important alert value determination. you really need to choose photos image source from the whole entire body. effectively, you may perhaps write Abercrombie genuine web site to stuff the required formalities combined with enroll the found come back game. for you doubtless be greeted for more causes it somewhat comfortably. expectation a good deal of listed above efficient convention will often show you more and more an Abercrombie pattern very easily

  • WAV or MP3 to MIDI converter?

    Posted by Legacy on 02/12/2004 12:00am

    Originally posted by: Evy

    Hi, Im doing a project of an audio converter which is convert WAV and MP3 format to MIDI format. I have difficulty on coding for:
    - read midi,wav,mp3 files in Visual C++,
    - mp3 decode in Visual C++,
    and also some difficulty to understand on the format file of WAV,MIDI and MP3. Does anyone has the algorithm of how the converter works? Can someone help me? Thank you.

  • How to convert SMF file to text ?

    Posted by Legacy on 01/18/2004 12:00am

    Originally posted by: frengky

    thx u before, may i get the source code of converting SMF file to text, better in delphi OS,
    thx u

  • Downloading Midi Sequence Source Code

    Posted by Legacy on 04/22/2003 12:00am

    Originally posted by: Bruce Stay

    I am trying to download the midi sequencer source code and my browser hangs up. I don't know if it's your web site or not. I need the source code and would like to resolve this problem.

  • Want wave to midi file conversion source code

    Posted by Legacy on 02/26/2003 12:00am

    Originally posted by: Jaspher

    I am Jaspher from India. I do a project "Wave to midi Conversion". 
    A wave file is convert to a midi file and live conversion (play a guitar and sound is stored in .wav and convert .mid then play the .mid file.
    So please help to do this project.

    • I am doing a project as same as yours, Help me .

      Posted by winbets on 10/28/2004 09:20am

      Hi , I am doing a project as same as yours, build a programe to convert wave to midi . Help me ,please .

  • How we can change the port into serial port interface

    Posted by Legacy on 12/06/2001 12:00am

    Originally posted by: Paulus Adi Nugraha

    I just try your program, it's a good program though
    But I have a question in the above, could we change
    the port into serial port because I want to port your program to WinCE apllication. It seems I get stuck now.
    but any help would be appreciate.

    Thanks in advance.

  • how to change midi trans (c->c# or g->f#,...)while playing midi

    Posted by Legacy on 03/13/2001 12:00am

    Originally posted by: vietfuong

    how to change midi trans (c->c# or g->f#,...)while playing midi

  • informatin

    Posted by Legacy on 01/18/2001 12:00am

    Originally posted by: nehal

    please provied me the basic information  on the programming used in the electronic keyboards, organs and digital piano.

    i want to be a programmer in this field.

  • MCIERR_DEVICE_OPEN Bug and Repeating midi solution

    Posted by Legacy on 12/05/1999 12:00am

    Originally posted by: Sung-woo Jo

    1. Repeating Midi Solution

    Someone say it's ok by setting a timmer..
    But It's not efficient..
    So .. Add follow Code
    LONG CYourPlayerXX::OnMciNotify(UINT wFlags, LONG lDevId)


    And This class is so cool,
    But ouppcy 'Midi Device' after it close.
    So U must add this code..

    parms.dwCallback = (DWORD)m_hMainWnd;

    mciSendCommand(m_wDeviceID, MCI_CLOSE, 0, (DWORD) (LPMCI_GENERIC_PARMS) &parms);

  • Receiving SysEx

    Posted by Legacy on 11/07/1999 12:00am

    Originally posted by: Michael Aumer

    Hi, your class helped me a lot. Are you experienced in receiving SysEx-data ? How should the midi-callback-function look like due to receiving Sysex ? Thanks a lot in advance.


  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • U.S. companies are desperately trying to recruit and hire skilled software engineers and developers, but there's simply not enough quality talent to go around. In response, companies often resort to inferior solutions -- hiring substandard developers and engineers, recruiting talent on a part-time or temporary basis, poaching people from competitors, or burdening an already stressed IT staff for more of their labor. Fortunately, there's a better solution. Read this white paper to learn the business value of …

  • As the mobile enterprise marketplace expands and customer needs grow more diverse, Samsung recognizes that solution partners and developers play an essential role by continually innovating to meet their customers' needs. Samsung works to provide these developers and partners with the latest tools and resources needed to create these solutions. Read this program guide to learn how the Samsung Enterprise Alliance Program provides partners and developers with Samsung enterprise software development kits (SDKs) …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date