|
-
Jun 8th, 2000, 05:22 AM
#1
Thread Starter
Addicted Member
How can i use this code
Code:
ret = mciSendString("open " & "c:\midi\" & FileName & ".mid type sequencer alias canyon", 0&, 0, 0)
ret = mciSendString("play canyon", 0&, 0, 0)
But make the midi start at 22 seconds ??
-
Jun 8th, 2000, 05:29 AM
#2
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
-
Jun 8th, 2000, 05:33 AM
#3
Thread Starter
Addicted Member
Not end at 22 seconds.
I want the midi to start at
22 seconds.
And timers suck.. Use Gettickcount
-
Jun 8th, 2000, 06:25 AM
#4
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.
-
Jun 8th, 2000, 07:02 AM
#5
Thread Starter
Addicted Member
Yeah thanks but I need the midi to start playing
right away, is there anyway to do that?
-
Jun 8th, 2000, 07:07 AM
#6
Right away??? I thought you said 22 seconds? To make it play right away, the code you were using above was fine.
-
Jun 8th, 2000, 08:43 AM
#7
Thread Starter
Addicted Member
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?
-
Jun 9th, 2000, 02:57 AM
#8
Try this. This pauses the MIDI. To play it again, just use the play command.
Code:
ret = mciSendString("pause canyon", 0&, 0, 0
-
Jun 9th, 2000, 08:52 AM
#9
Thread Starter
Addicted Member
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..
-
Jun 10th, 2000, 10:24 PM
#10
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|