#!/bin/sh

#file access test
echo Basic id3v1 tags 1| text2wave - | lame --resample 48 - "access_1.mp3"
chmod 777 access_1.mp3

echo Basic id3v1 tags 1| text2wave - | lame --resample 48 - "access_2.mp3"
chmod 666 access_2.mp3

echo Basic id3v1 tags 1| text2wave - | lame --resample 48 - "access_3.mp3"
chmod 555 access_3.mp3

echo Basic id3v1 tags 1| text2wave - | lame --resample 48 - "access_4.mp3"
chmod 444 access_4.mp3

# *** Basic id3v1 tags (ver 1 layer 3) ***

echo Basic id3v1 tags 1| text2wave - | lame --resample 48 - "id3v1_basic_1.mp3"
id3v2 --id3v1-only -t "The title"  -a "The Artist" -A "The album name" -y 1969 -c "This is a basic comment"  -T 5 -g 5 "id3v1_basic_1.mp3"
echo Basic id3v1 tags 2| text2wave - | lame --resample 48 - "id3v1_basic_2.mp3"
id3v2 --id3v1-only -t "Title"      -a "Artist"     -A "Album"          -y 1999 -c "Comment"                  -T 6 -g 6 "id3v1_basic_2.mp3"
echo Basic id3v1 tags 3| text2wave - | lame --resample 48 - "id3v1_basic_3.mp3"
id3v2 --id3v1-only -t "nimi"       -a "artisti"    -A "levy"           -y 2029 -c "jotain kommenttia"        -T 7 -g 7 "id3v1_basic_3.mp3"

# *** id3v1 specific tags ***



# *** Basic id3v23 tags (ver 1 layer 3) ***

echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_basic_1.mp3"
id3v2 --id3v2-only -t "The titlev23"  -a "The artistv23" -A "The album namev23" -y 1969 -c "This is a basic commentv23"  -T 8  -g 8  "id3v23_basic_1.mp3"
echo Basic id3v23 tags 2| text2wave - | lame --resample 48 - "id3v23_basic_2.mp3"
id3v2 --id3v2-only -t "Titlev23"      -a "Artistv23"     -A "Albumv23"          -y 1999 -c "Commentv23"                  -T 9  -g 9  "id3v23_basic_2.mp3"
echo Basic id3v23 tags 3| text2wave - | lame --resample 48 - "id3v23_basic_3.mp3"
id3v2 --id3v2-only -t "nimiv23"       -a "artistiv23"    -A "levyv23"           -y 2029 -c "jotain kommenttiav23"        -T 10 -g 10 "id3v23_basic_3.mp3"

# *** id3v23 specific tags ***

#TRCK
echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_trck_1.mp3"
id3v2 --id3v2-only -t "The titlev23"  -a "The artistv23" -A "The album namev23" -y 1969 -c "This is a basic commentv23"  -T 88/95  -g 8  "id3v23_trck_1.mp3"

#COMM
echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_comm_1.mp3"
id3v2 --id3v2-only -t "The titlev23"  -a "The artistv23" -A "The album namev23" -y 1969 -c " - "  -T 8  -g 8  "id3v23_comm_1.mp3"

echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_comm_2.mp3"
id3v2 --id3v2-only -t "The titlev23"  -a "The artistv23" -A "The album namev23" -y 1969 -c " "  -T 8  -g 8  "id3v23_comm_2.mp3"

echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_comm_3.mp3"
id3v2 --id3v2-only -t "The titlev23"  -a "The artistv23" -A "The album namev23" -y 1969 -c "c"  -T 8  -g 8  "id3v23_comm_3.mp3"

#TCON
echo id3v23 tcon 1| text2wave - | lame --resample 48 - "id3v23_tcon_1.mp3"
id3v2 --id3v2-only --TCON "Red Metal"  "id3v23_tcon_1.mp3"

echo id3v23 tcon 2| text2wave - | lame --resample 48 - "id3v23_tcon_2.mp3"
id3v2 --id3v2-only --TCON "(42)"  "id3v23_tcon_2.mp3"

echo id3v23 tcon 3| text2wave - | lame --resample 48 - "id3v23_tcon_3.mp3"
id3v2 --id3v2-only --TCON "(42)Soul"  "id3v23_tcon_3.mp3"

echo id3v23 tcon 4| text2wave - | lame --resample 48 - "id3v23_tcon_4.mp3"
id3v2 --id3v2-only --TCON "(42)Smooth Soul Metal"  "id3v23_tcon_4.mp3"

#TCON the next ones are "against the spec", but usually handled this way
echo id3v23 tcon 5| text2wave - | lame --resample 48 - "id3v23_tcon_5.mp3"
id3v2 --id3v2-only --TCON "42"  "id3v23_tcon_5.mp3"

