Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (206)
games submitted by our members
Games in WIP (781)
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  
  RainThunder  (Read 4880 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2016-11-26 03:02:12 »



A procedural rain and thunder app: RainThunder.jar

Sample of audio output: RainThunderDemo.ogg

I wasn't sure whether to put this in a new thread or add it to the "forest ambience" thread from a short while ago. I think this is ready to show, despite there being room for improvement. It is a mild thunderstorm, not supercharged, Hollywood-level drama.

The source sf/x files came from http://freesound.org/people/lennyboy/sounds/244053/, if you are curious as to the original sound cue. I use about half of this cue (7 seconds).

The main new component is a "ClipSectionPlayer" tool. With it, you can specify sections of clips (my equivalent of the Java Clip, not javax.audio.sampled.Clip itself), and play them as a chain. Start and end frames are required. At this point a single cross-fade length is used for all the seams.

I vary the playback frequency to get different "intensities" (ranging from something like 1/2 speed to 3x's speed). At the faster playbacks, code adds more and longer sections to achieve similar lengths throughout the intensity range. It wouldn't be too hard to make the event length an independent parameter.

One challenge was making the taper long enough not to sound abrupt with the faster playbacks, without bringing in a long sample. After trying several approaches, I tried a crude granular approach: the first half of the decay sample is broken into many short overlapping fragments which are chained. Most of the thunder events, thus are made from just a few longer sections for the body, followed by numerous but shorter sections from the "tapering" sample.

The rain and wind use a clip-slicer tool (explained in earlier posts). I made a crude low frequency (LF) "noise" tool, to vary the volume of the rain and wind. At this point, the tool varies the "wind" slightly before the "rain", and errs on the side of subtlety. It seems to me, the LF noise wave should be filtered slightly (maybe with simple box filter) before using with the rain, on the theory that the rain reflects the sum of wind gusts occurring during its fall. Having a variable high-Q filter for the wind would be very helpful for more theatrical wind effects. As it stands, the wind is almost more a texture-thickener for the rain than something that reads clearly in its own right.

music and music apps: http://adonax.com
Online J0
« Reply #1 - Posted 2016-11-27 18:40:21 »

You should bundle every one of your effects into one big jar Smiley
One question: what does the purple bar represent? I saw it moving but couldn't understand it...
Oh, also: do you think we might be able to use your ambiance library/libraries in our games? I'd love to be able to implement that kind of sound effects in my next project!
Offline philfrei
« Reply #2 - Posted 2016-11-29 19:14:47 »

You should bundle every one of your effects into one big jar Smiley
One question: what does the purple bar represent? I saw it moving but couldn't understand it...
Oh, also: do you think we might be able to use your ambiance library/libraries in our games? I'd love to be able to implement that kind of sound effects in my next project!

Thanks!

I'm curious what the purple bar is that you are seeing. The code only should have a simple JavaFX GUI with buttons and sliders. Are you referring to the 3D-Sound program where I was trying out a time-delay based algorithm for implementing 3D audio? In that, the purple cylinders that rise and sink in place, corresponding to audio source locations. They are loudest when tallest, and quiet when they sink into the "chessboard" floor.

I'm quite perplexed in terms of figuring out what to make freely available or not. I don't want to commit too much of the code yet, as part of my way of development includes rewriting fundamental parts of it as I learn more, and I don't want to be encumbered by obligations for backwards compatibility. (Ran into this with SiVi a couple years ago.)

Yes, it is possible to combine the various into a single library jar.

J0, when you are ready to seriously consider going forward, maybe you can message me and check in on the status of things. (Same to anyone else.) I'd like to be part of a team, and the audio expertise is one of the main things I can bring. I'm also looking for situations to implement "real-world" examples of the library being used.

music and music apps: http://adonax.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online J0
« Reply #3 - Posted 2016-11-29 20:55:15 »

By purple bar I meant this here

I now see it could very well be a separator... I've never used JavaFX honestly, so idk. On my computer the rightmost, say 4-5 pixels in width, move in a strange manner. Nevermind, my pc's haunted.

If my current project gets anywhere near something that might see the light of day sometime, I'll get back to you then Cheesy
Offline philfrei
« Reply #4 - Posted 2016-11-30 06:26:09 »

Yes, just a separator. I put very little into the GUI. It is just a series of JavaFX HBoxes, stacked one on top of another in a GridPane. The "separator" is an empty HBox with a background color:

1  
2  
3  
    HBox sectionBar = new HBox();
    sectionBar.setMinHeight(3);
    sectionBar.setStyle("-fx-background-color: #8080FF;");


Supposed to be light blue. Is kind of purple now that you mention it. It shouldn't have moved! Computer needs an exorcist?

I look forward to seeing what you come up with.

music and music apps: http://adonax.com
Pages: [1]
  ignore  |  Print  
 
 

 
Galdo (237 views)
2017-01-12 13:44:09

Archive (405 views)
2017-01-02 05:31:41

0AndrewShepherd0 (864 views)
2016-12-16 03:58:39

0AndrewShepherd0 (801 views)
2016-12-15 21:50:57

Lunch (938 views)
2016-12-06 16:01:40

ral0r2 (1168 views)
2016-11-23 16:08:26

ClaasJG (1270 views)
2016-11-10 17:36:32

CoffeeChemist (1305 views)
2016-11-05 00:46:53

jay4842 (1390 views)
2016-11-01 19:04:52

theagentd (1207 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!