Files
godot-demo-projects/audio/generator
Hugo Locurcio 4d49bbd1b8 Update demos for Godot 4.4
- Resave all files with Godot 4.4 to make use of script/shader UIDs.
- Use AgX tonemapping in all demos that used a tonemapper other than Linear.
2025-03-21 02:00:41 +01:00
..
2025-03-21 02:00:41 +01:00
2025-03-21 02:00:41 +01:00

Audio Generator

This is a demo showing how one can generate and play audio samples from GDScript. It plays a simple 440 Hz sine wave at 22050 Hz.

Language: GDScript

Renderer: Compatibility

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2759

How does it work?

It uses the push_frame() method on an AudioStreamGeneratorPlayback object, which is inside of an AudioStreamPlayer node, to generate audio frame-by-frame based on pulse_hz.