We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to make a front end for LAME. I'm totally lost on how to communicate with the Library. I want to make a Windows version first and then a OSX version, although I'm a Linux user.
Basically, I'm sick of all the badly encoded podcasts which I regularly listen to. I am going to fix this issue! It's costs bandwidth, therefor electricity, therefor places a burden on the environment. Also it just annoys me, and my bandwidth is limited since I must use a VPN to get through the great firewall of China.
I'm an experienced coded, but, again, I'm totally lost on how I might use Processing with LAME. Would I have to tie in the source or can I tie in the binary object like the .dll under windows.
Please help, thank you!
Answers
https://forum.Processing.org/two/discussions/tagged/native
Thank you for the reply. I see that I am suppose to:
So I actually have to modify and compile my own version of LAME?
There's no way for me to just pass parameters to the binary?
How do other programs call LAME without their own version of the binary?
Like some how call: "lame -q0 -V 6 -p -m j --replaygain-accurate input.wav output.mp3"
Sorry if these questions seem obtuse. I've never used other programs like this before.
https://Processing.org/reference/launch_.html
https://forum.Processing.org/two/discussions/tagged?Tag=launch()
...me ...like ...
Thank you! fist bump
did you not think that someone had perhaps done this before and googled for 'java lame'?
http://lamejb.sourceforge.net/ java interface to the lame libraries
http://openinnowhere.sourceforge.net/lameonj/ ditto
https://github.com/nwaldispuehl/java-lame a port of lame to java
you probably want one of the first two. and they look outdated, almost, but then lame hasn't really changed in the last few years so they are probably ok.
I would look into ProcessBuilder. I wrote a small program that uses ProcessBuilder to run a binary called Potrace (which Processing looks for in the data folder).
The application looks for a png in the data folder, loads it, and then saves it as a black and white bmp, which is the format that Potrace requires. Then an instance of Potrace is started with ProcessBuilder using commandline specific to Potrace. Potrace then generates an svg file using the parameters put forth in the commandline. The application then deletes the bmp, which was only a temporary file needed for Potrace.
I know you are not looking to trace an image, but the steps are the same, I presume, with Lame. Here is the code I used to do this:
@Bird what is the advantage of ProcessBuilder compared to use open with params?
Not a critique but serious question
Well, I'm certainly no expert, but I like the ability to define the process independent of the parameters of the actual program, i.e.- error file. I'm still learning about ProcessBuilder (and Process), but for me it allows more options. That might be of use for your chess engine.
Thank you!
Exactly ....
I've already finished a Windows version a couple days ago... I'll make a Linux version, and a mac version later. It's mostly for podcasts and audiobooks.
https://sourceforge.net/projects/tired-of-bad-encoding/
off topic: the solution for my chess-engine problem was to use ProcessBuilder
thanks @Bird !!! Life saver.