What I did today

I’ve been taking some time to work on Audio/Music ideas again, and made something I have been wanting for a long time.

Here is the “problem”: let’s say we want to have branching music. If the music relies on PCM data (imported wav resources), then creating branching points is a problem, because musical events overlap in time. A note may still be echoing or be present in the mix due to a long decay or being part of the reverberent acoustic space when the next note (which we want to avoid as part of the branch to new material) arrives.

Are other musical-control systems successfully managing this?

What I have is this: the music is played via an event-scoring system where code creates sounds in real time from a score. I have a unit of score that I’m calling a “Motif” (can be any number of beats of music, can be looped), and a new scripting system (written two weeks ago) that controls the management of the motif units.

What I finished making yesterday and am documenting today: every motif now includes its own dedicated collection as a cache for “pending” commands. A pending command is a command that has not yet executed (is scheduled for some point in the future) for a note that is currently playing, for example a “release” of that note. When we swap in one motif for another (when the music branches) there are now three options for how the pending events can be handled. They can be discarded, all played at once, or all played at their originally scored timings. These options are available on any beat in the motif. This, theoretically, should allow a great deal of flexibility in writing music that can branch both smoothly and with a high degree of granularity.

I should try and come up with an example. Give me a few days to ponder and hopefully compose some simple musical case that illustrates this.

The IML file was messed up because I had restructured (via its own refactoring, mind you) the project. It was incorrectly structuring the packages/directories because of that, and the only way to correct it was to remake the project entirely because all of the files were messed up. Literally re-importing everything fixed it (I tried invalidating the cache, rebuilding the project, re-importing maven, etc - the project was completely fried).

Also those inspection warnings disappeared after I did this too. It was just completely misinterpreting the dependencies. The support for local project dependencies in general is a bit shoddy since from what I understand it’s a bit new.

Anyway there’s nothing wrong with ranting considering I already filed all of the bug reports and posted my question to Stack/answered it myself to help the community. People who aren’t openly critical of bugs, especially when it comes to software that’s hundreds of dollars a year, really are essentially the bootlickers of the programming world.

EDIT: I decided to just go back to Eclipse. IntelliJ really just isn’t for me. It seems to have been overhyped quite a bit, and it’s honestly as buggy and unstable as Eclipse is IMO. I ran into numerous well-known bugs during my short-time with it. I really don’t have time to constantly be tinkering with the IDE rather than actually working.

EDIT 2: This article basically captures my feelings perfectly: https://techblog.bozho.net/still-prefer-eclipse-intellij-idea/

EDIT 3 (BONUS): I had to configure every project I have initially just to get it to load into IntelliJ correctly. After that, I still had to do a lot of configuring to get it to even accept projects with other projects as dependency. And after that, it was still a pain to use since you have to have them in separate windows. When I re-imported them into Eclipse, they just worked and nothing further had to be done. If I can just solve the issue with exporting JARs with JDK9+, I’ll be in good shape. I’d rather have that single headache than the thousands IntelliJ introduced just to use it…

I really have no idea how you did this, but it took me literally just two minutes to import https://github.com/SkyAphid/ClearDialogue into my IntelliJ. There are some dependencies missing, but cross references between two (unrelated) maven projects work just fine for me. My guess really is, that you did something wrong, then threw a bunch of “i don’t care, fix it” actions on it and expected everything to work. I checked it with HEAD and with commit 2fc627a829ff60bf20d23e7b40591f27962aec21, both worked.

[quote]Also those inspection warnings disappeared after I did this too. It was just completely misinterpreting the dependencies. The support for local project dependencies in general is a bit shoddy since from what I understand it’s a bit new.
[/quote]
The inspections probably run concurrently, so they analyse the current state. If your current state is broken, what do you expect the inspections to do? And I also don’t know how you configured “local project dependencies” - As said, I tried it with your project and it worked after two minutes. A better way than having the IDE configuring something on top of an already existing build tool: why not just use the build tool and standard configurations to make the dependencies happen?! Maven is capable of multi module projects and that is what should be used here. Alternative would be gradle, where multi project support is even better. You use neither, is there any reason for this?

[quote]Anyway there’s nothing wrong with ranting considering I already filed all of the bug reports and posted my question to Stack/answered it myself to help the community.
[/quote]
yea sorry, links or it didn’t happen…

[quote]People who aren’t openly critical of bugs, especially when it comes to software that’s hundreds of dollars a year, really are essentially the bootlickers of the programming world.
[/quote]
Than it’s very good that I am not this person you describe. But I can give you the info that IntelliJ community is free and open source, I guess you haven’t paid a cent for your little experiment, have you.

[quote]EDIT 2: This article basically captures my feelings perfectly: https://techblog.bozho.net/still-prefer-eclipse-intellij-idea/
[/quote]
hahaha who would have guessed that… this fits so perfectly…this post is literally an exclusive list of things that are not true from a person that complains about anything that is differend and doesn’t fit a workflow that was shaped by eclipse usage 10 years long, oh what a wonder…most of them are debunked in the comments already. I think only a single one (“there is a lag I can’t describe better”) can’t be proven wrong…

