#!/usr/bin/kaptain # # lameGUI version 0.21 using kaptain grammer (C) 2000 by Jens Henrik Goebbert, goebbert@epost.de # released under the GNU General Public License, version 2 # http://www.fsf.org/copyleft/gpl.txt # start "LameGUI (Lame MP3 Encoder)"-> lame buttons; lame :tabbed :reverse -> audio_options lame_options general; #----------BASICS----------- general "general"-> up_1 down_1; up_1 :horizontal -> left right; left :framed -> input; input "input device" -> audio | file!; audio "direct recording" -> " - "; file "wav-file" -> " "@infile("*.wav")="~/test.wav"" "; input_2 -> ao_up" | " | ""; input_2 <- input; right :framed -> output konsole; output "output file" -> " "@outfile("*.mp3")="~/test.mp3"; konsole "konsole"-> the_konsole; the_konsole "see all output" -> "konsole --caption LameGUI-Output --notoolbar --nohist --nowelcome --vt_sz 120x20 -e bash -c '" |@; the_konsole_2->";echo;echo finished ... will close in 3 sec;sleep 3 '"|""; the_konsole_2<-the_konsole; down_1 -> @; #--------detailed BASICS description---------- output=""< an existing file would be overwritten END ; audio="""you want to record from your soundcard directly"; file="""you want to convert a WAV file to an mp3"; down_1=< please send ideas and bugreports <---- END ; #----------lame Options--------- lame_options "lame options" -> l_up l_down; l_up :horizontal :framed-> l_fixed | l_variable; l_fixed "fixed bitrate"->l_fixed_2; l_fixed_2 :framed ->l_bitraten l_quality; l_bitraten :beside "bitrate" -> " -b "@combo("32","40","48","56","64","80","96","112","128","160","192","224","256","320")=9" "; l_quality :horizontal "mp3 quality" ->l_high | l_normal ! | l_low ; l_high "high" -> " -h "; l_normal "normal" -> ""; l_low "low" -> " -f "; l_variable "variable bitrate" ->l_variable_2; l_variable_2 ->l_vb_up l_vb_down; l_vb_up :framed :horizontal->l_vb_min l_vb_max; l_vb_min :beside "min. bitrate" -> " -b " @combo("32","40","48","56","64","80","96","112","128","160","192","224","256","320")=4" "; l_vb_max :beside "max. bitrate" -> " -B " @combo("8","16","32","40","48","56","64","80","96","112","128","160","192","224","256","320")=16 " "; l_vb_down :horizontal -> l_vb_down_1 l_vb_down_2; l_vb_down_1 :framed -> l_vb_quality; l_vb_quality "VBR quality" ->" -V "@integer(0,9)=4" "; l_vb_down_2 :framed -> l_vbrheader; l_vbrheader "VBR header" -> l_vbrheader2; l_vbrheader2 "yes/no"-> " -t " | @; l_down -> l_forboth extras; l_forboth :horizontal-> l_sm l_resamplebox; l_sm :framed ->l_stereo_mono; l_stereo_mono :horizontal "encode in..." -> l_mono |l_stereo !| l_jointstereo | l_forcejoint; l_stereo "stereo" -> " -m s "; l_mono "mono" -> " -m m "; l_jointstereo "joint stereo" -> " -m j "; l_forcejoint "force joint stereo" ->" -m f "; l_resamplebox :framed -> l_resample; l_resample "resample to ..." ->l_rs; l_rs :beside -> " --resample " @combo("16","22.05","24","32","44.1","48")=5" " | @!; #--------detailed lame options description---------------- l_fixed="""use a fixed bitrate which is faster to encode"< al_up al_down; al_up :framed -> al_options; al_options :horizontal -> al_left al_center al_right; al_left -> al_c al_o al_g al_a al_d al_ath al_abr al_preset al_e; al_center -> al_nores al_noshort al_F al_p al_r al_S al_x al_strict_ISO al_nohist; al_right -> al_filter ; al_a "downmix stereo file to mono" -> " -a " |@!; al_abr :beside "average bitrate encoding" -> " -abr "@integer(4,310)=100 |@!; al_nohist "disable histogram display" ->" --nohist "|@!; al_nores "disable bit reservoir" ->" --nores "|@!; al_noshort "disable short block frames" ->" --noshort "|@!; al_o "mark mp3 as copy" ->" -o "|@!; al_p "error protection" ->" -p "|@!; al_preset :beside "use built in presets" ->" --preset "@combo("phone","voice","fm","tape","hifi","cd","studio")=4" " |@!; al_r "input file is raw pcm" ->" -r "|@!; al_S "silent operation" ->" -S "|@!; al_strict_ISO "strict ISO compliance" ->" --strictly-enforce-ISO "|@!; al_x "swapbytes" ->" -x "|@!; al_c "copyright" -> " -c " |@!; al_d "block type control" -> " -d "|@!; al_e :beside "de-emphasis" -> " -e "@combo("n","5","c")" "|@!; al_F "strictly enforce the -b option"-> " -F " |@!; al_g "graphical frame analyser" -> " -g " |@!; al_filter :framed ->al_filter_2; al_filter_2 "Bandwidth settings..." -> al_filter_default | al_filter_manual | al_k; al_filter_default "default settings" -> ""; al_filter_manual "manual filter settings" -> al_highpasstext al_lowpasstext; al_k "full bandwidth" ->" -k "; al_highpasstext :framed -> al_high; al_high "highpass" ->al_highpass al_highpass_width; al_highpass :beside "filtering frequency in kHz" ->" --highpass "@integer(0,20)=0" "|@!; al_highpass_width :beside "width of filtering in kHz" ->" --highpass-width "@integer(0,20)=0" "|@!; al_lowpasstext :framed ->al_low; al_low "lowpass" -> al_lowpass al_lowpass_width; al_lowpass :beside "filtering frequency in kHz" ->" --lowpass " @integer(0,20)=20|@!; al_lowpass_width :beside "width of filtering in kHz" ->" --lowpass-width " @integer(0,20)=20" "|@!; al_ath "ATH options ..." -> al_ath2 |@!; al_ath2 :horizontal -> al_athonly | al_noath; al_athonly "only ATH" -> " -athonly "; al_noath "no ATH" -> " --noath "; #al_mp3input #al_decode #al_disptime #al_comp "choose sompression ratio" -> " --comp " |@!; #al_freeformat "free format bitstream" -> " --freeformat " |@!; al_down -> @close="OK"; #-------------detailed description of advanced lame options ------------ al_filter_default="""Lame uses his default filter settings"; al_filter_manual="""You can set up your own filter settings here"; al_a="" "Mix the stereo input file to mono and encode as mono.(only for PCM input)" < ATH"; al_athonly="" "This option causes LAME to ignore the output of the psy-model and only use masking from the ATH" < ao_up ao_down; ao_up :horizontal :framed ->ao_arecord | ao_user; ao_arecord "use 'arecord'" -> ao_sample_fr; ao_sample_fr :framed -> ao_sample ao_stereo_mono; ao_sample "record from soundcard with ..."-> ao_dsp | ao_cd ! ; ao_cd "cd quality (44100Hz - 16-bit)"->"arecord -w -m "; ao_dsp "dat quality (48000Hz - 16-bit)"->"arecord -w -M "; ao_stereo_mono :horizontal "record from soundcard with..." -> ao_stereo | ao_mono ; ao_stereo "stereo" -> " -S "; ao_mono "mono" -> ""; ao_user "use manual settings" -> ao_up_right; ao_up_right :framed ->ao_direct; ao_direct :beside ->ao_manual ao_manual_text; ao_manual->@string="arecord -w -m "; ao_manual_text->@text(< ao_channel; ao_channel -> @action("kmix")="select input channel"; #---------------detailed audio options description------------ ao_cd="" < mp3_buttons gui_buttons; gui_buttons "LameGUI" -> @exec("rm -f ~/.lameGUI.pid")="exit"; mp3_buttons :horizontal "encoding" -> ba_start ba_preview ba_stop; ba_start ->@action(encode)="start"; ba_preview->@preview(encode)="preview"; ba_stop ->@action(stopit)="stop"; encode ->the_konsole input_2 " lame "l_stereo_mono l_resample l_up al_up input output the_konsole_2 " & echo $! > ~/.lameGUI.pid"; stopit -> "kill $(cat ~/.lameGUI.pid) & echo recording stopped"; #---------------detailed button-and-action description------------- ba_start=""< avoid pressing twice on the start button because that will start another prozess, which can only be stopped manuelly (with "ps -x" and "kill ...") END ; ba_preview=""<