quixote79 Posted August 11, 2005 Posted August 11, 2005 (edited) I want to play sound using midi interface. Is there any method of playing, reading, saving midi(file)? Edited August 11, 2005 by quixote79
Josbe Posted August 11, 2005 Posted August 11, 2005 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 AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
quixote79 Posted August 12, 2005 Author Posted August 12, 2005 Can I play specified notes and specified instruments without using a midi file?
Valuater Posted August 12, 2005 Posted August 12, 2005 Can I play specified notes and specified instruments without using a midi file?<{POST_SNAPBACK}>maybe check "SoundPlay" in help??8)
quixote79 Posted August 12, 2005 Author Posted August 12, 2005 maybe check "SoundPlay" in help??8)<{POST_SNAPBACK}>Soundplay can play typically a WAV or MP3 not Midi.Can you give me a hint about midi function like this.playmidi($note(s), $duration, $instrument)
Valuater Posted August 12, 2005 Posted August 12, 2005 Soundplay can play typically a WAV or MP3 not Midi.Can you give me a hint about midi function like this.playmidi($note(s), $duration, $instrument)<{POST_SNAPBACK}>sorry, not a clue8)
wysocki Posted June 16, 2009 Posted June 16, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now