#!/bin/csh

switch ($1)
	
	case play:
		timidity -EFreverb=1 -U -idq -Or -o - -s 44100 "$2"
		exit 0
	breaksw
	
	case isOurFile:
		if ( { ( cat "$2" | file - | grep -q MIDI ) } ) then
			exit 0
		else
			exit -1
		endif
	breaksw
	
endsw

exit -1
