I want to develop a karaoke player in Java that works with kar files. I got it to play the song, but I coundn't make it read the lyric information from the file. I've searched a lot, but I coundn't find any clue about how kar files work.
How can I do it? I appreciate some example.
Thanks.
I don't think there is a Java library for that so you'll have to write it on your own code.
First, you need to know the inner structure of a .kar file. Since these files are so small, they're probably some kind of text files. Try opening one of them with your text editor and see what it looks like. Then you'll know how to process it.
Apologies as I don't have a definitive answer for you. I have seen several discussions about this but no real solid solutions. Here are a couple links to others' discussions on the topic. It seems to be a much more complicated task than one might imagine, as it is an uncommonly used file type. From what I know, it consists of MIDI data, albeit with slightly different meta data.
Reading lyrics information from a .kar file
How to read MIDI file in C#?
Can you open the .kar file in a text editor? What does it give you?
The best I could find is this:
"KAR"
Origin: The Company Tune 1000 A file kar (kar) is in fact, a midi
file, but whose words are standardized in events meta of the type
TEXT. The texts starting with # are additional indications compared to
the words. Example:
#L specifies the language of the words
#I any additional information
#T information of title
#KMIDI KARAOKE SPINS information of copyright
and type of file
Several lines of titles and information can be present. KaraWin
extracts information from titles to post them. The text even has a
very simple format to him: \ indicates a page break, /a return
indicates has the line
Source.
Besides that, according to Wikipedia, XBMC is an open source program that supports kar files. Since it's an open source project, you can download its code. If you are really interested, you can try searching among its 10k+ files (in C, not Java), how they do it. Maybe you can ask them or in their forum for a little bit of guidance.
You can also try in this yahoo group about karaoke software.
Related
I have searched a lot before asking that question. I have a program(java) which crawls some wep pages and trying to find some .doc and .pdf files and it can download them but only one .pdf or .doc can cover up to 3-4mb which is not good because there are millions of files.. so I decied to extract their text without downloading the whole file. Basically, I need to see pdf or doc file online and download their text only but I could not figure out how to do that. If necessary I can provide my code.
Edit:This question can be closed now since I got the idea and (no)solution.
Thanks for help.
And What's up with those downgrades on question ?
That is not possible. You can only start extracting the document once you download the bytes.
(unless you also have control over the server, you could do the extraction server-side and provide a txt download link)
Reading a file from a website on the Internet without downloading it is impossible.
If you have control of the server you could write a web service that can parse the files on demand and extract the parts you are interested in, which would then be sent to the client.
If not, and if you're up for a more challenging problem, you could write an HTTP client that starts downloading the file and parses it on the fly, downloading only as much as you need to extract the part(s) you need. This might or might not be feasible (or worthwhile) depending on where in the files the "interesting" bits were located. If they're close to the beginning in most cases then you might be able to reduce the download size significantly.
A detailed explanation of how to accomplish this is probably beyond the guidelines for StackOverflow answer length.
I have a tiff image with many directories and subdirectories. I would like to navigate this tiff directory tree and import the image into a 2D array, so I can process this image. I am relatively new to java and cannot figure out how to do this. Will someone please reply to my question with a tutorial and examples of code?
Also, does anyone else find the java API documentation difficult to find, difficult to navigate, and somewhat sparse? I am trying to do this as a workaround for a processing sketch I am creating. Are there different workarounds?
Thank you.
Well i didn't even know a tiff could have directories and sub directories... But I would have a look in java File class as a start point to try to see those directories from your app. If you can see them, than you probably can parse them too.
Any one knows what .ptn file is and how to open that, just got the file from client and couldnt able to figure out what is this , searched a lot but no luck .
Also have the requirement from client that
my application should read this .ptn file from Java
is this possible ?
thanks
This seems rather obvious, but if a client is paying you to write code to read a file, you're entirely within your rights to ask what the file is, and where it comes from. If it's some internal or proprietary format, you can ask for documentation.
Of course, you might start by simply opening the file in a text editor, to see if it's just something trivial.
This wonderful web site is a repository of information about file formats; searching "PTN" brings up nothing, unfortunately, which suggests that it's nothing very common.
I have been looking through Adobe's File Format Specification for PSD (Photoshop files) and cannot figure out where the details of animation are stored. I am looking for things like looping setting (how many time the animation should loop), duration of each frame, the number of frames in the animation, and which layers are visible on each frame.
I have a basic parser that will read through the bytes in the PSD file and can extract some basic information from the file. For the purpose of the project I am working on, I would really like to extract the animation information.
If someone knows where this data is located in the psd file, it would be really great if you could give me some tips of how to get at it. --would save me a lot of time that would be spent reverse-engineering the file format!
I am using Java for this project, but could adapt it to Objective C, C++, or C# if that is going to make any difference (e.g. in case there is already an existing parser that gets this information from a psd).
There's a PSD plugin for Paint.NET which is Open-Source. You might want to take a look at for starters:
http://frankblumenberg.de/doku/doku.php?id=paintnet:psdplugin#download
I'm working on a java project and i have to read some files like these:
- EntryID.data
- EntryID.index
- KeyText.data
- KeyText.index
...
I think these files are used in a dictionary project but i can't find a any document about this. How can i read them or know the format of them ? Sorry for my english =.=
Thanks alot!
This looks like files from a database management system. One file to store the data, another one to store at least one index to speed up queries.
I'd start with a hex editor and look at the file. Sometimes, the content binaries gives a hint.
Another idea: look at the classpath and inspect property and resource files. Maybe you'll find a database driver or some config files with jdbc connect strings.
Google told me, that all four files are used by Apple's Dictionary.app. Have a look at this blog, this can point you in the correct direction.
Last note - reading undocumented binaries is a challenge. I usually start with 010 Editor to analyse the datastructure and develop a java based test tool to read the data. It's some sort of try and error evolutionary process.
Well, this is kinda difficult. data could mean anything.
You could try the UNIX utility file or open the file with a hex editor and look for interesting strings (the utility strings is helpful for that too).
Some information is in info.plist.
KeyText.data is sometimes compressed using zlib. 78 9C is well-known zlib-header so you can decompress when you find it. Size of decompressed entry comes before compressed entry.
Size of entry comes before entry of array.
C# library is in https://github.com/kurema/MacDictionaryGeneral. But *.index is too difficult to understand and implement. info.plist says *.index is trie index which is not enough information to understand fully.