Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: MIDI support  (Read 22079 times)

0 Members and 1 Guest are viewing this topic.


  • Full Member
  • ***
  • Posts: 231
    • View Profile
MIDI support
« Reply #15 on: December 20, 2008, 11:28:17 am »
Hi, I am not sure that I understand completely what you mean when you say "supporting MIDI". From what you say, it sounds like you want to both support playing MIDI files, build in a sampler to play sounds, and connect it to the MIDI.

In my opinion, this is neither necessary, nor desirable, as MIDI can be used for other purposes, besides playing sound. During my years as a sound engineer, besides playing sounds, I have used it mainly to control sound effects, but also to synchronize audio files that had to be transferred between different setups.

What I think you should do, is keep the MIDI as just MIDI, separate from sound, and then let users do what they want with the signal. Midi controller pong? A program to teach piano? The next Rock Band, only with real midi instruments?

Then, when you have that down, you could maybe provide something like a GM wavetable to play the sounds, even though this is very high level. Or maybe you could pass it along to the OS to do whatever it wants with it - I don't really know how that works, but I know that Windows has its own (poor) wavetable.
Or perhaps build in a complete sampler, with support for SF2, Akai, sound effects and what not. Again, very high level.

My point is that supporting MIDI and playing sound are two different issues, even though the two are often connected. I hope that makes sense :)


  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
MIDI support
« Reply #16 on: December 20, 2008, 11:55:24 am »
That makes sense :)

However I'm not sure this is the way I want to go for SFML. A MIDI-oriented API would certainly be interesting, but that's a completely different topic that I can't develop right now. For the moment, I just aim at supporting the MIDI format in the current API; that would already make a lot of users happy.
Laurent Gomila - SFML developer


  • Newbie
  • *
  • Posts: 40
    • Yahoo Instant Messenger - samuraileumas
    • View Profile
MIDI support
« Reply #17 on: January 10, 2009, 09:24:32 pm »
I'm thinking of porting a music-to-code converter so that music files can be compiled all the way down to machine language using raw event triggering mechenisms and coroutines in C++.

I've already written a working prototype in C and it works on AmigaOS using the Audio Hardware Interface (AHI) drivers on that operating system.  I would like to write a better one based on the file loaders from MikMOD (LGPL) and using my own instrument handlers.  I want to make the instrument handling with a more liberal license than LGPL so that the output C++ code can be linked into the source of a game and will not produce rip-able music, only instrument samples.

Once I've gotten the MikMod version of the compiler complete, I can work on a MIDI-compatible version as well.

See my other thread for details.