denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] The angry midi delete.


From: Richard Shann
Subject: [Denemo-devel] The angry midi delete.
Date: Sun, 16 Nov 2008 14:49:53 +0000

Here is a script that implements the "angry midi delete". This is where
keypresses harder than a threshold replace the note before rather than
inserting a new note. (So-called, because when you are angry at playing
a wrong note there is a natural, though deplorable, reaction to hit the
correct note more loudly).
I have chosen the threshold velocity=70, and I have not got a raspberry
function yet to let you know you have deleted successfully, but it works
very well indeed.
Richard
;;;;;;;;;;;;
;;; MIDI filter - the "Angry Delete"

(define midi 0)
(define velocity 0)
(define command 0)

(define loop  (lambda ()
                (begin
                  
                  (set! midi (d-GetMidi))
                  (set! velocity (bit-extract midi 16 24))
                  (set! command (bit-extract midi 0 8))
                  (if (> velocity 70)
                      (d-DeletePreviousObject))
                  (d-PutMidi midi)
                  (loop))))
(loop)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]