denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] A Good Idea


From: Richard Shann
Subject: Re: [Denemo-devel] A Good Idea
Date: Fri, 05 Mar 2010 11:31:09 +0000

I missed out the complete listing of that midi thru script - just in
case you wanted to try it out:

;;;;;;;;;
;;;MidiThru

(if (not (defined? 'MidiThru::Active))
    (define MidiThru::Active #f)) 
(format #t "Starting with ~a~%"    MidiThru::Active)
(if MidiThru::Active
    (begin
      (d-PutMidi 0)
        (d-InputFilterNames "No MIDI Filter")
      (set! MidiThru::Active #f))
;;; not active
    (let ((midi 0)
          (command 0)
          (velocity 0)
          (note 0)
          (output 0))
      (begin
        (set! MidiThru::Active #t)
        (d-PlayMidiKey #x203001)
        (d-PlayMidiKey #x203401)
        (d-PlayMidiKey #x203701)
        (d-InputFilterNames "MIDI Thru Filter")
        (let loop  ()
                (if MidiThru::Active 
                        (begin
                          (set! midi (d-GetMidi))
                          (set! velocity (bit-extract midi 16 24))
                          (set! note (bit-extract midi 8 16))
                          (set! command (bit-extract midi 0 8))
                          (set! output (string-append (number->string command) 
" "
                                                      (number->string note) " " 
(number->string velocity)))
                          (format #t "Trying to do midibytes ~a~%" output)
                          (d-OutputMidiBytes output)            
                                 (loop)))))))
                        
;;;;;;;;;;;;;;;; end of MidiThru

as I say, this is just for concept testing, not for git

Richard
        

On Fri, 2010-03-05 at 09:42 +0000, Richard Shann wrote:
> On Thu, 2010-03-04 at 18:08 -0600, Jeremiah Benham wrote:
> > 
> > I would like to take a look at this script so I can better
> > understand  
> > what it is that needs done. Is it in git?
> 
> no - it is trivial and needs to be done in C anyway. It is mostly
> converting the format of d-GetMidi to d-OutputMidiBytes like this:
> 
>       (let loop  ()
>               (if MidiThru::Active 
>                       (begin
>                         (set! midi (d-GetMidi))
>                         (set! velocity (bit-extract midi 16 24))
>                         (set! note (bit-extract midi 8 16))
>                         (set! command (bit-extract midi 0 8))
>                         (set! output (string-append (number->string command) 
> " "
>                                                     (number->string note) " " 
> (number->string velocity)))
>                         (d-OutputMidiBytes output)            
>                                (loop)))))))
> 
> This won't get you any further on the MIDI recording thing - I'll reply
> to the other mail on that.
> Richard
> 
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel





reply via email to

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