[quote]EDIT 3 (BONUS): I had to configure every project I have initially just to get it to load into IntelliJ correctly. After that, I still had to do a lot of configuring to get it to even accept projects with other projects as dependency. And after that, it was still a pain to use since you have to have them in separate windows.
[/quote]
Why do so many people keep telling this bullshit with different windows? Like… how much easier could it be to just google how to do it. You can open two projects in the same window, I did it minutes ago with your project. But maven’s project is IntelliJ’s module and you have one Project (as in “this is my current job”) that contains multiple modules. It’s comparable to eclipse’s workspaces concept, but my impression is that you simply don’t want to know how it works.

EDIT: Look, I invested my time here and I regret it, but I really don’t care any further whether you grow, learn, your development workflow is fine or efficient, or if you will ever be able to use another tool than eclipse… I think I gave more than enough hints and help, if it’s still not clear, let’s just skip further conversation, time is precious.

Started a hitori game with solver, generator etc =)

I got moved to be strictly audio QA at Volition. So if the sound sucks in this game we’re making, you can blame me.

Experimented a bit more with VK_NV_ray_tracing. Implemented the methods to triangulate a voxel model as mentioned on https://medium.com/@fogleman/voxel-rendering-techniques-fa8d869457ca and created a single bottom-level acceleration structure from this 128x32x128 voxel triangulation. The results so far are a step back from what I’ve already got with OpenGL demos. It’s just that writing Vulkan instead of OpenGL code is so much more tedious and explicit. If only there was NV_ray_tracing for the OpenGL API…
Video:

dLOtOpX2ek8

(no spatial or temporal noise filtering yet; and that correlated noise/sampling pattern is really screwing with the video codec)

EDIT: Played with texturing and alpha-tested transparency:

Yuyc9M-dAMs

EDIT 2: Colored materials and emissive blocks:

Bruh you got way too toasty over this lol. I wasn’t trying to imply you were one of the bootlickers I mentioned (I was speaking in general), but you still shouldn’t get so defensive over an IDE. It’s just a tool. Having sentimentality toward your tools can lead to trouble.

Also the reason you were able to import it was because I fixed the project… In Eclipse. I hate to be rude, but I have nothing to prove to you either. So I’m not gonna respond to the rest of your post since I don’t want to instigate an argument or anything.

For those of you having issues with Eclipse: I’m just posting my experience on here so that people can see that IntelliJ really isn’t all that great as people say it is - it may work for some people, but since I moved back to Eclipse I’ve gained a new appreciation for it. All of the issues I was having with exporting were cured by just improving my Maven setup, so I wish I had known to just do that instead of trying to move to IntelliJ since the IDE itself was a pretty big waste of time for me. If you’re having issues with getting your project to export with the latest Java versions, you can actually get it to work nearly perfectly by setting your Maven configuration up to be more specific by adding more parameters to the pom. Once I did this, I stopped having my problems.

I still need to work out the exporting, and I’ll probably take a look at philfreis materials on that soon and maybe help out if I can (though it looks like he’s not having any trouble since he’s an absolute wizard). As of right now, I’m able to get runnable JARs working perfectly with OpenJDK11 just by using Eclipse’s tool. Before, it’d give me a lot of errors when I did that. So I’ll have to investigate more of what I’m doing differently.

Some more notes on IntelliJ: I did enjoy the amount of customization it had, it was just that I was spending too much time playing with the IDE itself and not enough time actually programming. That’s a common pitfall with tools. Sometimes people get wrapped up in playing with it because it has tons of cool bells and whistles, but I’m more concerned with something simple and reliable that tends to just work out of the box - especially tools that work out of the box even when you cobble together quick tests and what-not. IntelliJ’s constant complaining about small inane annoying stuff (and the fact that this nagging will actually halt your compilation) was hindering development because IntelliJ’s compiler is noticeably slower than Eclipse’s, even with the Eclipse compiler itself enabled. Not to mention the error catching appears to not be as good (from what I understand, there’s no way to improve this - you either have to open the files to see errors or wait for the compiler to report them). It has all of these annoying, almost irrelevant inspection warnings that pollute my screen - but then the error handling itself sucks.

It made me feel like I was programming with a nagging spouse. “Well just turn those inspections off!” - Yeah, let me spend like five hours tweaking it to not complain that I forgot to do the dishes before programming. Lmao

Just started working at Manhattan Associates today. Seems pretty cool!

Added multiple importance sampling of rectangular area lights. Generating equal-area samples on a rectangle is very simple, but getting the probability density function right for an arbitrary sample direction took me like four hours… and essentially was a mistake in computing whether a point is inside of a rectangle, for which I now wrote this (probably slow) GLSL function:


/**
 * Determine whether the point 'p' lies inside of the rectangle
 * with corner 'c' and spanning vectors 'x' and 'y'.
 *
 * @param p the point to test
 * @param c the corner of the rectangle
 * @param x the local X axis of the rectangle
 * @param y the local Y axis of the rectangle
 * @returns true iff 'p' lies inside of the rectangle; false otherwise
 */
