[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Learning java, question about the possibility of a specific task I want to accomplish.

Im fluent in C, but new to java, just getting my feet wet. In my line of work I frequently process audio files using various audio applications. What I would like to do, with java, is create a GUI to help me out. Currently for each file I process I must open my audio application, find the file, input the new file name to save as, and input the length of the sound bite or track I am processing so the audio processor knows when to stop. I frequently have long lists of audio for commercials and jingles and occasionally just plain music. Having to stop and wait for each sound file to finish so i can input the settings for the next one is a real time killer. So my question is this, is it possible to creat a GUI that will take in a text file of file names, open my audio program, retrieve file length from the sound file (possibly windows media player), input save to information, input file length, and finally process file, then repeat for each entry in the text file. The biggest problem i can see is the file length information. Im not looking for direct solutions here, not yet anyhow, as I am learning java and would like to write this myself, but would definitely like a yes or no on the project being possible. Some GENERAL pointers to the major aspects would also be appreciated. Im not looking for any code snippets. Thanks.
0
sdholden28
Asked:
sdholden28
  • 6
  • 5
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
>> The biggest problem i can see is the file length information.

Java has a File class in java.io package which can give you the length of a file.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
0
 
sdholden28Author Commented:
with the file length, I should have clarified. What I actually need is the time it takes for the audio file to play, which is provided by the audio player. a 4mb audio file might take 3 minutes to play, or 1 minute depending on the compression. My audio apps require this length of time to accurately stop processing and save the new file. Having the gui acquire this value and input it into my app is what i see as the biggest potential problem. Am I wrong?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sdholden28Author Commented:
moreover, the JFileChooser looks great, but I actually need the gui to operate the audio app if that makes sense. I.e. the audio app presents an open box, and then a save to box for the analyzed file. I want the Gui to input into the app from a batch list of file names. Again just wanting to know if this is all possible right now. If its not I won't put forth the effort.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Well, I am not sure if that is possible as I have not worked with audio files using Java very much. Wait for other experts to comment.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> I.e. the audio app presents an open box, and then a save to box for the analyzed file.

That can be done using JFileChooser.

>>  I want the Gui to input into the app from a batch list of file names.

The GUI can send the list of file names in an array-list.
0
 
sdholden28Author Commented:
mayan,

Thanks for you help so far, teriffic insight. Im doing some research myself on the audio file play length issue, but not having much luck so far, so thats still an issue. Also, on what level can I communicate with my audio application? For this to work there will have to be mouse clicks or keyboard strokes emulated to get through the audio application. can this be done, or is the communication behind the scenes so this doesn't have to be done?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> For this to work there will have to be mouse clicks or keyboard strokes emulated to get through the audio application.

What do you want to do on those mouse clicks/ keyboard strokes? Do you want to use short cuts for play/ pause/ full-screen, etc?
0
 
sdholden28Author Commented:
I'll just start at the top, using my favorite audio app as an example. When I open my analyzer, i must click once to get the file open dialog, again to "ok" it, again to "ok" the save to option, again to input the file length, again to "ok" the file length, again to begin the process.
0
 
objectsCommented:
an existing audio player may be a good starting point/kick start for you.

http://www.javazoom.net/jlgui/jlgui.html
0
 
sdholden28Author Commented:
While mayankeagle did not provide a direct solution, he (or she) did provide a wealth of knowledge and suggestions which ultimately allowed me to solve the problem. Therefore, I have awarded points to mayankeagle.

Thanks.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now