Jump to content
  • Advertisement
Sign in to follow this  
dividbyzero

Playing a midi using openAL?

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, Is it possible to play a midi using openAL? And if so, how? I have only ever used openAL to play WAVE's. Does it support any other format "out of the box"? Thanks all.

Share this post


Link to post
Share on other sites
Advertisement
Im afraid my friend, that OpenAL doesnt support other formats than WAVE, and given the fact the structure of a MIDI is very different, I really doubt it will someday

In the meantime, have you heard of TiMidity++?

cheers

Share this post


Link to post
Share on other sites
The previous poster is correct, but to elaborate: most music (mp3,ogg,wma,flac) is encoded (and compressed, lossless or lossy) via a particular audio codec, then the codec is used to decode the music into waveform data. A wav file is essentially this raw form (hence the large size). MIDI operates in a somewhat different manner, so converting to waveform data is not as easy, and is not the natural step to play a midi. Sound cards have MIDI devices which are used to synthesize the information stored within the midi, it is possible but usually not the best solution to convert from this midi data into the waveform data which is found in most music formats.

Share this post


Link to post
Share on other sites
For my current project I'm using SDL_Mixer and OpenAL for that very reason.

SDL_Mixer handles the midi stuff and I let OpenAL do the 3D sound stuff..

hth,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!