Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
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  
  procedural music, drum composition, proof of concept  (Read 11102 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2016-02-21 21:50:23 »

I was just sent a link that has a terrific example of using procedural music composition in a game.  I've only just now watched the video and thought it was well worth sharing:

In this case, the composing pertains to how the drums are used (though there are some nice synthesized sounds as well). I find the flow of the game play shown is particularly nice, don't you agree? The increase in activity, for example, when the guards discover the hero really gets the adrenaline going for the coming fight.

I'm wondering if the reverberation on the drums is part of the drum samples being used, or added on as last stage sweetening. And am also wondering whether or not the drums are sampled or generated. Maybe the drums are like sprites in that each "drum" is a collection of samples of the same drum being recorded but at different intensity levels. I think this is the most common algo used. Generating drums procedurally (from scratch) usually takes a lot of cpu and pretty sophisticated software, not something as cpu friendly as FM synthesis.

music and music apps:
Offline FabulousFellini
« Reply #1 - Posted 2016-02-24 00:34:02 »

I'm not sure how procedural music is generated within a program, but I did work in a recording studio as a recording engineer for 10 years.  These most definitely sound like samples to me.  They sound too good to be generated, especially when it comes to the cymbals (cymbals tend to sound really crappy when generated and these sound pretty good).  I'm not sure if you can put effects like reverb or delay on music with a good game engine (say something like "audioHandler.add(reverb)), but if you can that's probably what they're doing.  Having all those samples with long reverb tails would take up a lot of memory I think.  Like think of a drum hit is maybe 1 second.  But with the reverb tails (if the reverb was on the sample itself), it could easily take up to 4  to 5 seconds (especially in the end of that video when they are really long).  Add all those different drums with different length reverb tails and you are gonna end up with a good amount of samples which you would need to call independently when the reverb tail needs to get longer.   For that reason, I bet they generated sampled the music with the 4 or 5 sounds they had (toms, timpanis, kickdrum, and hi hat from what I heard), then put a reverb effect on all the audio itself using the engine (audioHandler.add(reverb.volume(1), or when it needs a longer reverb tail something like audioHandler.add(reverb.volume(10)).  

Offline BurntPizza

« JGO Bitwise Duke »

Medals: 486
Exp: 7 years

« Reply #2 - Posted 2016-02-24 00:53:08 »

Those are definitely multisamples. Effects/mixing sounds live to me.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline philfrei
« Reply #3 - Posted 2016-02-24 04:43:09 »

If you (FabulousFellini) are hearing the reverb tails become shorter or longer, then I'm thinking it is most probably a combination of relatively short samples (possibly dry) combined with a reverb for the entire mix. That still leaves the question of how the reverb is generated, as reverb is pretty cpu intensive. If it were just delay, that would be much less of a strain on cpu (by orders of magnitude).

I think there is some tone color change on the drums, depending on the hits. So there may be a set of samples for each drum. I assume that is what you (BurntPizza) mean by "multisamples"?

Regardless, the sound score is pretty nice how it follows along with the action.
I haven't figured out the algorithm being used to modulate the drum composition. I notice that there is often a slight "ting" almost exactly when an enemy gets dropped.

music and music apps:
Offline BurntPizza

« JGO Bitwise Duke »

Medals: 486
Exp: 7 years

« Reply #4 - Posted 2016-02-24 06:39:38 »

Offline nsigma
« Reply #5 - Posted 2016-02-24 13:32:43 »

That still leaves the question of how the reverb is generated, as reverb is pretty cpu intensive.

Well, it ain't that bad depending on the algorithm.  There have been real-time reverb DSP plugins for, what, 20 years.  Java ain't that slow!  Wink

Praxis LIVE includes a port of the freeverb algorithm.  It's forked from an original Java port by Karl Helgason (who also wrote Gervill, which has a similar reverb).

Code is here -

Praxis LIVE - hybrid visual IDE for (live) creative coding
Offline Grunnt

JGO Kernel

Medals: 143
Projects: 8
Exp: 5 years

Complex != complicated

« Reply #6 - Posted 2016-02-24 14:48:48 »

Meh, I found it quite poor actually. I mean, the samples are good but the overall atmosphere created by the music did not fit the game at all. The music reminded me more of a fleet of warships steaming up for a good long-range bombardment rather than intimate close-up combat. I suspect a bunch of monkeys ramming on drums will have pretty much the same effect.

Edit: I should add that I really do not have an ear for music as you might have guessed.

Offline philfrei
« Reply #7 - Posted 2016-02-24 22:24:01 »

It seems to me that drums/drumming of this sort has become a stock movie scoring play, and becomes cliche when overused. Still it can often be pretty exciting. I remember first noticing this sort of drumming in "Crouching Tiger, Hidden Dragon".

music and music apps:
Pages: [1]
  ignore  |  Print  

Riven (397 views)
2019-09-04 15:33:17

hadezbladez (5280 views)
2018-11-16 13:46:03

hadezbladez (2204 views)
2018-11-16 13:41:33

hadezbladez (5544 views)
2018-11-16 13:35:35

hadezbladez (1150 views)
2018-11-16 13:32:03

EgonOlsen (4585 views)
2018-06-10 19:43:48

EgonOlsen (5462 views)
2018-06-10 19:43:44

EgonOlsen (3119 views)
2018-06-10 19:43:20

DesertCoockie (4016 views)
2018-05-13 18:23:11

nelsongames (4708 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 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‑
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!