|
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn),
581
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
music trick to save space
#100990
12/04/06 17:26
12/04/06 17:26
|
Joined: Sep 2003
Posts: 733 Whitefish, Montana
JazzDude
OP
User
|
OP
User
Joined: Sep 2003
Posts: 733
Whitefish, Montana
|
By dividing your background music into separate files a theme can be reduced to 50% of the size of a single wav file. Example: Code:
midi_vol = 100;
media_play("drums.mid",null,100); // a recurring drum pattern of 2k media_play("strings_riff.wav",null,100); // recurring chord background, 150k media_play("horn_theme.wav", null, 80; //the main melody 500k--mysterioso, pompous, joyful, whatever-- //padded with silence so it plays intermittently.
Of course the last two have to be harmonically compatible. The main theme can be high quality stereo with effects, while the lesser elements use the sound cards instruments. Many variations are possible using ogg, mp3 or wma files and choosing which elements should be high quality. "Media_tune" could also be used to trigger changes with code.
Last edited by JazzDude; 12/05/06 01:06.
|
|
|
Re: music trick to save space
[Re: JazzDude]
#100991
12/04/06 19:57
12/04/06 19:57
|
Joined: Mar 2006
Posts: 2,758 Antwerp,Belgium
frazzle
Expert
|
Expert
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
|
This is interesting JazzDude, I didn't tested it yet but if it is thrue that the file size can be reduced by 30% even with high quality stereo effects, then you contribution would come in handy with allot of users  Cheers Frazzle
Antec® Case Intel® X58 Chipset Intel® i7 975 Quad Core 8 GB RAM DDR3 SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB NVIDIA® GeForce GTX 295 Memory 1795GB
|
|
|
Re: music trick to save space
[Re: Lion_Ts]
#100993
12/05/06 01:03
12/05/06 01:03
|
Joined: Sep 2003
Posts: 733 Whitefish, Montana
JazzDude
OP
User
|
OP
User
Joined: Sep 2003
Posts: 733
Whitefish, Montana
|
You are right. My Soundblaster Live card will not play two midi files at once. It ignores the second one.  When I tested this idea I used 2 wma files and 1 midi file. From the manual, re MEDIA_LOOP: Quote:
As many movie, sound or music files as supported by the hardware can be played simultaneously - for instance, to play two midi files at the same time you'd normally need two sound cards.
That should be re-worded. Maybe change "for instance, to play two...etc" to "but, to play two...etc."
Making a game that would require a sound card more exotic than a Soundblaster would not be a good idea for me.

|
|
|
Re: music trick to save space
[Re: EX Citer]
#100996
12/05/06 17:00
12/05/06 17:00
|
Joined: Sep 2003
Posts: 733 Whitefish, Montana
JazzDude
OP
User
|
OP
User
Joined: Sep 2003
Posts: 733
Whitefish, Montana
|
Yeah...I use to mess with mods back in the "old days" on my Amiga. You could get a lot of music on a floppy. I've never tried making mods on the PC but with the quality of sounds now available it could be very interesting. A good overview of the genre can be found HERE Since the format is not mentioned in the manual under media_play I'm wondering how it could be incorporated into a game. Can someone answer that?
|
|
|
|