1#!/bin/sh 2########################################################## 3### DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE ### 4### DOING. THIS SCRIPT MAKES MANY ASSUMPTIONS ABOUT ### 5### DEFAULT VALUES BEING SET TO MY PERSONAL SETUP. ### 6########################################################## 7fmmode=0 8mididevno=-1 9play=PLAY_MIDI 10gus1=/dos/ultrasnd/midi 11gus2=${PREFIX}/lib/Plib 12########################################################## 13### YOU MUST HAVE THE VOXWARE SOUND DRIVER INSTALLED ### 14### FOR THIS SCRIPT TO FUNCTION PROPERLY. /dev/sndstat ### 15### MUST BE AVAILABLE FOR READING ### 16########################################################## 17echo "Playmidi Quick Config Utility, Copyright (C)1996 Nathan I. Laredo" 18echo "This is free software with ABSOLUTELY NO WARRANTY. For details, please" 19echo "see the file COPYING included with the Playmidi distribution." 20echo "" 21echo "What type of device do you want to make the default?" 22echo "1. External midi synth, Ensoniq Soundscape, TB Maui, waveblaster cards" 23echo "2. Yamaha 2-op FM" 24echo "3. Yamaha 4-op FM" 25echo "4. Gravis Ultrasound" 26echo "5. SB AWE32 Synth" 27echo -n "(default = 1) --> " 28if [ "$ans1" = "1" ] || [ -z "$ans1" ] 29then 30echo "" 31echo "Playmidi External MIDI synth configuration:" 32grep -A 10 Midi\ devices: /dev/sndstat | grep -B 10 Timers: | grep -v Timers: 33echo "If you want to force one of the midi devices above, enter the number" 34echo "here, otherwise, to default to the last detected, hit enter." 35echo -n "(at runtime, option -D# will override this) --> " 36if [ -n "$ans2" ] 37then 38mididevno=$ans2 39fi 40fi 41if [ "$ans1" = "2" ] 42then 43play=PLAY_FM 44fi 45if [ "$ans1" = "3" ] 46then 47play=PLAY_FM 48fmmode=1 49fi 50if [ "$ans1" = "4" ] 51then 52play=PLAY_GUS 53echo "" 54echo "Where do you keep your Gravis Ultrasound patch files?" 55echo -n "(default = $gus1) --> " 56if [ -z "$ans3" ] 57then 58ans3=$gus1 59fi 60gus1=$ans3 61echo "" 62echo "Where else should playmidi look for GUS patch files?" 63echo -n "(default = $gus2) --> " 64if [ -z "$ans4" ] 65then 66ans4=$gus2 67fi 68gus2=$ans4 69fi 70if [ "$ans1" = "5" ] 71then 72play=PLAY_AWE32 73fi 74echo "" 75echo -n "Now creating playmidi.h with your defaults..." 76gus1=`echo $gus1 | sed -f pathname.sed` 77gus2=`echo $gus2 | sed -f pathname.sed` 78echo " s/DEFAULT_PLAYBACK_MODE/$play/ 79 s/DEFAULT_FM_MODE/$fmmode/ 80 s/MIDI_DEFAULT_DEV/$mididevno/ 81 s/PRIMARY_GUS_PATCH_LOCATION/$gus1/ 82 s/SECONDARY_GUS_PATCH_LOCATION/$gus2/" >config.sed 83sed -f config.sed playmidi.h-dist >playmidi.h 84echo "Done." 85exit 0 86