IPB

Welcome Guest ( Log In | Register )

5 Pages V  « < 3 4 5  
Closed TopicStart new topic
Noncompliant to single wav cuesheet, Any automated tool?
Moitah
post Aug 2 2006, 22:29
Post #101





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



Thanks for your reply, I will update CUE Tools after I finish working on a few other programs.

This post has been edited by Moitah: Aug 2 2006, 22:29
Go to the top of the page
+Quote Post
shrinkmail
post Aug 2 2006, 22:50
Post #102





Group: Members
Posts: 72
Joined: 17-February 05
Member No.: 19915



QUOTE (Moitah @ Aug 3 2006, 02:59) *
Thanks for your reply, I will update CUE Tools after I finish working on a few other programs.

Glad to hear that you are still working on it. So far your program is working like a gem. Special thanks for this. smile.gif
Go to the top of the page
+Quote Post
Fandango
post Aug 3 2006, 00:35
Post #103





Group: Members
Posts: 1549
Joined: 13-August 03
Member No.: 8353



Yes, it always worked like flawlessly. The conversion quality even surpassed the cue sheet interpreter of fb2k 0.8.x and in fact I've never found a difference between a CUETool-created conversion and test rips done with EAC set to the corresponding modes.
Go to the top of the page
+Quote Post
greynol
post Aug 3 2006, 01:01
Post #104





Group: Super Moderator
Posts: 10338
Joined: 1-April 04
From: San Francisco
Member No.: 13167



I wrote this a while back.

It's a batch file that that you just drag and drop a separate track CUE onto and it will create a single wave CUE based on the size of the wave files called out in the separate track CUE.

It will accept noncompliant, corrected gaps, as well as leftout gaps CUEs. If you feed it a corrected gaps CUE it will ask if the waves were created with gaps apended to the beginning or end of the track. If you feed it a leftout gaps CUE it will ask you if you want to proceed assuming the tracks were created with gaps appended to the end of the track.

CODE
@ECHO OFF

SET _outfile="%~dpn1 (single wav).cue"

IF EXIST %_outfile% (
ECHO "%~n1 (single wav).cue"
ECHO already exists!
ECHO.
ECHO Press any key to end . . .
PAUSE>nul
GOTO end
)

SET _line=
SET _skip=
SET _file=0
SET _total_frames=0
SET _correct_cue=

GOTO start

:get_next_line
SET /A _line+=1
SET _skip=skip=%_line%

:start
FOR /F "usebackq tokens=1,2* %_skip%" %%X IN (%1) DO (
SET _x=%%X
SET _y=%%Y
SET _z=%%Z
GOTO generate_cue
)
GOTO end

:generate_cue
IF "%_x%" == "FILE" (
CALL :file "%~dp1%_y:~1% %_z:~0,-5%
GOTO check_for_error
)
IF "%_x%" == "PREGAP" (
IF %_file% GTR 1 (
IF "%_correct_cue%" NEQ "c" (
GOTO leftout_gaps
) ELSE (
GOTO lg_index
)
)
)
IF "%_x%" NEQ "INDEX" GOTO other
IF "%_z%" == "00:00:00" (
GOTO start_index
) ELSE (
GOTO non_start_index
)
:other
IF %_file% NEQ 0 (
IF "%_x%" == "TRACK" (
SET _x= TRACK
) ELSE (
SET _x= %_x%
)
)
IF DEFINED _z (
ECHO %_x% %_y% %_z%>>%_outfile%
GOTO get_next_line
)
IF DEFINED _y (
ECHO %_x% %_y%>>%_outfile%
GOTO get_next_line
)
ECHO %_x%>>%_outfile%
GOTO get_next_line


:start_index
IF "%_y%" == "01" GOTO new_start_index
IF "%_correct_cue%" == "" GOTO corrected_gaps
IF /I "%_correct_cue%" == "p" GOTO get_next_line

:new_start_index
CALL :format_index %_prev_ftotal%
ECHO INDEX %_y% %mm%:%ss%:%ff%>>%_outfile%
GOTO get_next_line


:non_start_index
IF "%_y%" == "01" (
IF /I "%_correct_cue%" == "p" (
CALL :new_00_index %_z%
GOTO new_start_index
)
)
CALL :extract_index %_z%
SET /A _iframes=_prev_ftotal + mm*4500+ss*75+ff - _pregap
CALL :format_index %_iframes%
ECHO INDEX %_y% %mm%:%ss%:%ff%>>%_outfile%
GOTO get_next_line


