I Was Up All Night Doing This

master
Jay 3 years ago
commit 12c81bd326

@ -0,0 +1,58 @@
# csv2cue - Adobe Markers to CUE
Converts exported markers from Adobe Audition in to a CUE Sheet.
## About
I recently exported a 5 hour project and ran in to an issue; the embedded CUE
sheet generated by Audition would not load in my usual editor. It turned out to
be a problem with timecode. Audition writes:
```
hh:mm:ss:ff
```
But the cuesheet standard dictates:
```
mm:ss:ff
```
What this script does is strip the time-code out of Markers.csv, performs math
to convert hours in to minutes, then generates enough of a CUE sheet to import
in to my audio editor.
## How To Use/Setup
Put the script in the same directory as Markers.csv.
Make sure script is executable (chmod +x csv2cue.sh)
Execute script.
Your file is output.cue
# History
```
07-MAY-2022 - Initial Commit
```
# License
csv2cue
Copyright (C) 2022 Jay Moore - nq4tango@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

@ -0,0 +1,15 @@
#!/bin/bash
tail -n +2 Markers.csv | tac | awk '{print $3}' | sed -e "s/:/ /g" >> cue.tmp
t=1
cat cue.tmp | while read line;
do
p=($(echo $line))
if [ ${p[0]} -gt 0 ]; then
p[1]=$(echo "(${p[0]} * 60) + ${p[1]}" | bc)
fi
cue=($(echo "${p[1]}:${p[2]}:${p[3]}"))
printf "\nTRACK %02d AUDIO\n" $t >> output.cue
printf "INDEX 01 %s\n" $cue >> output.cue
t=$((t + 1))
done
rm cue.tmp
Loading…
Cancel
Save