wastingmylife

Gbox1.5

Jun 17th, 2021
1,128
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #BUILD to work on termux
  2. #linux version of the terminal
  3. #download termux from Google play
  4.  
  5.  
  6. sl
  7. figlet GBOX 1.5
  8.   echo "fb: Shadow People - Sweden ITC"
  9.   echo "guide to THE unknown (eng/swe)"
  10.   echo "--install-recommended"
  11.   echo "--download-sound-bank-p1"
  12.   echo "--download-sound-bank-p3"
  13.   echo ""
  14.   echo "--play-radio-p1"
  15.   echo "--play-radio-p3"
  16.   echo ""
  17.   echo "--build-sound-bank"
  18.   echo ""
  19.   echo "--start"
  20.   echo "--start-soundbok-version"
  21.   echo ""
  22.   echo "--play-white-noice"
  23.   echo "--record"
  24.   echo "--record-to-avi"
  25.   echo "--resize-avi"
  26.   echo $0 ?
  27.   echo "hyntens@gmail.com <-- mail me!"
  28.  
  29. if [[ $1 == "--resize-avi"
  30.  ]];then
  31. ffmpeg -i record.avi -b 300 -s 320x240 -vcodec xvid -ab 32 -ar 24000 -acodec aac final_record.mp4
  32. fi
  33.  
  34. if [[ $1 == "--record-to-avi"
  35.  ]];then
  36. ffmpeg -i record.mp3 -vn -acodec copy -f avi record.avi
  37. fi
  38.  
  39. if [[ $1 == "--record"
  40.  ]];then
  41. arecord -q -f cd -d 1 recvol.wav;sox recvol.wav -n stat 2>&1|grep RMS|grep amplitude|cut -d"." -f2|cut -c 1-2>recvol;echo $((`cat recvol`+1))>recvol;rec -t wav - silence 1 0.1 `cat recvol` -1 1.0 `cat recvol`%|lame -s 44.1 -a -v - >record.mp3
  42. fi
  43.  
  44. if [[ $1 == "--play-radio-p1"
  45.  ]];then
  46.  mpg123 -Z bank/P1/.bank*
  47. fi
  48.  
  49. if [[ $1 == "--play-radio-p3"
  50.  ]];then
  51.  mpg123 -Z bank/P3/.bank*
  52. fi
  53.  
  54. if [[ $1 == "--play-white-noice"
  55. ]];then
  56. play -n synth whitenoise
  57.  
  58. fi
  59.  
  60. if [[ $1 == "--download-sound-bank-p1" ]]; then
  61.  echo "Swedish online station"
  62.  echo "the replace_bank.mp3 are replaced"
  63.  echo "before running start bash gbox --build-sound-bank"
  64. wget -c http://http-live.sr.se/p1-mp3-192 -O replace_bank.mp3
  65. fi
  66.  
  67. if [[ $1 == "--download-sound-bank-p3" ]]; then
  68.  echo "Swedish online station"
  69.  echo "the replace_bank.mp3 are replaced"
  70.  echo "before running start bash gbox --build-sound-bank"
  71. wget -c http://http-live.sr.se/p3-mp3-192 -O replace_bank.mp3
  72. fi
  73.  
  74. if [[ $1 == "--start" ]]; then
  75. mpg123 -Z .bank*
  76. fi
  77.  
  78. if [[ $1 == "--start-soundbok-version" ]]; then
  79. mpg123 -Z bank/.bank*
  80. fi
  81.  
  82. if [[ $1 == "--install-recommended" ]]; then
  83. apt update
  84.  apt install ffmpeg sox cmatrix
  85.  apt install lame mpq123 git lame
  86.  apt install mpv cowsay sl figlet wget
  87. fi
  88.  
  89. if [[ $1 == "--build-sound-bank" ]]; then
  90. rm -f .bank*
  91. ffmpeg -i replace_bank.mp3 raw.wav
  92. sox replace_bank.mp3 reverse.wav reverse
  93. sox reverse.wav -b 16 -r 16k rev-stereo-16k.wav remix 1
  94. ffmpeg -i rev-stereo-16k.wav replace_bank.mp3
  95. sox replace_bank.mp3 .bank.mp3 trim 0 0.1 : newfile : restart
  96. rm *.wav
  97. rm replace_bank.mp3
  98.  
  99. mpg123 -Z .bank*
  100.  
  101. fi
RAW Paste Data