:new_00_index
CALL :extract_index %1
SET /A _pregap=mm*4500+ss*75+ff
IF %_file% == 1 GOTO :pregap
SET /A _iframes=_prev_ftotal - _pregap
CALL :format_index %_iframes%
ECHO INDEX 00 %mm%:%ss%:%ff%>>%_outfile%
GOTO :eof

:pregap
ECHO PREGAP %1>>%_outfile%
GOTO :eof


:file
IF NOT "%~x1"==".wav" (
ECHO The source CUE sheet must reference wave files!
SET _error=1
GOTO :eof
)
IF NOT EXIST %1 (
ECHO "%~nx1"
ECHO does not exist!
SET _error=2
GOTO :eof
)
SET /A _boundry=(%~z1 - 44)%%2352
IF %_boundry% GTR 0 (
ECHO The time for
ECHO "%~n1"
ECHO cannot be accurately calculated.
ECHO.
ECHO The file may not end on a frame boundry.
SET _error=3
GOTO :eof
)
SET _prev_ftotal=%_total_frames%
SET /A _total_frames+=(%~z1 - 44)/2352
SET /A _file+=1
SET _pregap=
IF %_file% GTR 1 GOTO :eof
ECHO FILE "Range.wav" WAVE>>%_outfile%
GOTO :eof

:check_for_error
IF "%_error%" NEQ "" GOTO error
GOTO get_next_line


:extract_index
SET _z=%1
IF %_z:~0,1% == 0 (
SET mm=%_z:~1,1%
) ELSE (
SET mm=%_z:~0,2%
)
IF %_z:~3,1% == 0 (
SET ss=%_z:~4,1%
) ELSE (
SET ss=%_z:~3,2%
)
IF %_z:~6,1% == 0 (
SET ff=%_z:~7,1%
) ELSE (
SET ff=%_z:~6,2%
)
GOTO :eof

:format_index
SET /A mm=%1/4500
SET /A ss=%1%%4500/75
SET /A ff=%1%%4500%%75
IF %mm% LSS 10 (SET mm=0%mm%)
IF %ss% LSS 10 (SET ss=0%ss%)
IF %ff% LSS 10 (SET ff=0%ff%)
GOTO :eof


:corrected_gaps
ECHO The source CUE sheet was likely created using
ECHO the Multiple WAV Files With Corrected Gaps option.
ECHO.
ECHO Enter "P" to continue assuming the corresponding files were created
ECHO with the Append Gaps To (P)revious Track (default) option selected,
ECHO.
ECHO enter "N" to continue assuming the corresponding files were created
ECHO with the Append Gaps To (N)ext Track option selected, or
ECHO.
SET /P _correct_cue=press ^<Enter^> to exit:
IF /I "%_correct_cue%" == "p" GOTO get_next_line
IF /I "%_correct_cue%" == "n" GOTO new_start_index
GOTO del_outfile


:leftout_gaps
ECHO The source CUE sheet was likely created using
ECHO the Multiple WAV Files With Leftout Gaps option.
ECHO.
ECHO Enter "c" to continue assuming the corresponding files were created
ECHO with the Append Gaps To Previous Track (default) option selected or
SET /P _correct_cue=press ^<Enter^> to exit:
IF /I "%_correct_cue%" NEQ "c" GOTO del_outfile

:lg_index
CALL :new_00_index %_y%
SET _pregap=
GOTO get_next_line


:error
ECHO.
ECHO Press any key to end . . .
PAUSE>nul

:del_outfile
DEL %_outfile%

:end


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
directjj
post Aug 14 2006, 02:19
Post #105





Group: Members
Posts: 54
Joined: 26-September 05
Member No.: 24709



QUOTE (Moitah @ Aug 2 2006, 17:29) *
Thanks for your reply, I will update CUE Tools after I finish working on a few other programs.


I just joined this thread, just heard about Cue Tools.

Can Cue Tools be used to automate the change of cast to proper case (Title Case) for Song Titles & Performers in Audio cue sheets?

Can it help me understand what is wrong with a .cue file (e.g. won't play in FooBar, plays track 2 twice in FooBar, plays track 12 for every track in WinAmp)?

In a nutshell what can Cue Tools Do.

I was referred to the download page and downloaded it but don't see a description at Moitah.net.

Thanks


--------------------
"J.J."
Go to the top of the page
+Quote Post
Moitah
post Oct 10 2006, 08:54
Post #106





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



[Link removed, see here for updated link]

This fixes the "Index length cannot be 0" and data track issues. It also adds an option for FLAC output, though the resulting files don't have seektables (which is why it's not 1.6.0 final), and the ability to stop/cancel during the writing of the audio files.

This post has been edited by Moitah: Nov 12 2006, 07:59
Go to the top of the page
+Quote Post
Fandango
post Oct 14 2006, 16:33
Post #107





