Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
music trick to save space #100990
12/04/06 17:26
12/04/06 17:26
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline 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 Offline
Expert
frazzle  Offline
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: frazzle] #100992
12/04/06 21:48
12/04/06 21:48
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
good idea. but i have a critique. it's impossible to play 2 or more mid files simultaneously on an ordinary hardware (like cheap soundblaster or inboard sound).

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 Offline OP
User
JazzDude  Offline 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: JazzDude] #100994
12/05/06 01:04
12/05/06 01:04
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I will edit the first post.

Re: music trick to save space [Re: JazzDude] #100995
12/05/06 08:08
12/05/06 08:08
Joined: May 2002
Posts: 2,541
Berlin
EX Citer Offline
Expert
EX Citer  Offline
Expert

Joined: May 2002
Posts: 2,541
Berlin
*.mod files do this trick. They save single sound files which appear hundreds of times in one track. That way mod saves alot of memory with very good quality. OF course the wav files can also be manipulated in the mod file so they sound different even if it´s the same file. .mod files rule!


:L
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 Offline OP
User
JazzDude  Offline 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?

Re: music trick to save space [Re: JazzDude] #100997
12/05/06 22:28
12/05/06 22:28
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
yeah, old good time... I remember my experiments with Tracker on my first IBM with worst sound over a speaker. After that I made my first gadget (plugged into lpt port) to let my music out
media_play can play all files, that are playable with the windows media player. just try it why asking?

Re: music trick to save space [Re: Lion_Ts] #100998
12/06/06 03:20
12/06/06 03:20
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I tried it. Didn't work.

Re: music trick to save space [Re: JazzDude] #100999
12/06/06 17:20
12/06/06 17:20
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
The xm format and other tracker formats can't be played back with 3dgs. Perhaps, if there isn't already one, someone should make a plugin for that, the sound files are amazingly small, it would be great indeed.

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Page 1 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1