Jump to content

how to Dllcall() for MIDIFILE.DLL


Will66
 Share

Recommended Posts

I found MIDIFILE.DLL and would like some help on how to call its functions via DllCall().

Whats good about the MIDIFILE.DLL?

the main functions MidiReadFile() - parse/convert .midi files to readable text into memory or plain text file,

the text file can then be edited, or create a new midi in human readable (text) format

then MidiWriteFile() - parse/converts the tex file back into midi format

I've tried, but got no experience using autoit dllcall function, help on dllCall for these 2 functions would be great.

MIDIFILE.DLL

MidiReadFile() and MidiReadFile2() parse midi to text.

From the midifile manual:

Template

long MidiReadFile(MIDIFILE * MidiFile);

Description

Opens and reads in a MIDI file, calling various callbacks in your application to aid in parsing the file. When this function returns, the MIDI file will have been completely parsed/loaded.

MidiWriteFile() and MidiWriteFile2()

Template

long MidiWriteFile(MIDIFILE * MidiFile);

Description

Opens (creates) and writes a MIDI file, calling various callbacks in your application to aid in saving the file. When this function returns, the MIDI file will have been completely saved.

Link to comment
Share on other sites

You can Run() that MidiDsm.EXE with command line parameters, this way you would avoid the trouble of dealing with that dll altogether. From what I understand there would have to be more stuff involved than just DllCall'ing MidiReadFile... you have to provide all the callback functions that will actually parse the file.

Edited by Siao

"be smart, drink your wine"

Link to comment
Share on other sites

You can Run() that MidiDsm.EXE with command line parameters, this way you would avoid the trouble of dealing with that dll altogether. From what I understand there would have to be more stuff involved than just DllCall'ing MidiReadFile... you have to provide all the callback functions that will actually parse the file.

Thanx for taking a look Siao :),

yeah, i'm actually using the two exe's from here at the momment: http://www.fourmilab.ch/webtools/midicsv/

Converts to csv and back.

figured using the dll would be more appropriate, anyway maybe one of those beep songers will see the value in this for creating/editing midis on the fly with all the instrument and multiple note possiblities midi has it would be good for games too i guess.

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...