Group: Members
Posts: 1549
Joined: 13-August 03
Member No.: 8353



Ah, that's great news! Thanks for this new release. I've tested the Data Track conversion already and it works as expected... ignoring the Data Track when converting seperate track cue sheets to single WAV cue sheet.

Then I have a suggestion for the opposite conversion scenario: add an option like "data track present". This will add an "EAC compliant" data track entry at the end of a seperate track cue sheet, they all look pretty much the same:
CODE
  TRACK 08 MODEx/2xxx
    TITLE "CD-Rom Track For PC and Mac "
    PERFORMER "Creation Rebel"
    ISRC 000000000000
    INDEX 00 04:10:15

The only thing that needs to be calculated is the "INDEX 00" line, it's the length of the last track. This way the user who knows what he is doing can easily "fake back" a seperate track cue sheet when he made a single wav rip of a CDDA disc with a data track. Also note that TITLE "CD-Rom Track For PC and Mac " is actually correct, the space between Mac and " is a typo in EAC's code, and for compliant's sake I'd adopt it because of that. laugh.gif

Unfortunately I'm not able to test the "Index length cannot be 0" thing anymore since I've deleted that rip some time ago. The remixes of those Can songs weren't that good anyway... tongue.gif

I also like the FLAC output, too. And I'm sure it will be the most awaited feature by most people.

Btw, how about starting your own thread here in the CD-HW/SW forum? It would be much easier to keep track of CUETools development and also easier to guide people in need of a tool like yours to that thread. Maybe it even becomes a sticky. And I'd contact a moderator to split this thread (at the point where you came up with your tool) and append it to that new thread, so the discussion about CUETools development will remain in one dedicated thread. smile.gif

This post has been edited by Fandango: Oct 14 2006, 16:42
Go to the top of the page
+Quote Post
Xenion
post Oct 19 2006, 11:46
Post #108





Group: Members
Posts: 1042
Joined: 23-May 02
From: DE
Member No.: 2107



cool! thanks for the work. VERY useful
Go to the top of the page
+Quote Post
Moitah
post Nov 2 2006, 10:15
Post #109





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



CUE Tools v1.6.0:
  • Added: Option to output FLAC files.
  • Fixed: "Index length cannot be 0" error.
  • Fixed: Couldn't handle CUE sheets with data tracks.
  • It's now possible to stop/cancel when writing audio files.
Download (Binary and Source) - .NET Framework 2.0 required

This version uses the FLAC 1.1.3 beta 2 library for decoding and encoding. The compression level and "verify" settings can be changed by editing "%AppData%\CUE Tools\settings.txt". The FLACCompressionLevel setting can range from 0 to 8 (inclusive), FLACVerify is 0 for disabled and 1 for enabled. The encoded FLAC files do have seektables and were bit-identical when I compared with the official "flac.exe" command line encoder with padding set to 4096 bytes.

This post has been edited by Moitah: Nov 4 2006, 05:30
Go to the top of the page
+Quote Post
Moitah
post Nov 3 2006, 06:46
Post #110





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



[Link removed, see here for updated link]

This adds WavPack decoding (no encoding, I'll see how much work that would involve). I haven't tested it with lossy+correction files but I think it should work.

This post has been edited by Moitah: Nov 12 2006, 08:00
Go to the top of the page
+Quote Post
ChangFest
post Nov 3 2006, 20:15
Post #111





Group: Members
Posts: 423
Joined: 3-February 04
Member No.: 11743



QUOTE (Moitah @ Nov 2 2006, 21:46) *
CUE Tools v1.7.0 Beta 1

This adds WavPack decoding (no encoding, I'll see how much work that would involve). I haven't tested it with lossy+correction files but I think it should work.

Appreciated very much. Thanks!
Go to the top of the page
+Quote Post
Moitah
post Nov 4 2006, 05:34
Post #112





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



CUE Tools v1.7.0:
  • Added: WavPack support, both read and write.
[Link removed, see here for updated link] - .NET Framework 2.0 required



I tested the WavPack reader with lossy+correction and it works fine. The WavPack writer uses the default settings, currently there isn't a way to change the compression level.

This post has been edited by Moitah: Nov 12 2006, 08:00
Go to the top of the page
+Quote Post
Moitah
post Nov 12 2006, 07:52
Post #113





Group: Members
Posts: 193
Joined: 5-June 02
From: Virginia Beach, VA
Member No.: 2227



CUE Tools now has its own thread, please post any new replies there instead of in this thread.
Go to the top of the page
+Quote Post

5 Pages V  « < 3 4 5
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th December 2014 - 20:31