echo id3v23 tcon 6| text2wave - | lame --resample 48 - "id3v23_tcon_6.mp3"
id3v2 --id3v2-only --TCON "42 Red Metal"  "id3v23_tcon_6.mp3"

#Others
echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_tags_1.mp3"
id3v2 --id3v2-only  --PCNT "4" --TALB "Album/Movie/Show" --TCON "content type" --TCOP "copyright me" --TDAT "2312" --TENC "julkaisija" --TEXT "Monday, monday.. yeah yeah.. monday" --TIT2 "Title or songname" --TLAN "fin" --TPE1 "lead performer" --TYER "2003" "id3v23_tags_1.mp3"

echo Basic id3v23 tags 1| text2wave - | lame --resample 48 - "id3v23_tags_2.mp3"
id3v2 --id3v2-only  --TIT1 "content group desc" --TOAL "original album title" --TPE2 "Orchestra" --TPUB "publisher" "id3v23_tags_2.mp3"

# *** Basic header/calculated tags ***

#Sampling rate
echo Header sampling 32  | text2wave - | lame --resample 32   - "header_sampling_mpeg1_1.mp3"
echo Header sampling 48  | text2wave - | lame --resample 48   - "header_sampling_mpeg1_2.mp3"
echo Header sampling 44.1| text2wave - | lame --resample 44.1 - "header_sampling_mpeg1_3.mp3"

echo Header sampling 16   | text2wave - | lame --resample 16    - "header_sampling_mpeg2_1.mp3"
echo Header sampling 24   | text2wave - | lame --resample 24    - "header_sampling_mpeg2_2.mp3"
echo Header sampling 22.05| text2wave - | lame --resample 22.05 - "header_sampling_mpeg2_3.mp3"

echo Header sampling 8     | text2wave - | lame --resample 8      - "header_sampling_mpeg25_1.mp3"
echo Header sampling 12    | text2wave - | lame --resample 12     - "header_sampling_mpeg25_2.mp3"
echo Header sampling 11.025| text2wave - | lame --resample 11.025 - "header_sampling_mpeg25_3.mp3"

#Bitrate
echo Header bitrate 32 | text2wave - | lame --resample 32 --cbr -b 32  - "header_bitrate_mpeg1_1.mp3"
echo Header bitrate 40 | text2wave - | lame --resample 32 --cbr -b 40  - "header_bitrate_mpeg1_2.mp3"
echo Header bitrate 48 | text2wave - | lame --resample 32 --cbr -b 48  - "header_bitrate_mpeg1_3.mp3"
echo Header bitrate 56 | text2wave - | lame --resample 32 --cbr -b 56  - "header_bitrate_mpeg1_4.mp3"
echo Header bitrate 64 | text2wave - | lame --resample 32 --cbr -b 64  - "header_bitrate_mpeg1_5.mp3"
echo Header bitrate 80 | text2wave - | lame --resample 32 --cbr -b 80  - "header_bitrate_mpeg1_6.mp3"
echo Header bitrate 96 | text2wave - | lame --resample 32 --cbr -b 96  - "header_bitrate_mpeg1_7.mp3"
echo Header bitrate 112| text2wave - | lame --resample 32 --cbr -b 112 - "header_bitrate_mpeg1_8.mp3"
echo Header bitrate 128| text2wave - | lame --resample 32 --cbr -b 128 - "header_bitrate_mpeg1_9.mp3"
echo Header bitrate 160| text2wave - | lame --resample 32 --cbr -b 160 - "header_bitrate_mpeg1_10.mp3"
echo Header bitrate 192| text2wave - | lame --resample 32 --cbr -b 192 - "header_bitrate_mpeg1_11.mp3"
echo Header bitrate 224| text2wave - | lame --resample 32 --cbr -b 224 - "header_bitrate_mpeg1_12.mp3"
echo Header bitrate 256| text2wave - | lame --resample 32 --cbr -b 256 - "header_bitrate_mpeg1_13.mp3"
echo Header bitrate 320| text2wave - | lame --resample 32 --cbr -b 320 - "header_bitrate_mpeg1_14.mp3"

echo Header vbr 1| text2wave - | lame --resample 32 --abr 64  - "header_bitrate_vbr_mpeg1_1.mp3"
echo Header vbr 1| text2wave - | lame --resample 32 --abr 128 - "header_bitrate_vbr_mpeg1_2.mp3"
echo Header vbr 1| text2wave - | lame --resample 32 --abr 256 - "header_bitrate_vbr_mpeg1_3.mp3"
