[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Scheme question
From: |
Andreas Schneider |
Subject: |
Re: [Denemo-devel] Scheme question |
Date: |
Sat, 25 Oct 2014 22:10:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.1.2 |
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] Scheme question, Andreas Schneider, 2014/10/25
- Re: [Denemo-devel] Scheme question, Richard Shann, 2014/10/25
- Re: [Denemo-devel] Scheme question,
Andreas Schneider <=
- Re: [Denemo-devel] Scheme question, Richard Shann, 2014/10/25
- Re: [Denemo-devel] Scheme question, Andreas Schneider, 2014/10/26
- Re: [Denemo-devel] Scheme question, Richard Shann, 2014/10/26
- Re: [Denemo-devel] Scheme question, Andreas Schneider, 2014/10/26
- Re: [Denemo-devel] Scheme question, Richard Shann, 2014/10/29