aspose file tools*
The moose likes Java in General and the fly likes Midi file to Hex ASCII conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Midi file to Hex ASCII conversion " Watch "Midi file to Hex ASCII conversion " New topic
Author

Midi file to Hex ASCII conversion

Manoj Tyagi
Ranch Hand

Joined: Jun 11, 2002
Posts: 35
Hi, all
Can any body tell how a midi file can be converted
to Hex ASCII (or anu other format like rttl).what is the exact format of midi file & how it can be
read in proper manner (upto what extent java can
solve this problem).
Or there are any other sites which can help me out
in solving this problem.
Any kind of help would be highly appreciable.
Thanks,
ur friend in trouble,
Manoj Tyagi
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Manoj - I don't know much about MIDI files; I suggest googling "midi file format". As for hex output, Java doesn't seem to have a nice built-in display mechanism for this (other than Integer.toHexString(), which has lousy formatting for your purposes). But it's fairly easy to do yourself, and I happen to have some code lying around which is similar to what you probably want. It converts an array of bytes into hex with spaces and newlines inserted at regular intervals for readability. Hopefully it will be of some use to you...


"I'm not back." - Bill Harding, Twister
Manoj Tyagi
Ranch Hand

Joined: Jun 11, 2002
Posts: 35
Hi Jim
Thanks for ur reply. Actually my purpose is little bit different. Actually i want to convert midi file format to RTTTL format (spec. by nokia) & then convert that RTTTL to Hex string which can be sent to mobile handsets so that user listens the song / tone.
I have tried googling (few midi sites & nokia site) but i am not able to find the enough details of RTTTL format (its structure & meaning).
If you can help me in any way, please right.
Thanks again.
Manoj Tyagi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Midi file to Hex ASCII conversion