home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Multimed
/
Multimed.zip
/
mp3p.zip
/
mp3p.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-12-02
|
7KB
|
282 lines
/* Arin mp3puristin rl99.12.03 v0.20
HaLPaRoTuKTioNS 1999
http://www.tec.puv.fi/~k3
e-mail:k3@sah.tec.puv.fi
THIS SCRIPT NEEDS TO BE COMPETITELY REWRITTEN... THIS IS MY FIRST REXX SCRIPT
KEEP THAT IN MIND WHILE INVESTIGATING THE SECRETS OF MP3PURISTIN
You can modify mp3puristin as much as you like! I've made this to fill my
needs... so if you need something, just add it! Send me a copy of the modified
version and some sort of description about the changes...
*/
/*
History: ! = fix ... + = added somethig ... - = removed something
990914: + First working version... Everything new!!!
0.01 + Leech and Lame supported
990915: ! Some major fixes
0.10 + Colors
990916: + User can define which tracks to be encoded
0.15
990922: ! Something...
0.16
991013: + Mono encoding now uses -a switch
0.17 ! Some defaults added and redefined...
991101: ! Uups! There was missing some sections, sorry.
0.18 ! Uuups uups... ...now fixed...
991203 + variable filename ( by Andreas.Ebbert@gmx.de )
0.20 ! comments are now in english also.
*/
/* Main / Pääohjelma */
TIME('E')
CALL alustus
CALL infoscreen
IF modex ='Y' then CALL muuta
CALL modes
call infoscreen2
IF modex ="Y" then CALL filenamechange
CALL leech
CALL lameta
SAY
SAY
SAY gr'Thank you for using this product for 'TIME('R')' seconds'
SAY gr'Look also http://www.tec.puv.fi/~k3 for updates etc...'gray
EXIT
/* Infoscreen1 */
INFOSCREEN:
SAY cy'┬─────────────────────────────────────┐'
SAY cy'│ 'gr'MP3PuRiSTiN RL99.12.03 for OS/2 'cy'│'
SAY cy'│ 'gr'(v0.20) (c)1999 HaLPaRoTuKTioNS 'cy'│'
SAY cy'└─────────────────────────────────────┘ '
SAY cy'Thanks to Andreas Ebbert for filenamechange option'
SAY
SAY gr'MP3PuRiSTiN is Freeware... if you like this send me e-mail!!!'
SAY gr'This version of MP3PuRiSTiN can only use 'bl'leech'gr' and'bl' lame'
SAY
SAY re'THERE IS NO CHECKINGS IN THIS SCRIPT, SO BE CAREFUL WHAT YOU TYPE IN!!!'
SAY re'If something goes wrong -> hit CTRL-C to exit...'
SAY
SAY wh'Default Parameters:'
SAY gr'Mode: ' cy'joint stereo'
SAY gr'Bitrate: ' cy'128'
SAY gr'Quality: ' cy'High (less speed)'
SAY gr'Grabber: ' cy'Leech'
SAY gr'Encoder: ' cy'Lame'
SAY
SAY pu'Do you want to change these options?(y/n)'gray
PULL modex .
RETURN
INFOSCREEN2: /* infoscreen2 */
SAY
SAY gr'Filename: ' cy''filename
SAY
SAY pu'Do you want to change the filename?(y/n)'gray
PULL modex
RETURN
/* Let's make some colors and default parameters... / Tehdään muutama tarpeellinen väri... */
ALUSTUS: /*FORMAT*/
'cls'
es='1b'x'[1;3'
re=es'1m'; gr=es'2m'; br=es'3m'; bl=es'4m'; pu=es'5m'; cy=es'6m'; wh=es'7m'
ez='1b'x'[;3'
gray=ez'7m'
/* Defaults / Alkuasetukset */
smode='-m j'
br=' 128'
quality='-h'
vari=' '
vbr= ' '
mono=' '
filename='track'
RETURN
/* Show all the modes / Esitetään kaikki moodit */
MODES:
SAY wh'Here are all the switches... Ingnore if you do not undestand :)'
SAY gr'mode 'cy smode
SAY gr'bitrate 'cy br
SAY gr'quality 'cy quality
SAY
SAY gr'variable 'cy vari
SAY gr'vbr 'cy vbr
SAY wh'lame 'smode' -b'br' 'quality' 'vari' 'vbr' <in.wav> <out.mp3>'gray
SAY
RETURN
/* Getting some information about CD */
LEECH:
SAY pu'In which drive you have the audio cd...?'gray
SAY 'Give only the drive letter... without the :'
PULL drive
SAY wh'Table of Contents'gray
'@leech f: toc'
SAY wh'Above is TOC, you can see there how many tracks there are on CD'
SAY pu'First track to encode?'gray
PULL track_first
SAY pu'Last track to encode?'gray
PULL track_last
RETURN
/* Leech & Lame / Nyt se alkaa, nääs se lametus ja leetsaus*/
LAMETA:
DO WHILE track_first <= track_last
'@leech 'drive': track ' track_first' "'filename'"'
IF track_first < 10
THEN
DO
filenameWAV = filename'_0'track_first'.wav'
filenameMP3 = filename'_0'track_first'.mp3'
END
ELSE
DO
filenameWAV = filename'_'track_first'.wav'
filenameMP3 = filename'_'track_first'.mp3'
END
'@lame 'smode' -b 'br' 'quality' 'vari' 'vbr' 'mono' "'filenameWAV'" "'filenameMP3'"'
'@del "'filenameWAV'" >nul'
track_first=track_first + 1
END
RETURN
/* Changing the options / Asetuksien muuttaminen tehdään täällä */
MUUTA: /* muuta=change */
SAY
SAY wh'Choose one of the following:'
SAY pu'a)'wh' Custom (make your own decicions)'
SAY pu'b)'wh' Stereo, br 160, High quality'
SAY pu'c)'wh' Stereo, br 192, High quality'
SAY pu'd)'wh' Joint Stereo, Variable br, min br 112, Vquality 4 (br will be 128-160)'
SAY pu'e)'wh' Stereo, Variable br, min br 128, Vquality 6...'
SAY pu'f)'wh' Mono, br 80... not so good...'
PULL custom
IF custom='F' then
DO
smode=' -m m '
mono =' -a '
br=' 80 '
quality=' '
vari=' '
vbr=' '
RETURN
END
IF custom='E' then
DO
smode=' -m s '
br=' 128 '
quality=' -h '
vari=' -v '
vbr=' -V 6'
RETURN
END
IF custom='D' then
DO
smode=' -m j '
br=' 112'
quality=' -h '
vari=' -v '
vbr=' -V 4'
RETURN
END
IF custom='C' then
DO
smode=' -m s '
br=' 192 '
quality=' -h '
RETURN
END
IF custom='B' then
DO
smode=" -m s "
br=' 160 '
quality=' -h '
RETURN
END
ELSE
SAY gr'MODE: 'pu'(s)tereo (j)oint, (f)orce or (m)ono? 'gray
PULL smodex
if smodex='S' then smode="-m s"
if smodex='F' then smode="-m f"
if smodex='J' then smode="-m j"
if smodex='M' then do
smode="-m m"
mono=" -a "
END
SAY gr'QUALITY: 'pu'(h)igh, (f)ast or (n)ormal?'gray
pull askq
if askq='H' then quality=' -h '
if askq='F' then quality=' -f '
if askq='N' then quality=' '
SAY gr'VARIABLE BITRATE: 'pu'(y/n)'gray
PULL vari
IF vari='Y' then
DO
SAY gr'VBR QUALITY:'pu' 0=high quality... 9=lowest'gray
PULL vbr
tmp=vbr
vbr='-V 'tmp
SAY wh'OK, the next bitrate sets the allowed minimum bitrate'gray
vari=' -v '
END
ELSE vari=' '
SAY gr'BITRATE:'pu' 32,40,56,64,80,96,112,128,160,192,224,256 or 320? 'gray
PULL br
RETURN
FILENAMECHANGE:
SAY
SAY gr'current filename:'pu filename gray
SAY gr'new filename (may contain spaces, etc.): 'pu
PARSE PULL filename
RETURN