;;; Angry Delete filter
(let ((midi 0)
      (command 0)
      (note 0)
      (velocity 0)
      (loop 0))
     (d-InputFilterNames "Angry Delete MIDI Filter")
     (d-SetMidiCapture #t)
     (set! loop  (lambda ()
		(begin		  
		  (set! midi (d-GetMidi))
		  (set! velocity (bit-extract midi 16 24))
		  (set! command (bit-extract midi 0 8))
		  
		  (if (and (= command #x90)(> velocity 80))
		       (begin (d-PlayMidiKey #xF06001)
                              (d-DeletePreviousObject)))
		  (d-PutMidi midi)
		  (if (= command 0)
		      (display "Filter stopping")
		      (loop)))))
     (loop))
(d-SetMidiCapture #f)
