Solved

How to determine play length of a MIDI file?

Posted on 1998-04-05
2
333 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 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

737 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