Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (577)
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  
  Real time sound synthesis in Java applet  (Read 3731 times)
0 Members and 1 Guest are viewing this topic.
Offline mrbungle

Senior Newbie


Projects: 1



« Posted 2009-09-13 13:53:28 »

I made an online music toy that emulates TB-303, TB-808 and TR-909 synthesizers.

It creates the acid basslines (and rhythms) automatically. Just press left mouse button to generate a new pattern. Move the mouse in the square area to tweak the TB-303 filter. X-axis is the filter cutoff frequency, Y-axis is the filter resonance.
Offline DzzD
« Reply #1 - Posted 2009-09-13 14:36:56 »

very cool Smiley

Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #2 - Posted 2009-09-13 16:28:28 »

 Cool

That could be very useful for creating menu music. With almost no overhead, one can add separate music for main menu, settings menu, highscore and so on.

Would it be possible to compress it down to a smaller size for applet games?

Are the loops just randomly generated?

Managed to produce this:
1  
2  
3  
4  
5  
Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: 96494
   at synth.RhythmSampler.tick(RhythmSampler.java:68)
   at synth.RhythmSynthesizer.stereoOutput(RhythmSynthesizer.java:382)
   at synth.Output.run(Output.java:143)
   at java.lang.Thread.run(Unknown Source)

Music stopped, but gfx was still alive. Happened when I clicked mouse button. Couldn't reproduce.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mrbungle

Senior Newbie


Projects: 1



« Reply #3 - Posted 2009-09-13 16:46:36 »

Cool

That could be very useful for creating menu music. With almost no overhead, one can add separate music for main menu, settings menu, highscore and so on.

Would it be possible to compress it down to a smaller size for applet games?

Are the loops just randomly generated?

Yeah, I think the size could be trimmed down significantly. There's some audio data that could be Vorbis-encoded. Originally I made the synth engine for making music to a game.  The loops are generated randomly based on a set of rules.

Quote
Managed to produce this:
1  
2  
3  
4  
5  
Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: 96494
   at synth.RhythmSampler.tick(RhythmSampler.java:68)
   at synth.RhythmSynthesizer.stereoOutput(RhythmSynthesizer.java:382)
   at synth.Output.run(Output.java:143)
   at java.lang.Thread.run(Unknown Source)

Music stopped, but gfx was still alive. Happened when I clicked mouse button. Couldn't reproduce.

Yeah, thanks for the info. I think that's already fixed, but I cannot release the fix yet because there's some other changes in the code that aren't ready yet. Refreshing the page is a simple workaround for now.
Offline randommark

Senior Newbie


Projects: 1



« Reply #4 - Posted 2009-09-14 22:24:08 »

Very nice!  Cheesy

Would it be possible at all to save the current music playing in some format so it can be reproduced later?
Offline mrbungle

Senior Newbie


Projects: 1



« Reply #5 - Posted 2009-09-15 12:41:22 »

Very nice!  Cheesy

Would it be possible at all to save the current music playing in some format so it can be reproduced later?

Yeah, if you have Windows XP (or possibly Linux or MacOS). In Windows XP you can record the audio output stream. In the mixer there is a checkbox 'record what you hear' or something similar. The outputted sound can then be recorded with Audacity or similar tool.

Too bad Microsoft removed this feature from Vista, probably due to pressure from music industry.

Of course you can still do similar thing by routing the analog audio output to analog line/mic input, but then the quality is affected.
Offline ShannonSmith
« Reply #6 - Posted 2009-09-15 17:24:27 »

Checked your stuff out over on KVR, pretty slick. It's interesting the only other guy I know doing Java synths is also in it for the games.

Offline skinny boy

Junior Duke





« Reply #7 - Posted 2009-09-16 16:55:48 »

i am mostly interested in the water effect

anyone any hint/help?

Offline mrbungle

Senior Newbie


Projects: 1



« Reply #8 - Posted 2009-09-16 19:37:05 »

Checked your stuff out over on KVR, pretty slick. It's interesting the only other guy I know doing Java synths is also in it for the games.

Yeah, originally I just wanted to do a simple SID like synth for some beeps in a platform game... but I'm a musician so it got a bit out of hands. I'd love to see a music/sfx engine where sounds would react to game events.
Offline mrbungle

Senior Newbie


Projects: 1



« Reply #9 - Posted 2009-09-16 19:37:25 »

i am mostly interested in the water effect

anyone any hint/help?



Here's a good explanation: http://www.neilwallis.com/java/water.html
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline skinny boy

Junior Duke





« Reply #10 - Posted 2009-09-16 21:16:22 »


thank you so much!!!!!
Offline CommanderKeith
« Reply #11 - Posted 2009-09-17 04:01:05 »

That's amazing!!!!!! I wish I had this program connected to my car!!!!

You should think about making this into an iphone app, seems like the kind of thing that might be popular.


Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #12 - Posted 2009-09-17 19:05:40 »

very very cool!

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (33 views)
2014-10-27 03:28:38

TehJavaDev (27 views)
2014-10-27 03:27:51

DarkCart (41 views)
2014-10-26 19:37:11

Luminem (22 views)
2014-10-26 10:17:50

Luminem (27 views)
2014-10-26 10:14:04

theagentd (33 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (59 views)
2014-10-16 15:22:06

Norakomi (48 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!