Jump to content

how to control midi


Recommended Posts

  • 3 years later...

Little example playing a MIDI file:

$MIDFile = @WindowsDir & "\media\canyon.mid"
_MCIExecute( "play " & $MIDFile )
Sleep(5700)
_MCIExecute( "stop " & $MIDFile )

Func _MCIExecute( $mciCmd )
    DllCall( "winmm.dll", "int", "mciExecute", "str", $mciCmd)
EndFunc
Sorry for opening up such an old post but it's relevant.

So how can I determine how long the file is, 5700 needs to be changed for each midi file I would select to play. Also, I'd like to be able to have a midi file loop continuously until I request it to stop. Any way to do this? Seems like the midi.udf isn't for playing .mid files.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...