Am 25.10.2014 um 21:34 schrieb Richard Shann:
> I think you mis-remembered the name of the procedure - display is a
> scheme procedure, disp is the Denemo procedure:
>
> (disp "command " command ", bank " bank ", velocity " velocity)
You're right, thank you. Now there is still one thing I do not
understand. With the traditional form of (d-GetMidi) as in angry delete,
the midi channel is always 0. But if I use the #f option in d-GetMidi to
return a byte list (as shown below), the channel is shown correctly.
;;; Master keyboard filter
(let ((midi "")
(command 0)
(bank 0)
(note 0)
(velocity 0)
(loop 0))
(d-InputFilterNames (_ "Master Keyboard MIDI Filter"))
(d-SetMidiCapture #t)
(set! loop (lambda ()
(begin
(set! midi (d-GetMidi #f))
(set! command (bit-extract (list-ref midi 0) 4 8))
(set! bank (bit-extract(list-ref midi 0) 0 4))
(set! note (list-ref midi 1))
(set! velocity (list-ref midi 2))
(disp "command " command ", bank " bank ", note " note ",
velocity "
velocity)
;(if (and (= command #x90)(= bank 0))
;(d-PutMidi midi)
(if (= command 0)
(display "Filter stopping")
(loop)))))
(loop))
(d-SetMidiCapture #f)
Andreas
_______________________________________________
Denemo-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel