Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: Re: real-time midi in Python (WINDOWS)

Date2009-02-16 15:55
Frommichael.gogins@gmail.com
Subject[Csnd] Re: Re: Re: real-time midi in Python (WINDOWS)
You probably are looking for a prebuilt package, but if you can program, you 
don't need one. You can use the Python ctypes module (part of Python since 
2.5, available separately for 2.4 and 2.3) to call the Windows multimedia 
APIs directly, just as if you were programming in C.

You also could use ctypes to call any cross-platform multimedia library with 
a C or Pascal calling convention shared library, which is all of them as far 
as I know.

I have used ctypes for financial programming and can attest that it works 
very well.

Hope this helps,
Mike

----- Original Message ----- 
From: "DavidW" 
To: 
Sent: Monday, February 16, 2009 12:24 AM
Subject: [Csnd] Re: Re: real-time midi in Python (WINDOWS)


> Yep - specifying a platform always helps. Also what you meant by  "binary" 
> is not clear, as python "compiles" to byte-code (.pyc). I  assumed you 
> meant an auto installer. The Americans are probably asleep  at the moment. 
> It's been a long time since midi for me, so I'm only  answering 'cause of 
> that.  From memory, Tim Mortimer was using python  + windows + midi. I 
> haven't heard from him for a while, incl. on this  list. - Perhaps you can 
> search the mail-list archive or try timmortimer@d2.net.au .
>
> ciao,
>
> D.
>
> On 16/02/2009, at 3:55 PM, Michael Mossey wrote:
>
>>
>>
>> Michael Mossey wrote:
>>> Can someone recommend a way to send real-time midi messages in  Python? 
>>> There is a pyPortMidi package. It doesn't seem to have a  binary 
>>> available for Python 2.5.x, however (anyone have one)?
>> I should have said, I'm looking for Windows.
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  "unsubscribe 
>> csound"
>>
>
> ________________________________________________
> David Worrall.
> - Experimental Polymedia: www.avatar.com.au
> - Education for Financial Independence: www.mindthemarkets.com.au
> Australian research affiliations:
> - Capital Markets Cooperative Research Centre: www.cmcrc.com
> - Sonic Communications Research Group: creative.canberra.edu.au/scrg
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound"
> 


Date2009-02-16 18:36
FromMichael Mossey
Subject[Csnd] Re: real-time midi in Python (WINDOWS)

michael.gogins@gmail.com wrote:
> You probably are looking for a prebuilt package, but if you can program, 
> you don't need one. You can use the Python ctypes module (part of Python 
> since 2.5, available separately for 2.4 and 2.3) to call the Windows 
> multimedia APIs directly, just as if you were programming in C.
> 
> You also could use ctypes to call any cross-platform multimedia library 
> with a C or Pascal calling convention shared library, which is all of 
> them as far as I know.
> 
> I have used ctypes for financial programming and can attest that it 
> works very well.
> 
> Hope this helps,
> Mike

Hi Mike,

I haven't used the multimedia api before, but would this be a good 
source of documentation?



Thanks,
Mike