Solved

How to determine play length of a MIDI file?

Posted on 1998-04-05
2
325 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
2 Comments
 
LVL 6

Accepted Solution

by:
clifABB earned 100 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now