Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU: Audio Processing using ShaderNode #24918

Merged
merged 9 commits into from
Nov 14, 2022

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Nov 6, 2022

Description

Pitch and delay effects.
Adjustments in GUI panel.

Soon is possible add this feature in NodeEditor.

Live

https://raw.githack.com/sunag/three.js/dev-audio-processing/examples/webgpu_audio_processing.html

This contribution is funded by Google

@sunag
Copy link
Collaborator Author

sunag commented Nov 6, 2022

/cc @mrdoob

@sunag sunag marked this pull request as ready for review November 6, 2022 13:30
@sunag sunag added this to the r147 milestone Nov 7, 2022
@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 7, 2022

Would it be possible to add a small visual feedback to the example? Maybe something like webaudio_visualizer that visualizes the audio in some way?

@mrdoob
Copy link
Owner

mrdoob commented Nov 11, 2022

Agreed that it would be nice to have a visualizer. Or a play button at least... 😅

I think webgpu audio processing could enable good 3d audio spatialization and wall occlusion for VR 🔥

@sunag
Copy link
Collaborator Author

sunag commented Nov 11, 2022

@Mugen87 @mrdoob What do you think now?

const spectrum = mul( texture( analyserTexture, viewportTopLeft.x ).x, viewportTopLeft.y );
const backgroundNode = mul( color( 0x0000FF ), spectrum );

image

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 11, 2022

Much better 😊 !

@sunag
Copy link
Collaborator Author

sunag commented Nov 11, 2022

@mrdoob Exactly, I will try to finish too my lip sync to three.js next year for any file format :)
I created it nine years ago, but even today it would be useful, mainly for VR avatars.

https://www.youtube.com/watch?v=rfuGqHR2MK8

@Mugen87 Mugen87 merged commit ac30ce0 into mrdoob:dev Nov 14, 2022
@sunag sunag deleted the dev-audio-processing branch November 16, 2022 21:44
0b5vr added a commit to three-types/three-ts-types that referenced this pull request Dec 19, 2022
0b5vr added a commit to three-types/three-ts-types that referenced this pull request Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants