How can i use this code
But make the midi start at 22 seconds ??Code:ret = mciSendString("open " & "c:\midi\" & FileName & ".mid type sequencer alias canyon", 0&, 0, 0)
ret = mciSendString("play canyon", 0&, 0, 0)
:)
Printable View
How can i use this code
But make the midi start at 22 seconds ??Code:ret = mciSendString("open " & "c:\midi\" & FileName & ".mid type sequencer alias canyon", 0&, 0, 0)
ret = mciSendString("play canyon", 0&, 0, 0)
:)
Put the following code in a Timer and make the Inverval 22000
Code:Private Sub Timer1_Timer()
ret = mciSendString("play canyon", 0&, 0, 0)
Timer1.Enabled = False
End Sub
Not end at 22 seconds.
I want the midi to start at
22 seconds.
And timers suck.. Use Gettickcount :)
That code will play it in 22 seconds. The mciSendString's open command will open the MIDI. That actual playing of it is done when you use the play command, thus when the 22 seconds is up, the MIDI will play.
Yes, GetTickCount is better than Timers but QueryPerformanceCounter is better than GetTickCount.
Yeah thanks but I need the midi to start playing
right away, is there anyway to do that?
Right away??? I thought you said 22 seconds? To make it play right away, the code you were using above was fine.
lol no..
Listen carefully.
The midi will play for 2 minutes.
And I would Like To play for 1 1/2 minutes .
I want it to start AT 22 seconds (Not IN 22 seconds)
I play the midi from the beginning, and then
I want to be able to stop it, and later
continue from where it left off.
How do you do that?
Try this. This pauses the MIDI. To play it again, just use the play command.
Code:ret = mciSendString("pause canyon", 0&, 0, 0
Thanks..
Sounded like a good idea but this is
what occured.
I want the midi music to pause and then
ANOTHER midi begin to play, and then
after awhile, the first midi unpause.
But a error occurs because the midi
device is busy.
Any other way to do it?
Thanks..
You can only play one MIDI at a time. I'll see if i can find a way to solve your problem. A Multimedia Control Control might do it.