Results 1 to 2 of 2

Thread: Looping midi without a controll??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184

    Post

    Im using MciSendString to play a midi, How can I loop it please?
    Thankyou

  2. #2
    Lively Member
    Join Date
    Aug 1999
    Location
    Malaysia
    Posts
    108

    Post

    Ok Dayo312 you can try this code:
    General Declarations
    Dim StatusMusic as Boolean

    Private Sub Form_Load()
    Dim i As Long
    Dim d As String
    d = "C:\Midis.mid"
    StatusMusic = True
    i = mciSendString("open sequencer!" & d & " alias midi", "", 0, 0)
    i = mciSendString("play midi", "", 0, 0)
    If i Then MsgBox "Error! No midi file in location" & " => " & d
    End Sub

    Private Sub Timer1_Timer()
    Dim MCIStatusLen As Integer
    Dim MCIStatus As String
    Dim i As Long
    If StatusMusic = True Then
    MCIStatusLen = 15
    MCIStatus = String(MCIStatusLen + 1, " ")
    i = mciSendString("STATUS midi MODE", MCIStatus, MCIStatusLen, 0)
    If UCase(Left$(MCIStatus, 7)) = "STOPPED" Then
    i = mciSendString("PLAY midi FROM 0", "", 0, 0)
    End If
    End If
    End Sub



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width