| Thanks for the information, I'll try that. I did try calling
csoundPreCompile first, but I didn't know about the command line flags.
By flags I meant O.RTevents and O.Midiin.
Original Message:
-----------------
From: Istvan Varga istvan@csounds.com
Date: Tue, 01 Mar 2005 12:08:02 +0100
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] CsoundVST broken as VST plugin
Michael Gogins wrote:
> Istvan, could you please review the CsoundVST code (in
> frontends/CsoundVST/CsoundVST.cpp) and devise a means for plugging a
> MIDI driver into Csound via the Csound API -- not only MIDI driver
> function pointers in ENVIRON->midiParams, but also setting the required
> flags in OPARMS?
I do not really understand what flags you are referring to, but here
is how you can set up your own MIDI driver without the (otherwise
recommended) use of a dynamic library:
1. you need to call csoundPreCompile() and csoundCompile()
separately, so call csoundPreCompile() first.
2. use the API to set up MIDI function pointers. You can find
details about this in InOut/midirecv.c, but here are some
notes regarding the use of the interface:
* the device open functions should take a csound instance
pointer, a void** pointer to a "user data" pointer (you
can use this to store a handle for the stream, e.g. a
pointer returned by malloc()), and a string device name
(this will be whatever was set for -M or -Q).
* the read/write functions take a csound instance pointer,
a void* "user data" pointer (see above), a buffer that
stores MIDI data, and an integer value that is the size
of the buffer (in bytes) for the read function, and the
number of bytes to write for the write function.
The buffer should always contain complete (not truncated)
messages, and should not make use of the MIDI feature of
repeating the status byte.
* the close functions take a csound instance pointer, and
'void *userData' already explained above. The functions
should check for userData being NULL which means that
the stream is already closed.
* all functions have an integer return value, which is
expected to be zero on success in the case of the
open and close calls, and the number of bytes read or
written in the case of the read/write functions.
Errors should be reported by returning a negative error
code.
3. you can now call csoundCompile(); by appending "-+rtmidi=null"
to the command line flags (argc/argv) you can make it sure
that no dynamic libraries will override your functions.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |