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