Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Playing Music  (Read 1463 times)
0 Members and 1 Guest are viewing this topic.
Offline DanK

Junior Duke




Javver games rock yawel!


« Posted 2004-06-01 05:37:04 »

I'm planning to put music into a game I've been working on in the next few days, and well... I wanted to know what people here recommend. I'd like to have a reasonable level of quality for the music, but I haven't ruled out midi just yet either. Most likely whatever I go with will be about a 30 second loop that'll probably fade in or out whenever the music begins/stops/changes.

So here are some of the things I'm not sure about...

What format to save the music files in (assuming I didn't go with a midi approach)? A wav file would probably be simple but that seems kind of like using an  uncompressed bmp image these days, my game would most likely be distributed via webstart so size is an issue.

Is speed likely to be a problem? I already loop a few sounds in my game but those are very short clips, and I suspect that something larger is going to either require a lot more time due to the amount of memory used or based on it not being loaded into memory at all and streamed in due to size.

Soundbanks for windows... is this something an end user would potentially have to deal with, or has it become part of the core distribution since sometime after 1.3?

I appreciate any feedback on these questions, sound isn't something I've messed with much, and short of moving my music off of CD into mp3's on my computer my file format know how is pretty much nothing (wavs are accurate but massive, and mp3 are small but I imagine playback in java wouldn't be ideal especially with everything else my game is already doing but if I'm wrong please correct me on that point).

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2004-06-01 06:05:59 »

Wave files, isn't really an option due to size issues. However you may be able to use ogg vorbis, and then decompress those to wav files at runtime (or installation time). There is a vorbis library for java (http://www.jcraft.com/jorbis/).
You could play the wave file as you would normally.
You could also use the FMOD binding in LWJGL, and use this to play modules, midi or ogg vorbis / mp3 (http://puppygames.net/forums/viewtopic.php?t=573)

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #2 - Posted 2004-06-01 11:41:14 »

>Soundbanks for windows... is this something an end user
>would potentially have to deal with, or has it become part of
>the core distribution since sometime after 1.3?

The JRE comes without a soundbank.

http://java.sun.com/products/java-media/sound/soundbanks.html

Without a soundbank midi and rmf *will* sound like... erm... poo. :-/

>mp3

MP3 isn't really an option. The license fees are pretty high and... well there is OGG. It's free and sounds much nicer - especially with low bitrates. (The Jorbis lib does all those tricky things for you.)

Basically there are two ways then. Either pre-decode into pcm (eg for sound effects) or streaming (decoding of tiny chunks just in time - eg for music). Playback of pre decoded oggs is of course pretty fast (just as wavs), but it needs some ram. Streaming needs more cpu power, but much less ram. However, the usage isn't that high... about 5-10% on a 500mhz machine.

Oh and there is also MOD (a tracker format) you can either playback it with the MicroMod lib or over the fmod lwjgl binding (fmod plays about every audio format).

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DanK

Junior Duke




Javver games rock yawel!


« Reply #3 - Posted 2004-06-01 19:24:13 »

jorbis looks pretty promising. I'm trying to keep as few native dependencies in my game as possible so I don't think fmod would be suitable, though I'll have to look at everything in LWJGL a bit closer for my future games.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (35 views)
2014-10-17 03:59:02

Norakomi (26 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (26 views)
2014-10-15 16:18:58

TehJavaDev (50 views)
2014-10-14 00:39:48

TehJavaDev (50 views)
2014-10-14 00:35:47

TehJavaDev (40 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (75 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!