playing .mid, .mp3? how?

BlitzMax Forums/BlitzMax Beginners Area/playing .mid, .mp3? how?

PatrickS(Posted 2005) [#1]
Hi everyone, I have a beginner question!

I am learning bmax demo and I was asking to myself how to play a midi or mp3 music? It seems to be different than b+. Bmax only know .wav and .ogg format?

thank you


ImaginaryHuman(Posted 2005) [#2]
At the moment there is only ogg and wav as far as I know. I think some people are working on a module player which might also play midi. No idea about the mp3.


PatrickS(Posted 2005) [#3]
ok thank you for your answer.


Kuron(Posted 2005) [#4]
You should be able to play mid & mp3 via Windows API. Somewhere in the code archives should be some decls for the multimedia functions for B+ and you could maybe try and convert them to BMax.

James showed me how to call DLLs here (thanks again James):
http://blitzbasic.com/Community/posts.php?topic=51732

You "should" be able to access the API stuff via the same method

B+ example:
http://blitzbasic.com/codearcs/codearcs.php?code=1329


FlameDuck(Posted 2005) [#5]
Besides which you need a license to play MP3 files. Even if you "play it through Windows".


(tu) ENAY(Posted 2005) [#6]
> Besides which you need a license to play
> MP3 files. Even if you "play it through Windows".

Even if you don't include .mp3 files with your game?


Matt McFarland(Posted 2005) [#7]
I create my own mp3 files because they save space. As a musician and game developer, I'm confused why they dont allow this?


tonyg(Posted 2005) [#8]
Because mp3 is a licensed format.


Kuron(Posted 2005) [#9]
esides which you need a license to play MP3 files. Even if you "play it through Windows".
Yeah, for games they go by "distributed copies" not sold copies. If you were doing an app, it would be different set of rules.

Because mp3 is a licensed format.
More specific, its a patented format which requires a licensing fee to use it under most circumstances.


xlsior(Posted 2005) [#10]
I create my own mp3 files because they save space. As a musician and game developer, I'm confused why they dont allow this?


Too expensive -- you have to pay a licensing fee for any program distributed capable of playing them...

However, BlitzMax does play .OGG, which tend to be even smaller than MP3 at the same quality settings, so if saving space is all you're after, OGG is the way to go.

There are quite a few free converters out there -- 'Audacity' for example, which can read MP3 or WAV and output OGG among others.


Hotcakes(Posted 2005) [#11]
At the moment there is only ogg and wav as far as I know.

And IFF 8SVX <grin>


FlameDuck(Posted 2005) [#12]
Even if you don't include .mp3 files with your game?
Yes. Microsofts license is exclusive to Microsoft, and doesn't cover you.


Matt McFarland(Posted 2005) [#13]
After further research I found that there is no need for mp3's to be used in anyone's game.

You can use the .ogg format (go to www.vorbis.com and download the FREE .wav to .ogg converters) and it is compressed just as good if not even better than an .mp3 file.

blitzmax will a play .ogg file just like a .wav file.

Anyone who is trying to get an .mp3 file to play in blitzmax should go to www.vorbis.com right now and get educated on .ogg because blitzmax plays .ogg files and they are just as good. I hope this helps anyone else here!


FlameDuck(Posted 2005) [#14]
After further research I found that there is no need for mp3's to be used in anyone's game.
You're half right. The only sensible arguement is if you wanted to allow your user to play songs from their own music collection (like in Sims and GTA:SA).

Anything you create yourself can just as easilly be in Ogg/Vorbis.


Matt McFarland(Posted 2005) [#15]
True.. I dont understand why people say you have to purchase a license to use mp3? certainly that means the developer themself then. Because Microsoft's Visual Basic does not allow mp3 play either.


FlameDuck(Posted 2005) [#16]
I dont understand why people say you have to purchase a license to use mp3?
Because parts of the compression techniques used to compress MPEG Layer 3 Audio is protected by a number of patents awarded to Fraunhofer IIS and Thomson Multimedia.

certainly that means the developer themself then.
Actually it means everyone applying the technology described by the patents in their products, regardless of platform or commercial gain.


Matt McFarland(Posted 2005) [#17]
wow so anyone who uses mp3 technology has to pay up then. So if anyone here uses an mp3 module and ends up getting the attention of mp3 people then they could get in serious trouble, huh.


Mirko(Posted 2005) [#18]
I don't think, that if u use the routines of MediaPlayer or even an external Programm like Winamp to play mp3's, lets say if you write a mp3 database programm, you have to pay.
As your programm is not able to play mp3, it is the other program which is not even part of your distribution.
An the other program has allready payed the mp3 guys.

Mirko


HappyCat(Posted 2005) [#19]
From http://www.mp3licensing.com/help/developers.html

"I have my own/third party mp3 software. Do I need a license?

Yes. Use of our patents is not related to a specific implementation of encoders and decoders, which means that a license under our patents is needed."

So even writting your own decoder from scratch requires you to have a license, never mind making use of one that might already be part of Windows (which would be a 3rd party in this case).

Just use Ogg and to hell with them.


FlameDuck(Posted 2005) [#20]
Just use Ogg and to hell with them.
My sentiments exactly.


Hotcakes(Posted 2005) [#21]
Better license, better format, better quality, smaller files. There's no sense in using mp3 at all.


ziggy(Posted 2005) [#22]
And better quality in high ratings. It's THE format. I've been using in my recording studio as the default back-up format for music and it's a great format