Jump to content
  • Advertisement
Sign in to follow this  
Drakkcon

Loading MIDI files

This topic is 4681 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

SDL_Mixer allows you to load MIDIs, which is great. The only problem is that I want to be able to load MIDIs from archive files that I create, and there is no Mix_LoadMIDI_RW() function. I need some way to load MIDI files into either the SDL_AudioSpec struct, or the Mix_Chunk/Mix_Music struct. This would be easy for .voc or .wav files, but since MIDI data is not a digital waveform, I have no idea how to do this. Any ideas? [Edited by - Drakkcon on August 28, 2005 6:45:18 PM]

Share this post


Link to post
Share on other sites
Advertisement
I have no idea, having never worked with the library before...However, for the sake of giving a reply, there's always the nasty ol' option of copying the data to a temporary file at runtime and loading it from there (since MIDI files are small, it shouldn't be too slow anyway [wink])...

Share this post


Link to post
Share on other sites
(Finally)

Yes, it seems that this is not a very common issue, so I may have to do what you've suggested. I've been looking through the 'timidity' source code to see if I can find a way to do it my way, but you're right, they're only like 4kb each.
So that's probably what I'll do.

Rating++

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!