godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.1k stars 69 forks source link

Add a visual graph system for audio effects and, post - proc . . . . #2846

Open charlesmlamb opened 3 years ago

charlesmlamb commented 3 years ago

Describe the project you are working on

A Tomb raider game . . .

Describe the problem or limitation you are having in your project

I was thinking, there's visual shaders and, Visual script, I use it as an artist and, prototyper, for fast interation, really amazing stuff . . . I was thinking, it might make sense to do the same for audio, so one could sort of add effects, etc . . and, similar to visual shaders where one can preview the result, one could play-back the audio, that results . .

I'm not sure what things should be possible, but stuff like adding, layering and, subtracting audio, to create unique effects . . Also, to add post-proc and, MAY-BE filtering . . . Idea is, one moves an audio resource in, and can work on it, faster . . .

2021-06-09 1401

Idea is it's like a graph editor system, that works with audio resources . . The buttons allow one to play, up to that point, or solo a node, etc . . . Well, it's an idea, seems it's missing, atm . .

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Sort of, a graph for, ' compositing ' and, ' tweaking ' audio, faster, and allowing to create complex effects, where each effect in the chain, could be called from code, to create complex audio systems fast, and more easily ' see ' the results, or so, thx . . . .

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Like the above, right now the Visual shader graph is a big help for non - coders, was thinking this might give a modular control over the 'audio' system, and allow one to create interesting effects faster, esp. if each resulting box could be called, from code . . Last, if one could sort-of, ' save ' each step, to a ' composite ' audio resource, that might be difficult, it might run really well, and one could have all audio effects, for a character, in a simple graph, mostly for ' Visual artists ', or so . . . Idea is it, will be flexible, and make it easier to work with effects, layer them etc etc . . .

If this enhancement will not be used often, can it be worked around with a few lines of script?

I can't do this, this is a very rough proposal, like my hope is, the engine gurus can look at it, and see if it's 'any' good, thx <3 . . . .

Is there a reason why this should be core and not an add-on in the asset library?

Just an, idea, so many things are getting a more 'visual' editor, might be possible to do the same, with audio, for faster iterations, prototypes, early work . . And, it might be useful, at some later stages, don't really know, thx . . . <3 . .

charlesmlamb commented 3 years ago

Ok, one might add a sort of, ' frequency ' preview, like for shaders, that prob. won't help, so haven't 100 % thought it, through . . .

2021-06-09 1416

Since it doesn't really make sense, or so . . might NOT be 'best' idea . . .

Like, there's no 'visual' help in looking at ' frequencies ' as such, for audio it makes more sense to be able to ' hear ' it, hence play buttons, or so . . . <3

Also, since all the calculations could be CPU intensive, saving each resulting ' effect ' step to a physical .ogg, might be good . . .

Last, one could add some amazing nodes, like ADD, SUBTRACT, MULTIPLY, and some ' cool ' stuff, not sure . . . .

I use the visual features a ton, almost 98 %, what I DON'T know is :(( if it's just easier to do this, in some audio software, or if this would be faster, total noob . . . Thx <3 . . .

ADD: The use-case I have is, player walks into a big room, with echo . . So, I can use the graph, to make a transition, based on distance to room, so instead of there being echo, or no echo, there's a gradual move, or so . . Thx . . . .

Also, suppose there are a ton, of people walking somewhere, so I can sort of set, it only plays 50 %, of the steps, to save resources, and quickly test, if it ' lowers ' realism, 'fidelity ' . . . Thx <3 . .

These are just noob suggestions, haven't really worked with audio, at 'quality' level so, this might be rather dumb, thx . . . .

ADD: One could add effects, like SQUARE, SINE, SAW, or CLIP <3 . . .

Idea is it, can be called from code, in a complex way and, it's SUPER - customizable, based on a modular and, sequential system <3 . .

Here's an example . . 2021-06-09 1437

However, idea is one could tie to code, same way one can connect shader, to world coordinates, to get an advanced audio effect generator that, could react with and, send well signals, to the engine . . .

I guess GPU's have shaders, not sure if one could use multi-threading or, make some GPUAudioshaders, that did SOME effects, on the GPU . .

Technically, a .wav is a bunch of points, on a line, so if one could do shader stuff, like adding them, subtracting them, it might be fast . . . .

2021-06-09 1443

I don't really know, how .wav work, I think it's like a single-pixel grey-scale image or, could be converted, so one could use the GPU, for simple audio effects, not sure . . . . Thx <3 . . .

charlesmlamb commented 3 years ago

So, idea is, some foot-ball players run from the training room, to the stadium, one has recording of cheering crowd, one recording . . . As player moves closer to stadium, one removes some effects, to get a ' smooth ' blend or, so . . .

https://www.youtube.com/watch?v=-Merz37KLEA Cheering crowd . .

In the graph editor, if one could move properties to an animationplayer, such a reverb strength, so on . . . One could create a ton of impressive effects, with just one sample, ie. the cheering crowd, well, it's an idea . . . <3

Also, for generating 'correct' sounds, for Star Wars space combat . . .

https://www.youtube.com/watch?v=6NvfGwmW01U

Might be cool, if it was possible, dobbler effect, for moving objects, even, at least for small levels . . . .

Last, if .wav are just some pixels, on a line, ie. the 'height' at any time, one could convert that line, into a more 'square' texture and, work with it, using the GPU <3 . . .

And, one might be able to make some approximate shaders, that did reverb, at least adding, or so . . . <3

Idea is, same way one can have 1000 CPU particles, but 1.000.000 GPU particles, one might be able to have say, 50.000 audio effects running, on the GPU, it's next - gen stuff, not sure, it's possible . . . :O :O . . .

mrjustaguy commented 3 years ago

No one will hear 50k audio effects.. Hell I doubt there'd be many that would be able to tell the difference between more than 10 audio effects running at the exact same time, let alone 100+ so why the hell bother? It's inefficient and just a Waste of processing power, and as such electricity..

Also as a side note, People are working really hard trying to figure out how to reduce the amount of particles and triangles rendered while preserving any of the effects the extra particles and triangles can give off, there's really no point in rendering more stuff then there are pixels to display that stuff.. You do know that right? While it might be impressive to say that you're drawing 50 billion triangles at 4k, it's actually more impressive to get the same picture with less triangles, like 5m drawn triangles for a 4k frame.

Quality>Quantity, It's more efficient, should preform much better.

charlesmlamb commented 3 years ago

Ok, I wasn't sure this was a good idea, I thought it would be really cool, esp. the custom audio set-ups, I guess what I don't know is, if it would be better to set it up, in an external program, and have some ' from one angle ' audio, and use pre-rendered animations, or to have a more custom way, of setting it up, so the player can dynamically ( from code ) make advanced sound stuff, or so . . .

Original idea was, we have visual shaders, there's visual script and, I heard some-one say, we're getting a visual editor for particles, so one can make 'custom' particle systems . . .

So, dumb as I am, I saw down and thought, where else would one might want to add some visual editor, and the last place, I can think of, not really anywhere else, is in audio, where one could make very custom audio set-ups, for each game, and where one could add nodes, to the audio graph editor, like 'WORLDCOORDINATE', or so . . . So, one could make audio fast, that was 'synced' to game-play or, other stuff . . . I just see it done with shaders, visual script, I think the same will happen, for particles . . So, I just though, might be nice to have it, for ' audio ', or so . . . .