Midi music as a backround music
Midi music as a backround music
Hello guys
Is there any easy way to use a midi file as a background music in PureBasic, and use it as a resource, so not as a separed file.
I think it should be something like Include (music.mid) or so on...
Also it should loop the music continuously.
Is there any easy way? I just started to practice PureBasic, that's for a lot of dummy questions, but anyway I could not find an easy solution for this.
Ekix
Is there any easy way to use a midi file as a background music in PureBasic, and use it as a resource, so not as a separed file.
I think it should be something like Include (music.mid) or so on...
Also it should loop the music continuously.
Is there any easy way? I just started to practice PureBasic, that's for a lot of dummy questions, but anyway I could not find an easy solution for this.
Ekix
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
If I'm not wrong, the Movie PureLibrary uses avisynth.dll which is used in Windows to play MIDI files.. so this is only limited to Windows.Kaeru Gaman wrote:the easy way to use some .mid file is the movie-lib:
MIDI-music can be played using PlayMovie()
but there is no CatchMovie(), so you couldn't directly use the date
if you attach it to the .exe via IncludeBinary.
I guess you guys are using Windows, which means that you would need something commercial to convert the MIDIs to MP3's.. Anyway, I use Linux and I can convert your MIDI files to high quality (320Kbps) MP3's. Just drop me a PM and I'll do the work for you. (I guess you can use CatchSound() with MP3's, right?)
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
PB-Win MovieLib uses DirectShow, PB-OSX MovieLib uses QuickTime, both can play mp3.josku_x wrote:If I'm not wrong, the Movie PureLibrary uses avisynth.dll which is used in Windows to play MIDI files.. so this is only limited to Windows.
according to the PB-Help, PB-Linux even has no Movie-Lib...
oh... and have a nice day.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Easier portability? MIDI just contains information about what instruments to play, when to play, etc.. an MP3 contains the audio data which people actually hear. So you would have to need to write your own MIDI parser if you don't want to use a Movie-lib..Kaeru Gaman wrote:sorry, I meant MIDI, this is the topic...
was a bit screwed up with the other mp3-topic...
dunno why josku came up with mp3 here, that just missed the topic.
I see no use in using an mp3 if I made some MIDI-music.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
LOLjosku_x wrote:So you would have to need to write your own MIDI parser if you don't want to use a Movie-lib..
...and how should I play the mp3 without Movie-Lib?
the sound-argument is ok, but then I would convert my MIDI on my own in order to hear the sounds the mp3 will have.
additionally I would use some totally differend music-program and would not walk the way across MIDI....
MIDI would be the solution for oldskool-athmosphere, and then it can stay MIDI...
oh... and have a nice day.
Midi (not mp3....)
And I would just include midi-file inside the exe-file, and play it looped. Midi files are small, that's whyI'd like to use them. Of coarse I know that it's up to soundboard how it sounds, but anyway can it be done?
Re: Midi (not mp3....)
I have not found any code to do this, but it is possible to include MOD or any other module formats into the EXE. MIDI just containts information, not samples, whilst MOD, XM, IT, S3M and other modules formats include samples and they are small..ekix wrote:And I would just include midi-file inside the exe-file, and play it looped. Midi files are small, that's whyI'd like to use them. Of coarse I know that it's up to soundboard how it sounds, but anyway can it be done?
http://en.wikipedia.org/wiki/Module_file
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Converting midi to mod
I've seen that there's around some software which converts midi files to mod's. So, it replaces the soundboard synth sounds with samples.
Doe's anyone know what would be good freeware software for this?
Doe's anyone know what would be good freeware software for this?
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany