Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: I Have Decided To Go With Ape... (Read 26309 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

I Have Decided To Go With Ape...

Reply #25
Quote
No. FLAC doesn't have it. You can find that discussion in a recent thread if you do a search. The developer said it's easy to implement but no one got around to it. I guess fb2k player can do it if you have the cue sheet.

Hmm, well in that case, I'll stick with MAC.

No one answered my other question:
Quote
what is pipe enabled? and what does the -c4000 switch do?

I Have Decided To Go With Ape...

Reply #26
Quote
Quote
Also, is there a system similar to the APL files with FLAC? I've been playing with them in MAC and decided i like that system a lot -- it is just good sense to have one large file and a cue sheet.


No.  FLAC doesn't have it. You can find that discussion in a recent thread if you do a search. The developer said it's easy to implement but no one got around to it. I guess fb2k player can do it if you have the cue sheet.

APL isn't limited to Monkey's Audio format, foobar2000 can use APL files with flacs if foo_apl is installed. Same component can also create APL files from CUEs/FLACs with CUEs.

I Have Decided To Go With Ape...

Reply #27
A pipe (|) enables the output of one process to be directly fed to the input of another process.  In this case, the decoding of an ape file can be fed directly to the encoding of the ogg file without having to create a wav file between the decode and encode steps.  This only works if the two programs support "stdout" and "stdin" ("standard out" and "standard in").  The original MAC.exe does not.  You have to use a modified version that does.  You can get one here:
http://rarewares.hydrogenaudio.org/ogg.html
Look for "Lossless Codecs".
You'll also have to use "Oggenc2.2.exe", as oggenc does not support "stdout" and "stdin" either.  "Oggenc2.2.exe" is available on the same page as the "Lossless Codecs".


An explanation of "-c4000" can be found in the help from MAC.exe:

"--- Monkey's Audio Console Front End (v3.97) © Matthew T. Ashland ---
Proper Usage: [EXE] [Input File] [Output File] [Mode]

Modes:
    Compress (fast):      -c1000
    Compress (normal):    -c2000
    Compress (high):      -c3000
    Compress (extra high): -c4000
    Decompress:            -d
    Verify:                -v
    Convert:              -nXXXX

Examples:
    Compress:  mac.exe "Metallica - One.wav" "Metallica - One.ape" -c2000
    Decompress: mac.exe "Metallica - One.ape" "Metallica - One.wav" -d
    Decompress: mac.exe "Metallica - One.ape" - -d (to stdout)
    Verify:    mac.exe "Metallica - One.ape" -v
    (note: int filenames must be put inside of quotations.)"

It tells the Monkey's Audio encoder to encode to the highest compression.

I Have Decided To Go With Ape...

Reply #28
If anybody still needs the Perl script to fix their APL files, you can find the script here (this is a straight copy-and-paste from the Monkey's Audio forum, with the strange characters removed).

For those of you that don't have Perl installed, I created a very quick-and-dirty Windows binary. Since I use the Cygwin version of Perl instead of the ActiveState package, I've also included the necessary Cygwin DLLs.

You can download the binary package here. If anybody of you has the ActiveState Perl package, can you please use Perl2Exe from that package, and post the resulting binary (that won't require extra DLLs) ?

WARNING: I have not tested this script/binary at all. So use it at your own risk. I'm unable to test it right now. I would like to hear if it works or not, though...

[span style='font-size:8pt;line-height:100%']w00t, my 100th post![/span]
Over thinking, over analyzing separates the body from the mind.

I Have Decided To Go With Ape...

Reply #29
It doesn't work for me PoisonDan. When I do FixAPL "A.apl" it says "Not found file [A.apl". When I do FixAPL *.apl it only fixes one of the apl files in the directory. I'd appreciate if someone solves this APL thing for me

Isn't this bug fixed in the latest stable or unstable build of Monkey's ? That's so annoying...
The object of mankind lies in its highest individuals.
One must have chaos in oneself to be able to give birth to a dancing star.

I Have Decided To Go With Ape...

Reply #30
I re-uploaded the compile with the modification I made where fixed APL files overwrite old ones.
This should be working, as reported by others. ZIP contains one EXE, syntax is: APL_FIX_MOD.EXE filename.apl
http://www.geocities.com/feedthedead/apl_f...fix_mod_bin.zip

When I tested 3.98alpha still computes incorrect frames.
"Something bothering you, Mister Spock?"

I Have Decided To Go With Ape...

Reply #31
Thanks a lot! Can we use it with *.APL ?
The object of mankind lies in its highest individuals.
One must have chaos in oneself to be able to give birth to a dancing star.

I Have Decided To Go With Ape...

Reply #32
Quote
Thanks a lot! Can we use it with *.APL ?

Um, no. For that you would type:

for %%a in (*.apl) do apl_fix_mod %%a

edit: What works even  better is adding (i.e.) "Fix APL" to Explorer File Types, at least then you can avoid many two-second delays since it will open multiple instances at once if many files are selected. However, if you choose this way be aware  that 'fixing' APL files twice will result in incorrect tracks.
"Something bothering you, Mister Spock?"

I Have Decided To Go With Ape...

Reply #33
One second this doesn't work:
Quote
for %%a in (*.apl) do apl_fix_mod %%a


I get:
Quote
%%a was unexpected at this time.


Do I need to create a batch file?
The object of mankind lies in its highest individuals.
One must have chaos in oneself to be able to give birth to a dancing star.

I Have Decided To Go With Ape...

Reply #34
Yeah, but try this instead:

Explorer: View > Folder options > File types
APL (for me, hidden under Winamp media file): Edit > New > Action: Fix APL > Application used... (browse for APL_FIX_MOD.EXE) and at the end type a space and: "%1" (with quote marks).
Click OK. Use by selecting APL files, right-click "Fix APL" and watch the fun.
"Something bothering you, Mister Spock?"

I Have Decided To Go With Ape...

Reply #35
Hmm that's no good in general though  APL should be associated to my player. Could you tell me what I need to do otherwise? Sorry

Edit: Oops sorry, I guess what you suggested does not change the default assoication. Thx.

Edit 2: Can't do it. When I use it in command line it works fine (except for the annoying 2 second delay problem) otherwise, when I add a new action and invoke it the files are not even modified(Yes I added the "%1" at end of the line). It works when I invoke the action individually, but not together.
The object of mankind lies in its highest individuals.
One must have chaos in oneself to be able to give birth to a dancing star.

I Have Decided To Go With Ape...

Reply #36
Well, I don't know if it should work with the Perl script, but on my system it does work with this executable.



Heh. I couldn't resist. I created an APL fix utility, written in C. The most important change right now is of course the size (22 KB!) and speed of the binary. However, if I find the time, I'll add some extra features. Stay tuned.

Anyway, I have also created an extra action for my APL files, using the method Destroid described. I can confirm that it definately does work for me when selecting multiple APL files. If it still doesn't work for you, contact me and I'll try to work it out.

Of course, if you find any bugs in my program, please let me know as well.

Right now, the program always creates a backup copy of the APL file (with .bak extension), but deleting all .bak files afterwards is of course trivial. I haven't implemented any command-line options yet, but I plan to add an option to skip creating the backup file.

I don't provide the source code yet. I first want to implement the extra "features" I've mentioned above.

Have fun.
Over thinking, over analyzing separates the body from the mind.

 

I Have Decided To Go With Ape...

Reply #37
Oh, and about command-line usage with multiple files: this command-line works for me:

Code: [Select]
for %a in (*.apl) do FixAPL.exe "%a"


In a batch file, you should use %%a, straight from the command-line you should use %a. Also, don't forget the quotes if the filename contains spaces.
Over thinking, over analyzing separates the body from the mind.

I Have Decided To Go With Ape...

Reply #38
Quote
Well, I don't know if it should work with the Perl script, but on my system it does work with this executable.

SNIP

Of course, if you find any bugs in my program, please let me know as well.

My server just died, but once I get it up and running again, I'll give your app a try - got about 7000 apl files for it to work on 

I Have Decided To Go With Ape...

Reply #39
Quote
Well, I don't know if it should work with the Perl script, but on my system it does work with this executable.



Heh. I couldn't resist. I created an APL fix utility, written in C. The most important change right now is of course the size (22 KB!) and speed of the binary. However, if I find the time, I'll add some extra features. Stay tuned.

Anyway, I have also created an extra action for my APL files, using the method Destroid described. I can confirm that it definately does work for me when selecting multiple APL files. If it still doesn't work for you, contact me and I'll try to work it out.

Of course, if you find any bugs in my program, please let me know as well.

Right now, the program always creates a backup copy of the APL file (with .bak extension), but deleting all .bak files afterwards is of course trivial. I haven't implemented any command-line options yet, but I plan to add an option to skip creating the backup file.

I don't provide the source code yet. I first want to implement the extra "features" I've mentioned above.

Have fun.

I never liked that pl2exe compile but it was cool a solution existed in Perl.

And thanks for confirming that I am not the only one that got the explorer association part to work.

If you don't backup your APL you can get them back from running MakeAPL again.

As for bugs...
Quote
Internal error: Line length overflow. Hang the developer.
Internal error: pathname overflow. Shoot the developer.

(sorry if I'm too nosy)
"Something bothering you, Mister Spock?"

I Have Decided To Go With Ape...

Reply #40
Quote
As for bugs...
Quote

Internal error: Line length overflow. Hang the developer.
Internal error: pathname overflow. Shoot the developer.

(sorry if I'm too nosy) 

Did you find these strings while searching through the executable (as in, being "nosy"), or did you really get these errors while executing the program (as in, "bugs")  ?

If the latter is true, I'd like to know more.
Over thinking, over analyzing separates the body from the mind.

I Have Decided To Go With Ape...

Reply #41
It screws up some of the APL files. I'll post an example here (Miles Davis - Tutu track 8, WinAMP APE plugin gives corrupted original file whereas it's not). But the perl2Exe binary created corrupted APL files sometimes that crashed my WinAmp (Kitaro - Dream, track 6). The APL file of the same track for this fix does not crash WinAmp but WinAmp cannot show the length of the track. I can post the cue sheet and the APL files. Non-fixed APL files perfectly work with WinAmp for these examples, but of course they don't correspond to correct positions because of the original bug. Here's the cue sheets for Miles Davis - Tutu and Kitaro - Dream. apl_fix_mod.exe (previously posted perl2exe solution) is also there.
The object of mankind lies in its highest individuals.
One must have chaos in oneself to be able to give birth to a dancing star.

I Have Decided To Go With Ape...

Reply #42
Quote
Did you find these strings while searching through the executable (as in, being "nosy"), or did you really get these errors while executing the program (as in, "bugs")  ?

Jus' peekin', I am always tempted to examine small EXE's

As for the crashing, the last "track" on the APE file should have -1 for EOF, not 0.
"Something bothering you, Mister Spock?"

I Have Decided To Go With Ape...

Reply #43
New version uploaded. Get it here.

Changes:
- Changing -1 for EOF to 0 fixed. (thanks Destroid)
- Better handling of pathnames. ("Shoot the developer" removed )

atici,

Since track 8 is the last track from the Miles Davis album, the bug with the EOF could have caused the problem. Can you check if the new version fixes this ?

However, I have no explanation why track 6 from the Kitaro album causes problems. I created the APL files, applied my fix, compared the changes and didn't see anything wrong with the fixed APL file. I can't play it of course, because I don't have the APE file.

If you still have this problem with the new version, can you post the two APL files for this track ? The original one from MakeAPL, and the one you got after using my utility ?

Thanks for the feedback so far.


Edit: With all these posts about the APL bug and possible fixes, shouldn't we create a separate thread about it ? Or maybe let a moderator split this thread ?
Over thinking, over analyzing separates the body from the mind.

I Have Decided To Go With Ape...

Reply #44
That FixAPL program has some problems, it gave me weird error messages with some filenames:

[E:\Temp\ATTHEG~1]fixapl "At The Gates - Slaughter Of The Soul - 03 - Cold.apl"
Cannot open At The Gates - Slaughter Of The Soul - 03 - Cold.aplndir?.new for writing.

[E:\Temp\ATTHEG~1]fixapl "At The Gates - Slaughter Of The Soul - 09 - Nausea.apl"
Cannot open At The Gates - Slaughter Of The Soul - 09 - Nausea.aplndir=C:\WINDOWS.new for writing.

[E:\Temp\ATTHEG~1]fixapl "At The Gates - Slaughter Of The Soul - 10 - Need.apl"
Cannot open At The Gates - Slaughter Of The Soul - 10 - Need.aplndir?.new for writing.

And it has rounding problems, if you add 0.5 to the new block number before converting to integer you should get correct values.

I Have Decided To Go With Ape...

Reply #45
Quote
That FixAPL program has some problems, it gave me weird error messages with some filenames:

[E:\Temp\ATTHEG~1]fixapl "At The Gates - Slaughter Of The Soul - 03 - Cold.apl"
Cannot open At The Gates - Slaughter Of The Soul - 03 - Cold.aplndir?.new for writing.

[E:\Temp\ATTHEG~1]fixapl "At The Gates - Slaughter Of The Soul - 09 - Nausea.apl"
Cannot open At The Gates - Slaughter Of The Soul - 09 - Nausea.aplndir=C:\WINDOWS.new for writing.

[E:\Temp\ATTHEG~1]fixapl "At The Gates - Slaughter Of The Soul - 10 - Need.apl"
Cannot open At The Gates - Slaughter Of The Soul - 10 - Need.aplndir?.new for writing.

And it has rounding problems, if you add 0.5 to the new block number before converting to integer you should get correct values.

Yes, I already noticed something similar after some more tests. I think I know what the problem is, I'll get a fix out ASAP.

(The behaviour of some function seems "inconsistent", though. Long story.)

About the rounding problems: can you give me an example ? I already add 0.5 before casting to int, so that can't be the problem. I did notice that MakeAPL itself has rounding problems (i.e. it truncates instead). When I apply the fix, I round the value properly, but because of the problem with the original value there is often still a difference of 1 sample between the resulting value and the value it should be (i.e. the value I get when I manually calculate it from the original cue sheet). This is a problem of Matt's MakeAPL, not my FixAPL. Since my utility doesn't read the cue sheet (yet), it can't verify if the resulting offset is sample-correct.

However, if there still remains another rounding problem in my utility, I'd like to know it (please provide values).
Over thinking, over analyzing separates the body from the mind.

I Have Decided To Go With Ape...

Reply #46
Quote
About the rounding problems: can you give me an example ? I already add 0.5 before casting to int, so that can't be the problem. I did notice that MakeAPL itself has rounding problems (i.e. it truncates instead).

That explains it, I didn't compare the values to MakeAPL's values but to my own APL writer's values. You can fix the rounding problem caused by MakeAPL by rounding to closest multiple of 588 samples, all CD tracks must have such length.

I Have Decided To Go With Ape...

Reply #47
New version uploaded. Same URL.

Changes:
- Fix weird output pathnames.
- Rounds offset number to nearest sector (multiple of 588 samples).

Thank you, Case.
Over thinking, over analyzing separates the body from the mind.

I Have Decided To Go With Ape...

Reply #48
Quote
New version uploaded. Same URL.

Seems to work perfectly now.

Quote
Thank you, Case.

No problem

I Have Decided To Go With Ape...

Reply #49
The latest version seems to solve both my problems. Thanks a lot! I think the next version should not create .bak backups anymore, you can always create the erroneous ones through MakeAPL anyway, and this version seems no longer at beta stage
The object of mankind lies in its highest individuals.
One must have chaos in oneself to be able to give birth to a dancing star.