Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to determine play length of a MIDI file?

Posted on 1998-04-05
2
Medium Priority
?
345 Views
Last Modified: 2012-06-27
How do I determine the length of a midi file in seconds, milliseconds or whatever is possible? I would like to be able to display the time remaining and update the display using the MCI StatusUpdate event. Any help will be greatly appreciated.
0
Comment
Question by:Foyal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
clifABB earned 300 total points
ID: 1460426
The MCI has a 'Length' property which specifies the length of the file as defined by the 'TimeFormat' property:

MMControl1.Command = "Open" 'Must be open before you can get the length
MMControl1.TimeFormat = mciFormatMilliseconds
Debug.Print MMControl1.Length
0
 
LVL 3

Author Comment

by:Foyal
ID: 1460427
I think this will work. I have tried it and everything seems OK. The problem I had was that I set the .TimeFormat property before opening the file and it won't work that way. Thanks for your help!
Foyal
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question