Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - paulscode

Pages: 1 ... 7 8 [9] 10 11 ... 58
121
Support / Re: Rain effect
« on: September 01, 2010, 11:40:20 am »
The cheapest way is as a 2D overlay using a texture with alpha.  If you are using Photoshop, use a process similar to the one described in this video to create the texture.  Of course, you would ignore the animation and scene set-up stuff in the video (you are just after the tileable rain mask).  You want to use the mask to generate a texture with degrees of alpha, rather than applying it to a photo (similar to the way I made the glow and smoke textures, which I've described in other threads here -- I can give you a step-by-step if you are not super familiar with the Photoshop menus).  Once you have the tileable texture, the cheapest way to animate it is to incrementally change the u/v coordinates to make the rain fall downward.  Another option is to animate it with a texture effect (slower in my experience).

If this isn't realistic enough for your project, I am working on a method that incorporates the rain as either particles or planes into the 3D scene, but I haven't yet found a way that is both cheap and looks believable.  I'll be sure to post an update if I can figure out a good method.

122
Projects / Re: 3D Sound System
« on: August 26, 2010, 10:56:33 pm »
Sounds like (no pun intended) that coding sound for Linux is quite a bucket of joy.
There were two small issues with 32-bit Java, which I have addressed (the webcam bug and the lack of a default JavaSound Mixer for non-Sun Java versions like OpenJDK), but it's mainly just 64-bit Sun Java for Linux that's a total piece of crap (which is why Ubuntu for example ships with OpenJDK instead).

123
Projects / Re: Alien Runner W.I.P
« on: August 26, 2010, 12:44:56 am »
please try to disable "eco mode" in the options menu and report the frame rate
It runs 47-49 fps on my Droid X with eco mode disabled.

124
Projects / Re: 3D Sound System
« on: August 25, 2010, 11:31:45 pm »
I've verified that this is a 64-bit Sun Java Linux thing (works fine in other OSs and JREs).  It is really odd - everything indicates that the source is playing, but no sound.  I think maybe I'll play around with the gain controls next (maybe it's assuming incorrectly that a gain of "0" is silent instead of initial gain).

125
Projects / Re: 3D Sound System
« on: August 25, 2010, 11:36:07 am »
I noticed a weird bug in the LibraryJavaSound plug-in today, where if the source and listener have exactly the same position, the source is silent regardless of its intended volume.  This is on my PC running Linux and 64-bit Sun Java (a combination which has a multitude of other problems), so I'll verify that this is happening on "normal" computers as well when I get home this evening (if anyone wants to test this for me, try playing a source from position 0,0,0 without moving the listener, and see if you hear anything).

126
Projects / Re: 3D Sound System
« on: August 25, 2010, 03:55:24 am »
Sound System, Bug Fixes, New Plug-in

Sound System jPCT
Sound System

JavaSound library pluggin
LWJGL OpenAL library pluggin
JOAL library pluggin

WAV codec pluggin
JOgg codec pluggin
JOrbis codec pluggin
IBXM codec pluggin
JSpeex codec pluggin

JavaDoc

I fixed the new bug I introduced by trying to fix the IBXM reverse-byte-order bug.  While this is a relatively minor fix, I ended up having to make small changes to nearly every package, so be sure to download all the new versions (in other words, mix-and-match at your own peril).

Additionally, I finished the JSpeex codec plug-in.  Speex-encoded files are generally wrapped into a .ogg container file.  (This is what is produced by the binaries you can download from http://www.speex.org/downloads/).  While I was digging around, I noticed that there is an "experimental" capability for JSpeex to wrap the data into .wav files as well.  Since the .wav format is quite simple to read from (much easier to understand than .ogg), I went ahead and made this codec plug-in useable with either format.  By default, it assumes a .ogg container, but I added a method you can call to use speex-encoded .wav files if you prefer instead.  Just a reminder - these aren't normal .ogg or .wav files (just the header information is), so obviously they will not work with the other codec plug-ins.  I would recommend using a different file extension (like .spx) so you don't get them mixed up with any other non-speex files.

One more note: Speex can also save into "raw" format (i.e., no header information).  I didn't make the codec plug-in support this format because it requires the user to define the header information manually, which doesn't mesh well with SoundSystem.  However, if using the raw format is a requirement for you, let me know and I can look into it more closely to see if there is a way to support it in my codec plug-in.

As always, let me know if you run into any problems, and I will work on correcting them as soon as possible.

127
Projects / Re: 3D Sound System
« on: August 24, 2010, 09:04:13 pm »
Oh btw software mode does not work for me. Its just fuzzy now for my XM music.
This is with the LibraryJavaSound plug-in, right?  I noticed that my previous "fix" actually created another problem, due to some faulty logic on my part when I wrote the system for matching libraries with codecs that produce incompatible data.  I've re-worked the way byte-order reversal works, and I am running tests to make sure it works for all combinations of normal/streaming/LWJGLOpenAL/JOAL/JavaSound.  I'll post an update this evening if all goes well.

128
Projects / Re: 3D Sound System
« on: August 24, 2010, 12:18:11 pm »
I am in the process of writing a codec plug-in for JSpeex.  It is a fairly low-level library, though, so it may take a while for me to understand it well enough to get it functioning properly in the context of an ICodec implementation.  I'll keep you updated

129
Projects / Re: 3D Sound System
« on: August 23, 2010, 08:56:18 pm »
This is for reading files that are compressed way down using the assumption that voice only ranges from 2 to 44 kbps.  Very interesting.  I thought it was a speech synthesis library at first glance..

130
Feedback / Writing my own software audio mixer
« on: August 23, 2010, 03:14:44 am »
Hello, all.  My next big project is to write my own software audio mixer, so that I can play multiple audio inputs on a single output line.  This will not only solve the latency and mixer-compatibility issues with Java Sound, but I could potentially use the same algorithms to write a sound library for the Android.  I thought I'd post here in case anyone has some knowledge about these topics.

I would need to be able to do the following things with PCM audio data:

1) Mixing multiple inputs into one 2-channel (left/right) output, maintaining synchronization between the channels
2) Converting between (or mixing directly) various audio formats (different sample rates/sample sizes/channels)
3) Changing frequency (pitch)
4) Changing gain (volume) independently on each channel

