Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Does anyone have a dll for extracting midi data from a midi file?

Author
Message
Vidiot
20
Years of Service
User Offline
Joined: 15th May 2006
Location: TN
Posted: 19th Nov 2010 00:47
I'm working on a program that pulls note, channel and velocity information out of a midi file. Everything else except tempo info can be ignored.

It occurred to me that someone may already have a dll with these functions designed to work with DBPro so I thought I would ask. I have the enhancement pack that can open and play midi files but theres nothing there to simply extract the data and use it. What I really need is a simple way to convert a midi file to an event list.

I've been trying to do it myself but the main problem is that there are so many different kinds of midi messages in a midi file and each can have a different length so there's no way to simply ignore the irrelevant stuff. You have to trap for every possible message in order to know how many bytes to skip.

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 21st Nov 2010 02:29
I've got a couple of command line programs from years ago. The files were freely distributable at the time and I don't think that has changed. I think you can contact the author here.

They are really nice and simple apps that convert midi files to text files (easily parsable) and those text files back to midi files. Hope they are helpful.

Enjoy your day.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Nov 2010 13:08
Shame it doesn't work on 64bit windows.
Vidiot
20
Years of Service
User Offline
Joined: 15th May 2006
Location: TN
Posted: 22nd Nov 2010 18:23
@Latch - Thanks very much! I'll try'em out.

@Green Gandalf - Luckily I'm up to my armpits in older NON-64 bit PCs and old laptops. I used to have one "portable" PC which was about the size of a 19" TV.

The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 22nd Nov 2010 20:05
@Vidiot
I've recompiled the programs for 32 bit so they should function in both a 32 bit and a 64 bit platform. They seem to work on a 32 bit system at least directly from the command line. I'll include the updated version in an attachment.

@Green Gandalf
Could you test these new versions to see if they work for you?

Enjoy your day.
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 22nd Nov 2010 22:59 Edited at: 22nd Nov 2010 23:04
@Latch - nicely done!
I can run the program in Windows 7 Home Premium 64bit
in a command prompt window, usage:
mf2t midifilename outputfilename

Thanks
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 25th Nov 2010 04:08
@BillR

Thanks. So then they should work by calling them from DBPro with execute file

Enjoy your day.
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th Nov 2010 07:42
I have never tried that, good luck.

I have a great interest in MIDI usage in DBPro, I would love to
here what you want to do with your MIDI data.

Post it here, or send me an email
Thanks

Login to post a reply

Server time is: 2026-07-21 12:51:14
Your offset time is: 2026-07-21 12:51:14