A CFFI interface to Midishare for Common Lisp is available for download from Common Music's Sourceforge project area:
http://sourceforge.net/project/showfiles.php? group_id=9766&package_id=172112
The interface should work in (at least) the following Lisp implementations: clisp 2.35 openmcl 1.0 cmucl 19c sbcl 0.9.7 The interface code does not depend at all on Common Music.
Midishare: http://midishare.sf.net/ CFFI: http://common-lisp.net/project/cffi/ Common Music: http://commonmusic.sf.net/
Rick Taube Associate Professor, Composition/Theory School of Music University of Illinois, Urbana IL 61821 USA Net: taube@uiuc Fax: 217 244 8319 Vox: 217 244 2684
On 2005-dec-09, at 23:35, Rick Taube wrote:
A CFFI interface to Midishare for Common Lisp is available for download from Common Music's Sourceforge project area:
This is very cool, specially when we consider the fact that the majority of the CFFI developers are musicians. :-)
I have a couple of comments and suggestions (more about CFFI than the bindings themselves):
- You use cffi:null-pointer-p a lot in examples. This suggests that adding a type that converts between the NULL pointer and Lisp NIL would be useful. What do you think James?
- The #+(or darwin macos macosx) in midishare.lisp (and the others) could be a simple #+darwin since all the CFFI-SYS implementations will push this into *features*. I find this useful, should we do this for more operating systems and/or architectures? Or is this bad style?
- (cffi:define-foreign-type pm-message () ':long) <-- I see a lot of these. I assume it's because these are bindings generated by Verrazano. If not, you can use (cffi:defctype pm-message :long) instead.
- Sorry about breaking your bindings *twice*. :-) To show you how bad I feel, I'm attaching a patch for the midishare tests/examples that fixes the calls to null-ptr-p.
- The #+(or darwin macos macosx) in midishare.lisp (and the others) could be a simple #+darwin since all the CFFI-SYS implementations will push this into *features*. I find this useful, should we do this for more operating systems and/or architectures? Or is this bad style?
that would be useful. as would a #+cffi *feature* too ;)
- Sorry about breaking your bindings *twice*. :-) To show you how bad I feel, I'm attaching a patch for the midishare tests/examples that fixes the calls to null-ptr-p.
thanks alot, ill fix this in cvs later today.
-- Luís Oliveira http://student.dei.uc.pt/~lmoliv/ Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt
<midishare.patch>
Rick Taube taube@uiuc.edu writes:
that would be useful. as would a #+cffi *feature* too ;)
Can you give me an example where it would be useful?
I have scripts that load up optional modules that depend on cffi. it would be nice if the script and the submodules could test to see if cffi is already around before it attempts load a cffi. i can sort of do it by testing for (asdf:find-system :cffi), but that just means the .asd file has been loaded, not the system itself, and then i also have to test to see if asdf is loaded. asdf does add a *feature* --rick
On Dec 12, 2005, at 2:59 AM, Luís Oliveira wrote:
Rick Taube taube@uiuc.edu writes:
that would be useful. as would a #+cffi *feature* too ;)
Can you give me an example where it would be useful?
-- Luís Oliveira luismbo (@) gmail (.) com Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt
cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel