denemo-devel
[Top][All Lists]
Advanced

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

Re: Getting MIDI events from scripts. (was Re: [Denemo-devel] Musical wa


From: Richard Shann
Subject: Re: Getting MIDI events from scripts. (was Re: [Denemo-devel] Musical ways of entering music.)
Date: Fri, 14 Nov 2008 20:35:32 +0000

And here is a bit of code that uses it to get a note
The output on the console was:

command144velocity82command144velocity0

where the second command was the key up, being sent as NOTEON with
velocity zero.

script follows:

;;;;;;;;;;;;
;;; MIDI functions
(define midi (d-GetMidi))
(define velocity (bit-extract midi 16 24))
(define command (bit-extract midi 0 8))
(display "command")(display  command)
(display "velocity")(display  velocity)

(set!  midi (d-GetMidi))
(set! velocity (bit-extract midi 16 24))
(set! command (bit-extract midi 0 8))
(display "command")(display  command)
(display "velocity")(display  velocity)


Richard


On Fri, 2008-11-14 at 20:18 +0000, Richard Shann wrote:
> I've created (d-GetMidi) which evaluates to a single midi event (stored
> in an integer).
> I was very put out to find that the documented function
> scm_from_int(int) did not exist and had to hunt through the header file
> to find something to create a scm from an integer. The state of the
> scheme documentation makes Denemo seem well documented.
> Richard
> 
> 
> 
> On Fri, 2008-11-14 at 09:13 -0600, Jeremiah Benham wrote:
> > On Fri, 2008-11-14 at 07:35 +0000, Richard Shann wrote:
> > 
> > > Having slept on the problem, it seems to me that we should start by
> > > allowing a script to get the midi events, and write some scripts to do
> > > some useful things with them. Then we can assess what the performance is
> > > like (whether we need to use C to package up the raw events), and if the
> > > performance is not good enough for some purposes, we can think of having
> > > multiple layers of access to the midi stream.
> > 
> > I like this idea. 
> > 
> > Jeremiah
> > 
> > 
> > > 
> > > Richard
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Denemo-devel mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/denemo-devel
> > 
> 
> 
> 
> _______________________________________________
> 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]