[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] controlled midi playback



that fixed the pyrex problem. i have the .c file now but there is another problem i ran into.
 
i tried to use code::blocks and the vctoolkit2003 to compile the extension. i get this error message: fatal error LNK1104: cannot open file 'LIBCMTD.LIB'
 
maybe you can give me another tip?
 
what compiler did python 2.5 for windows get compiled with? i read somewhere that it can get messy if you don't use the same compiler for extensions.
 
On 1/2/08, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
Yeah. To make Pyrex compatible with C++ enumerations are no longer
treated as integers, though assignment of an enumeration to an integer
is still allowd. Not accepting an enumeration as a boolean value may be
a bug. I would have to check. But then again it makes some sense. Just
edit line 357 to be:


       while(Pm_Poll(self.midi) != pmNoError):


machinimist@xxxxxxxxx wrote:
> awesome! :) thanks a lot...
>
> now i only have to get pyportmidi compiled for python 2.5. i get this
> pyrex error:
> pypm.pyx:357:21: Type 'PmError' not acceptable as a boolean
>
> do you have an idea what causes this?
>
> On 1/1/08, *Lenard Lindstrom* <len-l@xxxxxxxxx
> <mailto:len-l@xxxxxxxxx>> wrote:
>
>     This was something I put together to see if pygame and PyPortMidi
>     would
>     get along. They do. It is very simple. You can use the keyboard or
>     the
>     mouse to play a four note pipe organ.
>
>     Lenard
>
>
>     machinimist@xxxxxxxxx <mailto: machinimist@xxxxxxxxx> wrote:
>     > thanks!
>     >
>     > and does anyone know if there are examples somewhere? like a simple
>     > program which allows you to play a midi instrument (best using the
>     > integrated synthesizer on the sound card) with the computer
>     keyboard?
>     >
>     >
>     > On 1/1/08, *Lenard Lindstrom* < len-l@xxxxxxxxx
>     <mailto:len-l@xxxxxxxxx>
>     > <mailto:len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx >>> wrote:
>     >
>     >     Try http://alumni.media.mit.edu/~harrison/code.html
>     < http://alumni.media.mit.edu/%7Eharrison/code.html>
>     >     <http://alumni.media.mit.edu/%7Eharrison/code.html>
>     >
>     >     Lenard
>     >
>     >     machinimist@xxxxxxxxx <mailto:machinimist@xxxxxxxxx>
>     <mailto: machinimist@xxxxxxxxx <mailto:machinimist@xxxxxxxxx>> wrote:
>     >     > thanks!
>     >     > http://sound.media.mit.edu/~harrison/pyportmidi/
>     <http://sound.media.mit.edu/%7Eharrison/pyportmidi/>
>     >     < http://sound.media.mit.edu/%7Eharrison/pyportmidi/>
>     >     > < http://sound.media.mit.edu/%7Eharrison/pyportmidi/>
>     >     > it sounds like it is what i need but unfortunately it doesn't
>     >     seem to
>     >     > be available anymore...
>     >     >
>     >     > On 1/1/08, *Lenard Lindstrom* <len-l@xxxxxxxxx
>     <mailto:len-l@xxxxxxxxx>
>     >     <mailto:len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx >>
>     >     > <mailto: len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>
>     <mailto: len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>>>> wrote:
>     >     >
>     >     >     machinimist@xxxxxxxxx <mailto:machinimist@xxxxxxxxx>
>     <mailto: machinimist@xxxxxxxxx <mailto: machinimist@xxxxxxxxx>>
>     >     <mailto:machinimist@xxxxxxxxx <mailto:machinimist@xxxxxxxxx>
>     <mailto: machinimist@xxxxxxxxx <mailto:machinimist@xxxxxxxxx>>> wrote:
>     >     >     > hi,
>     >     >     >
>     >     >     > i have a midi song (not polyphonic) and want to play
>     back
>     >     one note
>     >     >     > after another triggered by key presses. what would
>     be the best
>     >     >     way to
>     >     >     > do this? i guess i can't directly do this with
>     pygame but
>     >     i need
>     >     >     some
>     >     >     > midi library? does anyone know which one would be
>     suited
>     >     for that
>     >     >     > (ideally it should work in linux and windows)? has
>     anyone
>     >     tried to
>     >     >     > do something similar?
>     >     >     Check out the Python music page:
>     >     >
>     >     >     http://wiki.python.org/moin/PythonInMusic
>     >     >     <http://wiki.python.org/moin/PythonInMusic
>     <http://wiki.python.org/moin/PythonInMusic>>
>     >     >
>     >     >     Of the various midi packages PyPortMidi is still
>     available.
>     >     >
>     >
>     >
>
>
>