Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Simple Line Mixer  (Read 9472 times)
0 Members and 1 Guest are viewing this topic.
Offline paulscode

Senior Devvie


Medals: 12


Staff Sergeant


« Reply #30 - Posted 2011-10-18 21:34:58 »

Thanks.  I haven't actually done much work on this project since my last post, because I've been busy with my N64 emulator for Android project.  I'll cycle back around to this project eventually  Grin

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline gouessej
« Reply #31 - Posted 2011-10-19 09:41:18 »

Hi

Thanks.  I haven't actually done much work on this project since my last post, because I've been busy with my N64 emulator for Android project.  I'll cycle back around to this project eventually  Grin
Sorry for the off topic. I tried to use JArio to play with Goldeneye 007 but some required op codes are not yet supported. Is your own emulator open source? I would like to make a nice demo of Goldeneye 007 with JOGL 2.0  Grin

Offline nsigma
« Reply #32 - Posted 2011-10-19 11:53:18 »

Just a heads up. My waking thought today is that my suggestion on post #22 is doomed to sub-par performance. (Very likely the more skilled programmers in the forum knew enough to steer clear?)

Grabbing bigger blocks of data at once should be more "data-oriented". I'm working through this problem via the Theremin project. Nothing like the learning process of making your own mistakes...

What exactly do you think is wrong with the approach you suggested in #22?  That seems pretty standard from a glance.  There's probably something wrong with how you're suggesting reading sumLeft / sumRight, but other than that the principle seems 'sound'.  Smiley

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline paulscode

Senior Devvie


Medals: 12


Staff Sergeant


« Reply #33 - Posted 2011-10-19 15:28:34 »

Hi

Thanks.  I haven't actually done much work on this project since my last post, because I've been busy with my N64 emulator for Android project.  I'll cycle back around to this project eventually  Grin
Sorry for the off topic. I tried to use JArio to play with Goldeneye 007 but some required op codes are not yet supported. Is your own emulator open source? I would like to make a nice demo of Goldeneye 007 with JOGL 2.0  Grin
Yes it is open source, but mainly written in native c/c++ using the Android NDK, so not really suitable for porting to Java.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline philfrei
« Reply #34 - Posted 2011-10-19 19:35:52 »

@nsigma, post #32
Probably just confused thinking on my part. I'm looking at what I suggested more closely and see that this is NOT the same as what is happening in the Theremin, where I've started to have dropouts and latency problems after adding an Echo. In the Theremin, I only work on single frames, even when extracting from the WaveTables instead of extracting blocks. My worry is that the operations are more fragmented than they need be as a result, rather than "data-oriented."

But here, on the suggestion in #22, I see that blocks of audio data ARE being used. So the loops are progressing through the arrays in a way that should be reasonably "data-oriented"? I'm just not that clear on what goes on underneath to know for sure, hence the doubts.

On the left & right summing, I kind of fluffed over the details of how the audio data is represented...if it is streams of floats or PCM. I assume that is what you mean by this section not being correct?

I'll post a progress report over on the Theremin thread to look at the drop out problems I've created for myself, so as not to hijack this thread.

"It's after the end of the world! Don't you know that yet?"
Offline philfrei
« Reply #35 - Posted 2011-11-01 09:35:25 »

Hey Paul! I hit a point where a little audio mixer would be a big plus, so I started working on one as well. You are surely further along than I am, but there's stuff you plan to do which I am going to take a pass on, like offering a broad range of format conversions.

The program I wrote today mixes six lines, but still lacks channel and master volumes, and needs some click prevention for the starts & stops. Four lines are for standard signed PCM .wav files (stereo, 16-bit, little endian). Two are for an Interface I am calling (unless someone has a better suggestion) NormalizedFloatAudioLine. This functions sort of like a TargetDataLine, in that you can read audio data from it. It delivers an array of floats assumed to be between -1 and 1 rather than bytes. (But I don't do anything in the program of the Interface to enforce this.)

Maybe there is already something out there like this? It seems like a logical thing for audio.
1  
2  
3  
4  
5  
6  
7  
public interface NormalizedFloatAudioLine  
{  
   int read(float[] buffer, int n);
   void start();
   void stop();
   boolean isRunning();
}


The point of this is that I'm starting to do more with synthesizing sounds on the fly, and most of the work is done with floats. It seems pointless to make the output a byte stream only to convert back to floats when the mixing happens. Yes?

Because the data is generated at the time of the read, there is no need to hassle with draining lines. Lots of other DataLine & TargetDataLine methods seem unnecessary as well. I don't know if this is something you'd consider supporting, but I thought I'd put it out there.

I just started playing with FM synthesis (frequency modulation), using the WaveTables from the JTheremin code. I wrote my first sirens and ray guns this week! It is marvelously efficient way to do SF/X, imho, and I just need to get a little mixer running so that I can show them off more easily. Wink

"It's after the end of the world! Don't you know that yet?"
Pages: 1 [2]
  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.

rwatson462 (37 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!