HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: Synthetic Soul on 2005-03-24 14:19:40

Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 14:19:40
CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe)
========
Neil Popham <neilpopham@bigfoot.com>, 2005

Version 0.1, 2005-03-24

CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe) is a tool for converting WAVE image files into individual track files.

CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe) will use an accompanying cuesheet to split a WAVE file into its component parts.  It will also run a specified command line on those track files, allowing the user to use foobar-style tags as placeholders for meta data taken from the cuesheet.

Current working syntax is:

CUESPLIT.EXE [--p] -c <path to cuesheet> -f <path to file> -r <command to run>

--p : prepend track one's pregap to track one's track file
-c : the path to the cuesheet
-f : the path to the WAVE file
-r : the command line to run on each track file

EXAMPLE USAGE
=============

CUESPLIT.EXE -c "C:\DOS\Alan Parsons\CDImage.cue" -f "C:\DOS\Alan Parsons\CDImage.wav" -r "C:\DOS\LAME.EXE" -V5 --ta "%artist%" --tt "%title%" --tn "%tracknumber%" --tl "%album%" --tc "%comment%" --tg "%genre%" %s "C:\DOS\@artist@\@album@\@tracknumber@ - @title@.mp3"

--

The above is taken from this text file (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.txt).

This is something I've been thinking about for a while, so I thought I'd have a play. The intention is to incorporate it into my EAC > APE batch scripts, so I can archive to image format (APE) and transcode to MP3 all in one go. I.e.:

EAC > WAVE image
WAVE image > CUESPLIT > Track WAVEs > Track MP3s
WAVE image > MAC > APE image
etc.

I thought I'd post it now, at alpha stage (Please read the to-do (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.txt)!), just to see if anyone was interested.

Take a look at the application, but more importantly take a look at the text file (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.txt) - which explains the current logic, and what's on my to-do.

I'm quite pleased about the way CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe) goes about things (notably the foobar tags, REM parsing, and the bit-accurate splitting) - but the main thing that bugs me about it is the fact that I've had to write it in VB6, so you get windows opening for each encoder call.  You can obviously still run it from the CMD prompt though (it's just that it will open a second shell to run LAME, etc.).

I had considered contacting Tangerine and seeing whether he would be interested in writing CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe) by adapting his WAVSPLIT application.  I would like to see a proper command line version of this application... Perhaps my logic and someone else's Delphi/C/C++ skills is the answer...

All feedback welcome.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-03-24 14:49:22
Hi Synthetic Soul,

Wow! I wrote a very similar command-line program before, but nobody on HA showed interests  . See:
http://www.hydrogenaudio.org/forums/index....showtopic=23488 (http://www.hydrogenaudio.org/forums/index.php?showtopic=23488)
Due to my web space, now it's available only at: http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)

It seems that people prefer foobar2000 to do this job. I should have written an English manual.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 15:03:54
Quote
Hi Synthetic Soul,

Wow! I wrote a very similar command-line program before, but nobody on HA showed interests   . See:
http://www.hydrogenaudio.org/forums/index....showtopic=23488 (http://www.hydrogenaudio.org/forums/index.php?showtopic=23488)
Due to my web space, now it's available only at: http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)

It seems that people prefer foobar2000 to do this job. I should have written an English manual.

Now you tell me! 

I am familiar with your LAME patch - I've used it before, but there's no 3.96.1 version.  I see from your other post why, and can't say I blame you.  Even if there was I'd want a 3.97 version soon...

I see from the accompanying BAT files that ACDIR does support tags also. I really could do with an English explanation of the syntax though. 

Is the source available?  It would be interesting to see it after writing CUESPLIT.

Edit: Maybe if you give me the source I could write the readme for you, if you would rather not bother.  I should be able to deduce the syntax from the source... I think...

Quote
I should have written an English manual.

You see, I have decent documentation - it's just the application that's crap.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 15:11:13
NB:  I was, and am still, aware that there are other WAVE splitting tools (including shntools and wavsplit) already in existance - but my requirement was for the flexible tagging that CUESPLIT, and it appears ACDIR, provides.

Another aspect of CUESPLIT - the INI file - may also be relevant here, as the intention is to allow users to encode to multiple encoders with one call (one excuse for writing to a file and not piping).
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-03-24 15:48:27
Thank you very much for the reply and understanding of the current situation.

Quote
I am familiar with your LAME patch - I've used it before, but there's no 3.96.1 version.  I see from your other post why, and can't say I blame you.  Even if there was I'd want a 3.97 version soon...

I ceased the patch because the situation around gapless MP3 playback has been changed a lot and we don't have to stick with it. Instead, I created a more generalized tool, ACDIR, because I wanted vorbis files as well after I owned iriver H120.

Quote
Is the source available?  It would be interesting to see it after writing CUESPLIT.
Edit: Maybe if you give me the source I could write the readme for you, if you would rather not bother.  I should be able to deduce the syntax from the source... I think...

I will release it under GPL shortly (after writing the build instruction). And it would be very helpful if you could write the English manual. I don't have spare time lately because I've just moved in UK from Japan. 

Quote
You see, I have decent documentation - it's just the application that's crap.

Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 16:00:18
Quote
Quote
Is the source available?  It would be interesting to see it after writing CUESPLIT.
Edit: Maybe if you give me the source I could write the readme for you, if you would rather not bother.  I should be able to deduce the syntax from the source... I think...
I will release it under GPL shortly (after writing the build instruction). And it would be very helpful if you could write the English manual. I don't have spare time lately because I've just moved in UK from Japan.

Please feel free to either email me at the address above, or PM me.

Welcome to the UK.  You will see from my profile that I live in Exeter, in Devon.

Quote
Quote
You see, I have decent documentation - it's just the application that's crap.

Well, I think I can explain exactly want I want the application to do, and what it currently does do, quite well.  However, I am not happy about the VB6 implementation at all.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 17:42:26
1. I have compiled the following from ACDIR's command line help (which I only just discovered).  This may be useful to others.

Code: [Select]
Audio CD Image Reader (ACDIR) 0.5 alpha  Copyright © 2003-2005 by Nyaochi

Audio CD Image Reader (ACDIR) is a tool for audio images with cuesheets.


USAGE:

ACDIR [options] command [command-arguments] [options] targets

EXAMPLE:

ACDIR.EXE --output %t.wav --extract CDImage.cue


OPTIONS:

--help or -h      Show usage information

--output name      Substitute 'name' for the output file variable (%o)

--extra-opt opt    Substitute 'opt' for the extra option variable (%x)

--track range      Specify track range to be processed

--targets file    Specify targets by an external file list

--overwrite        Force to overwrite existing output files


COMMANDS:

--exec      Execute expression for each track in cuesheets
            USAGE:  ACDIR [options] --exec expression cuesheet1 [cuesheet2 ...]

--pipe      Execute expression for each track with stdin redirection
            USAGE:  ACDIR [options] --pipe expression cuesheet1 [cuesheet2 ...]

--echo      Evaluate and show the expression (test only, no execution)
            USAGE:  ACDIR [options] --echo expression cuesheet1 [cuesheet2 ...]

--extract    Extract tracks to specified output files (use --output option)
            USAGE: CDIR [options] --extract cuesheet1 [cuesheet2 ...]

--find      Find cuesheets recursively in a directory that match the specified pattern
            USAGE:  ACDIR [options] --find directory pattern


VARIABLES:

Format:

