Renaming Mide files to include element from File Properties

J

Jack Maxwell

Hope someone can help here. My brother has asked me if I can assist in
renaming about 1500 midi files which are associated with a programm called
Cubase SE. With that software installed he can click on the file
Cm9146.mid and on the Properties tab there is details tab which lists
various properties the one he wants is Sequence Name the actual song name
e.g. 'Penny Lane'.
What he wants me to do (if I can) is rename the .mid file to be
PennyLaneCm9146.mid.

I am familiar (definitely not expert) with Visual Studio and have 'played'
with VB, but I dont have a clue where to start with this.
Would it be possible to do this? How would I access these properties? Any
assistance and code sample would be greatly appreciated.

Many thanks
Jack
 
O

Oenone

Jack said:
I am familiar (definitely not expert) with Visual Studio and have
'played' with VB, but I dont have a clue where to start with this.
Would it be possible to do this? How would I access these
properties? Any assistance and code sample would be greatly
appreciated.

I don't know how you could interact with the properties that Windows
displays, but it should be quite possible to read the title out from the
MIDI file yourself.

It's maybe going to be a bit complex if you're not familiar with binary file
manipulation.

You can find file specifications for .MID files here:

http://www.wotsit.org/list.asp?search=mid&button=GO!

One of the "meta" events in a MIDI file is event 03, which contains the song
title. In order to extract it you will need to open the file, parse through
the data until you find the track and the locate the title event within the
track. That should give you the information you need to extract the title
from the file.

Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top