View Single Post
Old 04-03-2006, 05:45 AM   #1
Art Evans
Mortal
 
Join Date: Feb 2006
Posts: 6,656
Default More detailed thoughts on Cue Sheet functionality

I'm hankering more and more for a mechanism for converting Reaper project markers to Cue Sheets.

This is how it could be done, in very-pseudo code.... please do not laugh....

First you'd have markers in your project at each point where a track was to begin, including at the very start, assuming the CD starts from project time zero.

If you wanted to have some markers as track markers and other markers as not track markers, then it would be simple to build in an adaptation of what follows such that the program only created cue sheet entries for markers whose titles begin with "tk", or "#", or some similar convention.

=============================================

Have a tickbox in the Render dialog for "Create cue sheet"
If ticked, and output file is wave format, do this -

open filename.rpp for input as #1
open filename.cue for output as #2

output to 2 "REM Created by Reaper"
output to 2 "TITLE '[render output filename with no extension]' "
output to 2 "FILE '[render output filename]' WAVE

Countervalue = 1

Read first line from #1
while first 6 characters <> "MARKER" then Read next line
end while

Start loop
Let stringvalue = the text portion in quotes on the current line of #1 [a line beginning with the word MARKER]
Let timevalue = the numeric portion of the current line of #1 converted to mins:secs:frames format

Output to 2 "TRACK countervalue AUDIO"

If countervalue = 1 then
Output to 2 "PREGAP 00:02:00" [You only need this for track one]
End if

Output to 2 "TITLE 'stringvalue' "
Output to 2 "INDEX 01 timevalue"

Let countervalue = countervalue + 1

Read next line from #1
if first 6 characters <> "MARKER" then end loop
if countervalue = 100 then end loop [Only 99 tracks are permitted on a CD]
otherwise go back to start loop

Close files

========================================
This is what the resulting cue sheet file might look like -
========================================
REM Created by Reaper
TITLE "Team of Pianists CD2"
FILE "Team of Pianists CD2.wav" WAVE
TRACK 01 AUDIO
TITLE "Brahms : Sonata No.2 for piano and violin"
PREGAP 00:02:00
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "Andante tranquillo - vivace - andante"
INDEX 01 08:33:56
TRACK 03 AUDIO
TITLE "Allegretto grazioso (quasi Andante)"
INDEX 01 15:05:66
TRACK 04 AUDIO
TITLE "Debussy : Sonata for violin and piano in G minor"
INDEX 01 20:59:61
TRACK 05 AUDIO
TITLE "Intermede - Fantasque et leger"
INDEX 01 26:01:05
TRACK 06 AUDIO
TITLE "Finale - Tres anime"
INDEX 01 30:26:19
TRACK 07 AUDIO
TITLE "Encore - Ravel : Piece en forme de Habanera"
INDEX 01 36:34:56
========================================

Ideally one would also have a mechanism for doing the opposite - taking a cue sheet and reading its contents, converting the titles and indexes to markers in the current session file - pretty straightforward process, only minor complication being the conversion from cue sheet mins:secs:frames format to that used in
Reaper project files. You could provide this function by having an option in the "File" menu of Reaper which would be "Import Cue Sheet..." which would provide a browser to find the .cue file you wanted to create Reaper project markers from.

Given that CueListTool (freeware) can take a wave file with standard cues in it and create a cue sheet, and that it can also take a cue sheet and write the info to a wave file as standard cues, and that many programs can read and write standard cues in wave files, and that Nero and EAC and other programs can burn CDs on the basis of cue sheets, then by means of what seems to be the fairly simple matter of adding cue sheet writing (and reading) to Reaper would help to translate between it and other programs, and to provide CD burning functionality - all of which I for one would very much like to see.

Last edited by Art Evans; 04-03-2006 at 05:48 AM.
Art Evans is offline   Reply With Quote