{%|$}[#]<variable-name>

A variable begins with either '%' or '$' (for batch file use)

An optional character '#' quotes the value with '"'

Available variables are:

%f    Filename of the audio image (e.g. CDImage.wav)
%p    Path to the cuesheet file
%d    Path to the cuesheet file with substitution of '_' for '\'
%o    Output filename (evaluation result of --output argument)
%x    Extra options (specified in --extra-opt argument)
%t    Title of the track (e.g. White Album)
%T    Title of the CD image (e.g. Back in the U.S.S.R.)
%a    Performer of the track (e.g. The Beatles)
%A    Performer of the CD image (e.g. The Beatles)
%n    Track number (e.g. 01)
%N    Number of tracks in the CD image (e.g. 17)
%q    Double-quotation character, '"'
%s    Start time of the track (INDEX 01)
%S    Start time of the track (INDEX 00 if any, otherwise INDEX 01)
%e    End time of the track (INDEX 01)
%E    End time of the track (INDEX 00 if any, otherwise INDEX 01)


COMMAND LINE HELP:

--help or -h        Show usage information
--help-options      Show a list of options
--help-variables    List available variables with description
--help-commands    Show a list of commands

-h followed by a command name for command-specific help
2. @nyaochi : Is there any way you can provide an additional variable switch to turn the variable into a valid file or folder name?

E.g.:

ACDIR.EXE --output "%n - %~t.wav" --extract CDImage.cue

The tilde would instruct ACDIR to remove illegal characters from the track title.

I've only just begun to test, but I've already fallen foul of an illegal character, which caused ACDIR to fail on that track.

3. My WAVE files match those created by Foobar and WavSplit byte for byte.  There is a discrepancy in the RIFF header between CUESPLIT's and ACDIR's (byte #4 - ACDIR's value is 4 bytes less).  I assume libsndfile deals with this?  I have checked the header spec and I'm pretty sure mine is accurate.  Anyone know whether this inaccuracy in the chunk size (bytes 4-7) means diddly? "This is the size of the                                entire file in bytes minus 8 bytes for the two fields not included in this count:                          ChunkID and ChunkSize."
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-03-24 18:23:07
Quote
2. @nyaochi : Is there any way you can provide an additional variable switch to turn the variable into a valid file or folder name?

E.g.:

ACDIR.EXE --output "%n - %~t.wav" --extract CDImage.cue

The tilde would instruct ACDIR to remove illegal characters from the track title.

I've only just begun to test, but I've already fallen foul of an illegal character, which caused ACDIR to fail on that track.

You mean removing characters such as :\?*<> which are not acceptable for a filename. Would it be fine just removing them?

I never thought about that because I don't use %t for naming files.

Quote
3. My WAVE files match those created by Foobar and WavSplit byte for byte.  There is a discrepancy in the RIFF header between CUESPLIT's and ACDIR's (byte #4 - ACDIR's value is 4 bytes less).  I assume libsndfile deals with this?  I have checked the header spec and I'm pretty sure mine is accurate.  Anyone know whether this inaccuracy in the chunk size (bytes 4-7) means diddly? "This is the size of the                                entire file in bytes minus 8 bytes for the two fields not included in this count:                          ChunkID and ChunkSize."
[a href="index.php?act=findpost&pid=285243"][{POST_SNAPBACK}][/a]

I confirmed this was a bug.  I don't use libsndfile for writing WAVE to an output stream. I miscalculated the value. Thank you for reporting this.

I'll update the binary shortly.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 18:31:54
Quote
You mean removing characters such as :\?*<> which are not acceptable for a filename. Would it be fine just removing them?

I never thought about that because I don't use %t for naming files.

Removing them would be fine.  I was planning to add a switch to CUESPLIT that would let the user supply a string of characters that were replacement characters. I.e.:  the characters that need replacing are \/:*?"<>|, so if the user would submit their replacement characters in the same order.  CUESPLIT currently replaces them all with a space.

Quote
I confirmed this was a bug.  I don't use libsndfile for writing WAVE to an output stream. I miscalculated the value. Thank you for reporting this.

I'll update the binary shortly.

Cool.  Glad to be of help.

I'm really looking forward to working with ACDIR.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-03-24 19:52:19
I released ACDIR 0.6 alpha.
http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)

@Synthetic Soul,
I decided to add a routine to legitimate the value of variable %o instead of your suggestion. I created a new undocumented option "--legitimate-output" which is activated by default. Then you don't have to change your variable template at all. If you specify "--legitimate-output=no" in ACDIR command-line, the value of %o variable won't be changed/converted.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 19:59:59
Woah.  Fast work!

Thanks for the mentions.

I look forward to testing...
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-24 20:09:16
Ah, just spotted a problem.

Because you are removing all the invalid filename characters across the board you can no longer create directories.  The following will no longer work as required:

ACDIR.EXE --output "%A\%T\%n - %t.wav" --extract CDImage.cue

I get:

Extracting track 1 to Kings Of Leon Aha Shake Heartbreak 01 - Slow Night, So Long.wav
Extracting track 2 to Kings Of Leon Aha Shake Heartbreak 02 - King Of The Rodeo.wav
... etc.

However, you can't just allow "\", as if one is found in a tag it will cause problems.

I think you may have to apply to replace one tag at a time...
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-03-24 20:24:35
Quote
Ah, just spotted a problem.

Because you are removing all the invalid filename characters across the board you can no longer create directories.  The following will no longer work as required:

ACDIR.EXE --output "%A\%T\%n - %t.wav" --extract CDImage.cue

I get:

Extracting track 1 to Kings Of Leon Aha Shake Heartbreak 01 - Slow Night, So Long.wav
Extracting track 2 to Kings Of Leon Aha Shake Heartbreak 02 - King Of The Rodeo.wav
... etc.

However, you can't just allow "\", as if one is found in a tag it will cause problems.

I think you may have to apply to replace one tag at a time...
[a href="index.php?act=findpost&pid=285277"][{POST_SNAPBACK}][/a]

I should have known this. I will re-update it.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-03-24 20:42:46
@Synthetic Soul

How about this one?
http://nyaochi.sakura.ne.jp/dist/acdir.exe (http://nyaochi.sakura.ne.jp/dist/acdir.exe)

Variables %~t, %~T, %~a, %~A are now supported.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-03-25 10:02:49
That works well.

Thank you very much.
Title: cuesplit.exe Alpha
Post by: ponchorage on 2005-04-03 17:18:18
Great work, Synthetic Soul. I must have missed this post. I'm using Flacattack as a basis to write a new program that will allow all types of encoders. It will be similar to M.A.R.E.O. but will allow you to encode to any assortment of image files and individual files. I am currently using a call to wavsplit, but cuesplit looks like it may be more robust.

As part of the program, I need to convert an image file cuesheet to an individual file cuesheet. Do you know of any program that already does this or could this be a feature of cuesplit? Do you have the source of cuesplit available? Thanks.
Title: cuesplit.exe Alpha
Post by: tas on 2005-04-03 18:03:41
Another brilliant way to cut would be to use DPSGuru's BeSplit (http://besplit.doom9.org/)!
It is able to cut/split: WAV/AC3/AAC/MPA/MP3/MP2/MP1/PCM/DTS/DTS-WAV
It also fixes corrupt streams, removes WAV headers etc.

As for the command line you may use the web to create one out of a list of track times, be it fromand it will generate the command line for Besplit.

Website: http://www.delta-hf.co.uk/freedbesplit/ (http://www.delta-hf.co.uk/freedbesplit/)

Or just generate one yourself.
Or use the CUE-File cutter GUI (although its in italian  )
BeSplit's a GEM!
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-04 09:50:41
Quote
I'm using Flacattack as a basis to write a new program that will allow all types of encoders. It will be similar to M.A.R.E.O. but will allow you to encode to any assortment of image files and individual files.

This new application sounds great.  It's something I would have liked to attempt, but just do not have the time.  It seems there is a definite call for an easy to use app that will allow you to write to multiple image formats and multiple track formats in the same run.  Good luck.

Quote
I am currently using a call to wavsplit, but cuesplit looks like it may be more robust.

I used a few references to help me build CueSplit - one of which was Tangerine's WavSplit source code.  I don't know if CueSplit is any more robust than WavSplit. As I noted earlier in the thread: I am pleased that the WAVE files produced appear 100% accurate (I believe WavSplit's are also, I haven't tested as thoroughly).  However, I think the main thing CueSplit has going for it over any other is the comprehensive meta data parsing.  I was quite pleased with that.

CueSplit (or more accurately VB6) really falls down over the command line I'm afraid.  If you call it from a normal command line it will begin CueSplit, but then continue without waiting.  I'm sure there is some way you can wait for CueSplit to complete, but I don't know.  Basically, I'm pleased with the concept of CueSplit - but the VB6 implementation really lets it down in my opinion.  I have considered moving to a .NET console app for both CueSplit and CueMake.

I'm personally very keen for ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) to progress and become my application of choice. It's a "proper" command line application, and I know nyaochi is planning to build in support for FLAC and maybe WavPack, as well as the existing WAVE and APE support.  It supports piping which CueSplit currently doesn't.

Quote
As part of the program, I need to convert an image file cuesheet to an individual file cuesheet. Do you know of any program that already does this or could this be a feature of cuesplit? Do you have the source of cuesplit available? Thanks.

I don't know of a program that does that (apart from perhaps foo_cue_ex in previous versions), however it would be very, very easy to do.  I had considered making it part of my other recent little app, CueMake (http://www.hydrogenaudio.org/forums/index.php?showtopic=32761&view=findpost&p=286459).  I mean, all you have to do is create a track entry for each track with a FILE command and INDEX 01 00:00:00.

When I wrote CueSplit I was wondering whether I could adapt WavSplit, or ask Tangerine to do it - then I decided "Hey, it may be fun to do it myself".  Similarly, with CueMake I wanted to use Foobar to create the image file and the accompanying cuesheet.  I then thought I could make the cuesheet myself, using what I'd learnt from CueSplit - then I thought "If I'm iterating through the WAVE files to build the cuesheet I may as well glue them together at the same time".

What am I on about?  I think you should write your own WAVE parser.  I couldn't believe how easy it was once I'd got to grips with a few things.  All the info you need is in the WAVE header.  Once you know your way around the header (there's only 13 parts, a few of which are of no real use) you can do anything you'll need.  I've had very little experience working with binary files previously, and I managed it.  The real breakthrough was creating the UDT (user-defined type) "WaveHeader" (see source) - which then let me access the header with complete ease.  WavSplit uses byte positions to access parts of the header, which makes things look very difficult.

If you write your own you'd have a lot more flexibility.

If you don't want to write your own I'd think about ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2).  I'm yet to have a proper look at tas' BeSplit - but it doesn't look like it has direct cuesheet support.  ACDIR could be very good.

The source of CueSplit can be found here (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit-src.zip).  I have also uploaded the source of CueMake (http://www.neilpopham.pwp.blueyonder.co.uk/cuemake/cuemake-src.zip).  I am by no means now an expert in WAVE file parsing now, but if I can be of any help I'd be very pleased to be of service.
Title: cuesplit.exe Alpha
Post by: Mr_Rabid_Teddybear on 2005-04-04 13:02:15
Quote
As part of the program, I need to convert an image file cuesheet to an individual file cuesheet. Do you know of any program that already does this or could this be a feature of cuesplit? Do you have the source of cuesplit available? Thanks.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=288044")

I'm not sure if I'll get what you mean, but [a href="http://www.burrrn.net/]Burrrn's[/url] CUEditor has an option "Split Into Tracks - Create a separate .cue file for each track".
Title: cuesplit.exe Alpha
Post by: ponchorage on 2005-04-04 15:37:18
Quote
Quote
As part of the program, I need to convert an image file cuesheet to an individual file cuesheet. Do you know of any program that already does this or could this be a feature of cuesplit? Do you have the source of cuesplit available? Thanks.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=288044")

I'm not sure if I'll get what you mean, but [a href="http://www.burrrn.net/]Burrrn's[/url] CUEditor has an option "Split Into Tracks - Create a separate .cue file for each track".
[a href="index.php?act=findpost&pid=288209"][{POST_SNAPBACK}][/a]


No, I meant take a cuesheet that is meant for an image file and convert it to the EAC Non-compliant format.

>>Synthetic Soul. Thanks for all that. I had started a few weeks ago to create my own converter, but thought I might see what was already available. Do you have any good references about WAV headers? I'll probably just do a Google search and I'm sure I'll find something. I'll also have a look at your source. This doesn't sound like it will be too difficult to do though as you have desribed it (writing a WAV parser).
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-04 15:51:11
Quote
I had started a few weeks ago to create my own converter, but thought I might see what was already available. Do you have any good references about WAV headers? I'll probably just do a Google search and I'm sure I'll find something. I'll also have a look at your source. This doesn't sound like it will be too difficult to do though as you have desribed it (writing a WAV parser).

I used:
http://www.ringthis.com/dev/wave_format.htm (http://www.ringthis.com/dev/wave_format.htm)
http://ccrma.stanford.edu/courses/422/projects/WaveFormat/ (http://ccrma.stanford.edu/courses/422/projects/WaveFormat/)

I know there's something to be said for not reinventing the wheel, but I think your app will be a lot more flexible if you create your own, as you can make decisions knowing the users exact requirements (like whether to pipe or create temporary WAVE files).

Since posting I have actually had a little play in VB.NET.  I've got a class, "WaveFile", from which you can load and (soon) save WAVE data.  The idea will be that you create your WaveFile object, load a WAVE file into it, and then manipulate it as you see fit.

It is my wish to expand this into a set of classes to manipualte WAVE and CUE files - with the intention of converting CueSplit and CueMake into a .NET console app.  However, unfortunately I have a severe lack of free time at the moment.

If I end up with anything that I think will be of use I'll pass it on (I assume you are writing this new app in C#).
Title: cuesplit.exe Alpha
Post by: ponchorage on 2005-04-04 16:06:20
Thanks for the links. It is true that it might be better to have the option of piping instead of creating temp waves. I hadn't thought of that. This would most likely only be true if the user were only encoding to one set of individual files (only choosing one encoder instead of multiple). It is good to have options though.

I'd be very interested to see a set of classes that deal with wave files and cue sheets. That would make it very easy to deal with them. Good luck with VB.NET. C# has not been too bad. I'm no expert by any means but I've been able to do most things I wanted.

This new app is written in C#. Right now I've got it working fairly well. It relies on one (maybe 2, another for general settings) ini files for encoder settings, supports replaygain (for formats that allow it). Right now I'm working on the cuesheet conversion aspects. The program requires that the user create a image file with a cuesheet. When the user chooses to encode to individual files for some format, the original cuesheet no longer works, so I want to update the cuesheet to match the new set of files. This includes index00 and index01 values. I wrote the code last night to find these new values after looking at an explanation that Tangerine had given about WavSplit. However, I read one of your posts about CueMake and the problem you encountered when dealing with waves that aren't standard (you can't just use the 2352 constant, which is what I'm doing). I'll have to look at your code to see how you worked around that.

Good luck with CueMake and finding time to work on it.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-04 16:35:38
Quote
I read one of your posts about CueMake and the problem you encountered when dealing with waves that aren't standard (you can't just use the 2352 constant, which is what I'm doing). I'll have to look at your code to see how you worked around that.

The answer was staring me in the face with the WAVE header (it's all there somewhere).

Bytes 28-31 provide the bytes per second (Int32 value).  I stopped converting to frames, etc. and simply used Bytes / BytesPerSecond to find the number of seconds.  Simple!

I didn't use it to start as I hadn't bothered looking at any other parts of the header than I needed, which was only the FileSize (4-7) and DataSize (40-43) I think.

It was this page (http://dis-dot-dat.net/jacktuts/starting/audioformat.html) that first got me using the header info to calculate the number of samples, and to use that with the SampleRate (24-27).  Finally another glance at the header info lead me to BytesPerSecond - a quite obvious friend. 

You'll see this in CueMake's modMain:

Code: [Select]
Trace "  Samples: " & lngTotalBytes / (objHeader.Channels * (objHeader.BitsPerSample / 8))
Trace "  Seconds (old): " & (lngTotalBytes / (objHeader.Channels * (objHeader.BitsPerSample / 8))) / objHeader.SampleRate
Trace "  Seconds (cur): " & lngTotalBytes / objHeader.BytesPerSecond

Of course, you should only be dealing with 2 channel 44.1kHz 16 bit WAVE files - having been ripped from CD - but it is nice to know that the code you write can cope with other formats also, for use elsewhere.
Title: cuesplit.exe Alpha
Post by: ponchorage on 2005-04-04 17:58:20
Check this out.

http://www.vbaccelerator.com/home/NET/Code...eam/article.asp (http://www.vbaccelerator.com/home/NET/Code/Media/Audio/WaveStream/article.asp)

This site actually has some pretty cool audio programs I've looked at before.
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-04-14 09:52:00
Quote
CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe)
========
Neil Popham <neilpopham@bigfoot.com>, 2005

Version 0.1, 2005-03-24

CUESPLIT (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.exe) is a tool for converting WAVE image files into individual track files.
All feedback welcome.
[a href="index.php?act=findpost&pid=285187"][{POST_SNAPBACK}][/a]


Hi. Thanks for this nice tool. It seems to me the kind of tool I was searching for.

Question: How do you handle pauses. Will they be added to the last track, the current track, or will they be removed?
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-14 13:22:59
I would actually recommend ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) over CueSplit.

All INDEX 0 entries are ignored in CueSplit - so in EAC terminology gaps are appended to the end of the previous track. If TRACK 1 has an INDEX 0 entry it is discarded by default, but can be appended to the beginning of TRACK 1 if the --p switch is used.

I don't really intend to continue with CueSplit, after discovering ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2).  I'm hoping ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) will continue to progress, with native support for FLAC and WavPack (etc.), and want to support it as much as possible.
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-04-14 15:48:38
Quote
I would actually recommend ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) over CueSplit.

...

I don't really intend to continue with CueSplit, after discovering ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2).  I'm hoping ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) will continue to progress, with native support for FLAC and WavPack (etc.), and want to support it as much as possible.
[a href="index.php?act=findpost&pid=290488"][{POST_SNAPBACK}][/a]


Well, if your latest version has no bugs, I still prefere your work. Reason: I can use any kind of tags/variables (REM DATE "2004") inside the cuesheet and use these information later. ACDIR has only fixed number of tags/variables.

This is a big  advantage.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-14 16:06:45
Quote
Well, if your latest version has no bugs, I still prefere your work

It's the only version so far.

It has no bugs that I know of - but I haven't tested it much since releasing the alpha here.
Quote
Reason: I can use any kind of tags/variables (REM DATE "2004") inside the cuesheet and use these information later. ACDIR has only fixed number of tags/variables.

This is a big  advantage.

Yes, the meta data handling is superior in CueSplit.

I'm currently converting CueMake (http://www.hydrogenaudio.org/forums/index.php?showtopic=32761&st=0&p=286459&#entry286459) to a .NET console app.  Maybe afterwards I will convert CueSplit to a .NET console app too.  I would be happier with it as a console app.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-04-24 12:34:05
Quote
I'm personally very keen for ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) to progress and become my application of choice. It's a "proper" command line application, and I know nyaochi is planning to build in support for FLAC and maybe WavPack, as well as the existing WAVE and APE support.  It supports piping which CueSplit currently doesn't.

I released ACDIR 0.9 alpha (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2) as Synthetic Soul expected  :
Code: [Select]
Version 0.9 alpha

- FLAC/OggFLAC decoding support.
- Embedded cuesheet support for FLAC/OggFLAC. ACDIR reads cuesheet description from CUESHEET vorbis-comment in FLAC/OggFLAC files. ACDIR does not support METADATA_BLOCK_CUESHEET because: it cannot store TITLE and PERFORMER fields; ACDIR will not support CDDB access; I sometimes edit cuesheet (e.g., correct track positions), which will break DISCID calculation; and CDDB information is not always accurate (especially for Japanese songs).

Version 0.8 alpha

- WavPack decoding support. WavPack 4.2 decoder is now incorporated into the ACDIR binary.
- Embedded cuesheet support for WavPack. (embedded cuesheet support for Monkey's Audio is not implemented due to the limitation of MACDLL.dll)

Use it if you prefer command-line interface.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-04-24 12:39:28
Quote
Well, if your latest version has no bugs, I still prefere your work. Reason: I can use any kind of tags/variables (REM DATE "2004") inside the cuesheet and use these information later. ACDIR has only fixed number of tags/variables.

This is a big  advantage.
[a href="index.php?act=findpost&pid=290513"][{POST_SNAPBACK}][/a]

All right. Personally, I don't use REM xxx, but I will implement REM support in near future.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-24 20:29:15
Excellent.  Thanks nyaochi.

I look forward to testing these new additions out.

Support for embedded cuesheets is a great idea.

I don't actually use REM commands in cuesheets either, but I was going to implement them in CueSplit as I know many people do.  I also know there is some confusion over the format to use, which is why I was allowing both quoted and non-quoted values.  With Vietwoojagig's request in mind, it may be worth looking at cuesplit.txt (http://www.neilpopham.pwp.blueyonder.co.uk/cuesplit/cuesplit.txt).


I hope your move went well and you are now feeling settled.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-26 13:39:42
nyaochi,

The little testing I've done so far seems to be going well.

One feature request that has come to mind:  would it be possible to add a switch that would allow you to override the file to be split?

Currently ACDIR receives a cuesheet and splits the file referred to in that cuesheet - which makes sense.  However, I am thinking of using this in my EAC batch scripts.  The cuesheet refers to CDImage.ape, but I want to split <temp>.wav before it is encoded (there's no reason to encode it to APE and then decode it again to split).

Obviously the cuesheet timings will be correct for <temp>.wav, as this will eventually become CDImage.ape.

Perhaps an option like --source "<path to source file>" ?

This would be very much appreciated.  I believe that others would find it useful also.

No rush obviously - just a suggestion for the next version.


Thanks.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-04-27 03:40:53
Quote
nyaochi,

The little testing I've done so far seems to be going well.

One feature request that has come to mind:  would it be possible to add a switch that would allow you to override the file to be split?

Currently ACDIR receives a cuesheet and splits the file referred to in that cuesheet - which makes sense.  However, I am thinking of using this in my EAC batch scripts.  The cuesheet refers to CDImage.ape, but I want to split <temp>.wav before it is encoded (there's no reason to encode it to APE and then decode it again to split).

Obviously the cuesheet timings will be correct for <temp>.wav, as this will eventually become CDImage.ape.

Perhaps an option like --source "<path to source file>" ?

This would be very much appreciated.  I believe that others would find it useful also.

No rush obviously - just a suggestion for the next version.


Thanks.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=293459")

I see what you want to do.  But I think this specification is irregular, considering that ACDIR can take multiple targets (cuesheets). Besides, just replacing "CDImage.ape" with <temp>.wav in a cuesheet should solve your problem. This job can be easily done by other text-processing program such as sed. For example, create a temporary cuesheet, temp.cue, by:
Code: [Select]
sed s/CDImage.ape/CDImage.wav/g < CDImage.cue > temp.cue

and pass it to ACDIR. IMHO, this method is much simpler than hacking ACDIR and easy to follow. If you run a batch file from EAC, adding this line to the batch file should cost nothing. If you don't want to include sed.exe (native Win32 binary is available) into your batch file solution, you can write a very short C program to replace the audio filename in cuesheets. Please let me know if this could not help you.

BTW, I released [a href="http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2]ACDIR 0.10 alpha[/url]:
Code: [Select]
Version 0.10 alpha
- Native support of Monkey's Audio decoding. Monkey's Audio 3.99 library is now integrated to the ACDIR binary.
- Embedded cuesheet support for Monkey's Audio. ACDIR reads cuesheet description from CUESHEET field of tag information.
- Add new variables, %r{NAME} and %R{NAME} for retrieving REM * field value. If a cuesheet has a line, "REM DATE 2005" , %R{DATE} will be 2005.
- Better command-line documentation.
- Add some batch files
- Re-launch the tutorial web site in English.

I also wrote a tutorial in English:
http://nyaochi.sakura.ne.jp/xoops/modules/...wares/tc_2.html (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html)

Cheers.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-04-27 09:01:13
Quote
I see what you want to do.  But I think this specification is irregular, considering that ACDIR can take multiple targets (cuesheets).

Ah, good point.

Quote
Besides, just replacing "CDImage.ape" with <temp>.wav in a cuesheet should solve your problem. This job can be easily done by other text-processing program such as sed. For example, create a temporary cuesheet, temp.cue, by:
Code: [Select]
sed s/CDImage.ape/CDImage.wav/g < CDImage.cue > temp.cue

Cool.  Thanks for the suggestion.  I've heard of SED before, but have no idea what it does and thought it was just a *NIX thing.  I'll definately take a look.

Quote
BTW, I released ACDIR 0.10 alpha (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2):
Code: [Select]
Version 0.10 alpha
- Native support of Monkey's Audio decoding. Monkey's Audio 3.99 library is now integrated to the ACDIR binary.
- Embedded cuesheet support for Monkey's Audio. ACDIR reads cuesheet description from CUESHEET field of tag information.
- Add new variables, %r{NAME} and %R{NAME} for retrieving REM * field value. If a cuesheet has a line, "REM DATE 2005" , %R{DATE} will be 2005.
- Better command-line documentation.
- Add some batch files
- Re-launch the tutorial web site in English.

I also wrote a tutorial in English:
http://nyaochi.sakura.ne.jp/xoops/modules/...wares/tc_2.html (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html)

Superb.  I was hoping that we would get embedded cuesheet support for Monkey's Audio files!

Thanks once again nyaochi.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-05 16:47:32
Hi, me again

If I use $R{DATE} it will only find the command REM DATE XXXXX... and not REM Date, REM date, or even rem DATE.

I'm kinda fine with the first two - although I don't believe that case-sensitivity is really required in this situation.

However, I do think rem and REM should be interchangeable.

Is there any chance that the next version could be case-insensitive?


NB: I have added ACDIR to the transcoding section of my CD backup guide (http://www.neilpopham.pwp.blueyonder.co.uk/cd_backup_transcode.html#transcode-acdir).  Any feedback appreciated.


Edit: In your guide you mention that you would like to use ACDIR to create AAC/MP4 files, but none support STDIN input.

Case has recently "released" NAAC, which uses the Nero DLLs, and does support STDIN input.  You can download  here (http://www.saunalahti.fi/cse/files/?C=M;O=D).
Title: cuesplit.exe Alpha
Post by: schonenberg on 2005-05-06 08:28:02
Quote
Hi Synthetic Soul,

Wow! I wrote a very similar command-line program before, but nobody on HA showed interests   . See:
http://www.hydrogenaudio.org/forums/index....showtopic=23488 (http://www.hydrogenaudio.org/forums/index.php?showtopic=23488)
Due to my web space, now it's available only at: http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)

It seems that people prefer foobar2000 to do this job. I should have written an English manual.
[a href="index.php?act=findpost&pid=285195"][{POST_SNAPBACK}][/a]



For me, the problem of going from One Huge Wave File to Many Wave Files is when there is no cue sheet available, and it's hard to make one without opening the file into sound forge and manually chopping the file up.

Anyone know an easy way to do this?
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-06 08:34:22
Quote
For me, the problem of going from One Huge Wave File to Many Wave Files is when there is no cue sheet available, and it's hard to make one without opening the file into sound forge and manually chopping the file up.

Anyone know an easy way to do this?


Cuesheet Heaven (http://www.regeert.nl/cuesheet/) uses freedb information to create cuesheets for a CD.

I've never tested the results against an existing cuesheet - but it's certainly a start.  You could always test using the WAV+CUE in foobar and them make minor amends if required.

Or, if you (still) have the CD, you could get EAC to create just the cuesheet.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-05-06 11:27:01
Quote
Hi, me again

If I use $R{DATE} it will only find the command REM DATE XXXXX... and not REM Date, REM date, or even rem DATE.

I'm kinda fine with the first two - although I don't believe that case-sensitivity is really required in this situation.

However, I do think rem and REM should be interchangeable.

Is there any chance that the next version could be case-insensitive?

Indeed. Current ACDIR only accepts capital letters, REM, TRACK, AUDIO, ... IIRC these commands should be case-insensitive. And there's no point to distinguish DATE, date, and Date. I agree with you. I'll fix it soon.

Quote
Edit: In your guide you mention that you would like to use ACDIR to create AAC/MP4 files, but none support STDIN input.

Case has recently "released" NAAC, which uses the Nero DLLs, and does support STDIN input.  You can download  here (http://www.saunalahti.fi/cse/files/?C=M;O=D).
[a href="index.php?act=findpost&pid=295445"][{POST_SNAPBACK}][/a]

That's great!! I'll check it and include batch files for Nero AAC encoders. Thanks for the info. 
Title: cuesplit.exe Alpha
Post by: shawn.e on 2005-05-06 12:51:17
Nice idea, but Easy CD-DA Extractor has done that for ages with nice GUI. It splits the Cue Sheets and/or encodes them to different formats (MP3, MP4, NERO, Ogg, FLAC etc) or even burns them directly to CD-R. And it is not limited to WAV only, the Cue Sheet can specify MP3, FLAC or other format.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-06 14:02:32
Quote
Indeed. Current ACDIR only accepts capital letters, REM, TRACK, AUDIO, ... IIRC these commands should be case-insensitive. And there's no point to distinguish DATE, date, and Date. I agree with you. I'll fix it soon.

Thanks again nyaochi. 

Actually, I don't know why I'm thanking you as I don't actually use REM commands myself - but I do think it will improve ACDIR's usability, and therefore hopefully its popularity.

Quote
Nice idea, but Easy CD-DA Extractor has done that for ages with nice GUI. It splits the Cue Sheets and/or encodes them to different formats (MP3, MP4, NERO, Ogg, FLAC etc) or even burns them directly to CD-R. And it is not limited to WAV only, the Cue Sheet can specify MP3, FLAC or other format.

Thanks for the info.  I may take a look at Easy CD-DA Extractor out of interest.

Foobar will also do all this - but ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) is a command line application - which means you can run it from a batch file, etc.  I use Foobar to transcode my APE image files often - but being able to do it from the command line holds many benefits.  "Horses for courses".

FYI: ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) is not limited to WAVE, but can use APE, WV and FLAC files.  It will even read embedded cuesheets in these files - which is a really nice touch IMHO.

[span style='font-size:8pt;line-height:100%']Edit: explained why I thought the fact that it wasn't a GUI was a good thing[/span]
Title: cuesplit.exe Alpha
Post by: schonenberg on 2005-05-06 21:41:20
Cuesheet Heaven (http://www.regeert.nl/cuesheet/) uses freedb information to create cuesheets for a CD.
[a href="index.php?act=findpost&pid=295585"][{POST_SNAPBACK}][/a]
[/quote]
Thanks! What an invaluable resource!!
Title: cuesplit.exe Alpha
Post by: batagy on 2005-05-09 09:00:03
Hi!

On http://www.softpedia.com (http://www.softpedia.com) they have added CueSplit 1.0.
http://www.softpedia.com/get/Multimedia/Au.../CUEsplit.shtml (http://www.softpedia.com/get/Multimedia/Audio/Audio-Editors-Recorders/CUEsplit.shtml)
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-09 09:26:46
Quote
Hi!

On http://www.softpedia.com (http://www.softpedia.com) they have added CueSplit 1.0.
http://www.softpedia.com/get/Multimedia/Au.../CUEsplit.shtml (http://www.softpedia.com/get/Multimedia/Audio/Audio-Editors-Recorders/CUEsplit.shtml)

  That is scary.  It's a crappy alpha, that is unlikely to even reach beta status.

I have posted a review, and suggested users use ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) instead.

Thanks for the info batagy.

NB: I don't wish to be ungrateful to the person who submitted it to Softpedia (http://www.softpedia.com/get/Multimedia/Audio/Audio-Editors-Recorders/CUEsplit.shtml) - I'm flattered - but I am concerned about dissapointed users, and would rather they bought into an application like ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) that really delivers.  Since nyaochi added the meta data parsing (r${NAME} and R${NAME}) in 0.10 ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) has all the features of Cuesplit - and many many more.
Title: cuesplit.exe Alpha
Post by: batagy on 2005-05-09 10:25:25
I don't know who submitted. Maybe they found it themself.
Title: cuesplit.exe Alpha
Post by: Antonski on 2005-05-09 15:42:19
Quote
I don't know who submitted. Maybe they found it themself.
[a href="index.php?act=findpost&pid=296236"][{POST_SNAPBACK}][/a]


Probably. I have already downloaded some crappy versions released as stable ones from that romanian site and I don't think to visit it anymore. Anyway, it is too slow.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-11 19:17:08
Curiously I received some emails today telling me Tag (http://www.softpedia.com/get/Multimedia/Audio/Tag-Editors/Tag.shtml) and Wapet (http://www.softpedia.com/get/Multimedia/Audio/Audio-CD-Rippers-Encoders/Wapet.shtml) have been added also.

It's curious as they have been added under the name Synthetic Soul, as was CueSplit.  However, the amendments I made to Tag and Wapet were under my real name, Neil Popham.

That suggests to me that these applications have been harvested from this forum somehow.

Dunno.

I don't mind, although it's a bit tight when Tag and Wapet are actually Case's apps. I'm just curious about the whole thing...
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-13 10:59:51
I've just discovered that EAC v0.95 Beta 1 adds a GENRE, DATE, DISCID and COMMENT REM statement to the cuesheet, e.g.:

Code: [Select]
REM GENRE Rock
REM DATE 2005
REM DISCID 9309870C
REM COMMENT ExactAudioCopy v0.95b1
PERFORMER "The Bravery"
TITLE "The Bravery"
FILE "CDImage.ape" WAVE
 TRACK 01 AUDIO
   TITLE "An Honest Mistake"
   PERFORMER "The Bravery"
   INDEX 01 00:00:00
...


So it looks like it will now be even easier to get that info from an image file into tracks, etc.

Coolio.

[span style='font-size:8pt;line-height:100%']Edit: expanded cuesheet extract (for improved relevance?)[/span]
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-05-13 13:37:53
Ah, I've just noticed that EAC doesn't bother quoting values with spaces, e.g.:

Code: [Select]
REM GENRE Progressive Rock
REM DATE 1995
REM DISCID 8611D80B
REM COMMENT ExactAudioCopy v0.95b1
PERFORMER "Pink Floyd"
TITLE "Pulse (CD 1)"
FILE "Range.wav" WAVE
 TRACK 01 AUDIO
   TITLE "Shine On You Crazy Diamond"
   PERFORMER "Pink Floyd"
   INDEX 01 00:00:00
...


CueSplit will handle this fine, but ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) won't - the value returned for R${GENRE} will be "Progressive".

@nyaochi

Seeing as this is EAC, and 98% of cuesheets being processed by ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) will be created in this way, is there any chance that you could get ACDIR to process these REM statements as required?

With CueSplit I used the following logic, which I believe accounts for most/all situations:

The line must be:

REM <tag name> <tag value>

If <tag name> contains spaces, e.g.: MY COMMENT, it must be surrounded in quotes, e.g.:

REM "MY COMMENT" <tag value>

... otherwise the first word after REM will be assumed to be <tag name>, and all following text will be assumed to be <tag value>.

After detirmining <tag name>, check whether <tag value> is surrounded by quotes - which some applications/users use (http://www.hydrogenaudio.org/forums/index.php?showtopic=32281)  (the linked post was quite useful).  If so, remove them.

A few examples of valid statements:

REM COMMENT Comment
REM COMMENT This is my comment
REM COMMENT "This is my comment"
REM "MY COMMENT" This is my comment
REM "MY COMMENT" "This is my comment"


I don't mean to teach you to suck eggs, or to attempt to dictate to you in any way.  I realise that I am on a very thin line, and am close to moving from supportive to annoying and/or interfering.

However, I believe that the meta data parsing of ACDIR (http://nyaochi.sakura.ne.jp/xoops/modules/mysoftwares/tc_2.html) will benefit from implementing such an approach, and am keen to help in any way I can.  I gave this a fair bit of thought when writing CueSplit, and I would like to help by passing on that work.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-02 09:00:30
Miss me?

OK, another request for ACDIR, for a facility that both WavSplit and CueSplit have.

Would you consider adding a switch which will allow the user to append the TRACK 1 INDEX 0 track, if there is one, to the beginning of track 1?

Both WavSplit and CueSplit achieve this by simply changing the start of the first track from the TRACK 1 INDEX 1 time to 0:00:00 if the switch is present.  If the switch is not present (i.e.: by default) the start of the first track should be the time set for TRACK 1 INDEX 1.

If you want to be a fancy pants it is also possible that you could treat the TRACK 1 INDEX 0 track as a separate track, with the tracknumber "0".  I would actually prefer this, as it is a separate track after all.  The possibility for both would be optimal.

I must admit, at the time of writing, I haven't actually tested to see what ACDIR currently does with these cuesheets.  I will test tonight (10 hrs time).  I would assume it uses the TRACK 1 INDEX 1 time.  Either way, without a switch, it's not going to suit all people.

When I get home I'll try to append a cuesheet snippet to clarify what I mean here.

Edit:

Code: [Select]
PERFORMER "Lemon Jelly"
TITLE "'64 - '95"
FILE "CDImage.ape" WAVE
 TRACK 01 AUDIO
   TITLE "Intro"
   PERFORMER "Lemon Jelly"
   INDEX 00 00:00:00
   INDEX 01 01:23:18
 TRACK 02 AUDIO
   TITLE "'88 AKA Come Down On Me"
   PERFORMER "Lemon Jelly"
   INDEX 01 01:47:53
...


So in the above cuesheet track "0" is 00:00:00-01:23:17, and track 1 is 01:23:18-01:47:52.  Or, track 1 is either 01:23:18-01:47:52 or 00:00:00-01:47:52 depending on the switch.

Edit 2: OK, well I have now tested and ACDIR does just leave the TRACK 1 INDEX 0 data out.  I think this is best as the default action, but I would like a switch to be able to access it.

As I say, both WavSplit and CueSplit (both of which I have also tested today - and all three are producing bit-identical results under the same circumstances) have a switch to allow you to prepend this data to track 1.

I think it would be great if ACDIR gave you the opportunity to take three courses of action:I'm not sure how you would implement this - either as two new switches (--pregap-prepend and --pregap-track) or as one switch with a value (--pregap [ignore|prepend|track]).  I guess one switch with a value makes most sense, as it can only be set to one or the other - two switches would suggest that both could be used simultaneously.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-02 09:05:56
Quote
Ah, I've just noticed that EAC doesn't bother quoting values with spaces, e.g.:

Code: [Select]
REM GENRE Progressive Rock
REM DATE 1995
REM DISCID 8611D80B
REM COMMENT ExactAudioCopy v0.95b1
PERFORMER "Pink Floyd"
TITLE "Pulse (CD 1)"
FILE "Range.wav" WAVE
 TRACK 01 AUDIO
   TITLE "Shine On You Crazy Diamond"
   PERFORMER "Pink Floyd"
   INDEX 01 00:00:00
...

As of 0.95b2 (2005-06-01) it appears EAC does now quote values with spaces:

Code: [Select]
REM GENRE "Progressive Rock"
REM DATE 1995
REM DISCID 8611D80B
REM COMMENT "ExactAudioCopy v0.95b2"
PERFORMER "Pink Floyd"
TITLE "Pulse (CD 1)"
FILE "Range.wav" WAVE
 TRACK 01 AUDIO
   TITLE "Shine On You Crazy Diamond"
   PERFORMER "Pink Floyd"
   INDEX 01 00:00:00
...


I would still like to see the improved meta data parsing, but I no longer see it quite so necessary.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-06 13:01:51
I have this line in my batch file:

SET acdirCommand=%pathToAcdir% --output "%mp3Folder%\$~A\$~T\$n - $~t.mp3" --pipe "$q%pathToLame%$q -V5 --athaa-sensitivity 1 --scale %scale% --tt $#t --ta $#a --tl $#T --tn $#n - $#o" "%~dpn2.cue"

When run it appears as though the first quote before the LAME path is being ignored.

An example:

"C:\DOS\LAME.EXE" -V5 --athaa-sensitivity 1 --scale 0.316592 --tt "Blue Light" --ta "Bloc Party" --tl "Test Audio CD" --tn "02" - "C:\DOS\CDBackup\MP3\Bloc Party\Test Audio CD\02 - Blue Light.mp3"
'C:\DOS\LAME.EXE" -V5 --athaa-sensitivity 1 --scale 0.316592 --tt "Blue' is not recognized as an internal or external command,
operable program or batch file.


Any ideas what is happening here?  I can't see how it's a problem with my command.  I can only assume that ACDIR is doing something wrong.  I don't understand how the quote is there on what looks like the command to be called, but obviously isn't when being executed.

If I manually attempt to run:

C:\DOS\LAME.EXE" -V5 --athaa-sensitivity 1 --scale 0.316592 --tt "Blue Light" --ta "Bloc Party" --tl "Test Audio CD" --tn "02" - "C:\DOS\CDBackup\MP3\Bloc Party\Test Audio CD\02 - Blue Light.mp3"

I get exactly the same result.

Why do I feel like I'm talking to myself...
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-06-08 02:08:28
Sorry for my absence.  I've been busy with another project.

Quote
REM COMMENT Comment
REM COMMENT This is my comment
REM COMMENT "This is my comment"
REM "MY COMMENT" This is my comment
REM "MY COMMENT" "This is my comment"

[a href="index.php?act=findpost&pid=297205"][{POST_SNAPBACK}][/a]

When I saw this at first, I thought this was not the fault of ACDIR but of EAC. Of course you can use comment lines freely. But, if you are willing to use REM for describing some information, a value containing a space should be quoted, conforming to the custom of cue sheets. Then I noticed the improvement of 0.95b2. Do you mind if I leave the current specification of ACDIR?
Code: [Select]
REM <field-name> <field-value>

You can quote <field-name> and <field-value> if you want.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-08 09:34:37
Quote
Sorry for my absence.  I've been busy with another project.

No problem.  Thank you for taking the time to respond.

Quote
Do you mind if I leave the current specification of ACDIR?
Code: [Select]
REM <field-name> <field-value>

You can quote <field-name> and <field-value> if you want.

Personally I think this format makes the most sense - any value with spaces should be quoted.  NB: I didn't realise you could actually do it with the field name, but I have just tested and it works fine (e.g.: $R{MY COMMENT} returns REM "MY COMMENT" "ExactAudioCopy v0.95b2").

Unfortunately, there are some people that don't quote the field value, as per the thread quoted (http://www.hydrogenaudio.org/forums/index.php?showtopic=32281).  Looking at that thread it looks like it is the foobar component foo_cue_ex which is to blame (see Supacon's later posts) - which is a real shame.  Still, with foobar 0.9 foo_cue_ex will have to be redeveloped, and maybe the format will be revised...

Considering the change in EAC 0.95b2 (which is quite interesting in itself, I wonder what made AndrĂ© change his mind?), I am quite happy for you to leave it as it is.  EAC will be the biggest contributor of cuesheets in my opinion.

I think you've already agreed that the REM command (and other commands like TITLE?), and the field name, should be case insensitive in 0.11.

Thanks again.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-08 12:52:00
OK, I'm going to add another tiny little niggle that I have, while you are considering the others.

$n returns the track number padded, e.g.: "01".  Although LAME seems to handle this OK, so "--tn $n" will render as "--tn 01" but be stored as "1", I wonder whether some other encoders may not.

Technically, I believe, track numbers should be stored as a numeric value, and not zero padded.  In any case, my suggestion would allow either.

I would say that $n should return "1", while $~n (the filename-safe version) should return "01". The thinking being is that you generally pad the tracknumber when creating a filename, e.g.: --output "$~A\$~T\$~n - $~t.mp3".

This should probably follow for $N as well.

So, if people want to be anal they can use "--tn $n", and ID3v2 users can use something like "$~n/$~N", to get a format like "01/12" or "01/06".

It's just yet more flexibility - $~n and $~N are currently useless, so why not use them to provide even more options?

I know. Even I hate me. 

Edit: Relevant, but inconclusive, links to standards.  APEv2 does state "integer" or "integer/integer". ID3v2 example is not padded : ID3v2 (http://www.id3.org/id3v2.3.0.html#TRCK) and APEv2 (http://www.hydrogenaudio.org/musepack/klemm/www.personal.uni-jena.de/~pfk/mpp/sv8/apekey.html)
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-06-08 14:19:21
Quote
Technically, I believe, track numbers should be stored as a numeric value, and not zero padded.  In any case, my suggestion would allow either.

Technically speaking, "1" and "01" are both valid integer strings. Because both atoi("01") and atoi("1") return 1, a software interprets these integer values as I expected. And most programing languages follow this rule by default.

Quote
Edit: Relevant, but inconclusive, links to standards.  APEv2 does state "integer" or "integer/integer". ID3v2 example is not padded : ID3v2 (http://www.id3.org/id3v2.3.0.html#TRCK) and APEv2 (http://www.hydrogenaudio.org/musepack/klemm/www.personal.uni-jena.de/~pfk/mpp/sv8/apekey.html)
[a href="index.php?act=findpost&pid=304550"][{POST_SNAPBACK}][/a]

I think the situation depends on the follwing three factors:
1) How an encoder program handles a command-line input "01/12" and stores it into a tag field.
2) Whether the tag specification allows "01/12".
3) How a parser program handles a tag value "01/12" if the encoder and tag spec stored as it is.

Considering that maximum track number for a valid audio CD is 99, the tag specification should reserve at least two characters for a track number if it requires to store the valus as string. Since both "01" and "1" are valid integer string, I don't think this causes a trouble.

I don't want ACDIR's variable specification to be complicated. Great if you let me know a case where the current specification actually causes a trouble with some encoders.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-08 14:26:10
Cool.  Thanks for the response.

I kinda regreted posting this one once I had, as I really don't want to cloud the issue too much.

I agree that the solution could confuse the variable system.

I am happy that you feel that all/most applications will treat "1" and "01" equally.  I based my argument on the fact that I have seen those-in-the-know complain about zero-padded numbers as TRACK values.  If the actual tagging process will "filter" this anyway, then that is great by me.

Thanks again.  I'm really looking forward to 0.11 alpha...  Do you have any other fetaures (other than those I've requested) in mind?
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-22 08:56:53
Hi,

I'm tested ACDIR 0.10 and it looks like a great tool.

I tested lamecs.bat:

Code: [Select]
@acdir --output "$n - $t - $a.mp3" --pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9


It worked so far.

But, as you know, LAME only is able to set some of the possible id3v2-fields. As an example, it is not possible to set the "Position in Media Set"-field or "Album-Subtitle"-field.

Is it possible to modify the batch in a way, that a tagging-program runs after the encoding to set all the id3v2 fields, that LAME is not able to set.
Which command-tagger would be a good choice.

thanks
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-22 10:59:04
You should just be able to use && in your pipe command, e.g.:

--pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o && id3.exe <id3.exe command here>"

NB: && is simply used to run multiple commands on one line, i.e.: "command1 && command2 && command3" will run command1, then command2, then command3.

The only ID3 command line tagger I know of is ID3.EXE (http://home.wanadoo.nl/squell/id3.html).
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-06-22 12:25:58
I released ACDIR version 0.11 alpha with a lot of help from Synthetic Soul.
http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)

- Improved the cuesheet parser to be case-insensitive.
- Variable names of REM field are now case-insensitive.
- Added --hidden-track1 option, which assumes track #1 to begin at TRACK 01 INDEX 00 if any. This will force to include the hidden part of track 1.
- Modified oggenccs.bat, cue2ogg.bat, mppenccs.bat, and cue2mpp.bat to support REM YEAR and REM GENRE

Quote
Is it possible to modify the batch in a way, that a tagging-program runs after the encoding to set all the id3v2 fields, that LAME is not able to set.
[a href="index.php?act=findpost&pid=308042"][{POST_SNAPBACK}][/a]

I thought about it once: multiple --pipe and --exec arguments that are executed one-by-one. For example,
Code: [Select]
@acdir --output "$n - $t - $a.mp3" --pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o" --exec "tag $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9

I will add this to the todo-list for 0.12.

Quote
You should just be able to use && in your pipe command, e.g.:

--pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o && id3.exe <id3.exe command here>"
[a href="index.php?act=findpost&pid=308055"][{POST_SNAPBACK}][/a]

I didn't even know this (&&) solution. Thanks.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-22 12:42:20
Quote
I released ACDIR version 0.11 alpha with a lot of help from Synthetic Soul.
http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)

Cool - the official release.  I'll update my page. 

Quote
Quote
You should just be able to use && in your pipe command, e.g.:

--pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o && id3.exe <id3.exe command here>"

I didn't even know this (&&) solution. Thanks.

I tested briefly using:

--pipe "LAME -V5 - $#o && COPY $#o $n.mp3"

... and it appeared to work fine.

Quote
I thought about it once: multiple --pipe and --exec arguments that are executed one-by-one. For example,
Code: [Select]
@acdir --output "$n - $t - $a.mp3" --pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o" --exec "tag $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9

I will add this to the todo-list for 0.12.

This would be an easier (for the user) approach, as it should keep things easier to maintain.  Long command lines are a nightmare, and the --pipe command can look confusing enough with a load of variables in place.  This is my command I use in my batch files:

--output "%mp3Folder%\$~A\$~T\$n - $~t.mp3" --pipe "%pathToLame% -V5 --athaa-sensitivity 1 --scale %scale% --tt $#t --ta $#a --tl $#T --tn $#n --ty $#R{DATE} - $#o" "%~dpn2.cue"

Yum! 

I guess it comes down to how easy this would be for you, as the && method should be a usable workaround.

Thanks yet again nyaochi.
Title: cuesplit.exe Alpha
Post by: tycho on 2005-06-22 14:47:58
Thanks for the nice tool, nyaochi and Synthetic Soul.

I'm using ACDIR to split .ape file with APE 2 tags. However, it seems like embedded cuesheet tags does not hold unicode letters. Is it the tag format itself, or the tools that embeds the cuesheet which is the problem? I don't think it is ACDIR. Am I stuck with keeping the .cue file along with the CD image file?

/edit: hm. I cheked the ape tag definition page which states that most tags are UTF-8 strings. Well, the extracted filenames are not the same as the original, so a wrong convertion is happening somewhere. Maybe this is not the right the place to discuss that...
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-22 15:02:36
Quote
Thanks for the nice tool, nyaochi and Synthetic Soul.

I'm just an advocate and keen user of ACDIR - ACDIR is nyaochi's work completely.

Quote
I'm using ACDIR to split .ape file with APE 2 tags. However, it seems like embedded cuesheet tags does not hold unicode letters. Is it the tag format itself, or the tools that embeds the cuesheet which is the problem? I don't think it is ACDIR. Am I stuck with keeping the .cue file along with the CD image file?

What tagging application did you use?  APEv2 tags are UTF-8 if I remember correctly, so there really shouldn't be an issue.

Have you tried using ACDIR with an external cuesheet with UNICODE characters?  That should go some way to proving where the process is failing.
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-23 21:27:26
cool would be something like that inside the command-option:

$#if{field}{parameter used if field exists}{parameter used if field does not exists} or
$#if{filed=value}{parameter used if field == value}{parameter used if field != value}

Understanable what I'm searching for?

regards
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-23 21:39:22
I believe I understand what you're asking for.

I'd be interested to see one or two examples of where or how you would use this feature though.  I'm finding it difficult to see how useful it would be.

I'm not saying it wouldn't be useful, I'm just lacking imagination.
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-24 06:02:43
Quote
I believe I understand what you're asking for.

I'd be interested to see one or two examples of where or how you would use this feature though.  I'm finding it difficult to see how useful it would be.

I'm not saying it wouldn't be useful, I'm just lacking imagination.
[a href="index.php?act=findpost&pid=308422"][{POST_SNAPBACK}][/a]


OK, let's try one:

Code: [Select]
acdir --output "$if{PERFORMER=Various}{\$R{SERIES}\$R{DATE}$if{VOLUME}{ - Vol. $R{VOLUME}}{\$A\$R{DATE} - $T\}$if{MEDIASET}{$R{MEDIASET}-}$n - $a - $t.mp3" --pipe "lame -V 2 --add-id3v2 --tt $#t --ta $#a --tl $#T --ty $#r{DATE} --tn $#n --tg $#R{GENRE} $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9


should result in:
\Dream Dance\2005 - Vol. 35\02-13 - Carl B - All Day.mp3
\Natalie Imbruglia\2005 - Counting Down The Days\02 - Shiver.mp3
Title: cuesplit.exe Alpha
Post by: Pensive on 2005-06-24 08:35:23
rhh
Title: cuesplit.exe Alpha
Post by: Pensive on 2005-06-24 08:35:44
Ok - i have a suggestion for you all - i was going to write it myself but i just started a new job with a move into London and im too busy....

I'm creating a flac army of all my cds to pipe around my house when i get wireless audio devices. As you know foobar and winamp can play individual tracks, while preserving the lossless CD image.

I'm also buying a portable mp3 player.


Could any of you add drag n drop functionality to your software which would allow  you to split the flac file up into normal wave files, and parse them to mp3, ogg or aac etc. with real ease of use?

My other idea is a virtual mp3 folder - realtime encoding everything from your FLAC images, when its requested - so you dont waste any space, and you can change the bitrate and quality/format at will.
The beauty of this is that it is compatible with all mp3/ogg/aac/wma players past, present and future, including the software. Or it could be bodged to work really easily.

It's my idea - but Im gonna honestly say i cant be bothered to implement it - im too busy. Any of you young fellas want to collaborate on this idea? I can explain the concept better, and i have more ideas - like auto detection of required bitrates (according to mp3 player disc space and how many tracks you select from your FLAC archive) etc.......

peace
Title: cuesplit.exe Alpha
Post by: tycho on 2005-06-24 09:00:48
Quote
What tagging application did you use?  APEv2 tags are UTF-8 if I remember correctly, so there really shouldn't be an issue.
I have tried both Tag.exe and Wapet.exe, e.g.:
>  Wapet.exe CDImage.ape -f "cuesheet=CDImage.cue" MAC.exe CDImage.wav CDImage.ape -c2000
>  lamecs.bat CDImage.ape
This does not recreate the unicode characters in the filenames correctly.
Quote
Have you tried using ACDIR with an external cuesheet with UNICODE characters?  That should go some way to proving where the process is failing.
Yes, "lamecs.bat CDImage.cue" works as it should.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-24 09:31:34
Quote
I have tried both Tag.exe and Wapet.exe, e.g.:
>  Wapet.exe CDImage.ape -f "cuesheet=CDImage.cue" MAC.exe CDImage.wav CDImage.ape -c2000

Hmmm... I wondered whether this may rear its head.

I don't think the -f switch functionality I implemented in Tag and Wapet will cope with UNICODE characters - it assumes each byte to be a character.

It really should*, but as I am no C++ programmer I don't know how I would implement it.

I will take a look at the rest of the source and see if there's any pointers.

Meanwhile, try tagging a file using foobar and see if you get better results.


* That said, the way I understand it the cuesheet standard is ASCII.  I'm not sure even foobar likes non-ascii cuesheets.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-24 12:27:23
Removed: totally posted to the wrong thread! 
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-27 13:20:20
Quote
Quote
I believe I understand what you're asking for.

I'd be interested to see one or two examples of where or how you would use this feature though.  I'm finding it difficult to see how useful it would be.

I'm not saying it wouldn't be useful, I'm just lacking imagination.
[a href="index.php?act=findpost&pid=308422"][{POST_SNAPBACK}][/a]
OK, let's try one:

Code: [Select]
acdir --output "$if{PERFORMER=Various}{\$R{SERIES}\$R{DATE}$if{VOLUME}{ - Vol. $R{VOLUME}}{\$A\$R{DATE} - $T\}$if{MEDIASET}{$R{MEDIASET}-}$n - $a - $t.mp3" --pipe "lame -V 2 --add-id3v2 --tt $#t --ta $#a --tl $#T --ty $#r{DATE} --tn $#n --tg $#R{GENRE} $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9
should result in:
\Dream Dance\2005 - Vol. 35\02-13 - Carl B - All Day.mp3
\Natalie Imbruglia\2005 - Counting Down The Days\02 - Shiver.mp3[a href="index.php?act=findpost&pid=308496"][{POST_SNAPBACK}][/a]


@Syntetic Soul: No reaction so far? Is this example enough for you?
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-27 13:26:41
Oh, sorry.  Thanks for the example - I see what you are after now.

It's up to nyaochi whether he wants to implement it or not.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-06-27 13:47:14
Quote
Quote
I believe I understand what you're asking for.

I'd be interested to see one or two examples of where or how you would use this feature though.  I'm finding it difficult to see how useful it would be.

I'm not saying it wouldn't be useful, I'm just lacking imagination.
[a href="index.php?act=findpost&pid=308422"][{POST_SNAPBACK}][/a]


OK, let's try one:

Code: [Select]
acdir --output "$if{PERFORMER=Various}{\$R{SERIES}\$R{DATE}$if{VOLUME}{ - Vol. $R{VOLUME}}{\$A\$R{DATE} - $T\}$if{MEDIASET}{$R{MEDIASET}-}$n - $a - $t.mp3" --pipe "lame -V 2 --add-id3v2 --tt $#t --ta $#a --tl $#T --ty $#r{DATE} --tn $#n --tg $#R{GENRE} $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9


should result in:
\Dream Dance\2005 - Vol. 35\02-13 - Carl B - All Day.mp3
\Natalie Imbruglia\2005 - Counting Down The Days\02 - Shiver.mp3
[a href="index.php?act=findpost&pid=308496"][{POST_SNAPBACK}][/a]

Do you really use "REM SERIES", "REM VOLUME", "REM MEDIASET", etc? Can you retrieve such information from some source (like freedb)?

Considering the implementation simplicity, I don't want to implement the conditional expression like $if{PERFORMER=Various} because I must change ACDIR source code a lot. In contrast, I can implement another conditional expression like $if{MEDIASET} (i.e., without operators and arguments) and find it useful for other occasions, for example, $if{GENRE}{--tg $#R{GENRE}} (if REM field "GENRE" exist, add and set "--tg" option).

I will add this to the 0.12 todo list.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-06-27 14:07:20
Quote
Quote
What tagging application did you use?  APEv2 tags are UTF-8 if I remember correctly, so there really shouldn't be an issue.
I have tried both Tag.exe and Wapet.exe, e.g.:
>  Wapet.exe CDImage.ape -f "cuesheet=CDImage.cue" MAC.exe CDImage.wav CDImage.ape -c2000
>  lamecs.bat CDImage.ape
This does not recreate the unicode characters in the filenames correctly.
Quote
Have you tried using ACDIR with an external cuesheet with UNICODE characters?  That should go some way to proving where the process is failing.
Yes, "lamecs.bat CDImage.cue" works as it should.
[a href="index.php?act=findpost&pid=308514"][{POST_SNAPBACK}][/a]

I'll look into this problem later. I don't expect this to be a fault of ACDIR.

BTW, even after using embedded cuesheet, I couldn't find its usefulness. You will get less support from software such as players and CD writers. You cannot edit the layout as easily as you open it with a favorite text editor. It requires file parsing only to distinguish APE files with/without a cuesheet embedded. ACDIR does not have a function to enumerate (--find) only audio files with a cuesheet embedded, which is a necessary process to convert all CD images into respective compressed audio files.

What is the merit of embedded cuesheets other than integrating two files into one? I defenitely prefer separated CD images.
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-27 14:17:15
@nyaochi

It looks like tycho's embedded cuesheet problem is actually caused by Wapet and Tag - as the code I used can't cope with UNICODE files.

I would like to fix this, but I don't think I have the skills.  The -f switch, which I implemented and allows you to set a tag from the contents of a file, was only originally introduced to Tag and Wapet for my own use - and I never considered UNICODE support as I basically listen to US or UK artists.


RE: Embedded cuesheets:

I personally embed the cuesheet in my APE file, but keep the external cuesheet also.

I like the embedded cuesheet for the reason that I have only one file to worry about.  As long as my APE file is safe I have everything I need.

I agree embedded cuesheets may be less easy to use and maintain than an external cuesheet - but for my purposes I solely archive to APE - so maintenance, flexibility and software support are of little interest to me.  As long as I can extract the cuesheet from my APE when I need to burn to CD I'm happy.

I actually run ACDIR using an external cuesheet (a temporary cuesheet which points to EAC's temporary WAVE file) - before I create the APE file and embed the cuesheet.  However, I like the fact that I could use it with my embedded cuesheet in my APE file, for transcoding at a later time.
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-27 14:47:06
Quote
Do you really use "REM SERIES", "REM VOLUME", "REM MEDIASET", etc? Can you retrieve such information from some source (like freedb)?

Yes I really use them. No I cannot retrieve them from any database. I edit the cuesheet and add them by myself. Well it's not too difficult to guess them, if you have something like "DreamDance 35 CD1" 

Quote
Considering the implementation simplicity, I don't want to implement the conditional expression like $if{PERFORMER=Various} because I must change ACDIR source code a lot.
Yes you're right. I understand that. 

Quote
In contrast, I can implement another conditional expression like $if{MEDIASET} (i.e., without operators and arguments) and find it useful for other occasions, for example, $if{GENRE}{--tg $#R{GENRE}} (if REM field "GENRE" exist, add and set "--tg" option).
I will add this to the 0.12 todo list.
[a href="index.php?act=findpost&pid=309219"][{POST_SNAPBACK}][/a]
Thanks, that helps a lot. 
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-28 23:26:41
Hi,

It seems, that in acdir special characters are not replaced before a file is created. After encoding an album, the one with a "?" in the title was missing afterwards.

If this is the problem, please replace the characters, which are not alowed in Fat32 or Linux.

These are my suggestions, maybe you find them adequate
"/" -> "-"
"\" -> "-"
":" -> " -" (there is a space!)
"*" -> "#"
"?" -> "" (null string)
""" -> "''" (two single ')
"<" -> "["
">" -> "]"
"|" -> "-"

thanks
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-06-29 00:05:30
Quote
Hi,

It seems, that in acdir special characters are not replaced before a file is created. After encoding an album, the one with a "?" in the title was missing afterwards.

If this is the problem, please replace the characters, which are not alowed in Fat32 or Linux.

These are my suggestions, maybe you find them adequate
"/" -> "-"
"\" -> "-"
":" -> " -" (there is a space!)
"*" -> "#"
"?" -> "" (null string)
""" -> "''" (two single ')
"<" -> "["
">" -> "]"
"|" -> "-"

thanks
[a href="index.php?act=findpost&pid=309622"][{POST_SNAPBACK}][/a]

Did you use the modifier that legitimates variable vales to be suitable for a filename such as $~t, $~o, etc?
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-06-29 07:08:28
Quote
Quote
Hi,

It seems, that in acdir special characters are not replaced before a file is created. After encoding an album, the one with a "?" in the title was missing afterwards.

If this is the problem, please replace the characters, which are not alowed in Fat32 or Linux.

Did you use the modifier that legitimates variable vales to be suitable for a filename such as $~t, $~o, etc?
[a href="index.php?act=findpost&pid=309630"][{POST_SNAPBACK}][/a]


Sorry, I used lamecs.bat and did not understand all the %$#~-possibilities:
Code: [Select]
@acdir --output "$n - $t - $a.mp3" --pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9


So, I should modify it that way?:
Code: [Select]
@acdir --output "$~n - $~t - $~a.mp3" --pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9


OK, now I understand # and ~, but what is the difference between % and $? In you're batch-examples, you seem to use only $?
Title: cuesplit.exe Alpha
Post by: Synthetic Soul on 2005-06-29 09:30:51
Quote
So, I should modify it that way?:
Code: [Select]
@acdir --output "$~n - $~t - $~a.mp3" --pipe "lame --tt $#t --ta $#a --tl $#T --tn $#n $x - $#o" %1 %2 %3 %4 %5 %6 %7 %8 %9

You can just use:

"$n - $~t - $~a.mp3"

.. as $n - the track number - should never include any illegal characters.  (Similarly you should be able to use $n instead of $#n as it should never contain spaces.)

NB: All illegal characters are replaced with a space.

Quote
OK, now I understand # and ~, but what is the difference between % and $? In you're batch-examples, you seem to use only $?

$ and % are interchangable.  I always use $ as using % in a batch file will confuse matters. If you are running from the command line you can use either.
Title: cuesplit.exe Alpha
Post by: nyaochi on 2005-07-02 21:14:29
I released version 0.12 alpha. Changes are:
1) Fixed a serious bug that was introduced with 0.10 alpha. ACDIR 0.10-0.11 alpha could not pass a valid filename to Monkey's Audio decoder in some case. ACDIR might not open an Monkey's Audio file if either the filename and pathname contains a character other than US-ASCII.
2) Added #ifdef, #ifndef, #else, #endif to describe a flexible command-line with conditions.
3) Improved batch files to use brand new #ifdef...#endif block and legitimated variable (e.g., $~t) for a filename.

Because of 1), ACDIR could not handle APE cuesheets that point to an APE file whose filename contains characters other than US-ASCII or that is located under a path with characters other than US-ASCII. I suppose this caused tycho's trouble. I confirmed that ACDIR 0.12 handles a Japanese pathname correctly.

As for the usage of 2), please refer to the batch files. The typical example would be:
Code: [Select]
--genre #ifdef$r{GENRE}$#r{GENRE}#else$qNo genre$q#endif

If a cuesheet contains REM GENRE "Rock", this will be:
Code: [Select]
--genre "Rock"

If not:
Code: [Select]
--genre "No genre"


http://nyaochi.sakura.ne.jp/xoops/modules/...php?cid=1&lid=2 (http://nyaochi.sakura.ne.jp/xoops/modules/mydownloads/singlefile.php?cid=1&lid=2)
Title: cuesplit.exe Alpha
Post by: Vietwoojagig on 2005-11-25 23:32:32
Something that would be cool:
Having a cue and a corresponding wav. Splitting the wav with acdir using the cue and getting multiple wavs and a new cue created out of all infos of the old cue and the new wavs.
I think this could be usefull if you decide that your achive with one wav per cd was wrong but don't want to re-rip everything.
Title: cuesplit.exe Alpha
Post by: ponchorage on 2005-11-26 15:10:30
I've got some code in Wack that currently does this, but I haven't created a standalone application do it. Maybe I could do that in the future.