I want to be able to do this in pure Java, completely programatically (i.e. no linking with 3rd-party libraries except to initially acquire the PCM data and then to actually play the output).  I'm looking for all tips, source code, tutorials, that kind of thing.  I am proficient in several programming languages, so references don't necessarily have to be written specifically for Java.  I've googled up a few promising things already, but the more information I can get, the easier my job will be.

131
Projects / Re: 3D Sound System
« on: August 22, 2010, 01:34:38 pm »
Yeah hardware mode is working  :D
My XM music is also sounding better. Thanks for your hard work.

Btw it seems IBXM is the old version and its now called Micromod-j:
http://sites.google.com/site/mumart/

Good to see the downloads are working.  I'll take a look at Micromod-j, thanks for the link.

132
Projects / Re: 3D Sound System
« on: August 22, 2010, 01:20:52 pm »
Ok, I have no idea why the old version is being cached and sent instead of the new version.  It must be a bug with either my FTP program or the server, I'll have to try and track it down.

In the mean time, I changed to links to point to the 21 August version archive directory instead of the "latest version" directory, and that seems to be working.  Give it a shot and let me know if you are still getting the old version.

133
Projects / Re: 3D Sound System
« on: August 22, 2010, 12:51:51 pm »
That is really weird..  I FTP'ed all the files yesterday, but just now downloaded them and got the old version ???  Let me try this again..

OK, this makes no sense.

- I delete the files from the server.
- I try to download them from the browser to make sure they are gone.
- I double-check the zip files again to verify it is the current version.
- I FTP the files to the server.
- I download the files from the server and...  old version!???

134
Projects / Re: 3D Sound System
« on: August 22, 2010, 05:13:46 am »
Sound System, Major Update, Beta Release

Sound System jPCT
Sound System

JavaSound library pluggin
LWJGL OpenAL library pluggin
JOAL library pluggin

WAV codec pluggin
JOgg codec pluggin
JOrbis codec pluggin
IBXM codec pluggin

JavaDoc

I am calling this a beta release, because this has been one of the biggest overhauls of the library yet, and I fully expect there to be bugs.  I'll post additional updates in the coming days and problems are discovered.  I'm working on updating the tutorials as well.

There have been extensive changes since the last release.  I'll try and explain all of them quickly.

The big/important changes:

1) I fixed the incompatibility introduced back in LWJGL 2.3 when they stopped supporting indirect buffers.
2) I added a Doppler effect algorithm to LibraryJavaSound using sample-rate controls.  Note: normal sample-rate ranges in JavaSound are 4KHz - 48Khz, so this can effect how well certain sound effects do with the Doppler effect.
3) I implemented a standard interface for Doppler effect, which can now be used with all library plug-ins.  There are also new Doppler-effect interface methods in SoundSystemJPCT with SimpleVector parameters in jPCT's coordinate system.
4) I implemented a new stream-listener interface, which enables listening for End of Stream events (most useful for playing a sequence of music clips)
5) I added in an intelligent auto-search for common MIDI synthesizers when the default is missing.  This makes MIDI possible on non-Sun Java versions (such as OpenJDK)
6) I added the ability to create normal sources from raw PCM data.  Most useful for playing procedurally-generated sound effects.
7) I added the ability to check the millisecond position of any playing source
8) I added a Mixer ranking system, and an intelligent Mixer-picking based on the functions compatible with each Mixer.  This allowed an intelligent work-around for the Java Sound "webcam chosen as default Mixer" bug, as well as the fact that non-Sun Java (such as OpenJDK) may not have the "Java Sound Audio Engine" mixer available.

Additional changes:

1) I fixed a reverse-byte-order bug in CodecIBXM which caused some sounds to be loud and scratchy.
2) I fixed a bug where switching libraries caused pre-loaded sounds not to re-load.
3) I fixed various bugs when running 64-bit Java plug-in for Firefox on Linux.  There are still more (see below).
4) I added an error message when attempting to load a missing file from the JAR.  Before it acted as if there were no problem if a file was not present.
5) I added in a workaround for the Java Sound bug where a random InterruptedException is sometimes thrown when trying to access the default MIDI sequencer.
6) I added a varriable to SoundSystemCongfig for specifying which MIDI synthesizer to try first
7) I fixed the message-flooding bug that would happen when Mixer controls are not available.
8) I fixed various potential thread-synchronization bugs.

There are still several know issues with 64-bit Java on Linux which I am currently working on, including:

1) No MIDI
2) Random blocking for a half-second every few seconds
3) No sound from Java Sound when switching from OpenAL to Java Sound on the fly
4) JFrame 'paint' method causes system graphics to go wacky when playing JavaSound, and can even result in a complete OS lock-up requiring reset.

Please let me know if you run into any problems, and I will work on correcting them right away.

135
Support / Re: Sound with JMF
« on: August 19, 2010, 10:37:11 pm »
I can't think of anything that would cause it to work until you change the library path, other than missing natives.  Are there any other VM options you are adding or removing besides "-Djava.library.path..."?  Also, doesn't playing mpeglayer3 require a JMF plug-in?  If so, that might be something else to look at (things like how the plug-in is registered, if it has natives of its own, etc).  I've used JMF very little myself, so sorry I can't be any more help.

Pages: 1 ... 7 8 [9] 10 11 ... 58