bool inrect(vec3 p, vec3 c, vec3 x, vec3 y) {
  vec2 pd = (inverse(mat3(x, y, cross(x, y))) * (p - c)).xy;
  return all(greaterThanEqual(pd, vec2(0.0))) && all(lessThan(pd, vec2(1.0)));
}

So this first transforms the point into the local coordinate system of the rectangle and then performs a 2D (is inside unit rectangle) test.
This allowed to produce this MIS-sampled image:

It uses balance-weighted multiple-importance sampling with the first distribution sampling the light source (the elongated rectangle) using area sampling of the light source, and the second distribution being a simple cosine-weighted hemisphere sampling.
It’s a good feeling when the math finally works out and a multiple-importance sampled image converges to the exact same result as a simple uniform hemisphere-sampled image (which is always my trusted reference sampling method).

EDIT: Added an OpenGL 4.3 demo to the lwjgl3-demos repository (https://github.com/LWJGL/lwjgl3-demos/commit/10bfc1378dec2d4dcbcaf16f82c9ea65124d797b)

EDIT2: Thinking a bit more about point in 3D rectangle testing, there is a much cheaper method: Just project the point to be tested onto the spanning/side vectors of the rectangle (and not transform the whole coordinate system) and check the lengths of the projections:


bool inrect(vec3 p, vec3 c, vec3 x, vec3 y) {
  vec2 xyp = vec2(dot(p-c, x), dot(p-c, y));
  return all(greaterThanEqual(xyp, vec2(0.0)))
      && all(lessThan(xyp, vec2(dot(x,x), dot(y,y))));
}

I made some incremental progress with my engine/game over the last few weeks, i didn’t have much time to work on it though, yesterday i defended my bachelors thesis, so in like a week or so i finally get my B.Sc degree in in “Information and Communication Technology”, you can imagine how little time was left for programming.

Here’s some screenshots of the engine running on a crusty thinkpad t420 with Intel HD3000 at 60 fps with 100 Terrain tiles and 20500 sprites on screen, i think i got the performance very near to where i where i want it to be but there’s still some potential to be unlocked:

[Right click->Open Image in new Tab!]

Here’s a new Bunker sprite/model i made in a hurry, it still needs some detailing:

Edit: What’s up with the forum? I get database errors at almost every second visit…

[quote]Edit: What’s up with the forum? I get database errors at almost every second visit…
[/quote]
Yeah, and it said that admin is asleep… lucky admin…

He shall sleep for a thousand years, and then one day he shall rise again, and we shall take back the lost lands and so shall begin the golden age.

Cas :slight_smile:

Today I added blue noise sampling instead of white noise sampling, which I used so far. It was difficult to get consistent results over many accumulated samples. Visible patterns started to creep in after a few hundred samples. The main problem was the discretization of the blue noise texture only having 256 values for each of the three channels I needed, so adding an offset to the sampled texel values based on elapsed time helped there. Animating blue noise over time also seems like a challenging problem still. Nevertheless, after applying the time-based offset to the values and also offsetting the sample coordinates based on white noise (per frame and per ray bounce) gave consistently good results.
Here are two images showing the first sample of white noise (left) and blue noise (right) sampling.

The right one is arguably more pleasing.

Yeah, and it said that admin is asleep… lucky admin…
[/quote]
Seriously though… I haven’t been able to update my avatar on here in months because the forum seems to be a bit broken.

God I hope he comes back some day and saves us all. I love this forum and community to death, but the forum software really does need some love. I’d seriously kill to see it revamped to something more modern. I’m worried that the community is going to slowly die unless the site gets fixed, which would seriously suck since this is the community I care most about on the internet. If you could have a home on the internet… This would totally be mine.

No homo but I love all you guys lol

It’s nice to see so many people still around on JGO, I’ve been absent for months/years at a time a lot but every now and then I pop by to see what’s brewing. Really miss the community, just haven’t had nearly as much time to program since I’m not as young a kid anymore.

With high school being done for a year and myself getting settled into a routine with my job, I’ve started to port TritonForge to libgdx and feel out whether I’ll have time to reboot the project or not. Fingers crossed that I will, cause I’ve definitely gotten a lot smarter and better at programming even without being as active as before.

On another note, how is everyone doing? I’d love to see if anyone who remembers me is up to something cool, or just anyone in general! The WIP board isn’t as active as it once was, but i know there’s still many Java’ers out there having fun and creating.

:smiley:

EDIT: I second what was said about the website, hopefully the software gets some attention

Hi guys. Not very java related but i need your feedback.
I want a new logo for bitbotz.
These 2 logos are my 2 finalists.

@BitBotz The right one is better imo.

The one on the left reads better.

[quote]He shall sleep for a thousand years, and then one day he shall rise again, and we shall take back the lost lands and so shall begin the golden age.
[/quote]
I will be roaming the land(mostly taverns) until that day.

[quote]The one on the left reads better.
[/quote]
I agree.

Thank you guys for your feedback.
Most people that i asked, voted for the left one.
I think i have a winner :wink: