Advertisement
metalx1000

Custom Doom GZdoom zscript sounds

Apr 17th, 2024 (edited)
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.24 KB | None | 0 0
  1. #custom sounds for doom
  2. #create directories
  3. mkdir -p sounds/custom
  4. cd sounds/custom
  5.  
  6. #records gun sounds
  7. padsp sox -r 96k -c 1 -d tmp.wav
  8.  
  9. #split sounds
  10. sox tmp.wav bang.wav silence 1 0.1 1% 1 0.1 1% : newfile : restart
  11.  
  12. #remove temp
  13. rm tmp.wav
  14.  
  15. # record other sounds
  16. echo -n "Enter Sound Name: ";read name
  17. padsp sox -r 96k -c 1 -d tmp.wav
  18.  
  19. #split sounds
  20. sox tmp.wav $name.wav silence 1 0.1 1% 1 0.1 1% : newfile : restart
  21.  
  22. #remove temp
  23. rm tmp.wav
  24.  
  25. #move back up to main folder
  26. cd ../../
  27.  
  28. # create sound config file
  29. find sounds|while read snd;do [[ -f "$snd" ]] && echo -e "$(echo "$snd"|sed 's|sounds/||g'|cut -d\. -f1)\t$(basename "$snd"|cut -d\. -f1)";done |sort > SNDINFO
  30.  
  31. # creat random groups automatially
  32. cat SNDINFO|awk '{print $2}'|tr -d '[0-9]'|sort -u|while read group
  33. do
  34.   echo "\$random $group {$(grep $group SNDINFO|awk '{print $1}'|tr "\n" " ")}" >> SNDINFO
  35. done
  36.  
  37. # create random groups Manually
  38. echo -n "Enter Sound Group: ";read group; echo "\$random $group {$(grep $group SNDINFO|awk '{print $1}'|tr "\n" " ")}" >> SNDINFO
  39.  
  40. #extra notes
  41. $random weapons/pistol {custom/bang001 custom/bang002 custom/bang003 custom/bang004 }
  42. $random grunt/attack {custom/bang001 custom/bang002 custom/bang003 custom/bang004 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement