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

[pygame] Re: MIDI files in Games?



Dave LeCompte (really) schrieb:
> "John Eriksson" <john-G6QYb4WcdHF/x8I4biQc1Q@xxxxxxxxxxxxxxxx> wondered:
>> I guess a midi-file will sound different on different platforms. But
>> will it be a huge difference or just a small difference?
> 
> I'm planning to use BASSMidi (http://www.un4seen.com/) for one of my
> current projects. The benefit to this is that the MIDI synthesis happens
> on the CPU, instead of the sound card, so the music guy can give me a
> "sound font" with the instruments he likes. This should give consistent
> sounding music across a variety of machines.

Have you considered using fluidsynth (http://www.nongnu.org/fluid/)?
It's a softsynth with soundfont support as a C library. AFAIK there are
no Python bindings (does BASSMidi have them?) but you could probably use
ctypes as well.

You can also start is as a separate process and then send commands via
stdin.

> However, some of the downsides:

* Good-sounding soundfonts are several megabytes in size

> * No Linux support

Booooh!


Chris


Chris