• Welcome to Dark Bit Factory & Gravity.
 

Tell me About Sound

Started by valis, January 21, 2011

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

valis

How are sound systems typically programmed for games and demos?

Let's say I want to produce something similar to a mod tracker.  Let's say I want to make it tiny. 

How are the different audio channels handled?  Do you have, eg, 4 channel audio, each one with a different sound bound to it?

Educate.

va!n

#1
You can use mod /xm files if you dont use any tiny synth like 4kklang or v2m. However i prefer to look at this very nice, tiny and open source mod player:

http://ufmod.sourceforge.net/
== has even support for blitz max ;)


I am not sure if Blitz sound commands supports multi channel... IF so, it would be easy to handle...
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

valis

#2
It does have multichannel sound.  However I am a complete noob to sound programming.

maybe I will find some short sound samples and have a play around.

Any thoughts about this?
http://code.google.com/p/maxmod/

va!n

i d/l BlitzMax demo and taked a look to the documentation... Seems its very easy to use own channels and so you can have multiply chanlles with controlling each of your wishes.

Audio -> Audioplayback:
TChannel == Audio channel Type
AllocChannel == Allocate audio channel
StopChannel == Stop an audio channel
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

zawran

Blitzmax has a useful audio module, which supports multiple channels. I have not seen any kind of trackers coded in blitzmax that uses its own audio module. For that you are probably better off using one of the supported tracker players like ufmod, bass and fmod. ufmod is quite small and works just fine for xm tunes. I have mostly used bass, but a lot of people use fmod. I have no personal experience with maxmod, but from the look of it, it could work as well for playing tracker tunes.

ferris

Are you asking about how to simply play files or are you interested in making your own module player / synth / whatever?
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

va!n

i think he would like to know, how to play multiply samples at the same time and how to control the playing of these... If so, i think Blitzmax audio commands may be helpfull here ^^
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

valis

I looked around at the available mod players and synths.  Looks like something like ufmod will be what I need.

With those, is it possible to play mods out of memory instead of loading them from a file?  Are the samples the mod player uses tweakable in realtime, eg. can I write sin or square waves to the samples?

ferris

I should. I'm not sure about ufmod's blitzmax implementation, but it's FreeBASIC flavor was used in one of my old 64k's.
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won: